+ // Make sure we can change the desired memory attributes.\r
+ //\r
+ Status = gDS->GetMemorySpaceDescriptor (\r
+ mSmramCacheBase,\r
+ &MemDesc\r
+ );\r
+ ASSERT_EFI_ERROR (Status);\r
+ if ((MemDesc.Capabilities & SMRAM_CAPABILITIES) != SMRAM_CAPABILITIES) {\r
+ gDS->SetMemorySpaceCapabilities (\r
+ mSmramCacheBase,\r
+ mSmramCacheSize,\r
+ MemDesc.Capabilities | SMRAM_CAPABILITIES\r
+ );\r
+ }\r
+ //\r
+ // If CPU AP is present, attempt to set SMRAM cacheability to WB and clear\r
+ // all paging attributes.\r