From 28cd1fd93a3eb573835e5a8880f4d0c7ee78cefe Mon Sep 17 00:00:00 2001 From: zwei4 Date: Fri, 6 Jan 2017 15:29:52 +0800 Subject: Remove platform policies which are not used. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4 --- Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec | 4 +- .../NorthCluster/Include/Library/PeiSaPolicyLib.h | 34 +- .../NorthCluster/Include/Ppi/GraphicsConfig.h | 57 --- .../Include/Ppi/HybridGraphicsConfig.h | 52 --- .../NorthCluster/Include/Ppi/IpuConfig.h | 35 -- .../NorthCluster/Include/Ppi/SaPolicy.h | 80 ---- .../NorthCluster/Include/Ppi/SaPreMemConfig.h | 37 -- .../Library/PeiSaPolicyLib/PeiSaPolicyLib.c | 432 --------------------- .../Library/PeiSaPolicyLib/PeiSaPolicyLib.inf | 47 --- .../Library/PeiSaPolicyLib/PeiSaPolicyLibrary.h | 70 ---- Silicon/BroxtonSoC/BroxtonSiPkg/SiPkgPeiLib.dsc | 6 +- 11 files changed, 3 insertions(+), 851 deletions(-) delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/GraphicsConfig.h delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/HybridGraphicsConfig.h delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/IpuConfig.h delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPolicy.h delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPreMemConfig.h delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.c delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.inf delete mode 100644 Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLibrary.h (limited to 'Silicon/BroxtonSoC') diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec index eaf8fb9741..2ee4008c63 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec @@ -5,7 +5,7 @@ # DSC and EDK II INF files to generate AutoGen.c and AutoGen.h files # for the EDK II build infrastructure. # -# Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -27,7 +27,6 @@ gVariableStoragePpiGuid = { 0x90d915c5, 0xe4c1, 0x4da8, {0xa7, 0x6f, 0x9, 0xe5, 0x78, 0x91, 0x65, 0x48}} gPeiSmmAccessPpiGuid = { 0x268f33a9, 0xcccd, 0x48be, {0x88, 0x17, 0x86, 0x05, 0x3a, 0xc3, 0x2e, 0xd6}} gSaPlatformPolicyPpiGuid = { 0x7D84B2C2, 0x22A1, 0x4372, {0xB1, 0x2C, 0xEB, 0xB2, 0x32, 0xD3, 0xA6, 0xA3}} - gSiSaPolicyPpiGuid = { 0x65289ae5, 0x1589, 0x484c, {0xa6, 0x10, 0x90, 0xe1, 0x0a, 0xc2, 0xdb, 0x28}} gSiSaPreMemPolicyPpiGuid = { 0xcfe5ec91, 0x31ed, 0x47e9, {0xbe, 0x7d, 0x9c, 0xcb, 0x59, 0x13, 0x4b, 0x71}} gSaPolicyPpiGuid = { 0xf6435590, 0x2402, 0x4e02, {0x99, 0xfd, 0xab, 0xdd, 0x9d, 0xd4, 0x0a, 0x6a}} gScPolicyPpiGuid = { 0x10164673, 0xD365, 0x4BE2, {0x85, 0x13, 0x14, 0x97, 0xCC, 0x07, 0x61, 0x1D}} @@ -73,7 +72,6 @@ # NC Config Block IP GUID # gSaMiscConfigGuid = { 0xc5c9145f, 0x61fb, 0x4abe, { 0x88, 0x0a, 0xf2, 0x56, 0x89, 0x9f, 0x40, 0xb0}} - gGraphicsConfigGuid = { 0x0319c56b, 0xc43a, 0x42f1, { 0x80, 0xbe, 0xca, 0x5b, 0xd1, 0xd5, 0xc9, 0x28}} gMemoryConfigGuid = { 0x26cf084c, 0xc9db, 0x41bb, { 0x92, 0xc6, 0xd1, 0x97, 0xb8, 0xa1, 0xe4, 0xbf}} gIpuConfigGuid = { 0x67eeefd0, 0x9e42, 0x48c8, { 0xbd, 0xab, 0xfd, 0x0d, 0x23, 0x69, 0x88, 0x0b}} gHybridGraphicsConfigGuid = { 0x0b7e694d, 0xb909, 0x4097, { 0x9c, 0x03, 0x5e, 0x72, 0x84, 0x89, 0xf7, 0x09}} diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Library/PeiSaPolicyLib.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Library/PeiSaPolicyLib.h index 3a83ceab1c..c57df9ff72 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Library/PeiSaPolicyLib.h +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Library/PeiSaPolicyLib.h @@ -1,7 +1,7 @@ /** @file Prototype of the PeiSaPolicy library. - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -16,27 +16,11 @@ #ifndef _PEI_SA_POLICY_LIB_H_ #define _PEI_SA_POLICY_LIB_H_ -#include #include #include #include -/** - Creates the Pre Mem Config Blocks for SA Policy. - It allocates and zero out buffer, and fills in the Intel default settings. - - @param[in, out] SiSaPolicyPpi The pointer to get SI/SA Policy PPI instance. - - @retval EFI_SUCCESS The policy default is initialized. - @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer. - -**/ -EFI_STATUS -EFIAPI -SaCreatePreMemConfigBlocks( - IN OUT SI_SA_POLICY_PPI **SiSaPolicyPpi - ); /** Creates the Config Blocks for SA Policy. @@ -54,22 +38,6 @@ CreateConfigBlocks ( IN OUT SI_SA_POLICY_PPI **SiSaPolicyPpi ); -/** - Install PPI SiSaPolicyPpi. - While installed, RC assumes the Policy is ready and finalized. So please update and override - any setting before calling this function. - - @param[in] SiSaPolicyPpi Pointer of policy structure. - - @retval EFI_SUCCESS The policy is installed. - @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer. - -**/ -EFI_STATUS -EFIAPI -SiSaInstallPolicyPpi ( - IN SI_SA_POLICY_PPI *SiSaPolicyPpi - ); /** SaInstallPreMemPolicyPpi installs SaPolicyPpi. diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/GraphicsConfig.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/GraphicsConfig.h deleted file mode 100644 index 92b49f51f9..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/GraphicsConfig.h +++ /dev/null @@ -1,57 +0,0 @@ -/** @file - Policy definition for Internal Graphics Config Block. - - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
- - 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 _GRAPHICS_CONFIG_H_ -#define _GRAPHICS_CONFIG_H_ - -#pragma pack(1) - -#define GRAPHICS_CONFIG_REVISION 1 - -extern EFI_GUID gGraphicsConfigGuid; - -typedef struct { - CONFIG_BLOCK_HEADER Header; ///< Offset 0-23 Config Block Header - UINT32 CdClock : 3; - UINT32 PeiGraphicsPeimInit: 1; ///< 0- Disable 1- Enable - UINT32 RsvdBits0 : 4; ///< Reserved for future use - UINT8 Rsvd1[2]; ///< Offset 14 - UINT32 GttMmAdr; ///< Offset 16 Address of System Agent GTTMMADR: Default is 0xDF000000 - VOID* LogoPtr; ///< Offset 20 Address of Logo to be displayed in PEI - UINT32 LogoSize; ///< Offset 24 Logo Size - VOID* GraphicsConfigPtr; ///< Offset 28 Address of the Graphics Configuration Table - UINT32 GmAdr; ///< Offset 32 Address of System Agent GMADR: Default is 0xC0000000 - UINT8 PmSupport; - UINT8 PavpEnable; - UINT8 EnableRenderStandby; - UINT8 PavpPr3; - UINT8 ForceWake; - UINT8 PavpLock; - UINT8 GraphicsFreqModify; - UINT8 GraphicsFreqReq; - UINT8 GraphicsVideoFreq; - UINT8 PmLock; - UINT8 DopClockGating; - UINT8 UnsolicitedAttackOverride; - UINT8 WOPCMSupport; - UINT8 WOPCMSize; - UINT8 PowerGating; - UINT8 UnitLevelClockGating; -} GRAPHICS_CONFIG; - -#pragma pack() - -#endif // _GRAPHICS_CONFIG_H_ - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/HybridGraphicsConfig.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/HybridGraphicsConfig.h deleted file mode 100644 index 69951ff36e..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/HybridGraphicsConfig.h +++ /dev/null @@ -1,52 +0,0 @@ -/** @file - Hybrid Graphics policy definitions. - - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
- - 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 _HYBRID_GRAPHICS_CONFIG_H_ -#define _HYBRID_GRAPHICS_CONFIG_H_ - -#pragma pack(1) - -#define HYBRID_GRAPHICS_CONFIG_REVISION 1 - -extern EFI_GUID gHybridGraphicsConfigGuid; - -// -// HG GPIO Data Structure -// -typedef struct { - UINT32 CommunityOffset; ///< GPIO Community - UINT16 PinOffset; ///< GPIO Pin - BOOLEAN Active; ///< 0=Active Low; 1=Active High -} HG_GPIO; - -// -// Defines the Switchable Graphics configuration parameters for System Agent. -// -typedef struct { - CONFIG_BLOCK_HEADER Header; ///< Offset 0-23 Config Block Header - UINT8 RootPortDev; ///< Device number used for SG - UINT8 RootPortFun; ///< Function number used for SG - UINT8 HgEnabled; ///< HgEnabled (0=Disabled, 1=Enabled) - UINT16 HgSubSystemId; ///< Hybrid Graphics Subsystem ID - UINT16 HgDelayAfterPwrEn; ///< Dgpu Delay after Power enable using Setup option - UINT16 HgDelayAfterHoldReset; ///< Dgpu Delay after Hold Reset using Setup option - HG_GPIO HgDgpuHoldRst; ///< This field contain dGPU HLD RESET GPIO value and level information - HG_GPIO HgDgpuPwrEnable; ///< This field contain dGPU_PWR Enable GPIO value and level information -} HYBRID_GRAPHICS_CONFIG; - -#pragma pack() - -#endif // _HYBRID_GRAPHICS_CONFIG_H_ - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/IpuConfig.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/IpuConfig.h deleted file mode 100644 index 2662880eb5..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/IpuConfig.h +++ /dev/null @@ -1,35 +0,0 @@ -/** @file - IPU policy definitions. - - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
- - 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 _IPU_CONFIG_H_ -#define _IPU_CONFIG_H_ - -#pragma pack(1) - -#define IPU_CONFIG_REVISION 1 - -extern EFI_GUID gIpuConfigGuid; - -typedef struct { - CONFIG_BLOCK_HEADER Header; ///< Offset 0-23 Config Block Header - UINT8 SaIpuEnable; ///< Enable SA IPU device: 0=Disable, 1=Enable - UINT8 IpuAcpiMode; ///< Set IPU ACPI mode: 0=AUTO, 1=IGFX Child device, 2=ACPI device - UINT32 IpuMmAdr; ///< Address of IPU MMIO Bar IpuMmAdr: Default is 0x90000000 -} IPU_CONFIG; - -#pragma pack() - -#endif // _IPU_CONFIG_H_ - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPolicy.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPolicy.h deleted file mode 100644 index 96107dcc95..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPolicy.h +++ /dev/null @@ -1,80 +0,0 @@ -/** @file - Interface definition details between MRC and platform drivers during PEI phase. - - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
- - 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_PPI_H_ -#define _SA_POLICY_PPI_H_ - -#include -#include -#include -#include -#include -#include -#include -#include - -// -// Extern the GUID for protocol users. -// -extern EFI_GUID gSiSaPolicyPpiGuid; -extern EFI_GUID gSiSaPreMemPolicyPpiGuid; - -/** - PPI revision number - Any backwards compatible changes to this PPI will result in an update in the revision number - Major changes will require publication of a new PPI - -**/ -#define SA_POLICY_PPI_REVISION 1 - -// -// Generic definitions for device enabling/disabling used by NC code. -// -#define DEVICE_ENABLE 1 -#define DEVICE_DISABLE 0 - -#ifndef MAX_SOCKETS -#define MAX_SOCKETS 4 -#endif - -#define S3_TIMING_DATA_LEN 9 -#define S3_READ_TRAINING_DATA_LEN 16 -#define S3_WRITE_TRAINING_DATA_LEN 12 - -#ifndef S3_RESTORE_DATA_LEN -#define S3_RESTORE_DATA_LEN (S3_TIMING_DATA_LEN + S3_READ_TRAINING_DATA_LEN + S3_WRITE_TRAINING_DATA_LEN) -#endif // S3_RESTORE_DATA_LEN - -#pragma pack(1) - - -/** - SI SA Policy PPI\n - Each config block change history should be listed here\n\n - -**/ -typedef struct { - CONFIG_BLOCK_TABLE_HEADER TableHeader; ///< Offset 0-31 -/** - Individual Config Block Structures are added here in memory as part of AddConfigBlock() - -**/ -} SI_SA_POLICY_PPI; - -#pragma pack() - -#endif // _SA_POLICY_PPI_H_ - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPreMemConfig.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPreMemConfig.h deleted file mode 100644 index 04c9951700..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Ppi/SaPreMemConfig.h +++ /dev/null @@ -1,37 +0,0 @@ -/** @file - Policy definition for SA Pre-Mem Config Block. - - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
- - 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_PRE_MEM_CONFIG_H_ -#define _SA_PRE_MEM_CONFIG_H_ - -#pragma pack(1) - -#define SA_PRE_MEM_CONFIG_REVISION 1 - -extern EFI_GUID gSaPreMemConfigGuid; - -typedef struct { - CONFIG_BLOCK_HEADER Header; ///< Offset 0-23 Config Block Header - UINT8 IgdDvmt50PreAlloc; - UINT8 PrimaryDisplay; - UINT8 ApertureSize; - UINT8 InternalGraphics; - UINT16 GttSize; ///< Selection of iGFX GTT Memory size: 1=2MB, 2=4MB, 3=8MB -} SA_PRE_MEM_CONFIG; - -#pragma pack() - -#endif // _SA_PRE_MEM_CONFIG_H_ - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.c b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.c deleted file mode 100644 index 2b92562c0c..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.c +++ /dev/null @@ -1,432 +0,0 @@ -/** @file - This file provides services for Pei SA policy default initialization. - - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
- - 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 "PeiSaPolicyLibrary.h" - -// -// @todo: Remove the duplicate definition of the GUIDs and make it a location function. -// Because mBxtSaIpBlocks' initializer must be a constant, we need to define those GUID for it. -// -#define SA_MISC_CONFIG_GUID { 0xc5c9145f, 0x61fb, 0x4abe, { 0x88, 0x0a, 0xf2, 0x56, 0x89, 0x9f, 0x40, 0xb0}} -#define GRAPHICS_CONFIG_GUID { 0x0319c56b, 0xc43a, 0x42f1, { 0x80, 0xbe, 0xca, 0x5b, 0xd1, 0xd5, 0xc9, 0x28}} -#define MEMORY_CONFIG_GUID { 0x26cf084c, 0xc9db, 0x41bb, { 0x92, 0xc6, 0xd1, 0x97, 0xb8, 0xa1, 0xe4, 0xbf}} -#define IPU_CONFIG_GUID { 0x67eeefd0, 0x9e42, 0x48c8, { 0xbd, 0xab, 0xfd, 0x0d, 0x23, 0x69, 0x88, 0x0b}} -#define SA_PRE_MEM_CONFIG_GUID { 0x7200eef0, 0xbe7f, 0x4061, { 0x93, 0xe3, 0x3c, 0xd0, 0x36, 0x7c, 0xe1, 0x51}} -#if (ENBDT_PF_ENABLE == 1) -#define HYBRID_GRAPHICS_CONFIG_GUID { 0x0b7e694d, 0xb909, 0x4097, { 0x9c, 0x03, 0x5e, 0x72, 0x84, 0x89, 0xf7, 0x09}} -#endif - -GLOBAL_REMOVE_IF_UNREFERENCED CONFIG_BLOCK_HEADER mBxtSaIpBlocks[] = { - // Block GUID Block Size, Revision - {SA_MISC_CONFIG_GUID, sizeof (SA_MISC_CONFIG), SA_MISC_CONFIG_REVISION, {0, 0, 0}}, - {GRAPHICS_CONFIG_GUID, sizeof (GRAPHICS_CONFIG), GRAPHICS_CONFIG_REVISION, {0, 0, 0}}, - {IPU_CONFIG_GUID, sizeof (IPU_CONFIG), IPU_CONFIG_REVISION, {0, 0, 0}}, -#if (ENBDT_PF_ENABLE == 1) - {HYBRID_GRAPHICS_CONFIG_GUID, sizeof (HYBRID_GRAPHICS_CONFIG), HYBRID_GRAPHICS_CONFIG_REVISION, {0, 0, 0}}, -#endif - {MEMORY_CONFIG_GUID, sizeof (MEMORY_CONFIGURATION), MEMORY_CONFIG_REVISION, {0, 0, 0}} -}; -GLOBAL_REMOVE_IF_UNREFERENCED CONFIG_BLOCK_HEADER mBxtSaIpPreMemBlocks[] = { - // Block GUID Block Size, Revision - {SA_PRE_MEM_CONFIG_GUID, sizeof (SA_PRE_MEM_CONFIG), SA_PRE_MEM_CONFIG_REVISION, { 0, 0, 0}} -}; - -// -// Function call to Load defaults for Individial IP Blocks -// -EFI_STATUS -EFIAPI -LoadSaMiscDefault ( - IN VOID *ConfigBlockPointer - ) -{ - SA_MISC_CONFIG *MiscConfig; - - MiscConfig = ConfigBlockPointer; - - DEBUG ((DEBUG_INFO, "MiscConfig->Header.Guid = %g\n", MiscConfig->Header.Guid)); - DEBUG ((DEBUG_INFO, "MiscConfig->Header.Size = 0x%x\n", MiscConfig->Header.Size)); - - return EFI_SUCCESS; -} - - -EFI_STATUS -EFIAPI -LoadIpuDefault ( - IN VOID *ConfigBlockPointer - ) -{ - IPU_CONFIG *IpuPolicy; - - IpuPolicy = ConfigBlockPointer; - DEBUG ((DEBUG_INFO, "IpuPolicy->Header.Guid = %g\n", IpuPolicy->Header.Guid)); - DEBUG ((DEBUG_INFO, "IpuPolicy->Header.Size = 0x%x\n", IpuPolicy->Header.Size)); - - IpuPolicy->SaIpuEnable = 1; - IpuPolicy->IpuMmAdr = 0xCF000000; - - return EFI_SUCCESS; -} - - -EFI_STATUS -EFIAPI -LoadGraphicsDefault ( - IN VOID *ConfigBlockPointer - ) -{ - GRAPHICS_CONFIG *GtConfig; - - GtConfig = ConfigBlockPointer; - - // - // Initialize the Graphics configuration - // - GtConfig->GmAdr = 0xA0000000; - GtConfig->GttMmAdr = 0xBF000000; - GtConfig->EnableRenderStandby = 1; - GtConfig->PavpEnable = 1; - GtConfig->PmSupport = 1; - GtConfig->PavpPr3 = 1; - GtConfig->PeiGraphicsPeimInit = 0; - // - // Initialize the CdClock to 675 Mhz - // - GtConfig->CdClock = 3; - - return EFI_SUCCESS; -} - - -#if (ENBDT_PF_ENABLE == 1) -EFI_STATUS -EFIAPI -LoadHybridGraphicsDefault ( - IN VOID *ConfigBlockPointer - ) -{ - HYBRID_GRAPHICS_CONFIG *HgConfig; - - HgConfig = ConfigBlockPointer; - - // - // Initialize the Hybrid Graphics configuration - // - HgConfig->HgEnabled = 0x0; - HgConfig->HgDelayAfterPwrEn = 300; - HgConfig->HgDelayAfterHoldReset = 100; - - return EFI_SUCCESS; -} -#endif - - -EFI_STATUS -EFIAPI -LoadSaPreMemDefault ( - IN VOID *ConfigBlockPointer - ) -{ - SA_PRE_MEM_CONFIG *SaPreMemConfig; - - SaPreMemConfig = ConfigBlockPointer; - - // - // Initialize the Graphics configuration - // - SaPreMemConfig->GttSize = 3; - SaPreMemConfig->IgdDvmt50PreAlloc = 2; - SaPreMemConfig->InternalGraphics = 1; - SaPreMemConfig->PrimaryDisplay = 0; - SaPreMemConfig->ApertureSize = 2; - - return EFI_SUCCESS; -} - - -/** - Initialize default settings for each SA Config block. - - @param[in] ConfigBlockPointer The buffer pointer that will be initialized as specific config block. - @param[in] BlockId Request to initialize defaults of specified config block by given Block ID. - - @retval EFI_SUCCESS The given buffer has contained the defaults of requested config block. - @retval EFI_NOT_FOUND Block ID is not defined so no default Config block will be initialized. - -**/ -EFI_STATUS -EFIAPI -LoadConfigBlockDefault ( - IN VOID *ConfigBlockPointer, - IN EFI_GUID BlockGuid - ) -{ - if (CompareGuid (&BlockGuid, &gSaMiscConfigGuid)) { - LoadSaMiscDefault (ConfigBlockPointer); - } else { - if (CompareGuid (&BlockGuid, &gGraphicsConfigGuid)) { - LoadGraphicsDefault (ConfigBlockPointer); - } else { - if (CompareGuid (&BlockGuid, &gIpuConfigGuid)) { - LoadIpuDefault (ConfigBlockPointer); - } else { - if (CompareGuid (&BlockGuid, &gSaPreMemConfigGuid)) { - LoadSaPreMemDefault (ConfigBlockPointer); - } -#if (ENBDT_PF_ENABLE == 1) - else { - if (CompareGuid (&BlockGuid, &gHybridGraphicsConfigGuid)) { - LoadHybridGraphicsDefault (ConfigBlockPointer); - } -#endif - else { - return EFI_NOT_FOUND; - } - - -#if (ENBDT_PF_ENABLE == 1) - } -#endif - } - } - } - - return EFI_SUCCESS; -} - - -/** - Creates the Pre-Mem Config Blocks for SA Policy. - It allocates and zero out buffer, and fills in the Intel default settings. - - @param[in, out] SiSaPolicyPpi The pointer to get SI/SA Policy PPI instance. - - @retval EFI_SUCCESS The policy default is initialized. - @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer. - -**/ -EFI_STATUS -EFIAPI -SaCreatePreMemConfigBlocks( - IN OUT SI_SA_POLICY_PPI **SiSaPolicyPpi - ) -{ - UINT32 TotalBlockSize; - UINT16 TotalBlockCount; - UINT16 BlockCount; - VOID *ConfigBlockPointer; - EFI_STATUS Status; - SI_SA_POLICY_PPI *SaInitPolicy; - UINT32 ConfigBlockHdrSize; - UINT32 RequiredSize; - - SaInitPolicy = NULL; - TotalBlockCount = sizeof (mBxtSaIpPreMemBlocks) / sizeof (CONFIG_BLOCK_HEADER); - DEBUG ((DEBUG_INFO, "TotalBlockCount = 0x%x\n", TotalBlockCount)); - - TotalBlockSize = 0; - - for (BlockCount = 0; BlockCount < TotalBlockCount; BlockCount++) { - TotalBlockSize += (UINT32) mBxtSaIpPreMemBlocks[BlockCount].Size; - DEBUG ((DEBUG_INFO, "TotalBlockSize after adding Block[0x%x]= 0x%x\n", BlockCount, TotalBlockSize)); - } - DEBUG ((DEBUG_INFO, "TotalBlockSize Final = 0x%x\n", TotalBlockSize)); - - ConfigBlockHdrSize = GetSizeOfConfigBlockTableHeaders ((UINT16) TotalBlockCount); - - RequiredSize = ConfigBlockHdrSize + TotalBlockSize; - - Status = CreateConfigBlockTable ((VOID *) &SaInitPolicy, TotalBlockCount, RequiredSize); - ASSERT_EFI_ERROR (Status); - - // - // Initialize Policy Revision - // - SaInitPolicy->TableHeader.Header.Revision = SA_POLICY_PPI_REVISION; - // - // Initialize ConfigBlockPointer to NULL - // - ConfigBlockPointer = NULL; - // - // Loop to identify each config block from mBxtSaIpPreMemBlocks[] Table and add each of them - // - for (BlockCount = 0; BlockCount < TotalBlockCount; BlockCount++) { - ConfigBlockPointer = (VOID *) &mBxtSaIpPreMemBlocks[BlockCount]; - Status = AddConfigBlock ((VOID *) SaInitPolicy, (VOID *) &ConfigBlockPointer); - ASSERT_EFI_ERROR (Status); - LoadConfigBlockDefault ((VOID *) ConfigBlockPointer, mBxtSaIpPreMemBlocks[BlockCount].Guid); - } - // - // Assignment for returning SaInitPolicy config block base address - // - *SiSaPolicyPpi = SaInitPolicy; - - return EFI_SUCCESS; -} - - -/** - Creates the Config Blocks for SA Policy. - It allocates and zero out buffer, and fills in the Intel default settings. - - @param[in, out] SiSaPolicyPpi The pointer to get SI/SA Policy PPI instance. - - @retval EFI_SUCCESS The policy default is initialized. - @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer. - -**/ -EFI_STATUS -EFIAPI -CreateConfigBlocks ( - IN OUT SI_SA_POLICY_PPI **SiSaPolicyPpi - ) -{ - UINT32 TotalBlockSize; - UINT16 TotalBlockCount; - UINT16 BlockCount; - VOID *ConfigBlockPointer; - EFI_STATUS Status; - SI_SA_POLICY_PPI *SaInitPolicy; - UINT32 ConfigBlockHdrSize; - UINT32 RequiredSize; - - SaInitPolicy = NULL; - TotalBlockCount = sizeof (mBxtSaIpBlocks) / sizeof (CONFIG_BLOCK_HEADER); - DEBUG ((DEBUG_INFO, "TotalBlockCount = 0x%x\n", TotalBlockCount)); - - TotalBlockSize = 0; - - for (BlockCount = 0 ; BlockCount < TotalBlockCount; BlockCount++) { - TotalBlockSize += (UINT32 )mBxtSaIpBlocks[BlockCount].Size; - DEBUG ((DEBUG_INFO, "TotalBlockSize after adding Block[0x%x]= 0x%x\n", BlockCount, TotalBlockSize)); - } - DEBUG ((DEBUG_INFO, "TotalBlockSize Final = 0x%x\n", TotalBlockSize)); - - ConfigBlockHdrSize = GetSizeOfConfigBlockTableHeaders ((UINT16) TotalBlockCount); - - RequiredSize = ConfigBlockHdrSize + TotalBlockSize; - - Status = CreateConfigBlockTable ((VOID *) &SaInitPolicy, TotalBlockCount, RequiredSize); - ASSERT_EFI_ERROR (Status); - - // - // Initialize Policy Revision - // - SaInitPolicy->TableHeader.Header.Revision = SA_POLICY_PPI_REVISION; - // - // Initialize ConfigBlockPointer to NULL - // - ConfigBlockPointer = NULL; - // - // Loop to identify each config block from mBxtSaIpBlocks[] Table and add each of them - // - for (BlockCount = 0 ; BlockCount < TotalBlockCount; BlockCount++) { - ConfigBlockPointer = (VOID *) &mBxtSaIpBlocks[BlockCount]; - Status = AddConfigBlock ((VOID *) SaInitPolicy, (VOID *) &ConfigBlockPointer); - ASSERT_EFI_ERROR (Status); - LoadConfigBlockDefault ((VOID *) ConfigBlockPointer, mBxtSaIpBlocks[BlockCount].Guid); - } - // - // Assignment for returning SaInitPolicy config block base address - // - *SiSaPolicyPpi = SaInitPolicy; - - return EFI_SUCCESS; -} - - -/** - Install PPI SiSaPolicyPpi. - While installed, RC assumes the Policy is ready and finalized. So please update and override - any setting before calling this function. - - @param[in] SiSaPolicyPpi Pointer of policy structure. - - @retval EFI_SUCCESS The policy is installed. - @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer. - -**/ -EFI_STATUS -EFIAPI -SiSaInstallPolicyPpi ( - IN SI_SA_POLICY_PPI *SiSaPolicyPpi - ) -{ - EFI_STATUS Status; - EFI_PEI_PPI_DESCRIPTOR *SiSaInstallPolicyPpiDesc; - - SiSaInstallPolicyPpiDesc = (EFI_PEI_PPI_DESCRIPTOR *) AllocateZeroPool (sizeof (EFI_PEI_PPI_DESCRIPTOR)); - ASSERT (SiSaInstallPolicyPpiDesc != NULL); - if (SiSaInstallPolicyPpiDesc == NULL) { - return EFI_OUT_OF_RESOURCES; - } - - // - // Initialize the PPI - // - SiSaInstallPolicyPpiDesc->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; - SiSaInstallPolicyPpiDesc->Guid = &gSiSaPolicyPpiGuid; - SiSaInstallPolicyPpiDesc->Ppi = SiSaPolicyPpi; - - // - // Install PEI SA Policy PPI - // - Status = PeiServicesInstallPpi (SiSaInstallPolicyPpiDesc); - ASSERT_EFI_ERROR (Status); - - return Status; -} - - -/** - SaInstallPreMemPolicyPpi installs Sa Pre Mem PolicyPpi. - While installed, RC assumes the Policy is ready and finalized. So please update and override - any setting before calling this function. - - @param[in] SaPreMemPolicyPpi The pointer to SA PREMEM Policy PPI instance. - - @retval EFI_SUCCESS The policy is installed. - @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer. - -**/ -EFI_STATUS -EFIAPI -SaInstallPreMemPolicyPpi ( - IN SI_SA_POLICY_PPI *SaPolicyPpi - ) -{ - EFI_STATUS Status; - EFI_PEI_PPI_DESCRIPTOR *SaPreMemPolicyPpiDesc; - - SaPreMemPolicyPpiDesc = (EFI_PEI_PPI_DESCRIPTOR *) AllocateZeroPool (sizeof (EFI_PEI_PPI_DESCRIPTOR)); - if (SaPreMemPolicyPpiDesc == NULL) { - ASSERT (FALSE); - return EFI_OUT_OF_RESOURCES; - } - - SaPreMemPolicyPpiDesc->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; - SaPreMemPolicyPpiDesc->Guid = &gSiSaPreMemPolicyPpiGuid; - SaPreMemPolicyPpiDesc->Ppi = SaPolicyPpi; - - // - // Install PREMEM Policy PPI - // - Status = PeiServicesInstallPpi (SaPreMemPolicyPpiDesc); - ASSERT_EFI_ERROR (Status); - - return Status; -} - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.inf b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.inf deleted file mode 100644 index 54a4d90c0a..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.inf +++ /dev/null @@ -1,47 +0,0 @@ -## @file -# Pei SA policy library. -# -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
-# -# 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. -# -## - -[Defines] - INF_VERSION = 0x00010017 - BASE_NAME = PeiSaPolicyLib - FILE_GUID = B612937D-2674-4e5f-9EAB-3B94CCF31C9E - VERSION_STRING = 1.0 - MODULE_TYPE = PEIM - LIBRARY_CLASS = PeiSaPolicyLib - -[Sources] - PeiSaPolicyLib.c - PeiSaPolicyLibrary.h - -[Packages] - MdePkg/MdePkg.dec - BroxtonSiPkg/BroxtonSiPkg.dec - -[LibraryClasses] - DebugLib - PeiServicesLib - MemoryAllocationLib - ConfigBlockLib - BaseMemoryLib - -[Ppis] - gSiSaPolicyPpiGuid ## PRODUCES - gSiSaPreMemPolicyPpiGuid ## PRODUCES - gSaMiscConfigGuid ## PRODUCES - gGraphicsConfigGuid ## PRODUCES - gMemoryConfigGuid ## PRODUCES - gIpuConfigGuid ## PRODUCES - gHybridGraphicsConfigGuid ## PRODUCES - gSaPreMemConfigGuid diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLibrary.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLibrary.h deleted file mode 100644 index 26a6e67968..0000000000 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLibrary.h +++ /dev/null @@ -1,70 +0,0 @@ -/** @file - Header file for the Pei SA policy library. - - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
- - 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_LIBRARY_H_ -#define _PEI_SA_POLICY_LIBRARY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#define SaIoRead8 IoRead8 -#define SaIoRead16 IoRead16 -#define SaIoRead32 IoRead32 -#define SaIoWrite8 IoWrite8 -#define SaIoWrite16 IoWrite16 -#define SaIoWrite32 IoWrite32 -#define SaCopyMem CopyMem -#define SaSetMem SetMem -#define SaLShiftU64 LShiftU64 -#define SaRShiftU64 RShiftU64 -#define SaMultU64x32 MultU64x32 - -#define RTC_INDEX_REGISTER (0x70) -#define RTC_TARGET_REGISTER (0x71) -#define R_PCH_RTC_INDEX_ALT (0x74) -#define R_PCH_RTC_TARGET_ALT (0x75) -#define R_PCH_RTC_EXT_INDEX_ALT (0x76) -#define R_PCH_RTC_EXT_TARGET_ALT (0x77) - -#define RTC_INDEX_MASK (0x7F) -#define RTC_BANK_SIZE (0x80) - -#define RTC_SECONDS (0x00) -#define RTC_MINUTES (0x02) -#define RTC_HOURS (0x04) -#define RTC_DAY_OF_MONTH (0x07) -#define RTC_MONTH (0x08) -#define RTC_YEAR (0x09) -#define CMOS_REGA (0x0A) -#define CMOS_REGB (0x0B) -#define CMOS_REGC (0x0C) -#define CMOS_REGD (0x0D) - -#define RTC_UPDATE_IN_PROGRESS (0x80) -#define RTC_HOLD (0x80) -#define RTC_MODE_24HOUR (0x02) -#define RTC_CLOCK_DIVIDER (0x20) -#define RTC_RATE_SELECT (0x06) - -#define BCD2BINARY(A) (((((A) >> 4) & 0xF) * 10) + ((A) & 0xF)) -#define CENTURY_OFFSET (2000) - -#endif // _PEI_SA_POLICY_LIBRARY_H_ - diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SiPkgPeiLib.dsc b/Silicon/BroxtonSoC/BroxtonSiPkg/SiPkgPeiLib.dsc index 14a887005d..b454329aed 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SiPkgPeiLib.dsc +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SiPkgPeiLib.dsc @@ -1,7 +1,7 @@ ## @file # Component description file for the Broxton RC PEI libraries. # -# Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,10 +36,6 @@ MpServiceLib|$(PLATFORM_SI_PACKAGE)/Cpu/Library/Private/PeiMpServiceLib/PeiMpServiceLib.inf CpuS3Lib|$(PLATFORM_SI_PACKAGE)/Cpu/Library/Private/PeiCpuS3Lib/PeiCpuS3Lib.inf -# -# NC -# - PeiSaPolicyLib|$(PLATFORM_SI_PACKAGE)/NorthCluster/Library/PeiSaPolicyLib/PeiSaPolicyLib.inf # # TXE -- cgit v1.2.3