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