In preparation for the ChainloadApp frontend, which needs a handful of
PCD values that differ from the package defaults, add a single opt-in
DEFINE that switches them all on together instead of changing any of
them for existing coreboot/Slim Bootloader users.

CHAINLOAD_DEFAULTS defaults to FALSE, so a plain
build -p UefiPayloadPkg.dsc is unaffected.

Under CHAINLOAD_DEFAULTS the package currently selects the HOB-driven
SerialPortLib for the AArch64 DXE and SEC phases, publishes the ACPI
MCFG range as reserved memory, forces a full INIT-SIPI-SIPI sequence
for AP bring-up on IA32/X64, enlarges the UEFI region, and makes the
GIC base PCDs dynamic so they can be taken from the ACPI MADT.

Cc: Benjamin Doron <[email protected]>
Cc: Gua Guo <[email protected]>
Cc: Guo Dong <[email protected]>
Cc: James Lu <[email protected]>
Cc: Sean Rhodes <[email protected]>
Cc: Shuo Liu <[email protected]>
Assisted-by: claude-opus-5
Signed-off-by: Alexander Graf <[email protected]>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 07fbc3fbf9..38240e4e40 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -72,6 +72,17 @@
   DEFINE UNIVERSAL_PAYLOAD            = FALSE

   DEFINE UNIVERSAL_PAYLOAD_FORMAT     = ELF

 

+  #

+  # Enable defaults suited to the ChainloadApp frontend:

+  # MCFG published as reserved memory, endpoint PCI BARs left at zero

+  # by the outer firmware programmed before PciBusDxe runs, full

+  # INIT-SIPI-SIPI for the first AP wakeup, a larger UEFI region, and

+  # on AArch64 the HOB-driven SerialPortLib plus MADT-derived GIC

+  # bases.  Left FALSE so that coreboot/Slim Bootloader users are

+  # unaffected.

+  #

+  DEFINE CHAINLOAD_DEFAULTS           = FALSE

+

   #

   # NULL:    NullMemoryTestDxe

   # GENERIC: GenericMemoryTestDxe

@@ -594,6 +605,10 @@
   ## Whether capsules are allowed to persist across reset.

   
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|$(CAPSULE_SUPPORT)

 

+!if $(CHAINLOAD_DEFAULTS) == TRUE

+  gUefiPayloadPkgTokenSpaceGuid.PcdPublishMcfgAsReservedMemory|TRUE

+!endif

+

 [PcdsFeatureFlag.X64]

   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE

   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE

@@ -669,6 +684,12 @@
 

   ## Whether allows PCI RB to allocate DMA memory above 4GB

   gUefiPayloadPkgTokenSpaceGuid.PcdPciAllocateMemoryAbove4GB|FALSE

+!if $(CHAINLOAD_DEFAULTS) == TRUE

+  # Note: gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize is a

+  # different PCD with the same name; UefiPayloadEntry consumes only the

+  # gUefiPayloadPkgTokenSpaceGuid one below.

+  gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x10000000

+!endif

 

 [PcdsFixedAtBuild.AARCH64]

   # System Memory Base -- fixed at 0x4000_0000

-- 
2.47.3



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#122093): https://edk2.groups.io/g/devel/message/122093
Mute This Topic: https://groups.io/mt/120797257/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to