PeiFspPolicyInitLib.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. /** @file
  2. Internal header file for Fsp Policy Initialization Library.
  3. Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _PEI_FSP_POLICY_INIT_LIB_H_
  7. #define _PEI_FSP_POLICY_INIT_LIB_H_
  8. #include <PiPei.h>
  9. #include <Library/DebugLib.h>
  10. #include <Library/PeiServicesLib.h>
  11. #include <FspEas.h>
  12. #include <FspmUpd.h>
  13. #include <FspsUpd.h>
  14. #include <Setup.h>
  15. /**
  16. Performs FSP SI PEI Policy pre mem initialization.
  17. @param[in][out] FspmUpd Pointer to FSP UPD Data.
  18. @retval EFI_SUCCESS FSP UPD Data is updated.
  19. @retval EFI_NOT_FOUND Fail to locate required PPI.
  20. @retval Other FSP UPD Data update process fail.
  21. **/
  22. EFI_STATUS
  23. EFIAPI
  24. PeiFspSiPolicyInitPreMem (
  25. IN OUT FSPM_UPD *FspmUpd
  26. );
  27. /**
  28. Performs FSP SI PEI Policy initialization.
  29. @param[in][out] FspsUpd Pointer to FSP UPD Data.
  30. @retval EFI_SUCCESS FSP UPD Data is updated.
  31. @retval EFI_NOT_FOUND Fail to locate required PPI.
  32. @retval Other FSP UPD Data update process fail.
  33. **/
  34. EFI_STATUS
  35. EFIAPI
  36. PeiFspSiPolicyInit (
  37. IN OUT FSPS_UPD *FspsUpd
  38. );
  39. /**
  40. Performs FSP PCH PEI Policy pre mem initialization.
  41. @param[in][out] FspmUpd Pointer to FSP UPD Data.
  42. @retval EFI_SUCCESS FSP UPD Data is updated.
  43. @retval EFI_NOT_FOUND Fail to locate required PPI.
  44. @retval Other FSP UPD Data update process fail.
  45. **/
  46. EFI_STATUS
  47. EFIAPI
  48. PeiFspPchPolicyInitPreMem (
  49. IN OUT FSPM_UPD *FspmUpd
  50. );
  51. /**
  52. Performs FSP PCH PEI Policy initialization.
  53. @param[in][out] FspsUpd Pointer to FSP UPD Data.
  54. @retval EFI_SUCCESS FSP UPD Data is updated.
  55. @retval EFI_NOT_FOUND Fail to locate required PPI.
  56. @retval Other FSP UPD Data update process fail.
  57. **/
  58. EFI_STATUS
  59. EFIAPI
  60. PeiFspPchPolicyInit (
  61. IN OUT FSPS_UPD *FspsUpd
  62. );
  63. /**
  64. Performs FSP CPU PEI Policy initialization.
  65. @param[in][out] FspmUpd Pointer to FSP UPD Data.
  66. @retval EFI_SUCCESS FSP UPD Data is updated.
  67. @retval EFI_NOT_FOUND Fail to locate required PPI.
  68. @retval Other FSP UPD Data update process fail.
  69. **/
  70. EFI_STATUS
  71. EFIAPI
  72. PeiFspCpuPolicyInitPreMem (
  73. IN OUT FSPM_UPD *FspmUpd
  74. );
  75. /**
  76. Performs FSP Security PEI Policy initialization.
  77. @param[in][out] FspmUpd Pointer to FSP UPD Data.
  78. @retval EFI_SUCCESS FSP UPD Data is updated.
  79. @retval EFI_NOT_FOUND Fail to locate required PPI.
  80. @retval Other FSP UPD Data update process fail.
  81. **/
  82. EFI_STATUS
  83. EFIAPI
  84. PeiFspSecurityPolicyInitPreMem(
  85. IN OUT FSPM_UPD *FspmUpd
  86. );
  87. /**
  88. Performs FSP ME PEI Policy pre mem initialization.
  89. @param[in][out] FspmUpd Pointer to FSP UPD Data.
  90. @retval EFI_SUCCESS FSP UPD Data is updated.
  91. @retval EFI_NOT_FOUND Fail to locate required PPI.
  92. @retval Other FSP UPD Data update process fail.
  93. **/
  94. EFI_STATUS
  95. EFIAPI
  96. PeiFspMePolicyInitPreMem (
  97. IN OUT FSPM_UPD *FspmUpd
  98. );
  99. /**
  100. Performs FSP ME PEI Policy initialization.
  101. @param[in][out] FspsUpd Pointer to FSP UPD Data.
  102. @retval EFI_SUCCESS FSP UPD Data is updated.
  103. @retval EFI_NOT_FOUND Fail to locate required PPI.
  104. @retval Other FSP UPD Data update process fail.
  105. **/
  106. EFI_STATUS
  107. EFIAPI
  108. PeiFspMePolicyInit (
  109. IN OUT FSPS_UPD *FspsUpd
  110. );
  111. /**
  112. Performs FSP SA PEI Policy initialization in pre-memory.
  113. @param[in][out] FspmUpd Pointer to FSP UPD Data.
  114. @retval EFI_SUCCESS FSP UPD Data is updated.
  115. @retval EFI_NOT_FOUND Fail to locate required PPI.
  116. @retval Other FSP UPD Data update process fail.
  117. **/
  118. EFI_STATUS
  119. EFIAPI
  120. PeiFspSaPolicyInitPreMem (
  121. IN OUT FSPM_UPD *FspmUpd
  122. );
  123. /**
  124. Performs FSP SA PEI Policy initialization.
  125. @param[in][out] FspsUpd Pointer to FSP UPD Data.
  126. @retval EFI_SUCCESS FSP UPD Data is updated.
  127. @retval EFI_NOT_FOUND Fail to locate required PPI.
  128. @retval Other FSP UPD Data update process fail.
  129. **/
  130. EFI_STATUS
  131. EFIAPI
  132. PeiFspSaPolicyInit (
  133. IN OUT FSPS_UPD *FspsUpd
  134. );
  135. /**
  136. Performs FSP CPU PEI Policy post memory initialization.
  137. @param[in][out] FspsUpd Pointer to FSP UPD Data.
  138. @retval EFI_SUCCESS FSP UPD Data is updated.
  139. @retval EFI_NOT_FOUND Fail to locate required PPI.
  140. @retval Other FSP UPD Data update process fail.
  141. **/
  142. EFI_STATUS
  143. EFIAPI
  144. PeiFspCpuPolicyInit (
  145. IN OUT FSPS_UPD *FspsUpd
  146. );
  147. /**
  148. Performs FSP Security PEI Policy post memory initialization.
  149. @param[in][out] FspsUpd Pointer to FSP UPD Data.
  150. @retval EFI_SUCCESS FSP UPD Data is updated.
  151. @retval EFI_NOT_FOUND Fail to locate required PPI.
  152. @retval Other FSP UPD Data update process fail.
  153. **/
  154. EFI_STATUS
  155. EFIAPI
  156. PeiFspSecurityPolicyInit(
  157. IN OUT FSPS_UPD *FspsUpd
  158. );
  159. /**
  160. PeiGetSectionFromFv finds the file in FV and gets file Address and Size
  161. @param[in] NameGuid - File GUID
  162. @param[out] Address - Pointer to the File Address
  163. @param[out] Size - Pointer to File Size
  164. @retval EFI_SUCCESS Successfull in reading the section from FV
  165. **/
  166. EFI_STATUS
  167. EFIAPI
  168. PeiGetSectionFromFv (
  169. IN CONST EFI_GUID NameGuid,
  170. OUT VOID **Address,
  171. OUT UINT32 *Size
  172. );
  173. /**
  174. Performs FSP Misc UPD initialization.
  175. @param[in][out] FspmUpd Pointer to FSPM_UPD Data.
  176. @retval EFI_SUCCESS FSP UPD Data is updated.
  177. **/
  178. EFI_STATUS
  179. EFIAPI
  180. PeiFspMiscUpdInitPreMem (
  181. IN OUT FSPM_UPD *FspmUpd
  182. );
  183. #endif // _PEI_FSP_POLICY_INIT_LIB_H_