mirror of https://github.com/acidanthera/audk.git
QuarkSocPkg/SmmAccessDxe: Set region to UC on SMRAM close
The following commit removed the unconditional UC setting
just prior to closing the SMRAM region. This is a correct
change for most platforms.
bfc87aa78e
The Quark platforms still require this UC setting, so move
the UC setting into the Quark specific SMM Access Protocol
when the Close() service is called.
Cc: Kelly Steele <kelly.steele@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
This commit is contained in:
parent
c793d24b01
commit
0edaa8c162
|
@ -1,7 +1,7 @@
|
|||
## @file
|
||||
# Component description file for SmmAccess module
|
||||
#
|
||||
# Copyright (c) 2013-2015 Intel Corporation.
|
||||
# Copyright (c) 2013-2019 Intel Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
|
@ -34,6 +34,7 @@
|
|||
S3BootScriptLib
|
||||
UefiDriverEntryPoint
|
||||
UefiBootServicesTableLib
|
||||
DxeServicesTableLib
|
||||
PcdLib
|
||||
SmmLib
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
This is the driver that publishes the SMM Access Protocol
|
||||
instance for the Tylersburg chipset.
|
||||
|
||||
Copyright (c) 2013-2015 Intel Corporation.
|
||||
Copyright (c) 2013-2019 Intel Corporation.
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
|
@ -221,6 +221,7 @@ Returns:
|
|||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
SMM_ACCESS_PRIVATE_DATA *SmmAccess;
|
||||
BOOLEAN OpenState;
|
||||
UINTN Index;
|
||||
|
@ -239,6 +240,21 @@ Returns:
|
|||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// Reset SMRAM cacheability to UC
|
||||
//
|
||||
for (Index = 0; Index < mSmmAccess.NumberRegions; Index++) {
|
||||
DEBUG ((DEBUG_INFO, "SmmAccess->Close: Set to UC Base=%016lx Size=%016lx\n", SmmAccess->SmramDesc[Index].CpuStart, SmmAccess->SmramDesc[Index].PhysicalSize));
|
||||
Status = gDS->SetMemorySpaceAttributes(
|
||||
SmmAccess->SmramDesc[Index].CpuStart,
|
||||
SmmAccess->SmramDesc[Index].PhysicalSize,
|
||||
EFI_MEMORY_UC
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_WARN, "SmmAccess: Failed to reset SMRAM window to EFI_MEMORY_UC\n"));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Close TSEG
|
||||
//
|
||||
|
|
|
@ -3,7 +3,7 @@ Header file for SMM Access Driver.
|
|||
|
||||
This file includes package header files, library classes and protocol, PPI & GUID definitions.
|
||||
|
||||
Copyright (c) 2013-2015 Intel Corporation.
|
||||
Copyright (c) 2013-2019 Intel Corporation.
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
@ -21,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/DxeServicesTableLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue