From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4F4F61A1E2F for ; Sat, 15 Oct 2016 09:58:38 -0700 (PDT) Received: by mail-io0-x234.google.com with SMTP id j37so150952449ioo.3 for ; Sat, 15 Oct 2016 09:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bjd6mn/N85nvLAzZYp+r5onZ10Fo1bymbOx73DIkM3U=; b=fI0cM6i/LJUP+7L2kDUPtHN/NfThPunPYFVZkE95m1YtA31Kr6drSFq7TbSfVJPYn3 c8eZhq+1/OzukB7GPxWzcvsx4rEdDXvruFSqAtGx5uzndflyeLAEqMhhvFdh6DfaArkp Ht6kJWQenTTMu6haDgidsEp0GI/YN9Jbxiu14= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bjd6mn/N85nvLAzZYp+r5onZ10Fo1bymbOx73DIkM3U=; b=FRAjVs17nJh0yYhp9igLEIkdcWxPn3RbWr5knkH5zpjZvaKWBNSd1OgQhoeRy1ZBqr ehwT2g6Aca7fUk/r4z/oz0ym16xrV7EndizX8zCbZQJDJH1lXrFk6mmJSwg8oCu+OZ77 Bn4nQLMTRQpUI6cU27xScIKHmF1ype+XqrH1fD0r9rr8mVrRrsU70lPpuTEeVyFanaxb GWtsJhU4x89jOZzmt+pk9uenkf/h93zindYy5mFp2GT+1nzyg7atd2iPyLHjHEBNmMfp r8aAtfTFmR3sQb0h1Uwh3M9O44NJ0lNwsWkqHkqB8hHzctLXeHDwGoFrZtS6dim5Xe33 Ku/w== X-Gm-Message-State: AA6/9Rn/Pw2ikuZUvOnT8G59w5p59+uHz4xXUHroa4iLEBretLB+mCkPV5VBsFsypQMCC5sB+7VbGq2sQgclqZZb X-Received: by 10.107.34.197 with SMTP id i188mr15875882ioi.138.1476550717691; Sat, 15 Oct 2016 09:58:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.5.139 with HTTP; Sat, 15 Oct 2016 09:58:37 -0700 (PDT) In-Reply-To: <20161015165622.21996-1-lersek@redhat.com> References: <20161015165622.21996-1-lersek@redhat.com> From: Ard Biesheuvel Date: Sat, 15 Oct 2016 17:58:37 +0100 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 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 16:58:38 -0000 Content-Type: text/plain; charset=UTF-8 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 I always had a suspicion we were missing something here, but I never got around to tracking it down. Thanks for doing that. > --- > 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 >