]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/PlatformPei/Platform.h
MdeModulePkg/CapsuleApp: Center bitmap at bottom of screen
[mirror_edk2.git] / Vlv2TbltDevicePkg / PlatformPei / Platform.h
CommitLineData
3cbfba02
DW
1/*++\r
2\r
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
4 \r\r
5 This program and the accompanying materials are licensed and made available under\r\r
6 the terms and conditions of the BSD License that accompanies this distribution. \r\r
7 The full text of the license may be found at \r\r
8 http://opensource.org/licenses/bsd-license.php. \r\r
9 \r\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
12 \r\r
13\r
14\r
15**/\r
16\r
17\r
18#ifndef __PEI_PLATFORM_H__\r
19#define __PEI_PLATFORM_H__\r
20\r
21#define PEI_STALL_RESOLUTION 1\r
22#define STALL_PEIM_SIGNATURE SIGNATURE_32('p','p','u','s')\r
23\r
24typedef struct {\r
25 UINT32 Signature;\r
26 EFI_FFS_FILE_HEADER *FfsHeader;\r
27 EFI_PEI_NOTIFY_DESCRIPTOR StallNotify;\r
28} STALL_CALLBACK_STATE_INFORMATION;\r
29\r
30#define STALL_PEIM_FROM_THIS(a) CR (a, STALL_CALLBACK_STATE_INFORMATION, StallNotify, STALL_PEIM_SIGNATURE)\r
31\r
32#ifdef NOCS_S3_SUPPORT\r
33\r
34/**\r
35 Peform the boot mode determination logic\r
36 If the box is closed, then\r
37 1. If it's first time to boot, it's boot with full config .\r
38 2. If the ChassisIntrution is selected, force to be a boot with full config\r
39 3. Otherwise it's boot with no change.\r
40\r
41 @param PeiServices General purpose services available to every PEIM.\r
42 @param BootMode The detected boot mode.\r
43\r
44 @retval EFI_SUCCESS if the boot mode could be set\r
45**/\r
46EFI_STATUS\r
47UpdateBootMode (\r
48 IN CONST EFI_PEI_SERVICES **PeiServices\r
49 );\r
50#endif\r
51\r
52/**\r
53 This function reset the entire platform, including all processor and devices, and\r
54 reboots the system.\r
55\r
56 @param PeiServices General purpose services available to every PEIM.\r
57\r
58 @retval EFI_SUCCESS if it completed successfully.\r
59**/\r
60EFI_STATUS\r
61EFIAPI\r
62ResetSystem (\r
63 IN CONST EFI_PEI_SERVICES **PeiServices\r
64 );\r
65\r
66/**\r
67 This function will be called when MRC is done.\r
68\r
69 @param PeiServices General purpose services available to every PEIM.\r
70 @param NotifyDescriptor Information about the notify event..\r
71 @param Ppi The notify context.\r
72\r
73 @retval EFI_SUCCESS If the function completed successfully.\r
74**/\r
75EFI_STATUS\r
76EFIAPI\r
77MemoryDiscoveredPpiNotifyCallback (\r
78 IN EFI_PEI_SERVICES **PeiServices,\r
79 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
80 IN VOID *Ppi\r
81 );\r
82\r
83/**\r
84 This is the callback function notified by FvFileLoader PPI, it depends on FvFileLoader PPI to load\r
85 the PEIM into memory.\r
86\r
87 @param PeiServices General purpose services available to every PEIM.\r
88 @param NotifyDescriptor The context of notification.\r
89 @param Ppi The notify PPI.\r
90\r
91 @retval EFI_SUCCESS if it completed successfully.\r
92**/\r
93EFI_STATUS\r
94EFIAPI\r
95FvFileLoaderPpiNotifyCallback (\r
96 IN EFI_PEI_SERVICES **PeiServices,\r
97 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
98 IN VOID *Ppi\r
99 );\r
100\r
101/**\r
102 This function provides a blocking stall for reset at least the given number of microseconds\r
103 stipulated in the final argument.\r
104\r
105 @param PeiServices General purpose services available to every PEIM.\r
106 @param this Pointer to the local data for the interface.\r
107 @param Microseconds number of microseconds for which to stall.\r
108\r
109 @retval EFI_SUCCESS the function provided at least the required stall.\r
110**/\r
111EFI_STATUS\r
112EFIAPI\r
113Stall (\r
114 IN CONST EFI_PEI_SERVICES **PeiServices,\r
115 IN CONST EFI_PEI_STALL_PPI *This,\r
116 IN UINTN Microseconds\r
117 );\r
118\r
119/**\r
120 This function initialize recovery functionality by installing the recovery PPI.\r
121\r
122 @param PeiServices General purpose services available to every PEIM.\r
123\r
124 @retval EFI_SUCCESS If the interface could be successfully installed.\r
125**/\r
126EFI_STATUS\r
127EFIAPI\r
128InitializeRecovery (\r
129 IN EFI_PEI_SERVICES **PeiServices\r
130 );\r
131\r
132/**\r
133 This function\r
134 1. Calling MRC to initialize memory.\r
135 2. Install EFI Memory.\r
136 3. Capsule coalesce if capsule boot mode.\r
137 4. Create HOB of system memory.\r
138\r
139 @param PeiServices Pointer to the PEI Service Table\r
140\r
141 @retval EFI_SUCCESS If it completes successfully.\r
142\r
143**/\r
144EFI_STATUS\r
145MemoryInit (\r
146 IN EFI_PEI_SERVICES **PeiServices\r
147 );\r
148\r
149/**\r
150 This function provides the implementation of AtaController PPI Enable Channel function.\r
151\r
152 @param PeiServices General purpose services available to every PEIM.\r
153 @param this Pointer to the local data for the interface.\r
154 @param ChannelMask This parameter is used to specify primary or slavery IDE channel.\r
155\r
156 @retval EFI_SUCCESS Procedure returned successfully.\r
157**/\r
158EFI_STATUS\r
159EnableAtaChannel (\r
160 IN EFI_PEI_SERVICES **PeiServices,\r
161 IN PEI_ATA_CONTROLLER_PPI *This,\r
162 IN UINT8 ChannelMask\r
163 );\r
164\r
165/**\r
166 This function provides the implementation of AtaController PPI Get IDE channel Register Base Address\r
167\r
168 @param PeiServices General purpose services available to every PEIM.\r
169 @param this Pointer to the local data for the interface.\r
170 @param IdeRegsBaseAddr Pointer to IDE_REGS_BASE_ADDR struct, which is used to record\r
171 IDE Command and Control regeisters Base Address.\r
172\r
173 @retval EFI_SUCCESS Procedure returned successfully.\r
174**/\r
175EFI_STATUS\r
176GetIdeRegsBaseAddr (\r
177 IN EFI_PEI_SERVICES **PeiServices,\r
178 IN PEI_ATA_CONTROLLER_PPI *This,\r
179 IN IDE_REGS_BASE_ADDR *IdeRegsBaseAddr\r
180 );\r
181\r
182/**\r
183 This function provides the implementation to properly setup both LM & PDM functionality.\r
184\r
185 @param PeiServices General purpose services available to every PEIM.\r
186\r
187 @retval EFI_SUCCESS Procedure returned successfully.\r
188\r
189**/\r
190EFI_STATUS\r
191ConfigureLM(\r
192 IN EFI_PEI_SERVICES **PeiServices\r
193 );\r
194\r
195#include <Ppi/VlvMmioPolicy.h>\r
196\r
197BOOLEAN\r
198EFIAPI\r
199IsFastBootEnabled (\r
200 IN CONST EFI_PEI_SERVICES **PeiServices\r
201 );\r
202\r
203EFI_STATUS\r
204PrioritizeBootMode (\r
205 IN OUT EFI_BOOT_MODE *CurrentBootMode,\r
206 IN EFI_BOOT_MODE NewBootMode\r
207 );\r
208\r
209EFI_STATUS\r
210EFIAPI\r
211CapsulePpiNotifyCallback (\r
212 IN EFI_PEI_SERVICES **PeiServices,\r
213 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
214 IN VOID *Ppi\r
215 );\r
216#endif\r