From d0d640c6fcd9647fa6fe2a8a09bcc65558a0884a Mon Sep 17 00:00:00 2001 From: zwei4 Date: Mon, 9 Jan 2017 14:59:23 +0800 Subject: Remove platform policy Remove silicon platform policy which is not used by any silicon code. Signed-off-by: zwei4 Reviewed-by: Mang Guo Cc: Mike Wu Cc: Benjamin You Cc: Mang Guo Cc: Shifei Lu --- .../Library/PeiPolicyInitLib/PeiPolicyInit.h | 1 - .../Library/PeiPolicyInitLib/PeiPolicyInitLib.inf | 2 - .../Library/PeiPolicyInitLib/PeiSiPolicyInit.c | 60 -------------------- .../Library/PeiPolicyInitLib/PeiSiPolicyInit.h | 47 ---------------- .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 1 - .../Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.c | 65 ---------------------- .../Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.h | 26 --------- .../PlatformPreMemPei/PlatformInitPreMem.c | 45 --------------- .../PlatformPreMemPei/PlatformPreMemPei.inf | 1 - .../PlatformDsc/LibraryClasses.IA32.PEI.dsc | 2 - 10 files changed, 250 deletions(-) delete mode 100644 Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.c delete mode 100644 Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.h delete mode 100644 Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.c delete mode 100644 Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.h (limited to 'Platform') diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h index 37661ece06..c4bdfb9a0b 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInit.h @@ -19,7 +19,6 @@ #include #include #include -#include "PeiSiPolicyInit.h" #include "PeiCpuPolicyInit.h" #endif diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf index 319684445d..93a10a0332 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiPolicyInitLib.inf @@ -43,8 +43,6 @@ PeiPolicyInit.h PeiCpuPolicyInit.c PeiCpuPolicyInit.h - PeiSiPolicyInit.c - PeiSiPolicyInit.h [Ppis] gScPcieDeviceTablePpiGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.c deleted file mode 100644 index dac17f1280..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.c +++ /dev/null @@ -1,60 +0,0 @@ -/** @file - This file is SampleCode for Intel Silicon PEI Policy initialzation. - - 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 "PeiSiPolicyInit.h" - -/** - This function performs Silicon 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 ERRORS The PPI is not successfully installed. - @retval EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the driver - -**/ -EFI_STATUS -EFIAPI -PeiSiPolicyInit ( - IN UINT8 FirmwareConfiguration - ) -{ - EFI_STATUS Status; - SI_POLICY_PPI *SiPolicyPpi; - - // - // Call SiCreatePolicyDefaults to initialize Silicon Policy structure - // and get all Intel default policy settings. - // - Status = SiCreatePolicyDefaults (&SiPolicyPpi); - ASSERT_EFI_ERROR (Status); - - // - // Update and override all platform related and customized settings below. - // - UpdatePeiSiPolicy (SiPolicyPpi); - - // - // Install SiPolicyPpi. - // While installed, RC assumes the Policy is ready and finalized. So please - // update and override any setting before calling this function. - // - Status = SiInstallPolicyPpi (SiPolicyPpi); - ASSERT_EFI_ERROR (Status); - - return Status; -} - diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.h deleted file mode 100644 index 783421fe8a..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyInitLib/PeiSiPolicyInit.h +++ /dev/null @@ -1,47 +0,0 @@ -/** @file - Header file for the PeiSiPolicyInit. - - 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 _SI_POLICY_INIT_PEI_H_ -#define _SI_POLICY_INIT_PEI_H_ - -#include -#include -#include -#include -#include -#include - -// -// Functions -// -/** - This function performs Silicon 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 ERRORS The PPI is not successfully installed. - @retval EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the driver. - -**/ -EFI_STATUS -EFIAPI -PeiSiPolicyInit ( - IN UINT8 FirmwareConfiguration - ); - -#endif // _SI_POLICY_INIT_PEI_H_ - diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf index df8293d917..d913506f86 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf @@ -25,7 +25,6 @@ PeiScPolicyUpdate.c PeiCpuPolicyUpdatePreMem.c PeiCpuPolicyUpdate.c - PeiSiPolicyUpdate.c HdaVerbTables.c [Packages] diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.c deleted file mode 100644 index 4fc9434988..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.c +++ /dev/null @@ -1,65 +0,0 @@ -/** @file - This file is SampleCode of the library for Intel Silicon PEI - Platform Policy initialzation. - - 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 "PeiSiPolicyUpdate.h" -#include -#include - -/** - This function performs Silicon PEI Policy initialzation. - - @param[in] SiPolicy The Silicon Policy PPI instance - - @retval EFI_SUCCESS The function completed successfully - -**/ -EFI_STATUS -EFIAPI -UpdatePeiSiPolicy ( - IN OUT SI_POLICY_PPI *SiPolicy - ) -{ - UINTN VariableSize; - SYSTEM_CONFIGURATION SystemConfiguration; - EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices; - EFI_STATUS Status; - - // - // Update Silicon Policy Config - // - // - // Retrieve Setup variable - // - Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariableServices); - if (EFI_ERROR (Status)) { - ASSERT_EFI_ERROR (Status); - return Status; - } - - VariableSize = sizeof (SYSTEM_CONFIGURATION); - Status = VariableServices->GetVariable ( - VariableServices, - PLATFORM_SETUP_VARIABLE_NAME, - &gEfiSetupVariableGuid, - NULL, - &VariableSize, - &SystemConfiguration - ); - SiPolicy->OsSelection = 3; - - return EFI_SUCCESS; -} - diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.h deleted file mode 100644 index 711a5b4818..0000000000 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiSiPolicyUpdate.h +++ /dev/null @@ -1,26 +0,0 @@ -/** @file - Header file for PEI SiPolicyUpdate. - - 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_SI_POLICY_UPDATE_H_ -#define _PEI_SI_POLICY_UPDATE_H_ - -#include -#include -#include -#include -#include - -#endif - diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c index cab3847649..a002bef041 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c @@ -595,49 +595,6 @@ ScBaseInit ( } -/** - This function performs Silicon Policy initialization. - - @param[in] FirmwareConfiguration It uses to skip specific policy init that depends - on the 'FirmwareConfiguration' variable. - - @retval EFI_SUCCESS The PPI is installed and initialized. - @retval EFI ERRORS The PPI is not successfully installed. - @retval EFI_OUT_OF_RESOURCES Do not have enough resources to initialize the driver - -**/ -EFI_STATUS -EFIAPI -PeiSiPolicyInit ( - VOID - ) -{ - EFI_STATUS Status; - SI_POLICY_PPI *SiPolicyPpi; - - // - // Call SiCreatePolicyDefaults to initialize Silicon Policy structure - // and get all Intel default policy settings. - // - Status = SiCreatePolicyDefaults (&SiPolicyPpi); - ASSERT_EFI_ERROR (Status); - - // - // Update and override all platform related and customized settings below. - // - UpdatePeiSiPolicy (SiPolicyPpi); - - // - // Install SiPolicyPpi. - // While installed, RC assumes the Policy is ready and finalized. So please - // update and override any setting before calling this function. - // - Status = SiInstallPolicyPpi (SiPolicyPpi); - ASSERT_EFI_ERROR (Status); - - return Status; -} - /** This function performs SC PreMem Policy initialization. @@ -1005,8 +962,6 @@ PlatformInitPreMemEntryPoint ( Status = PeiScPreMemPolicyInit (&StartTimerTicker); ASSERT_EFI_ERROR (Status); - Status = PeiSiPolicyInit (); - ASSERT_EFI_ERROR (Status); if (!ImageInMemory) { if (GdtDscriptor.Base >= 0xFE000000) { diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformPreMemPei.inf b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformPreMemPei.inf index dd8d073dbb..22e9de212c 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformPreMemPei.inf +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformPreMemPei.inf @@ -90,7 +90,6 @@ MonoStatusCodeLib SeCUmaLib BaseIpcLib - PeiSiPolicyInit PeiPlatformConfigUpdateLib GpioLib CpuPolicyLib diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc index 03df740090..2b004019d0 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc @@ -21,9 +21,7 @@ # # Common # - PeiSiPolicyInit|$(PLATFORM_SI_PACKAGE)/Library/PeiSiPolicyLib/PeiSiPolicyLib.inf PeiPlatformConfigUpdateLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiPlatformConfigUpdateLib/PeiPlatformConfigUpdateLib.inf - SiPolicyLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiPolicyLib/PeiSiPolicyLib.inf # -- cgit v1.2.3