summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Common
diff options
context:
space:
mode:
authorGuo Mang <mang.guo@intel.com>2017-07-06 14:28:28 +0800
committerGuo Mang <mang.guo@intel.com>2017-07-06 14:29:31 +0800
commit599f54866cf77ed21fb0dbfb7ca027434f5764b2 (patch)
tree4c43324a5c023d4d2034c0df48442c31f2898d2b /Platform/BroxtonPlatformPkg/Common
parent784cb22999a14b6fb68aa5cdd68a5f56ee8d3c5f (diff)
downloadedk2-platforms-599f54866cf77ed21fb0dbfb7ca027434f5764b2.tar.xz
Enable GCC Yocto S3
Enable GCC build BIOS image Yocto S3 support. Replace CPU drivers with drivers from core packages. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Common')
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c34
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf4
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c30
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf1
4 files changed, 37 insertions, 32 deletions
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
index b5cd9f7fea..30071325aa 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
@@ -16,6 +16,7 @@
#include <Guid/AcpiTableStorage.h>
#include <Guid/EfiVpdData.h>
#include <Guid/GlobalVariable.h>
+#include <Protocol/CpuGlobalNvsArea.h>
#include <Guid/PlatformInfo.h>
#include <Guid/PlatformCpuInfo.h>
#include <Guid/SetupVariable.h>
@@ -42,6 +43,7 @@
#include <Library/DxeVtdLib.h>
#include <Library/SideBandLib.h>
#include <Library/SteppingLib.h>
+#include <Private/CpuInitDataHob.h>
#include "PlatformBaseAddresses.h"
#if (ENBDT_PF_ENABLE == 0)
@@ -66,6 +68,8 @@ CHAR16 gACPIOSFRMfgStringVariableName[] = ACPI_OSFR_MFG_STRING_VARIABLE_NA
EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea;
EFI_CPU_IO2_PROTOCOL *mCpuIo;
+CPU_INIT_DATA_HOB *mCpuInitDataHob = NULL;
+CPU_GLOBAL_NVS_AREA_PROTOCOL CpuGlobalNvsAreaProtocol;
BOOLEAN mFirstNotify;
EFI_PLATFORM_INFO_HOB *mPlatformInfo;
@@ -1317,6 +1321,7 @@ AcpiPlatformEntryPoint (
CHAR16 LocalGuidString[GUID_CHARS_NUMBER];
UINTN Data32;
UINT32 VariableAttributes;
+ VOID *Hob;
mFirstNotify = FALSE;
TableVersion = EFI_ACPI_TABLE_VERSION_2_0;
@@ -1999,6 +2004,35 @@ AcpiPlatformEntryPoint (
NULL
);
+
+
+ //
+ // Get CPU Init Data Hob
+ //
+ Hob = GetFirstGuidHob (&gCpuInitDataHobGuid);
+ if (Hob == NULL) {
+ DEBUG ((DEBUG_ERROR, "CPU Data HOB not available\n"));
+ ASSERT_EFI_ERROR (EFI_NOT_FOUND);
+ }
+ mCpuInitDataHob = (CPU_INIT_DATA_HOB *) ((UINTN) Hob + sizeof (EFI_HOB_GUID_TYPE));
+
+ //
+ // Get CPU Global NVS protocol pointer
+ //
+ CpuGlobalNvsAreaProtocol.Area = (CPU_GLOBAL_NVS_AREA *) (UINTN) mCpuInitDataHob->CpuGnvsPointer;
+ CpuGlobalNvsAreaProtocol.Area->DtsAcpiEnable = 0;
+
+ //
+ // Install Cpu Power management GlobalNVS Area protocol
+ //
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &Handle,
+ &gCpuGlobalNvsAreaProtocolGuid,
+ &CpuGlobalNvsAreaProtocol,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
//
// Read tables from the storage file.
//
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
index cf862fc88d..31c2a77532 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -1,7 +1,7 @@
## @file
# ACPI Platform Driver.
#
-# Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -62,6 +62,7 @@
gEfiBxtVariableGuid
gEfiPramConfGuid
gPlatformSsdtImageGuid
+ gCpuInitDataHobGuid
[Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
@@ -77,6 +78,7 @@
gEfiTcgProtocolGuid
gEfiFirmwareVolume2ProtocolGuid
gEfiSeCOperationProtocolGuid
+ gCpuGlobalNvsAreaProtocolGuid
[Pcd]
gEfiBxtTokenSpaceGuid.PcdScAcpiIoPortBaseAddress
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
index 7d84e26b76..bfed3bf1ac 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformInit.c
@@ -19,7 +19,6 @@
#include <Guid/PttPTPInstanceGuid.h>
#include <Ppi/Smbus2.h>
#include <Library/PcdLib.h>
-#include <Private/Library/CpuS3Lib.h>
#include <Library/HeciMsgLib.h>
#include <Ppi/SeCUma.h>
@@ -30,13 +29,6 @@
#pragma optimize ("", off)
#endif
-EFI_STATUS
-EFIAPI
-CpuS3SmmAccessNotifyCallback (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
- IN VOID *Ppi
- );
static EFI_PEI_RESET_PPI mResetPpi = { IchReset };
@@ -69,11 +61,6 @@ static EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {
static EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] = {
{
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
- &gPeiSmmAccessPpiGuid,
- CpuS3SmmAccessNotifyCallback
- },
- {
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiEndOfPeiSignalPpiGuid,
EndOfPeiPpiNotifyCallback
@@ -545,23 +532,6 @@ PeiGetSectionFromFv (
}
-EFI_STATUS
-EFIAPI
-CpuS3SmmAccessNotifyCallback (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
- IN VOID *Ppi
- )
-{
- //
- // Restore Cpu settings only during S3 resume
- //
- S3InitializeCpu (PeiServices);
-
- return EFI_SUCCESS;
-}
-
-
/**
Install Firmware Volume Hob's once there is main memory
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf
index 762eff2a2b..2fb7fb6a6f 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPostMemPei/PlatformPostMemPei.inf
@@ -55,7 +55,6 @@
CpuPolicyLib
TimerLib
ScPlatformLib
- CpuS3Lib
SeCUmaLib
[Ppis]