// used for other purposes.\r
// \r
if (Type == EfiConventionalMemory && Start == 0 && (End >= EFI_PAGE_SIZE - 1)) {\r
- SetMem ((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);\r
+ if ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0) {\r
+ SetMem ((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);\r
+ }\r
}\r
\r
//\r
NumberOfEntries = 0;\r
for (Link = mGcdMemorySpaceMap.ForwardLink; Link != &mGcdMemorySpaceMap; Link = Link->ForwardLink) {\r
GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);\r
- if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistentMemory) || \r
+ if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistent) || \r
(GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||\r
((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) &&\r
((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME))) {\r
MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size);\r
}\r
\r
- if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypePersistentMemory) {\r
+ if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypePersistent) {\r
//\r
// Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR, \r
// it will be recorded as page PhysicalStart and NumberOfPages. \r