From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.6912.1643375808590849172 for ; Fri, 28 Jan 2022 05:16:48 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 78F3E12FC; Fri, 28 Jan 2022 05:16:47 -0800 (PST) Received: from e126645.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 531D63F766; Fri, 28 Jan 2022 05:16:46 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Thomas Abraham Subject: [PATCH RESEND edk2-platforms v1 1/1] Platform/ARM: Add BootDiscoveryPolicy Date: Fri, 28 Jan 2022 14:17:03 +0100 Message-Id: <20220128131703.3256564-1-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pierre Gondois This commit adds code which check BootDiscoveryPolicy variable and calls Boot Policy Manager Protocol to connect device specified by the variable. To enable that mechanism for platform EfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy PCD must be added to DSC file. For the edk2 repository, commit cae735f61328 ("ArmPkg: Enable boot discovery policy for ARM package.") adds a mechanism to check for the boot discovery policy. When the following are available: - gEfiBootManagerPolicyProtocolGuid protocol - BOOT_DISCOVERY_POLICY_VAR variable this allows to choose whether devices need to be connected during boot. During boot on ARM platforms, all devices are connected if there are no valid boot options. If the UEFI shell is added as a valid boot option, some devices won't be connected. The BootDiscoveryPolicy will allow to manually configure this. For all ARM platforms, add: - BootManagerPolicyDxe module to Bds phase - BootDiscoveryPolicyUiLib to UiApp module - PcdBootDiscoveryPolicy Pcd Signed-off-by: Pierre Gondois --- Platform/ARM/JunoPkg/ArmJuno.dsc | 2 ++ Platform/ARM/JunoPkg/ArmJuno.fdf | 1 + Platform/ARM/Morello/MorelloPlatform.dsc.inc | 2 ++ Platform/ARM/Morello/MorelloPlatformFvp.fdf | 1 + Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 2 ++ Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 1 + Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 2 ++ Platform/ARM/SgiPkg/SgiPlatform.fdf | 1 + Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc | 2 ++ Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf | 1 + Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc | 2 ++ Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf | 1 + Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 7 +++++++ 13 files changed, 25 insertions(+) diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJ= uno.dsc index 3b7a63b6437a..f7ce397633f6 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -362,12 +362,14 @@ [Components.common] # # Bds # + MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { + NULL|MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPo= licyUiLib.inf NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.in= f NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManagerUiLib.inf diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJ= uno.fdf index f70d30c6a9d9..c9d51c65ffdb 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.fdf +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf @@ -221,6 +221,7 @@ [FV.FvMain] # # Bds # + INF MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.i= nf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf diff --git a/Platform/ARM/Morello/MorelloPlatform.dsc.inc b/Platform/ARM/= Morello/MorelloPlatform.dsc.inc index dccd22248318..1c93246a5273 100644 --- a/Platform/ARM/Morello/MorelloPlatform.dsc.inc +++ b/Platform/ARM/Morello/MorelloPlatform.dsc.inc @@ -204,12 +204,14 @@ [Components.common] FatPkg/EnhancedFatDxe/Fat.inf =20 # Bds + MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { + NULL|MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPo= licyUiLib.inf NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.in= f NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManagerUiLib.inf diff --git a/Platform/ARM/Morello/MorelloPlatformFvp.fdf b/Platform/ARM/M= orello/MorelloPlatformFvp.fdf index 851ee3159b3d..5f2af05c8bfc 100644 --- a/Platform/ARM/Morello/MorelloPlatformFvp.fdf +++ b/Platform/ARM/Morello/MorelloPlatformFvp.fdf @@ -143,6 +143,7 @@ [FV.FvMain] INF Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeFvp.inf =20 # Bds + INF MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.i= nf INF MdeModulePkg/Application/UiApp/UiApp.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc b/Platform/ARM/N1Sdp/N1= SdpPlatform.dsc index 8dac1bc54c36..865dd04deb09 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.dsc @@ -238,12 +238,14 @@ [Components.common] FatPkg/EnhancedFatDxe/Fat.inf =20 # Bds + MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { + NULL|MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPo= licyUiLib.inf NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.in= f NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManagerUiLib.inf diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.fdf b/Platform/ARM/N1Sdp/N1= SdpPlatform.fdf index 6ede2b7fc894..09f1e0e0073b 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.fdf +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.fdf @@ -160,6 +160,7 @@ [FV.FvMain] INF Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf =20 # Bds + INF MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.i= nf INF MdeModulePkg/Application/UiApp/UiApp.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPk= g/SgiPlatform.dsc.inc index 4fe3ccf9a530..582efb0114c6 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -318,12 +318,14 @@ [Components.common] # # Bds # + MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { + NULL|MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPo= licyUiLib.inf NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.in= f NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManagerUiLib.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/Sg= iPlatform.fdf index 8227ae03330c..21eeb3706ba0 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -187,6 +187,7 @@ [FV.FvMain] # # Bds # + INF MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.i= nf INF MdeModulePkg/Application/UiApp/UiApp.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc b/Platform= /ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc index e06a2a47f091..cb9d2d4287e3 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc @@ -267,12 +267,14 @@ [Components.common] # # Bds # + MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { + NULL|MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPo= licyUiLib.inf NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.in= f NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManagerUiLib.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf b/Platform= /ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf index f98de162e634..8ca70a248d09 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf @@ -153,6 +153,7 @@ [FV.FvMain] # # Bds # + INF MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.i= nf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc b/Platf= orm/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc index cf7350649edb..8561c21fab5a 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc +++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc @@ -328,12 +328,14 @@ [Components.common] # # Bds # + MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf MdeModulePkg/Universal/BdsDxe/BdsDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { + NULL|MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPo= licyUiLib.inf NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.in= f NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManagerUiLib.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf b/Platf= orm/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf index 7635cb7a8406..a7d048273b37 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf +++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf @@ -161,6 +161,7 @@ [FV.FvMain] # # Bds # + INF MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.i= nf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/= VExpressPkg/ArmVExpress.dsc.inc index d6f31ecda42f..9f739b374c91 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc @@ -264,6 +264,13 @@ [BuildOptions] # ########################################################################= ######## =20 +[PcdsDynamicHii.common.DEFAULT] + # Possible values are: + # 0: Connect Minimal Devices + # 1: Connect Network Devices + # 2: Connect All Devices + gEfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy|L"BootDiscoveryP= olicy"|gBootDiscoveryPolicyMgrFormsetGuid|0|0 + [PcdsFeatureFlag.common] gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|TRUE gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|TRUE --=20 2.25.1