PlatformEarlyInit.inf 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. ## @file
  2. # This is the Platform PEIM to initialize whole platform on PEI phase.
  3. #
  4. # This PEIM includes 3 parts, pre memory initialization, MRC
  5. # wrapper and post memory initialization.
  6. # On pre memory, following action is performed,
  7. # 1. Initizluize GMCH.
  8. # 2. Detect boot mode.
  9. # 3. Detect video adapter to determine whether we need pre allocated
  10. # memory.
  11. #
  12. # After that MRC wrapper calls MRC to initialize memory and install a PPI
  13. # notify to do post memory
  14. # initialization. MRC wrapper performance following actions,
  15. # 1. Install EFI Memory.
  16. # 2. Create HOB of system memory.
  17. #
  18. # On post memory, following action is performed,
  19. # 1. QNC initialization after MRC.
  20. # 2. SIO initialization.
  21. # 3. Install ResetSystem and FinvFv PPI, relocate Stall to memory on
  22. # recovery boot mode.
  23. # 4. Set MTRR for PEI
  24. # 5. Create FV HOB and Flash HOB
  25. # 6. Install RecoveryModule and AtaController PPI if on recovery boot mode.
  26. #
  27. # This PEIM does not have any register access directly, it depends on
  28. # IntelQNCLib, QNCAccess libraries to access Chipset
  29. # registers.
  30. #
  31. # Platform.c - Provide main flow and entrypoint of PEIM.
  32. # MemoryCallback.c - Includes a memory call back function notified when
  33. # MRC is done.
  34. # Recovery.c - provides the platform recoveyr functionality.
  35. # MrcWrapper.c - Contains the logic to call MRC PPI and do Framework
  36. # memory specific stuff like build memory map, build
  37. # resource description hob for DXE phase,etc.
  38. # Bootmode.c - Detect boot mode.
  39. # Copyright (c) 2013 - 2019 Intel Corporation.
  40. #
  41. # SPDX-License-Identifier: BSD-2-Clause-Patent
  42. #
  43. ##
  44. [Defines]
  45. INF_VERSION = 0x00010005
  46. BASE_NAME = PlatformEarlyInitPei
  47. FILE_GUID = 9618C0DC-50A4-496c-994F-7241F282ED01
  48. MODULE_TYPE = PEIM
  49. VERSION_STRING = 1.0
  50. ENTRY_POINT = PeiInitPlatform
  51. #
  52. # The following information is for reference only and not required by the build tools.
  53. #
  54. # VALID_ARCHITECTURES = IA32 X64
  55. #
  56. [Sources]
  57. Generic/Recovery.c
  58. PlatformErratas.c
  59. MrcWrapper.c
  60. MrcWrapper.h
  61. PlatformEarlyInit.c
  62. PlatformEarlyInit.h
  63. MemoryCallback.c
  64. BootMode.c
  65. CommonHeader.h
  66. PeiFvSecurity.c
  67. PeiFvSecurity.h
  68. [Packages]
  69. MdePkg/MdePkg.dec
  70. MdeModulePkg/MdeModulePkg.dec
  71. UefiCpuPkg/UefiCpuPkg.dec
  72. QuarkPlatformPkg/QuarkPlatformPkg.dec
  73. QuarkSocPkg/QuarkSocPkg.dec
  74. [LibraryClasses]
  75. ResetSystemLib
  76. PrintLib
  77. TimerLib
  78. PcdLib
  79. IntelQNCLib
  80. ReportStatusCodeLib
  81. PciLib
  82. PciExpressLib
  83. IoLib
  84. PciCf8Lib
  85. HobLib
  86. BaseMemoryLib
  87. PeiServicesTablePointerLib
  88. PeiServicesLib
  89. BaseLib
  90. PeimEntryPoint
  91. DebugLib
  92. MemoryAllocationLib
  93. PerformanceLib
  94. CacheMaintenanceLib
  95. MtrrLib
  96. QNCAccessLib
  97. PlatformHelperLib
  98. PlatformPcieHelperLib
  99. I2cLib
  100. [Guids]
  101. gEfiMemoryConfigDataGuid # ALWAYS_CONSUMED L"MemoryConfig"
  102. gEfiAcpiVariableGuid # ALWAYS_CONSUMED L"AcpiGlobalVariab"
  103. gEfiMemoryTypeInformationGuid # ALWAYS_CONSUMED L"MemoryTypeInformation"
  104. gEfiMemoryConfigDataGuid # SOMETIMES_PRODUCED Hob: GUID_EXTENSION
  105. gEfiSmmPeiSmramMemoryReserveGuid # ALWAYS_PRODUCED Hob: GUID_EXTENSION
  106. gEfiFirmwareFileSystem2Guid # ALWAYS_CONSUMED
  107. gPeiCapsuleOnDataCDGuid
  108. gPeiCapsuleOnFatIdeDiskGuid
  109. gPeiCapsuleOnFatUsbDiskGuid
  110. gEfiMemoryOverwriteControlDataGuid # SOMETIMES_CONSUMED
  111. gEfiQuarkCapsuleGuid
  112. [Ppis]
  113. gQNCMemoryInitPpiGuid # PPI ALWAYS_CONSUMED
  114. gEfiPeiMemoryDiscoveredPpiGuid # PPI ALWAYS_PRODUCED
  115. gPeiAtaControllerPpiGuid # PPI SOMETIMES_PRODUCED
  116. gEfiPeiStallPpiGuid # PPI ALWAYS_PRODUCED
  117. gEfiPeiDeviceRecoveryModulePpiGuid # PPI SOMETIMES_CONSUMED
  118. gEfiPeiRecoveryModulePpiGuid # PPI SOMETIMES_PRODUCED
  119. gEfiPeiResetPpiGuid # PPI ALWAYS_PRODUCED
  120. gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED
  121. gEfiPeiBootInRecoveryModePpiGuid # PPI SOMETIMES_PRODUCED
  122. gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
  123. gEfiPeiFirmwareVolumeInfoPpiGuid
  124. gEfiEndOfPeiSignalPpiGuid
  125. gEfiPeiVirtualBlockIoPpiGuid
  126. gPeiCapsulePpiGuid # PPI ALWAYS_CONSUMED
  127. [FeaturePcd]
  128. gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnFatUsbDisk
  129. gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnDataCD
  130. gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnFatFloppyDisk
  131. gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnIdeDisk
  132. gQuarkPlatformTokenSpaceGuid.WaitIfResetDueToError
  133. [Pcd]
  134. gQuarkPlatformTokenSpaceGuid.PcdEsramStage1Base
  135. gQuarkPlatformTokenSpaceGuid.PcdFlashAreaSize
  136. gQuarkPlatformTokenSpaceGuid.PcdFlashAreaBaseAddress
  137. gQuarkPlatformTokenSpaceGuid.PcdEccScrubBlkSize
  138. gQuarkPlatformTokenSpaceGuid.PcdEccScrubInterval
  139. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
  140. gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
  141. gQuarkPlatformTokenSpaceGuid.PcdFlashQNCMicrocodeSize
  142. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPmbaIoBaseAddress
  143. gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
  144. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciHostBridgeIoBase
  145. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciHostBridgeIoSize
  146. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohUartFunctionNumber
  147. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohUartBusNumber
  148. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohUartDevNumber
  149. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohGpioBusNumber
  150. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohGpioDevNumber
  151. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohGpioFunctionNumber
  152. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohGpioBarRegister
  153. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohGpioMmioBase
  154. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohMac0MmioBase
  155. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohMac1MmioBase
  156. gEfiQuarkSCSocIdTokenSpaceGuid.PcdPeiQNCUsbControllerMemoryBaseAddress
  157. gEfiQuarkNcSocIdTokenSpaceGuid.PcdRcbaMmioBaseAddress
  158. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciHostBridgeMemory32Base
  159. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciHostBridgeMemory32Size
  160. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciHostBridgeMemory64Base
  161. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciHostBridgeMemory64Size
  162. gEfiQuarkNcSocIdTokenSpaceGuid.PcdPciExpressSize
  163. gEfiQuarkNcSocIdTokenSpaceGuid.PcdGbaIoBaseAddress
  164. gEfiQuarkNcSocIdTokenSpaceGuid.PcdQuarkMicrocodeFile
  165. gEfiQuarkNcSocIdTokenSpaceGuid.PcdTSegSize
  166. gEfiQuarkNcSocIdTokenSpaceGuid.PcdESramMemorySize
  167. gQuarkPlatformTokenSpaceGuid.PcdFlashFvRecoverySize
  168. gQuarkPlatformTokenSpaceGuid.PcdFlashFvRecoveryBase
  169. gQuarkPlatformTokenSpaceGuid.PcdFlashFvMainSize
  170. gQuarkPlatformTokenSpaceGuid.PcdFlashFvMainBase
  171. gQuarkPlatformTokenSpaceGuid.PcdBootState
  172. gQuarkPlatformTokenSpaceGuid.PcdFlashFvPayloadBase
  173. gQuarkPlatformTokenSpaceGuid.PcdFlashFvPayloadSize
  174. gQuarkPlatformTokenSpaceGuid.PcdEnableFastBoot
  175. gQuarkPlatformTokenSpaceGuid.PcdPlatformType
  176. gEfiQuarkNcSocIdTokenSpaceGuid.PcdMrcParameters
  177. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohEthernetMac0
  178. gEfiQuarkSCSocIdTokenSpaceGuid.PcdIohEthernetMac1
  179. [Depex]
  180. gEfiPeiReadOnlyVariable2PpiGuid AND gQNCMemoryInitPpiGuid