+ \r
+ if (GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistentMemory) {\r
+ // \r
+ // Create EFI_MEMORY_DESCRIPTOR for every Persistent GCD entries\r
+ //\r
+ MemoryMap->PhysicalStart = GcdMapEntry->BaseAddress;\r
+ MemoryMap->VirtualStart = 0;\r
+ MemoryMap->NumberOfPages = RShiftU64 ((GcdMapEntry->EndAddress - GcdMapEntry->BaseAddress + 1), EFI_PAGE_SHIFT);\r
+ MemoryMap->Attribute = GcdMapEntry->Attributes | EFI_MEMORY_NV;\r
+ MemoryMap->Type = EfiPersistentMemory;\r
+ \r
+ //\r
+ // Check to see if the new Memory Map Descriptor can be merged with an \r
+ // existing descriptor if they are adjacent and have the same attributes\r
+ //\r
+ MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size);\r
+ }\r