From owner-svn-src-head@freebsd.org Thu Sep 7 06:52:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC8B6E0B9FA; Thu, 7 Sep 2017 06:52:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.161.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F7AE7F7CD; Thu, 7 Sep 2017 06:52:05 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yw0-f181.google.com with SMTP id w204so27796831ywg.3; Wed, 06 Sep 2017 23:52:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=uhi2JO4AjaRPyWRTq7cUI7ZL82yaqq4A/eKFQ5uM0VE=; b=YDLhoeRLhGSQRv+2oMok4AWOWwyZz6jaEKDOENV+7dSbdOISlOiRdI4DV70Biys5+I Wxqbyr3r7DkkqIyQzvKWFEyQJUIT6JWPjbCalaOH4NUpwheuUTo7bIdIDRo+LL0D6nZZ zplu/G6usglFQnw1oHKjLCJvcrYQW4qlnDYPEUBM71zKko9dQD+vSExNZNODOjPC+Uke a8zeoHZtYybnRyxtkOEEDFzWX2OPS3gfVqnWeKQaLdBHYUXJ5ItVeadBpn4higOOZQPx oGKCx5183qXNKdhjmsCp4hq0x1o7OKZBvev0pHlz0kb9vzVh/xf1xFM2my/E9zCGXycj Y43A== X-Gm-Message-State: AHPjjUgAXfqPg3csTBOCLxLxeKR3u/7jMvvb/xubqLKWAJU+rGNKy2ET hBAGzYCvHDBOtHFZdnI= X-Received: by 10.37.165.5 with SMTP id h5mr1279075ybi.68.1504765503336; Wed, 06 Sep 2017 23:25:03 -0700 (PDT) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com. [209.85.214.51]) by smtp.gmail.com with ESMTPSA id v11sm610567ywa.46.2017.09.06.23.25.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Sep 2017 23:25:02 -0700 (PDT) Received: by mail-it0-f51.google.com with SMTP id f199so16259152ita.1; Wed, 06 Sep 2017 23:25:02 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6QIJh1V/2lNFd49dV1E4rzEfHD4CMsQKoR7swVijE9luXGMNJVX3N7Cph5hJpoGQkOB6KuNAIu+/0AVKiDDkY= X-Received: by 10.36.141.67 with SMTP id w64mr2604421itd.8.1504765501835; Wed, 06 Sep 2017 23:25:01 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.81.131 with HTTP; Wed, 6 Sep 2017 23:25:01 -0700 (PDT) In-Reply-To: <201708311732.v7VHWEvs037245@repo.freebsd.org> References: <201708311732.v7VHWEvs037245@repo.freebsd.org> From: Conrad Meyer Date: Wed, 6 Sep 2017 23:25:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323063 - head/sys/boot/efi/boot1 To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 06:52:08 -0000 This seems to break world on ARM due to the size difference CHAR16 vs ARM wchat_t (currently 32-bit in loader, apparently). Best, Conrad On Thu, Aug 31, 2017 at 10:32 AM, Warner Losh wrote: > Author: imp > Date: Thu Aug 31 17:32:14 2017 > New Revision: 323063 > URL: https://svnweb.freebsd.org/changeset/base/323063 > > Log: > boot1.efi: print more info about where boot1.efi is loaded from > > Print the device that boot1.efi was loaded from. Print the path as > well (since it isn't included in DeviceHandle). Move block where we do > this earlier so all the block handle code is now together. > > Sponsored by: Netflix > > Modified: > head/sys/boot/efi/boot1/boot1.c > > Modified: head/sys/boot/efi/boot1/boot1.c > ============================================================================== > --- head/sys/boot/efi/boot1/boot1.c Thu Aug 31 17:32:09 2017 (r323062) > +++ head/sys/boot/efi/boot1/boot1.c Thu Aug 31 17:32:14 2017 (r323063) > @@ -344,6 +344,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) > EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; > SIMPLE_TEXT_OUTPUT_INTERFACE *conout = NULL; > UINTN i, max_dim, best_mode, cols, rows, hsize, nhandles; > + CHAR16 *text; > > /* Basic initialization*/ > ST = Xsystab; > @@ -387,6 +388,27 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) > } > putchar('\n'); > > + /* Determine the devpath of our image so we can prefer it. */ > + status = BS->HandleProtocol(IH, &LoadedImageGUID, (VOID**)&img); > + imgpath = NULL; > + if (status == EFI_SUCCESS) { > + text = efi_devpath_name(img->FilePath); > + printf(" Load Path: %S\n", text); > + efi_free_devpath_name(text); > + > + status = BS->HandleProtocol(img->DeviceHandle, &DevicePathGUID, > + (void **)&imgpath); > + if (status != EFI_SUCCESS) { > + DPRINTF("Failed to get image DevicePath (%lu)\n", > + EFI_ERROR_CODE(status)); > + } else { > + text = efi_devpath_name(imgpath); > + printf(" Load Device: %S\n", text); > + efi_free_devpath_name(text); > + } > + > + } > + > /* Get all the device handles */ > hsize = (UINTN)NUM_HANDLES_INIT * sizeof(EFI_HANDLE); > if ((status = BS->AllocatePool(EfiLoaderData, hsize, (void **)&handles)) > @@ -421,24 +443,6 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) > nhandles = hsize / sizeof(*handles); > printf(" Probing %zu block devices...", nhandles); > DPRINTF("\n"); > - > - /* Determine the devpath of our image so we can prefer it. */ > - status = BS->HandleProtocol(IH, &LoadedImageGUID, (VOID**)&img); > - imgpath = NULL; > - if (status == EFI_SUCCESS) { > - status = BS->HandleProtocol(img->DeviceHandle, &DevicePathGUID, > - (void **)&imgpath); > - if (status != EFI_SUCCESS) > - DPRINTF("Failed to get image DevicePath (%lu)\n", > - EFI_ERROR_CODE(status)); > -#ifdef EFI_DEBUG > - { > - CHAR16 *text = efi_devpath_name(imgpath); > - DPRINTF("boot1 imagepath: %S\n", text); > - efi_free_devpath_name(text); > - } > -#endif > - } > > for (i = 0; i < nhandles; i++) > probe_handle_status(handles[i], imgpath); >