SiliconPolicyUpdateLib.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /** @file
  2. Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. **/
  5. #include <PiPei.h>
  6. #include <Library/DebugLib.h>
  7. #include <Library/IoLib.h>
  8. #include <Ppi/ReadOnlyVariable2.h>
  9. #include <Library/PeiServicesLib.h>
  10. /**
  11. Performs silicon pre-mem policy update.
  12. The meaning of Policy is defined by silicon code.
  13. It could be the raw data, a handle, a PPI, etc.
  14. The input Policy must be returned by SiliconPolicyDonePreMem().
  15. 1) In FSP path, the input Policy should be FspmUpd.
  16. A platform may use this API to update the FSPM UPD policy initialized
  17. by the silicon module or the default UPD data.
  18. The output of FSPM UPD data from this API is the final UPD data.
  19. 2) In non-FSP path, the board may use additional way to get
  20. the silicon policy data field based upon the input Policy.
  21. @param[in, out] Policy Pointer to policy.
  22. @return the updated policy.
  23. **/
  24. VOID *
  25. EFIAPI
  26. SiliconPolicyUpdatePreMem (
  27. IN OUT VOID *Policy
  28. )
  29. {
  30. return Policy;
  31. }
  32. /**
  33. Performs silicon post-mem policy update.
  34. The meaning of Policy is defined by silicon code.
  35. It could be the raw data, a handle, a PPI, etc.
  36. The input Policy must be returned by SiliconPolicyDonePostMem().
  37. 1) In FSP path, the input Policy should be FspsUpd.
  38. A platform may use this API to update the FSPS UPD policy initialized
  39. by the silicon module or the default UPD data.
  40. The output of FSPS UPD data from this API is the final UPD data.
  41. 2) In non-FSP path, the board may use additional way to get
  42. the silicon policy data field based upon the input Policy.
  43. @param[in, out] Policy Pointer to policy.
  44. @return the updated policy.
  45. **/
  46. VOID *
  47. EFIAPI
  48. SiliconPolicyUpdatePostMem (
  49. IN OUT VOID *Policy
  50. )
  51. {
  52. return Policy;
  53. }