mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
MdeModulePkg: Update DxeCore to consume PI EfiGcdMemoryTypePersistent
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
4f5687c246
commit
35ac962b54
@ -115,7 +115,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *mGcdMemoryTypeNames[] = {
|
|||||||
"Reserved ", // EfiGcdMemoryTypeReserved
|
"Reserved ", // EfiGcdMemoryTypeReserved
|
||||||
"SystemMem", // EfiGcdMemoryTypeSystemMemory
|
"SystemMem", // EfiGcdMemoryTypeSystemMemory
|
||||||
"MMIO ", // EfiGcdMemoryTypeMemoryMappedIo
|
"MMIO ", // EfiGcdMemoryTypeMemoryMappedIo
|
||||||
"PersisMem", // EfiGcdMemoryTypePersistentMemory
|
"PersisMem", // EfiGcdMemoryTypePersistent
|
||||||
"MoreRelia", // EfiGcdMemoryTypeMoreReliable
|
"MoreRelia", // EfiGcdMemoryTypeMoreReliable
|
||||||
"Unknown " // EfiGcdMemoryTypeMaximum
|
"Unknown " // EfiGcdMemoryTypeMaximum
|
||||||
};
|
};
|
||||||
@ -2416,7 +2416,7 @@ CoreInitializeGcdServices (
|
|||||||
GcdMemoryType = EfiGcdMemoryTypeReserved;
|
GcdMemoryType = EfiGcdMemoryTypeReserved;
|
||||||
}
|
}
|
||||||
if ((ResourceHob->ResourceAttribute & EFI_RESOURCE_ATTRIBUTE_PERSISTENT) == EFI_RESOURCE_ATTRIBUTE_PERSISTENT) {
|
if ((ResourceHob->ResourceAttribute & EFI_RESOURCE_ATTRIBUTE_PERSISTENT) == EFI_RESOURCE_ATTRIBUTE_PERSISTENT) {
|
||||||
GcdMemoryType = EfiGcdMemoryTypePersistentMemory;
|
GcdMemoryType = EfiGcdMemoryTypePersistent;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EFI_RESOURCE_MEMORY_MAPPED_IO:
|
case EFI_RESOURCE_MEMORY_MAPPED_IO:
|
||||||
|
@ -1635,7 +1635,7 @@ CoreGetMemoryMap (
|
|||||||
NumberOfEntries = 0;
|
NumberOfEntries = 0;
|
||||||
for (Link = mGcdMemorySpaceMap.ForwardLink; Link != &mGcdMemorySpaceMap; Link = Link->ForwardLink) {
|
for (Link = mGcdMemorySpaceMap.ForwardLink; Link != &mGcdMemorySpaceMap; Link = Link->ForwardLink) {
|
||||||
GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
|
GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
|
||||||
if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistentMemory) ||
|
if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistent) ||
|
||||||
(GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||
|
(GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||
|
||||||
((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) &&
|
((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) &&
|
||||||
((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME))) {
|
((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME))) {
|
||||||
@ -1783,7 +1783,7 @@ CoreGetMemoryMap (
|
|||||||
MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size);
|
MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypePersistentMemory) {
|
if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypePersistent) {
|
||||||
//
|
//
|
||||||
// Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR,
|
// Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR,
|
||||||
// it will be recorded as page PhysicalStart and NumberOfPages.
|
// it will be recorded as page PhysicalStart and NumberOfPages.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user