From owner-svn-src-head@freebsd.org Tue Sep 5 13:33:28 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 297E1E09BC5 for ; Tue, 5 Sep 2017 13:33:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (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 D77AD69F62 for ; Tue, 5 Sep 2017 13:33:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x229.google.com with SMTP id b2so16281687iof.1 for ; Tue, 05 Sep 2017 06:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MmGDQ+M6hq37lgX41RxPE+wy0p7icX9WjkSinybI0Eo=; b=lIP+RCR3U5KHigWgeXeImC8LDTr+PkL2pWjdvNT0rv5QDCWYTt5kh+y3BYdN4JC+qA wK/cnQM9yTycH0b+9te46c5foy14DfOIrO2IKMUE8JCzzFAmAE3FBwZqPIWsCOF0DY2x S1nTYXQ60Qv1fmvy/CIFq+zcsoyoq/GxwX5C9OnHl6QgAf1jpAdc0eODARTBf/DFlKk1 GDFqGiOSa/RWRMvVcf2EXwaN0jhVzbYGR3VLZWyRc4S8HKcSQR3pDNX/azT2CK62jBQP hfIZkhCoqajw/TtrWb72bO/FZV0bosgkUEEvYdOEHKQdfEx6Judua3mNMzLTYudF/6Ky g7cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MmGDQ+M6hq37lgX41RxPE+wy0p7icX9WjkSinybI0Eo=; b=RHXouOsMPXGM2xKGX1D1JTQMTWJC2hdtt69A/j+pcP/qlPCtstQdP5B9rV8C1c5Wvv WckYFfPB9oQG4y7mNkKzkEtCZEeHT/dWciUDNhgq7P2Xfme7mQUh7fZGaXW6nIgz1ZFv FTbaIBaRIelPd2fwGNsh1woKfO6hoc9qho/R2IBuuR6TFLlSyIIMC59CPk1YkkQAIZx6 YoxyAfW7a6hvJRNFTVpdnNZNGWrDY+civfKIHh6fuFf05PObdjE0tvMNLldDiufcfYna GIrZwnuojYiMFgB7IkFXxIve/jCueWhyDBzu9GVcJOzQpZPHm+KZ5QVbeL3Yv+6SN5p3 jwkw== X-Gm-Message-State: AHPjjUgjoSx4ATMB/39OKcIeuideMZCjXlVgDcpgG8NUoImqTUGqgqOv AfMNKJBIUnVRmZQow24hzOQjPtg9F6J5 X-Google-Smtp-Source: ADKCNb65UIgpvzxk5gTPAU43tqycDhdwiqwc13k+qDGqR16Kcwdm4y0hBvONMzRdNiQHXwMbEiju+3Ud3IA8sPiFCJ0= X-Received: by 10.107.35.208 with SMTP id j199mr4002283ioj.277.1504618406943; Tue, 05 Sep 2017 06:33:26 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Tue, 5 Sep 2017 06:33:26 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201708311732.v7VHWEvs037245@repo.freebsd.org> From: Warner Losh Date: Tue, 5 Sep 2017 07:33:26 -0600 X-Google-Sender-Auth: YwIKEB9GdHRJdROxEu7tlKSAqVo Message-ID: Subject: Re: svn commit: r323063 - head/sys/boot/efi/boot1 To: Jia-Shiun Li Cc: Warner Losh , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Tue, 05 Sep 2017 13:33:28 -0000 On Mon, Sep 4, 2017 at 11:51 PM, Jia-Shiun Li wrote: > Seems to cause armv6 crossbuild to fail. > But did armv6 use efi anyway? > > > jsli@jsli-e5:/tmp/src # uname -a > FreeBSD jsli-e5 12.0-CURRENT FreeBSD 12.0-CURRENT #59 r323150: Mon Sep 4 > 11:30:09 CST 2017 jsli@jsli-e5:/usr/obj/usr/src/sys/GENERIC-NODEBUG > amd64 > jsli@jsli-e5:/tmp/src # svnversion > 323170 > jsli@jsli-e5:/tmp/src # time nice +20 env MAKEOBJDIRPREFIX=/tmp/obj make > -sj12 TARGET_ARCH=armv6 KERNCONF=RPI2 -DNO_CLEAN buildworld buildkernel > ... > ... > ... > /tmp/src/sys/boot/efi/boot1/boot1.c:474:32: error: format specifies type > 'wchar_t *' (aka 'unsigned int *') but the argume > nt has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] > printf(" Load Path: %S\n", text); > ~~ ^~~~ > /tmp/src/sys/boot/efi/boot1/boot1.c:485:35: error: format specifies type > 'wchar_t *' (aka 'unsigned int *') but the argume > nt has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] > printf(" Load Device: %S\n", text); > ~~ ^~~~ > Yea, this is just a command line flag. Will fix. Not sure why x86 doesn't suffer from this, but it's a wchar_t size difference I'm sure. Warner > On Fri, Sep 1, 2017 at 1: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); >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> > >