diff options
author | Guo Mang <mang.guo@intel.com> | 2017-07-06 14:28:28 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-06 14:29:31 +0800 |
commit | 599f54866cf77ed21fb0dbfb7ca027434f5764b2 (patch) | |
tree | 4c43324a5c023d4d2034c0df48442c31f2898d2b /Platform/BroxtonPlatformPkg/Common/Acpi | |
parent | 784cb22999a14b6fb68aa5cdd68a5f56ee8d3c5f (diff) | |
download | edk2-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/Acpi')
-rw-r--r-- | Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c | 34 | ||||
-rw-r--r-- | Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf | 4 |
2 files changed, 37 insertions, 1 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
|