From be8b1fff74129bfd5d6eb8668566b29974822c0a Mon Sep 17 00:00:00 2001 From: Jiewen Yao Date: Mon, 28 Aug 2017 09:38:11 +0800 Subject: new policy design for min platform. Cc: Michael A Kubacki Cc: Amy Chan Cc: Chasel Chiu Cc: Brett Wang Cc: Daocheng Bu Cc: Isaac W Oram Cc: Rangasai V Chaganty Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao Reviewed-by: Michael A Kubacki Reviewed-by: Amy Chan --- .../PeiFspWrapperPlatformLib.c | 14 +- .../PeiFspWrapperPlatformLib.inf | 4 +- .../Include/Library/FspPolicyInitLib.h | 46 ------- .../Include/Library/FspPolicyUpdateLib.h | 48 ------- .../Include/Library/SiliconPolicyInitLib.h | 141 +++++++++++++++++++++ .../Include/Library/SiliconPolicyUpdateLib.h | 90 +++++++++++++ Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec | 4 +- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 9 ++ .../SiliconPolicyInitLibNull.c | 70 ++++++++++ .../SiliconPolicyInitLibNull.inf | 36 ++++++ .../SiliconPolicyUpdateLibNull.c | 43 +++++++ .../SiliconPolicyUpdateLibNull.inf | 36 ++++++ .../SiliconPolicyDxe/SiliconPolicyDxe.c | 43 +++++++ .../SiliconPolicyDxe/SiliconPolicyDxe.inf | 62 +++++++++ .../SiliconPolicyPei/SiliconPolicyPeiPostMem.c | 43 +++++++ .../SiliconPolicyPei/SiliconPolicyPeiPostMem.inf | 62 +++++++++ .../SiliconPolicyPei/SiliconPolicyPeiPreMem.c | 43 +++++++ .../SiliconPolicyPei/SiliconPolicyPeiPreMem.inf | 62 +++++++++ 18 files changed, 752 insertions(+), 104 deletions(-) delete mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h delete mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyInitLib.h create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyUpdateLib.h create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.c create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.inf create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.c create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.inf create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.c create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.c create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.c create mode 100644 Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.c b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.c index 3682a1e2e2..2c6c026ee5 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.c +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.c @@ -19,8 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include -#include +#include +#include /** @@ -37,8 +37,9 @@ UpdateFspmUpdData ( IN OUT VOID *FspUpdRgnPtr ) { - FspmPolicyInit (FspUpdRgnPtr); - FspmPolicyUpdate (FspUpdRgnPtr); + SiliconPolicyInitPreMem (FspUpdRgnPtr); + SiliconPolicyUpdatePreMem (FspUpdRgnPtr); + SiliconPolicyDonePreMem (FspUpdRgnPtr); } /** @@ -53,8 +54,9 @@ UpdateFspsUpdData ( IN OUT VOID *FspUpdRgnPtr ) { - FspsPolicyInit (FspUpdRgnPtr); - FspsPolicyUpdate (FspUpdRgnPtr); + SiliconPolicyInitPostMem (FspUpdRgnPtr); + SiliconPolicyUpdatePostMem (FspUpdRgnPtr); + SiliconPolicyDonePostMem (FspUpdRgnPtr); } /** diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf index 316c983322..f7e82d81d7 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf @@ -58,7 +58,7 @@ MinPlatformPkg/MinPlatformPkg.dec [LibraryClasses.IA32] - FspPolicyInitLib - FspPolicyUpdateLib + SiliconPolicyInitLib + SiliconPolicyUpdateLib PeiServicesTablePointerLib BaseMemoryLib diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h deleted file mode 100644 index ba95a32c85..0000000000 --- a/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h +++ /dev/null @@ -1,46 +0,0 @@ -/** @file - Function prototype of FspPolicyInitLib. - -Copyright (c) 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 that 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 _FSP_POLICY_INIT_LIB_H_ -#define _FSP_POLICY_INIT_LIB_H_ - -/** - Performs FSPM UPD Policy initialization. - - Value of FspmUpd has been initialized by FSP binary default value. - Only a subset of FspmUpd needs to be updated for different silicon sku. - - @param[in, out] FspmUpd Pointer to FSPM UPD data. -**/ -VOID -EFIAPI -FspmPolicyInit ( - IN OUT VOID *FspmUpd - ); - -/** - Performs FSPS UPD Policy initialization. - - Value of FspsUpd has been initialized by FSP binary default value. - Only a subset of FspsUpd needs to be updated for different silicon sku. - - @param[in, out] FspsUpd Pointer to FSPS UPD data. -**/ -VOID -EFIAPI -FspsPolicyInit ( - IN OUT VOID *FspsUpd - ); - -#endif // _FSP_POLICY_INIT_LIB_H_ diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h deleted file mode 100644 index 8726d21ebc..0000000000 --- a/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h +++ /dev/null @@ -1,48 +0,0 @@ -/** @file - Function prototype of FspPolicyUpdateLib. - -Copyright (c) 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 that 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 _FSP_POLICY_UPDATE_LIB_H_ -#define _FSP_POLICY_UPDATE_LIB_H_ - -/** - Performs FSPM UPD Policy update. - - A platform may use this API to update the FSPM UPD policy initialized - by the silicon module or the default UPD data. - The output of FSPM UPD data from this API is the final UPD data. - - @param[in, out] FspmUpd Pointer to FSPM UPD data. -**/ -VOID -EFIAPI -FspmPolicyUpdate ( - IN OUT VOID *FspmUpd - ); - -/** - Performs FSPS UPD Policy update. - - A platform may use this API to update the FSPS UPD policy initialized - by the silicon module or the default UPD data. - The output of FSPS UPD data from this API is the final UPD data. - - @param[in, out] FspsUpd Pointer to FSPS UPD data. -**/ -VOID -EFIAPI -FspsPolicyUpdate ( - IN OUT VOID *FspsUpd - ); - -#endif diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyInitLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyInitLib.h new file mode 100644 index 0000000000..1694ae0bb5 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyInitLib.h @@ -0,0 +1,141 @@ +/** @file + +Copyright (c) 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 that 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 _SILICON_POLICY_INIT_LIB_H_ +#define _SILICON_POLICY_INIT_LIB_H_ + +/** + Performs silicon pre-mem policy initialization. + + The meaning of Policy is defined by silicon code. + It could be the raw data, a handle, a PPI, etc. + + The returned data must be used as input data for SiliconPolicyDonePreMem(), + and SiliconPolicyUpdateLib.SiliconPolicyUpdatePreMem(). + + 1) In FSP path, the input Policy should be FspmUpd. + Value of FspmUpd has been initialized by FSP binary default value. + Only a subset of FspmUpd needs to be updated for different silicon sku. + The return data is same FspmUpd. + + 2) In non-FSP path, the input policy could be NULL. + The return data is the initialized policy. + + @param[in, out] Policy Pointer to policy. + + @return the initialized policy. +**/ +VOID * +EFIAPI +SiliconPolicyInitPreMem ( + IN OUT VOID *Policy OPTIONAL + ); + +/* + The silicon pre-mem policy is finalized. + Silicon code can do initialization based upon the policy data. + + The input Policy must be returned by SiliconPolicyInitPreMem(). + + @param[in] Policy Pointer to policy. + + @retval EFI_SUCCESS The policy is handled consumed by silicon code. +*/ +EFI_STATUS +EFIAPI +SiliconPolicyDonePreMem ( + IN VOID *Policy + ); + +/** + Performs silicon post-mem policy initialization. + + The meaning of Policy is defined by silicon code. + It could be the raw data, a handle, a PPI, etc. + + The returned data must be used as input data for SiliconPolicyDonePostMem(), + and SiliconPolicyUpdateLib.SiliconPolicyUpdatePostMem(). + + 1) In FSP path, the input Policy should be FspsUpd. + Value of FspsUpd has been initialized by FSP binary default value. + Only a subset of FspsUpd needs to be updated for different silicon sku. + The return data is same FspsUpd. + + 2) In non-FSP path, the input policy could be NULL. + The return data is the initialized policy. + + @param[in, out] Policy Pointer to policy. + + @return the initialized policy. +**/ +VOID * +EFIAPI +SiliconPolicyInitPostMem ( + IN OUT VOID *Policy OPTIONAL + ); + +/* + The silicon post-mem policy is finalized. + Silicon code can do initialization based upon the policy data. + + The input Policy must be returned by SiliconPolicyInitPostMem(). + + @param[in] Policy Pointer to policy. + + @retval EFI_SUCCESS The policy is handled consumed by silicon code. +*/ +EFI_STATUS +EFIAPI +SiliconPolicyDonePostMem ( + IN VOID *Policy + ); + +/** + Performs silicon late policy initialization. + + The meaning of Policy is defined by silicon code. + It could be the raw data, a handle, a protocol, etc. + + The returned data must be used as input data for SiliconPolicyDoneLate(), + and SiliconPolicyUpdateLib.SiliconPolicyUpdateLate(). + + In FSP or non-FSP path, the input policy could be NULL. + The return data is the initialized policy. + + @param[in, out] Policy Pointer to policy. + + @return the initialized policy. +**/ +VOID * +EFIAPI +SiliconPolicyInitLate ( + IN OUT VOID *Policy OPTIONAL + ); + +/* + The silicon late policy is finalized. + Silicon code can do initialization based upon the policy data. + + The input Policy must be returned by SiliconPolicyInitLate(). + + @param[in] Policy Pointer to policy. + + @retval EFI_SUCCESS The policy is handled consumed by silicon code. +*/ +EFI_STATUS +EFIAPI +SiliconPolicyDoneLate ( + IN VOID *Policy + ); + +#endif diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyUpdateLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyUpdateLib.h new file mode 100644 index 0000000000..0e166f1dc9 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyUpdateLib.h @@ -0,0 +1,90 @@ +/** @file + +Copyright (c) 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 that 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 _SILICON_POLICY_UPDATE_LIB_H_ +#define _SILICON_POLICY_UPDATE_LIB_H_ + +/** + Performs silicon pre-mem policy update. + + The meaning of Policy is defined by silicon code. + It could be the raw data, a handle, a PPI, etc. + + The input Policy must be returned by SiliconPolicyDonePreMem(). + + 1) In FSP path, the input Policy should be FspmUpd. + A platform may use this API to update the FSPM UPD policy initialized + by the silicon module or the default UPD data. + The output of FSPM UPD data from this API is the final UPD data. + + 2) In non-FSP path, the board may use additional way to get + the silicon policy data field based upon the input Policy. + + @param[in, out] Policy Pointer to policy. + + @return the updated policy. +**/ +VOID * +EFIAPI +SiliconPolicyUpdatePreMem ( + IN OUT VOID *Policy + ); + +/** + Performs silicon post-mem policy update. + + The meaning of Policy is defined by silicon code. + It could be the raw data, a handle, a PPI, etc. + + The input Policy must be returned by SiliconPolicyDonePostMem(). + + 1) In FSP path, the input Policy should be FspsUpd. + A platform may use this API to update the FSPS UPD policy initialized + by the silicon module or the default UPD data. + The output of FSPS UPD data from this API is the final UPD data. + + 2) In non-FSP path, the board may use additional way to get + the silicon policy data field based upon the input Policy. + + @param[in, out] Policy Pointer to policy. + + @return the updated policy. +**/ +VOID * +EFIAPI +SiliconPolicyUpdatePostMem ( + IN OUT VOID *Policy + ); + +/** + Performs silicon late policy update. + + The meaning of Policy is defined by silicon code. + It could be the raw data, a handle, a Protocol, etc. + + The input Policy must be returned by SiliconPolicyDoneLate(). + + In FSP or non-FSP path, the board may use additional way to get + the silicon policy data field based upon the input Policy. + + @param[in, out] Policy Pointer to policy. + + @return the updated policy. +**/ +VOID * +EFIAPI +SiliconPolicyUpdateLate ( + IN OUT VOID *Policy + ); + +#endif diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec index 477d3cc280..e1d52b7a62 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec @@ -57,8 +57,8 @@ AslUpdateLib|Include/Library/AslUpdateLib.h BoardAcpiEnableLib|Include/Library/BoardAcpiEnableLib.h BoardAcpiTableLib|Include/Library/BoardAcpiTableLib.h -FspPolicyInitLib|Include/Library/FspPolicyInitLib.h -FspPolicyUpdateLib|Include/Library/FspPolicyUpdateLib.h +SiliconPolicyInitLib|Include/Library/SiliconPolicyInitLib.h +SiliconPolicyUpdateLib|Include/Library/SiliconPolicyUpdateLib.h SpiFlashCommonLib|Include/Library/SpiFlashCommonLib.h diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc index b6a723616d..ef2b150f2a 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -48,6 +48,7 @@ gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly|FALSE gPlatformModuleTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE gPlatformModuleTokenSpaceGuid.PcdTpm2Enable|FALSE + gPlatformModuleTokenSpaceGuid.PcdPerformanceEnable|FALSE ################################################################################ # @@ -81,6 +82,9 @@ BoardInitLib|MinPlatformPkg/PlatformInit/Library/BoardInitLibNull/BoardInitLibNull.inf BoardAcpiTableLib|MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAcpiTableLibNull.inf BoardAcpiEnableLib|MinPlatformPkg/Acpi/Library/BoardAcpiLibNull/BoardAcpiEnableLibNull.inf + SiliconPolicyInitLib|MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.inf + SiliconPolicyUpdateLib|MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.inf + TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf [LibraryClasses.common.SEC] @@ -163,6 +167,11 @@ MinPlatformPkg/PlatformInit/Library/BoardInitLibNull/BoardInitLibNull.inf MinPlatformPkg/PlatformInit/Library/MultiBoardInitSupportLib/PeiMultiBoardInitSupportLib.inf MinPlatformPkg/PlatformInit/Library/MultiBoardInitSupportLib/DxeMultiBoardInitSupportLib.inf + MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf + MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf + MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf + MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.inf + MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.inf MinPlatformPkg/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf MinPlatformPkg/Test/Library/TestPointCheckLib/SecTestPointCheckLib.inf diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.c new file mode 100644 index 0000000000..804b729fd2 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.c @@ -0,0 +1,70 @@ +/** @file + +Copyright (c) 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 that 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 +#include +#include + +VOID * +EFIAPI +SiliconPolicyInitPreMem ( + IN VOID *Policy + ) +{ + return Policy; +} + +EFI_STATUS +EFIAPI +SiliconPolicyDonePreMem ( + IN VOID *Policy + ) +{ + return EFI_SUCCESS; +} + +VOID * +EFIAPI +SiliconPolicyInitPostMem ( + IN VOID *Policy + ) +{ + return Policy; +} + +EFI_STATUS +EFIAPI +SiliconPolicyDonePostMem ( + IN VOID *Policy + ) +{ + return EFI_SUCCESS; +} + +VOID * +EFIAPI +SiliconPolicyInitLate ( + IN VOID *Policy + ) +{ + return Policy; +} + +EFI_STATUS +EFIAPI +SiliconPolicyDoneLate ( + IN VOID *Policy + ) +{ + return EFI_SUCCESS; +} diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.inf new file mode 100644 index 0000000000..593d1490f1 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyInitLibNull/SiliconPolicyInitLibNull.inf @@ -0,0 +1,36 @@ +## @file +# Component information file for Silicon Init Library +# +# Copyright (c) 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 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 = 0x00010005 + BASE_NAME = SiliconInitLibNull + FILE_GUID = 81B55810-E3DE-4E3E-8477-B8768232193A + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = SiliconInitLib + +[LibraryClasses] + BaseLib + PcdLib + DebugLib + +[Packages] + MinPlatformPkg/MinPlatformPkg.dec + MdePkg/MdePkg.dec + +[Sources] + SiliconPolicyInitLibNull.c + +[Pcd] diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.c new file mode 100644 index 0000000000..3c73d02018 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.c @@ -0,0 +1,43 @@ +/** @file + +Copyright (c) 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 that 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 +#include +#include + +VOID * +EFIAPI +SiliconPolicyUpdatePreMem ( + IN VOID *Policy + ) +{ + return Policy; +} + +VOID * +EFIAPI +SiliconPolicyUpdatePostMem ( + IN VOID *Policy + ) +{ + return Policy; +} + +VOID * +EFIAPI +SiliconPolicyUpdateLate ( + IN VOID *Policy + ) +{ + return Policy; +} diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.inf new file mode 100644 index 0000000000..ab03602297 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SiliconPolicyUpdateLibNull/SiliconPolicyUpdateLibNull.inf @@ -0,0 +1,36 @@ +## @file +# Component information file for Silicon Update Library +# +# Copyright (c) 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 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 = 0x00010005 + BASE_NAME = SiliconUpdateLibNull + FILE_GUID = 7D4AA651-D23B-42FC-ABE4-8A2FDF260B9F + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = SiliconUpdateLib + +[LibraryClasses] + BaseLib + PcdLib + DebugLib + +[Packages] + MinPlatformPkg/MinPlatformPkg.dec + MdePkg/MdePkg.dec + +[Sources] + SiliconPolicyUpdateLibNull.c + +[Pcd] diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.c b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.c new file mode 100644 index 0000000000..01cc22a973 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.c @@ -0,0 +1,43 @@ +/** @file + Silicon DXE policy. + +Copyright (c) 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 that 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 +#include +#include +#include + + +/** + Silicon Policy Init DXE module entry point + + @param[in] ImageHandle Image handle of this driver. + @param[in] SystemTable Global system service table. + + @retval EFI_SUCCESS The function completes successfully +**/ +EFI_STATUS +EFIAPI +SiliconPolicyDxeEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + VOID *Policy; + + Policy = SiliconPolicyInitLate (NULL); + SiliconPolicyUpdateLate (Policy); + SiliconPolicyDoneLate (Policy); + + return EFI_SUCCESS; +} \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf new file mode 100644 index 0000000000..4081a10dfb --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf @@ -0,0 +1,62 @@ +## @file +# Silicon DXE policy. +# +# Copyright (c) 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 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 Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = SiliconPolicyDxe + FILE_GUID = 65986603-43BC-4ABF-94D8-5A58847381A6 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = SiliconPolicyDxeEntryPoint + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources] + SiliconPolicyDxe.c + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[LibraryClasses] + UefiDriverEntryPoint + SiliconPolicyInitLib + SiliconPolicyUpdateLib + +[Depex] + TRUE \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.c new file mode 100644 index 0000000000..d5cf7bf05a --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.c @@ -0,0 +1,43 @@ +/** @file + Silicon post-mem policy PEIM. + +Copyright (c) 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 that 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 +#include +#include +#include + + +/** + Silicon Policy Init after memory PEI module entry point + + @param[in] FileHandle Not used. + @param[in] PeiServices General purpose services available to every PEIM. + + @retval EFI_SUCCESS The function completes successfully +**/ +EFI_STATUS +EFIAPI +SiliconPolicyPeiPostMemEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + VOID *Policy; + + Policy = SiliconPolicyInitPostMem (NULL); + SiliconPolicyUpdatePostMem (Policy); + SiliconPolicyDonePostMem (Policy); + + return EFI_SUCCESS; +} \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf new file mode 100644 index 0000000000..41433274c9 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.inf @@ -0,0 +1,62 @@ +## @file +# Silicon post-mem policy PEIM. +# +# Copyright (c) 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 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 Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = SiliconPolicyPeiPostMem + FILE_GUID = CE19678F-3F08-4E81-A1F3-1886CA13ADA7 + MODULE_TYPE = PEIM + VERSION_STRING = 1.0 + ENTRY_POINT = SiliconPolicyPeiPostMemEntryPoint + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources] + SiliconPolicyPeiPostMem.c + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[LibraryClasses] + PeimEntryPoint + SiliconPolicyInitLib + SiliconPolicyUpdateLib + +[Depex] + gEfiPeiMemoryDiscoveredPpiGuid \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.c new file mode 100644 index 0000000000..3bc260e999 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.c @@ -0,0 +1,43 @@ +/** @file + Silicon pre-mem policy PEIM. + +Copyright (c) 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 that 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 +#include +#include +#include + + +/** + Silicon Policy Init before memory PEI module entry point + + @param[in] FileHandle Not used. + @param[in] PeiServices General purpose services available to every PEIM. + + @retval EFI_SUCCESS The function completes successfully +**/ +EFI_STATUS +EFIAPI +SiliconPolicyPeiPreMemEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + VOID *Policy; + + Policy = SiliconPolicyInitPreMem (NULL); + SiliconPolicyUpdatePreMem (Policy); + SiliconPolicyDonePreMem (Policy); + + return EFI_SUCCESS; +} \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf new file mode 100644 index 0000000000..08192cdac3 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMem.inf @@ -0,0 +1,62 @@ +## @file +# Silicon pre-mem policy PEIM. +# +# Copyright (c) 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 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 Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = SiliconPolicyPeiPreMem + FILE_GUID = 3307DD15-23BA-4546-A004-FCBCC47D4A49 + MODULE_TYPE = PEIM + VERSION_STRING = 1.0 + ENTRY_POINT = SiliconPolicyPeiPreMemEntryPoint + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +################################################################################ +# +# Sources Section - list of files that are required for the build to succeed. +# +################################################################################ + +[Sources] + SiliconPolicyPeiPreMem.c + +################################################################################ +# +# Package Dependency Section - list of Package files that are required for +# this module. +# +################################################################################ + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[LibraryClasses] + PeimEntryPoint + SiliconPolicyInitLib + SiliconPolicyUpdateLib + +[Depex] + gEfiPeiMasterBootModePpiGuid \ No newline at end of file -- cgit v1.2.3