+ Status = gDS->SetMemorySpaceAttributes (CurBase, CurSize,\r
+ EFI_MEMORY_WB);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_WARN,\r
+ "%a: gDS->SetMemorySpaceAttributes() failed on region 0x%lx - 0x%lx (%r)\n",\r
+ __FUNCTION__, CurBase, CurBase + CurSize - 1, Status));\r
+ }\r
+\r
+ //\r
+ // Due to the ambiguous nature of the RO/XP GCD memory space attributes,\r
+ // it is impossible to add a memory space with the XP attribute in a way\r
+ // that does not result in the XP attribute being set on *all* UEFI\r
+ // memory map entries that are carved from it, including code regions\r
+ // that require executable permissions.\r