mirror of
https://github.com/Dasharo/edk2-upstream.git
synced 2026-06-13 19:16:19 -07:00
UefiPayloadPkg: Add PCD to control PCI DMA memory above 4GB
PCI Root Bridge is allowed to allocate DMA memory below 4GB by default, this policy does not applicable to all platform. For instance, QEMU SBSA refernce platform configure system memory base to be 0x10000000000, it makes all available memory resides above 0x10000000000. To make DmaAbove4G member of structure RootBridge flexible, use PCD to control behavior of DmaAbove4G. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
gUefiPayloadPkgTokenSpaceGuid.PcdPciReservedPMemAbove4GBBase
|
||||
gUefiPayloadPkgTokenSpaceGuid.PcdPciReservedPMemAbove4GBLimit
|
||||
gUefiPayloadPkgTokenSpaceGuid.SizeOfIoSpace
|
||||
gUefiPayloadPkgTokenSpaceGuid.PcdPciAllocateMemoryAbove4GB
|
||||
|
||||
|
||||
[BuildOptions]
|
||||
|
||||
@@ -774,7 +774,7 @@ ParsePciRootBridge (
|
||||
mPciRootBridgeInfo->RootBridge[RbIndex].PMem.Limit = PcdGet32 (PcdPciReservedPMemLimit);
|
||||
mPciRootBridgeInfo->RootBridge[RbIndex].UID = RbIndex;
|
||||
mPciRootBridgeInfo->RootBridge[RbIndex].HID = EISA_PNP_ID (0x0A03);
|
||||
mPciRootBridgeInfo->RootBridge[RbIndex].DmaAbove4G = FALSE;
|
||||
mPciRootBridgeInfo->RootBridge[RbIndex].DmaAbove4G = PcdGetBool (PcdPciAllocateMemoryAbove4GB);
|
||||
|
||||
Data32 = (UINT32 *)(PropertyPtr->Data);
|
||||
for (Base = 0; Base < TempLen / sizeof (UINT32); Base = Base + DWORDS_TO_NEXT_ADDR_TYPE) {
|
||||
|
||||
@@ -113,3 +113,6 @@ gUefiPayloadPkgTokenSpaceGuid.PcdFDTPageSize|8|UINT8|0x0000002C
|
||||
#- PcdUseUniversalPayloadSerialPort is TRUE, Serial Port parameters will be updated
|
||||
#- PcdUseUniversalPayloadSerialPort is FALSE, Serial Port parameters are fixed
|
||||
gUefiPayloadPkgTokenSpaceGuid.PcdUseUniversalPayloadSerialPort|TRUE|BOOLEAN|0x0000002D
|
||||
|
||||
## Indicates whether allows PCI Root Bridge to allocate DMA memory resource above 4G
|
||||
gUefiPayloadPkgTokenSpaceGuid.PcdPciAllocateMemoryAbove4GB|FALSE|BOOLEAN|0x0000002E
|
||||
|
||||
@@ -662,6 +662,9 @@
|
||||
gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
|
||||
!endif
|
||||
|
||||
## Whether allows PCI RB to allocate DMA memory above 4GB
|
||||
gUefiPayloadPkgTokenSpaceGuid.PcdPciAllocateMemoryAbove4GB|FALSE
|
||||
|
||||
[PcdsFixedAtBuild.AARCH64]
|
||||
# System Memory Base -- fixed at 0x4000_0000
|
||||
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000
|
||||
|
||||
Reference in New Issue
Block a user