## @file\r
# Component description file for SmmAccess module\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
S3BootScriptLib\r
UefiDriverEntryPoint\r
UefiBootServicesTableLib\r
+ DxeServicesTableLib\r
PcdLib\r
SmmLib\r
\r
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
\r
This file includes package header files, library classes and protocol, PPI & GUID definitions.\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
#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/DxeServicesTableLib.h>\r
#include <Library/PcdLib.h>\r
\r
//\r