summaryrefslogtreecommitdiff
path: root/Platform/Intel/MinPlatformPkg/Include
diff options
context:
space:
mode:
authorJiewen Yao <jiewen.yao@intel.com>2017-08-28 09:38:11 +0800
committerJiewen Yao <jiewen.yao@intel.com>2017-09-04 09:36:20 +0800
commitbe8b1fff74129bfd5d6eb8668566b29974822c0a (patch)
treeab12e706bdcd81f1bbd90ef4f5a87396968b523b /Platform/Intel/MinPlatformPkg/Include
parent1415ceb2b3bb5220847523bebf1f63de24f8d549 (diff)
downloadedk2-platforms-be8b1fff74129bfd5d6eb8668566b29974822c0a.tar.xz
new policy design for min platform.
Cc: Michael A Kubacki <michael.a.kubacki@intel.com> Cc: Amy Chan <amy.chan@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Brett Wang <brett.wang@intel.com> Cc: Daocheng Bu <daocheng.bu@intel.com> Cc: Isaac W Oram <isaac.w.oram@intel.com> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael A Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
Diffstat (limited to 'Platform/Intel/MinPlatformPkg/Include')
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h46
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h48
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyInitLib.h141
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/SiliconPolicyUpdateLib.h90
4 files changed, 231 insertions, 94 deletions
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.<BR>
-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.<BR>
-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.<BR>
+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.<BR>
+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