mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
UefiPayloadPkg: Add support for Special Purpose memory
We need to let UEFI know that there are cetain memory types which are special purpose (CXL/HBM) etc and we may want to avoid using them for UEFI purposes. Hence UPL needs to know about such memory types. Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
This commit is contained in:
parent
5cd9e7ce87
commit
c511663cfa
@ -236,6 +236,7 @@ ParseReservedMemory (
|
||||
UNIVERSAL_PAYLOAD_ACPI_TABLE *PlatformAcpiTable;
|
||||
UNIVERSAL_PAYLOAD_SMBIOS_TABLE *SmbiosTable;
|
||||
FDT_NODE_HEADER *NodePtr;
|
||||
UINT32 Attribute;
|
||||
|
||||
PlatformAcpiTable = NULL;
|
||||
|
||||
@ -273,6 +274,10 @@ ParseReservedMemory (
|
||||
} else if (AsciiStrnCmp (TempStr, "runtime-data", AsciiStrLen ("runtime-data")) == 0) {
|
||||
DEBUG ((DEBUG_INFO, " runtime-data"));
|
||||
BuildMemoryAllocationHob (StartAddress, NumberOfBytes, EfiRuntimeServicesData);
|
||||
} else if (AsciiStrnCmp (TempStr, "special-purpose", AsciiStrLen ("special-purpose")) == 0) {
|
||||
Attribute = MEMORY_ATTRIBUTE_DEFAULT | EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE;
|
||||
DEBUG ((DEBUG_INFO, " special-purpose memory"));
|
||||
BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, Attribute, StartAddress, NumberOfBytes);
|
||||
} else if (AsciiStrnCmp (TempStr, "acpi", AsciiStrLen ("acpi")) == 0) {
|
||||
DEBUG ((DEBUG_INFO, " acpi, StartAddress:%x, NumberOfBytes:%x", StartAddress, NumberOfBytes));
|
||||
BuildMemoryAllocationHob (StartAddress, NumberOfBytes, EfiBootServicesData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user