summaryrefslogtreecommitdiff
path: root/Platform
diff options
context:
space:
mode:
authorGuo Mang <mang.guo@intel.com>2017-04-05 10:47:22 +0800
committerzwei4 <david.wei@intel.com>2017-04-05 13:28:23 +0800
commitf039b8ad45670a266bb06a9a480a2a8cdeb4a9d1 (patch)
treeb97d90f7c3de0fea9b10cbd1a5ab68b6167c6e9d /Platform
parent2490f90b5c8908a776e15db75a646c705464be4e (diff)
downloadedk2-platforms-f039b8ad45670a266bb06a9a480a2a8cdeb4a9d1.tar.xz
Fix several issues of S3
1. Fix "AcpiGlobalVariable" couldn't be get issue. S3 memory info was saved in this variable. 2. Override PiSmmCpuDxeSmm to fix S3 failure issue. This override can be removed after upgrading core. 3. Fix set variable failure issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'Platform')
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c2
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c15
-rw-r--r--Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc2
-rw-r--r--Platform/BroxtonPlatformPkg/PlatformPkg.fdf2
4 files changed, 11 insertions, 10 deletions
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c
index 187eb2179e..de503a372a 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c
@@ -596,7 +596,7 @@ InitSeC (
Status = gRT->SetVariable (
L"Setup",
&gEfiSetupVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS,
sizeof (SYSTEM_CONFIGURATION),
&mSystemConfiguration
);
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c
index a002bef041..854d737c21 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c
@@ -907,6 +907,7 @@ PlatformInitPreMemEntryPoint (
#endif
PEI_BOARD_PRE_MEM_INIT_PPI *BoardPreMemInitPpi;
UINTN Instance;
+ UINT64 AcpiVariableSetCompatibility;
Status = (*PeiServices)->RegisterForShadow (FileHandle);
@@ -1070,25 +1071,25 @@ PlatformInitPreMemEntryPoint (
ASSERT_EFI_ERROR (Status);
return Status;
}
-
- VariableSize = sizeof (SystemConfiguration);
+
+ VariableSize = sizeof (AcpiVariableSetCompatibility);
Status = VariableServices->GetVariable (
VariableServices,
- PLATFORM_SETUP_VARIABLE_NAME,
- &gEfiSetupVariableGuid,
+ ACPI_GLOBAL_VARIABLE,
+ &gEfiAcpiVariableCompatiblityGuid,
NULL,
&VariableSize,
- &SystemConfiguration
+ &AcpiVariableSetCompatibility
);
AcpiVarHobSize = sizeof (UINT64);
BuildGuidDataHob (
&gEfiAcpiVariableCompatiblityGuid,
- &SystemConfiguration.AcpiVariableSetCompatibility,
+ &AcpiVariableSetCompatibility,
sizeof (AcpiVarHobSize)
);
- DEBUG ((DEBUG_INFO, "AcpiVariableAddr : 0x%08x\n", SystemConfiguration.AcpiVariableSetCompatibility));
+ DEBUG ((DEBUG_INFO, "AcpiVariableAddr : 0x%08x\n", AcpiVariableSetCompatibility));
PERF_START_EX (NULL, "RstVctr", "IBBL", 1, 0x1000);
Tick = CarMap->IbblPerfRecord0;
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
index d39ec6d4bf..fd45e33377 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc
@@ -259,7 +259,7 @@
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
+ $(PLATFORM_PACKAGE_COMMON)/SampleCode/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
index 81ca4cb054..0c3482be3c 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.fdf
@@ -586,7 +586,7 @@ APRIORI DXE {
#
INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
- INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
+ INF $(PLATFORM_PACKAGE_COMMON)/SampleCode/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf