This is the driver that publishes the SMM Access Protocol\r
instance for the Tylersburg chipset.\r
\r
-Copyright (c) 2013-2015 Intel Corporation.\r
+Copyright (c) 2013-2019 Intel Corporation.\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
\r
--*/\r
{\r
+ EFI_STATUS Status;\r
SMM_ACCESS_PRIVATE_DATA *SmmAccess;\r
BOOLEAN OpenState;\r
UINTN Index;\r
return EFI_DEVICE_ERROR;\r
}\r
\r
+ //\r
+ // Reset SMRAM cacheability to UC\r
+ //\r
+ for (Index = 0; Index < mSmmAccess.NumberRegions; Index++) {\r
+ DEBUG ((DEBUG_INFO, "SmmAccess->Close: Set to UC Base=%016lx Size=%016lx\n", SmmAccess->SmramDesc[Index].CpuStart, SmmAccess->SmramDesc[Index].PhysicalSize));\r
+ Status = gDS->SetMemorySpaceAttributes(\r
+ SmmAccess->SmramDesc[Index].CpuStart,\r
+ SmmAccess->SmramDesc[Index].PhysicalSize,\r
+ EFI_MEMORY_UC\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_WARN, "SmmAccess: Failed to reset SMRAM window to EFI_MEMORY_UC\n"));\r
+ }\r
+ }\r
+\r
//\r
// Close TSEG\r
//\r