// set attributes and change memory paging attribute accordingly.\r
// But current EFI_MEMORY_DESCRIPTOR.Attribute is assigned by\r
// value from Capabilities in GCD memory map. This might cause\r
- // boot problems. Clearing all paging related capabilities can\r
- // workaround it. Following code is supposed to be removed once\r
- // the usage of EFI_MEMORY_DESCRIPTOR.Attribute is clarified in\r
- // UEFI spec and adopted by both EDK-II Core and all supported\r
- // OSs.\r
+ // boot problems. Clearing all page-access permission related\r
+ // capabilities can workaround it. Following code is supposed to\r
+ // be removed once the usage of EFI_MEMORY_DESCRIPTOR.Attribute\r
+ // is clarified in UEFI spec and adopted by both EDK-II Core and\r
+ // all supported OSs.\r
//\r
MemoryMapEnd = MemoryMap;\r
MemoryMap = MemoryMapStart;\r
while (MemoryMap < MemoryMapEnd) {\r
- MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK;\r
+ MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ACCESS_MASK;\r
MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size);\r
}\r
MergeMemoryMap (MemoryMapStart, &BufferSize, Size);\r