diff options
author | zwei4 <david.wei@intel.com> | 2017-01-06 15:29:52 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-05-09 13:03:07 +0800 |
commit | 28cd1fd93a3eb573835e5a8880f4d0c7ee78cefe (patch) | |
tree | d0f4e8f4e76459e6a083dfd3f5541b7309972729 /Platform/BroxtonPlatformPkg/Common/Library | |
parent | 9b3b45002cc480ba30d55c62daa31ab86be1fd14 (diff) | |
download | edk2-platforms-28cd1fd93a3eb573835e5a8880f4d0c7ee78cefe.tar.xz |
Remove platform policies which are not used.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: zwei4 <david.wei@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Common/Library')
9 files changed, 6 insertions, 441 deletions
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf index 856d173322..fab0d00aef 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf @@ -1,7 +1,7 @@ ## @file
# Library functions for Fsp Policy Initialization Library.
#
-# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2015 - 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
@@ -92,7 +92,6 @@ gSiPolicyPpiGuid ## CONSUMES
gScPolicyPpiGuid
gSiCpuPolicyPpiGuid ## CONSUMES
- gSiSaPolicyPpiGuid ## CONSUMES
gSaMiscConfigGuid
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
gMemoryConfigGuid
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c index 04167c59cb..1dc31a08ca 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspSaPolicyInitLib.c @@ -1,7 +1,7 @@ /** @file
Implementation of Fsp SA Policy Initialization.
- Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2015 - 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
@@ -15,7 +15,6 @@ #include <PeiFspPolicyInitLib.h>
#include <Ppi/ReadOnlyVariable2.h>
-#include <Ppi/SaPolicy.h>
#include <Ppi/SaMiscConfig.h>
#include <Ppi/MemoryConfig.h>
#include <Library/IoLib.h>
@@ -188,8 +187,6 @@ PeiFspSaPolicyInit ( )
{
EFI_STATUS Status;
- SA_MISC_CONFIG *MiscConfig;
- SI_SA_POLICY_PPI *SiSaPolicyPpi;
VOID *Buffer;
UINT32 Size;
EFI_GUID PeiLogoGuid = gPeiLogoGuid;
@@ -199,20 +196,7 @@ PeiFspSaPolicyInit ( UINTN VariableSize = 0;
EFI_BOOT_MODE BootMode;
- //
- // Locate SiSaPolicyPpi
- //
- SiSaPolicyPpi = NULL;
- MiscConfig = NULL;
- Status = PeiServicesLocatePpi(
- &gSiSaPolicyPpiGuid,
- 0,
- NULL,
- (VOID **) &SiSaPolicyPpi
- );
- if (EFI_ERROR (Status) == FALSE) {
- Status = GetConfigBlock ((VOID *) SiSaPolicyPpi, &gSaMiscConfigGuid, (VOID *) &MiscConfig);
- }
+
Status = PeiServicesGetBootMode (&BootMode);
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h index 1e23002370..37661ece06 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h @@ -1,7 +1,7 @@ /** @file
Header file for the PolicyInitPei PEIM.
- Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2013 - 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
@@ -19,7 +19,6 @@ #include <PiPei.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
-#include "PeiSaPolicyInit.h"
#include "PeiSiPolicyInit.h"
#include "PeiCpuPolicyInit.h"
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf index db70e74c83..319684445d 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf @@ -1,7 +1,7 @@ ## @file
# Component description file for PeiPolicyInit library.
#
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 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
@@ -28,7 +28,6 @@ HobLib
PeiServicesLib
PeiPolicyUpdateLib
- PeiSaPolicyLib
ConfigBlockLib
SteppingLib
CpuPolicyLib
@@ -44,12 +43,9 @@ PeiPolicyInit.h
PeiCpuPolicyInit.c
PeiCpuPolicyInit.h
- PeiSaPolicyInit.c
- PeiSaPolicyInit.h
PeiSiPolicyInit.c
PeiSiPolicyInit.h
[Ppis]
- gSiSaPolicyPpiGuid
gScPcieDeviceTablePpiGuid
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSaPolicyInit.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSaPolicyInit.c deleted file mode 100644 index 5f0300ec59..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSaPolicyInit.c +++ /dev/null @@ -1,57 +0,0 @@ -/** @file
- This file is SampleCode for Intel SA PEI Policy initialization.
-
- Copyright (c) 1999 - 2016, 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
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "PeiSaPolicyInit.h"
-
-/**
- This PEIM performs SA PEI Policy initialzation.
-
- @param[in] FirmwareConfiguration It uses to skip specific policy init that depends
- on the 'FirmwareConfiguration' varaible.
-
- @retval EFI_SUCCESS The PPI is installed and initialized.
- @retval EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the PPI.
- @retval EFI ERRORS The PPI is not successfully installed.
-
-**/
-EFI_STATUS
-PeiSaPolicyInit (
- IN UINT8 FirmwareConfiguration
- )
-{
- EFI_STATUS Status;
- SI_SA_POLICY_PPI *SiSaPolicyPpi;
-
- //
- // Call SaCreatePolicyDefaults to initialize platform policy structure
- // and get all Intel default policy settings.
- //
- Status = CreateConfigBlocks (&SiSaPolicyPpi);
- DEBUG ((DEBUG_INFO, "SiSaPolicyPpi->TableHeader.NumberOfBlocks = 0x%x\n ", SiSaPolicyPpi->TableHeader.NumberOfBlocks));
- ASSERT_EFI_ERROR (Status);
-
- UpdatePeiSaPolicy (SiSaPolicyPpi);
-
- //
- // Install SiSaPolicyPpi.
- // While installed, RC assumes the Policy is ready and finalized. So please
- // update and override any setting before calling this function.
- //
- Status = SiSaInstallPolicyPpi (SiSaPolicyPpi);
- ASSERT_EFI_ERROR (Status);
-
- return Status;
-}
-
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSaPolicyInit.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSaPolicyInit.h deleted file mode 100644 index d1ce77b794..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSaPolicyInit.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file
- Header file for the SaPolicyInitPei PEIM.
-
- Copyright (c) 1999 - 2016, 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
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _SA_POLICY_INIT_PEI_H_
-#define _SA_POLICY_INIT_PEI_H_
-
-#include <Library/DebugLib.h>
-#include <Library/PeiServicesLib.h>
-#include <Library/PeiSaPolicyLib.h>
-#include <Ppi/SaPolicy.h>
-#include <Library/PeiSaPolicyUpdateLib.h>
-
-//
-// Functions
-//
-/**
- <b>This PEIM performs SA PEI Policy initialzation</b> \n
- - <b>Introduction</b> \n
- System Agent PEIM behavior can be controlled by platform policy without modifying reference code directly.
- Platform policy PPI is initialized with default settings in this funciton.
- Some MRC functions will be initialized in this PEIM to provide the capability for customization.
- This policy PPI has to be initialized prior to System Agent initialization PEIM and MRC execution.
-
- - @pre
- - PEI_READ_ONLY_VARIABLE_PPI
-
- - @result
- SI_SA_POLICY_PPI will be installed successfully and ready for System Agent reference code use.
-
- - <b>Porting Recommendations</b> \n
- Policy should be initialized basing on platform design or user selection (like BIOS Setup Menu)
-
- @param[in] FirmwareConfiguration It uses to skip specific policy init that depends
- on the 'FirmwareConfiguration' varaible.
-
- @retval EFI_SUCCESS The PPI is installed and initialized.
- @retval EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the PPI.
- @retval EFI ERRORS The PPI is not successfully installed.
-
-**/
-EFI_STATUS
-PeiSaPolicyInit (
- IN UINT8 FirmwareConfiguration
- );
-#endif
-
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf index 1f61f948cd..df8293d917 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf @@ -1,7 +1,7 @@ ## @file
# Module Infomation file for PEI PeiPolicyUpdateLib Library.
#
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 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
@@ -50,7 +50,6 @@ gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
gScPolicyPpiGuid
gSaMiscConfigGuid
- gGraphicsConfigGuid
gIpuConfigGuid
gScSpiPpiGuid
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSaPolicyUpdate.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSaPolicyUpdate.c deleted file mode 100644 index 4787f1fe6c..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSaPolicyUpdate.c +++ /dev/null @@ -1,254 +0,0 @@ -/** @file
- Do Platform Stage System Agent initialization.
-
- Copyright (c) 2013 - 2016, 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
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include <PeiSaPolicyUpdate.h>
-#include <Library/DebugLib.h>
-#include <Library/PeiSaPolicyLib.h>
-#include <Ppi/FirmwareVolume.h>
-#include <Pi/PiFirmwareFile.h>
-#include <Pi/PiPeiCis.h>
-#include <Core/Pei/PeiMain.h>
-#include <Library/SteppingLib.h>
-
-
-/**
- UpdatePeiSaPolicy performs SA PEI Policy initialzation
-
- @param[in, out] SiSaPolicyPpi SI_SA_POLICY PPI
-
- @retval EFI_SUCCESS The policy is installed and initialized.
-
-**/
-EFI_STATUS
-UpdatePeiSaPolicy (
- IN OUT SI_SA_POLICY_PPI *SiSaPolicyPpi
- )
-{
- EFI_STATUS Status;
- EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices;
- SYSTEM_CONFIGURATION SystemConfiguration;
- UINTN VariableSize;
- SA_MISC_CONFIG *MiscConfig = NULL;
- GRAPHICS_CONFIG *GtConfig = NULL;
- IPU_CONFIG *IpuPolicy = NULL;
- VOID* Buffer;
- UINT32 Size;
- EFI_GUID PeiLogoGuid = { 0x7BB28B99, 0x61BB, 0x11D5, 0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D };
- EFI_GUID TianmaVbtGuid = { 0xE08CA6D5, 0x8D02, 0x43ae, 0xAB, 0xB1, 0x95, 0x2C, 0xC7, 0x87, 0xC9, 0x33 };
- EFI_GUID TrulyFabBVbtTypeCGuid = { 0xDBADD769, 0xE86A, 0x4819, 0x81, 0x20, 0xE9, 0x91, 0x79, 0x2C, 0x0B, 0xC1 };
- EFI_GUID TrulyFabBVbtGuid = { 0x1a03cf12, 0xf54b, 0x4227, 0xa7, 0xa4, 0x6c, 0x97, 0x11, 0x3f, 0xac, 0x71 };
- EFI_GUID TrulyFabBCMVbtGuid = { 0x1fc29068, 0x17cf, 0x4613, 0x98, 0xd, 0x17, 0x2f, 0x97, 0xe7, 0xfa, 0xe5 };
- EFI_GUID TrulyFabBCMTypeCVbtGuid = { 0x2246d69f, 0xd9a6, 0x4f80, 0x90, 0x38, 0x78, 0xc5, 0xcc, 0x74, 0x1d, 0xdf };
- EFI_GUID TrulyFabBPr1TypeCVbtGuid = { 0x190c66ce, 0x475e, 0x4c5e, 0xb7, 0xd0, 0x2f, 0x67, 0x72, 0xba, 0x71, 0x70 };
- EFI_GUID TrulyFabBPr1CMTypeCVbtGuid = { 0xc1b31ace, 0x65db, 0x46d6, 0x9c, 0x7e, 0xa8, 0x2c, 0xce, 0x78, 0x45, 0x38 };
- VBT_INFO VbtInfo;
- SC_POLICY_PPI *ScPolicyPpi;
- SC_VTD_CONFIG *VtdConfig;
- BXT_SERIES SocSeries;
- BXT_STEPPING SocStepping;
-
- DEBUG ((DEBUG_INFO, "Entering Get Config Block function call from UpdatePeiSaPolicy\n"));
-
- Status = GetConfigBlock ((VOID *) SiSaPolicyPpi, &gSaMiscConfigGuid , (VOID *) &MiscConfig);
- ASSERT_EFI_ERROR (Status);
-
- Status = GetConfigBlock ((VOID *) SiSaPolicyPpi, &gGraphicsConfigGuid, (VOID *) &GtConfig);
- ASSERT_EFI_ERROR (Status);
-
- Status = GetConfigBlock ((VOID *) SiSaPolicyPpi, &gIpuConfigGuid, (VOID *) &IpuPolicy);
- ASSERT_EFI_ERROR (Status);
-
- //
- // Locate system configuration variable
- //
- Status = PeiServicesLocatePpi (
- &gEfiPeiReadOnlyVariable2PpiGuid, // GUID
- 0, // INSTANCE
- NULL, // EFI_PEI_PPI_DESCRIPTOR
- (VOID **) &VariableServices // PPI
- );
- ASSERT_EFI_ERROR ( Status);
-
- //
- // Locate SC Policy
- //
- Status = PeiServicesLocatePpi (
- &gScPolicyPpiGuid,
- 0,
- NULL,
- (VOID **) &ScPolicyPpi
- );
- ASSERT_EFI_ERROR (Status);
-
- Status = GetConfigBlock ((VOID *) ScPolicyPpi, &gVtdConfigGuid, (VOID *) &VtdConfig);
- ASSERT_EFI_ERROR (Status);
-
- //
- // Get System configuration variables
- //
- VariableSize = sizeof (SYSTEM_CONFIGURATION);
- Status = VariableServices->GetVariable (
- VariableServices,
- PLATFORM_SETUP_VARIABLE_NAME,
- &gEfiSetupVariableGuid,
- NULL,
- &VariableSize,
- &SystemConfiguration
- );
- if (!EFI_ERROR (Status)) {
- //
- // Get the Platform Configuration from SetupData
- //
- GtConfig->GttMmAdr = GTTMM_BASE_ADDRESS;
- GtConfig->GmAdr = GMADR_BASE_ADDRESS;
- GtConfig->PeiGraphicsPeimInit = SystemConfiguration.PeiGraphicsPeimInit;
- GtConfig->PmSupport = SystemConfiguration.PmSupport;
- GtConfig->EnableRenderStandby = SystemConfiguration.EnableRenderStandby;
- GtConfig->CdClock = SystemConfiguration.CdClock;
- GtConfig->PavpEnable = SystemConfiguration.PavpEnable;
-
- GtConfig->ForceWake = 0;
- GtConfig->PavpLock = 1;
- GtConfig->GraphicsFreqModify = 0;
- GtConfig->GraphicsFreqReq = 0;
- GtConfig->GraphicsVideoFreq = 0;
- GtConfig->PmLock = 1;
- GtConfig->DopClockGating = 1;
- GtConfig->UnsolicitedAttackOverride = 0;
- GtConfig->WOPCMSupport = 1;
- GtConfig->WOPCMSize = 0;
- GtConfig->PowerGating = 0;
- GtConfig->UnitLevelClockGating = 1;
-
- MiscConfig->FastBoot = 1;
- MiscConfig->DynSR = 1;
-
- IpuPolicy->SaIpuEnable = SystemConfiguration.IpuEn;
-
- SocSeries = GetBxtSeries ();
- SocStepping = BxtStepping ();
- if ((SocSeries == BxtP && SocStepping <= BxtPB2) || (SocSeries != BxtP && SocStepping < BxtC0)) {
- if (IpuPolicy->SaIpuEnble == 1) {
- VtdConfig->VtdEnable = 0;
- }
- }
-
- IpuPolicy->IpuAcpiMode = SystemConfiguration.IpuAcpiMode;
- IpuPolicy->IpuMmAdr = IPUMM_BASE_ADDRESS;
- }
-
- PeiGetSectionFromFv (PeiLogoGuid, &Buffer, &Size);
- if (Buffer == NULL) {
- DEBUG ((DEBUG_ERROR, "Could not locate Pei Logo"));
- }
- GtConfig->LogoPtr = Buffer;
- GtConfig->LogoSize = Size;
- DEBUG ((DEBUG_INFO, "LogoPtr from PeiGetSectionFromFv is 0x%x\n", Buffer));
- DEBUG ((DEBUG_INFO, "LogoSize from PeiGetSectionFromFv is 0x%x\n", Size));
-
- //
- // VBT selection may depend on SystemConfiguration->PanelSel value
- //
- PeiGetSectionFromFv (TianmaVbtGuid, &Buffer, &Size);
-
- if (Buffer == NULL) {
- DEBUG ((DEBUG_ERROR, "Could not locate VBT"));
- }
- GtConfig->GraphicsConfigPtr = Buffer;
-
- //
- // Build the VBT data into HOB for DXE GOP
- //
- VbtInfo.VbtAddress = (EFI_PHYSICAL_ADDRESS) Buffer;
- VbtInfo.VbtSize = Size;
- DEBUG ((DEBUG_INFO, "VbtInfo VbtAddress is 0x%x\n", Buffer));
- DEBUG ((DEBUG_INFO, "VbtInfo VbtSize is 0x%x\n", Size));
-
- BuildGuidDataHob (
- &gVbtInfoGuid,
- &VbtInfo,
- sizeof (VbtInfo)
- );
-
- return EFI_SUCCESS;
-}
-
-
-/**
- PeiGetSectionFromFv finds the file in FV and gets file Address and Size
-
- @param[in] NameGuid File GUID
- @param[out] Address Pointer to the File Address
- @param[out] Size Pointer to File Size
-
- @retval EFI_SUCCESS Successfull in reading the section from FV
-
-**/
-EFI_STATUS
-EFIAPI
-PeiGetSectionFromFv (
- IN CONST EFI_GUID NameGuid,
- OUT VOID **Address,
- OUT UINT32 *Size
- )
-{
- EFI_STATUS Status;
- EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi;
- EFI_FV_FILE_INFO FvFileInfo;
- PEI_CORE_INSTANCE *PrivateData;
- UINTN CurrentFv;
- PEI_CORE_FV_HANDLE *CoreFvHandle;
- EFI_PEI_FILE_HANDLE VbtFileHandle;
- EFI_GUID *VbtGuid;
- EFI_COMMON_SECTION_HEADER *Section;
- CONST EFI_PEI_SERVICES **PeiServices;
-
- PeiServices = GetPeiServicesTablePointer ();
-
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
-
- Status = PeiServicesLocatePpi (
- &gEfiFirmwareFileSystem2Guid,
- 0,
- NULL,
- (VOID **) &FvPpi
- );
- ASSERT_EFI_ERROR (Status);
-
- CurrentFv = PrivateData->CurrentPeimFvCount;
- CoreFvHandle = &(PrivateData->Fv[CurrentFv]);
-
- Status = FvPpi->FindFileByName (FvPpi, &NameGuid, &CoreFvHandle->FvHandle, &VbtFileHandle);
- if (!EFI_ERROR (Status) && VbtFileHandle != NULL) {
- DEBUG ((DEBUG_INFO, "Find SectionByType \n"));
- Status = FvPpi->FindSectionByType (FvPpi, EFI_SECTION_RAW, VbtFileHandle, (VOID **) &VbtGuid);
- if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "GetFileInfo \n"));
- Status = FvPpi->GetFileInfo (FvPpi, VbtFileHandle, &FvFileInfo);
- Section = (EFI_COMMON_SECTION_HEADER *) FvFileInfo.Buffer;
- if (IS_SECTION2 (Section)) {
- ASSERT (SECTION2_SIZE (Section) > 0x00FFFFFF);
- *Size = SECTION2_SIZE (Section) - sizeof (EFI_COMMON_SECTION_HEADER2);
- *Address = ((UINT8 *) Section + sizeof (EFI_COMMON_SECTION_HEADER2));
- } else {
- *Size = SECTION_SIZE (Section) - sizeof (EFI_COMMON_SECTION_HEADER);
- *Address = ((UINT8 *) Section + sizeof (EFI_COMMON_SECTION_HEADER));
- }
- }
- }
-
- return EFI_SUCCESS;
-}
-
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSaPolicyUpdate.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSaPolicyUpdate.h deleted file mode 100644 index ae1fd09602..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSaPolicyUpdate.h +++ /dev/null @@ -1,43 +0,0 @@ -/** @file
- Copyright (c) 2013 - 2016, 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
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _PEI_SA_POLICY_UPDATE_H_
-#define _PEI_SA_POLICY_UPDATE_H_
-
-//
-// External include files do NOT need to be explicitly specified in real EDKII
-// environment
-//
-#include <Guid/SetupVariable.h>
-#include <SaAccess.h>
-#include <Library/DebugPrintErrorLevelLib.h>
-#include <Ppi/ReadOnlyVariable2.h>
-#include <Ppi/SaPolicy.h>
-#include <Library/PeiServicesLib.h>
-
-extern EFI_GUID gVbtInfoGuid;
-
-typedef struct {
- EFI_PHYSICAL_ADDRESS VbtAddress;
- UINT32 VbtSize;
-} VBT_INFO;
-
-EFI_STATUS
-EFIAPI
-PeiGetSectionFromFv (
- IN CONST EFI_GUID NameGuid,
- OUT VOID **Address,
- OUT UINT32 *Size
- );
-#endif
-
|