From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 570291A1E2F for ; Sat, 15 Oct 2016 10:07:53 -0700 (PDT) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D284D8EA38; Sat, 15 Oct 2016 17:07:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-11.phx2.redhat.com [10.3.116.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9FH7n0b003313; Sat, 15 Oct 2016 13:07:50 -0400 To: Ard Biesheuvel References: <20161015165622.21996-1-lersek@redhat.com> Cc: edk2-devel-01 From: Laszlo Ersek Message-ID: <689995cc-3d2a-cf6e-a8e8-a1c9cc265b36@redhat.com> Date: Sat, 15 Oct 2016 19:07:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 15 Oct 2016 17:07:52 +0000 (UTC) Subject: Re: [PATCH] ArmVirtPkg: undo bogus component name and driver diagnostics disablement X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2016 17:07:53 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 10/15/16 18:58, Ard Biesheuvel wrote: > On 15 October 2016 at 17:56, Laszlo Ersek wrote: >> The entry point function of any UEFI_DRIVER that conforms to the UEFI >> driver model must install an instance of the EFI_DRIVER_BINDING_PROTOCOL >> on the image handle. Beyond that, the following protocols are optional: >> >> - EFI_COMPONENT_NAME_PROTOCOL >> - EFI_COMPONENT_NAME2_PROTOCOL >> - EFI_DRIVER_CONFIGURATION_PROTOCOL >> - EFI_DRIVER_CONFIGURATION2_PROTOCOL >> - EFI_DRIVER_DIAGNOSTICS_PROTOCOL >> - EFI_DRIVER_DIAGNOSTICS2_PROTOCOL >> >> The UefiLib functions >> >> - EfiLibInstallAllDriverProtocols() >> - EfiLibInstallAllDriverProtocols2() >> - EfiLibInstallDriverBindingComponentName2() >> >> are convenience helpers for such UEFI_DRIVERs. They simplify the >> installation of the above protocols. >> >> The UefiLib instance in "MdePkg/Library/UefiLib/UefiDriverModel.c" allows >> platforms to control these functions through the MdePkg feature PCDs >> >> - PcdComponentNameDisable >> - PcdComponentName2Disable >> - PcdDriverDiagnosticsDisable >> - PcdDriverDiagnostics2Disable >> >> If any of these PCDs are set to TRUE, then the helper functions will not >> install the corresponding protocol interfaces on the image handle, even if >> the driver passes in non-NULL protocol interfaces. >> >> In other words, at build time, a platform can forcibly prevent all drivers >> that employ UefiLib from producing these protocols. >> >> In ArmVirtPkg, that's what we've been doing forever, for no reason at all. >> This is why we haven't been seeing component and driver names from the DH, >> DEVICES, DRIVERS and DEVTREE shell commands, unlike in OvmfPkg. >> >> The default value for all these PCDs is FALSE, in "MdePkg/MdePkg.dec". >> Revert ArmVirtPkg to the sane defaults. >> >> This bug dates back to the inception of ArmVirtPkg (called >> ArmPlatformPkg/ArmVirtualizationPkg at the time). >> >> Cc: Ard Biesheuvel >> Fixes: 6f5872b1f4013f58c6d2f446d885edd6c8ea6d21 >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Laszlo Ersek > > Reviewed-by: Ard Biesheuvel Commit 5b54c92a6537. > I always had a suspicion we were missing something here, but I never > got around to tracking it down. Thanks for doing that. It's Saturday evening after all, i.e., when I'm supposed to have fun ;) Thanks! Laszlo >> --- >> ArmVirtPkg/ArmVirt.dsc.inc | 4 ---- >> 1 file changed, 4 deletions(-) >> >> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc >> index c624b3cdbecd..c071988ad8f5 100644 >> --- a/ArmVirtPkg/ArmVirt.dsc.inc >> +++ b/ArmVirtPkg/ArmVirt.dsc.inc >> @@ -254,10 +254,6 @@ [BuildOptions] >> >> [PcdsFeatureFlag.common] >> gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE >> - gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|TRUE >> - gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|TRUE >> - gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|TRUE >> - gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE >> >> # >> # Control what commands are supported from the UI >> -- >> 2.9.2 >> > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >