FspInfoHeader.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /** @file
  2. Intel FSP Info Header definition from Intel Firmware Support Package External
  3. Architecture Specification v1.1, April 2015, revision 001.
  4. Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _FSP_INFO_HEADER_H_
  8. #define _FSP_INFO_HEADER_H_
  9. #define FSP_HEADER_REVISION_1 1
  10. #define FSP_HEADER_REVISION_2 2
  11. #define FSPE_HEADER_REVISION_1 1
  12. #define FSPP_HEADER_REVISION_1 1
  13. ///
  14. /// Fixed FSP header offset in the FSP image
  15. ///
  16. #define FSP_INFO_HEADER_OFF 0x94
  17. #define OFFSET_IN_FSP_INFO_HEADER(x) (UINT32)&((FSP_INFO_HEADER *)(UINTN)0)->x
  18. #define FSP_INFO_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'H')
  19. #pragma pack(1)
  20. typedef struct {
  21. ///
  22. /// Byte 0x00: Signature ('FSPH') for the FSP Information Header
  23. ///
  24. UINT32 Signature;
  25. ///
  26. /// Byte 0x04: Length of the FSP Information Header
  27. ///
  28. UINT32 HeaderLength;
  29. ///
  30. /// Byte 0x08: Reserved
  31. ///
  32. UINT8 Reserved1[3];
  33. ///
  34. /// Byte 0x0B: Revision of the FSP Information Header
  35. ///
  36. UINT8 HeaderRevision;
  37. ///
  38. /// Byte 0x0C: Revision of the FSP binary
  39. ///
  40. UINT32 ImageRevision;
  41. ///
  42. /// Byte 0x10: Signature string that will help match the FSP Binary to a supported
  43. /// hardware configuration.
  44. ///
  45. CHAR8 ImageId[8];
  46. ///
  47. /// Byte 0x18: Size of the entire FSP binary
  48. ///
  49. UINT32 ImageSize;
  50. ///
  51. /// Byte 0x1C: FSP binary preferred base address
  52. ///
  53. UINT32 ImageBase;
  54. ///
  55. /// Byte 0x20: Attribute for the FSP binary
  56. ///
  57. UINT32 ImageAttribute;
  58. ///
  59. /// Byte 0x24: Offset of the FSP configuration region
  60. ///
  61. UINT32 CfgRegionOffset;
  62. ///
  63. /// Byte 0x28: Size of the FSP configuration region
  64. ///
  65. UINT32 CfgRegionSize;
  66. ///
  67. /// Byte 0x2C: Number of API entries this FSP supports
  68. ///
  69. UINT32 ApiEntryNum;
  70. ///
  71. /// Byte 0x30: The offset for the API to setup a temporary stack till the memory
  72. /// is initialized.
  73. ///
  74. UINT32 TempRamInitEntryOffset;
  75. ///
  76. /// Byte 0x34: The offset for the API to initialize the CPU and the chipset (SOC)
  77. ///
  78. UINT32 FspInitEntryOffset;
  79. ///
  80. /// Byte 0x38: The offset for the API to inform the FSP about the different stages
  81. /// in the boot process
  82. ///
  83. UINT32 NotifyPhaseEntryOffset;
  84. ///
  85. /// Below fields are added in FSP Revision 2
  86. ///
  87. ///
  88. /// Byte 0x3C: The offset for the API to initialize the memory
  89. ///
  90. UINT32 FspMemoryInitEntryOffset;
  91. ///
  92. /// Byte 0x40: The offset for the API to tear down temporary RAM
  93. ///
  94. UINT32 TempRamExitEntryOffset;
  95. ///
  96. /// Byte 0x44: The offset for the API to initialize the CPU and chipset
  97. ///
  98. UINT32 FspSiliconInitEntryOffset;
  99. } FSP_INFO_HEADER;
  100. ///
  101. /// Below structure is added in FSP version 2
  102. ///
  103. #define FSP_INFO_EXTENDED_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'E')
  104. typedef struct {
  105. ///
  106. /// Byte 0x00: Signature ('FSPE') for the FSP Extended Information Header
  107. ///
  108. UINT32 Signature;
  109. ///
  110. /// Byte 0x04: Length of the table in bytes, including all additional FSP producer defined data.
  111. ///
  112. UINT32 Length;
  113. ///
  114. /// Byte 0x08: FSP producer defined revision of the table.
  115. ///
  116. UINT8 Revision;
  117. ///
  118. /// Byte 0x09: Reserved for future use.
  119. ///
  120. UINT8 Reserved;
  121. ///
  122. /// Byte 0x0A: FSP producer identification string
  123. ///
  124. CHAR8 FspProducerId[6];
  125. ///
  126. /// Byte 0x10: FSP producer implementation revision number. Larger numbers are assumed to be newer revisions.
  127. ///
  128. UINT32 FspProducerRevision;
  129. ///
  130. /// Byte 0x14: Size of the FSP producer defined data (n) in bytes.
  131. ///
  132. UINT32 FspProducerDataSize;
  133. ///
  134. /// Byte 0x18: FSP producer defined data of size (n) defined by FspProducerDataSize.
  135. ///
  136. } FSP_INFO_EXTENDED_HEADER;
  137. //
  138. // A generic table search algorithm for additional tables can be implemented with a
  139. // signature search algorithm until a terminator signature 'FSPP' is found.
  140. //
  141. #define FSP_FSPP_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'P')
  142. #pragma pack()
  143. #endif