3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #ifndef __PEI_PLATFORM_H__
14 #define __PEI_PLATFORM_H__
16 #define PEI_STALL_RESOLUTION 1
17 #define STALL_PEIM_SIGNATURE SIGNATURE_32('p','p','u','s')
21 EFI_FFS_FILE_HEADER
*FfsHeader
;
22 EFI_PEI_NOTIFY_DESCRIPTOR StallNotify
;
23 } STALL_CALLBACK_STATE_INFORMATION
;
25 #define STALL_PEIM_FROM_THIS(a) CR (a, STALL_CALLBACK_STATE_INFORMATION, StallNotify, STALL_PEIM_SIGNATURE)
27 #ifdef NOCS_S3_SUPPORT
30 Peform the boot mode determination logic
31 If the box is closed, then
32 1. If it's first time to boot, it's boot with full config .
33 2. If the ChassisIntrution is selected, force to be a boot with full config
34 3. Otherwise it's boot with no change.
36 @param PeiServices General purpose services available to every PEIM.
37 @param BootMode The detected boot mode.
39 @retval EFI_SUCCESS if the boot mode could be set
43 IN CONST EFI_PEI_SERVICES
**PeiServices
48 This function reset the entire platform, including all processor and devices, and
51 Declaration of this function goes to MdeModulePkg/Include/Library/ResetSystemLib.h
53 @param PeiServices General purpose services available to every PEIM.
55 @retval EFI_SUCCESS if it completed successfully.
60 // IN CONST EFI_PEI_SERVICES **PeiServices
64 This function will be called when MRC is done.
66 @param PeiServices General purpose services available to every PEIM.
67 @param NotifyDescriptor Information about the notify event..
68 @param Ppi The notify context.
70 @retval EFI_SUCCESS If the function completed successfully.
74 MemoryDiscoveredPpiNotifyCallback (
75 IN EFI_PEI_SERVICES
**PeiServices
,
76 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
81 This is the callback function notified by FvFileLoader PPI, it depends on FvFileLoader PPI to load
84 @param PeiServices General purpose services available to every PEIM.
85 @param NotifyDescriptor The context of notification.
86 @param Ppi The notify PPI.
88 @retval EFI_SUCCESS if it completed successfully.
92 FvFileLoaderPpiNotifyCallback (
93 IN EFI_PEI_SERVICES
**PeiServices
,
94 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
99 This function provides a blocking stall for reset at least the given number of microseconds
100 stipulated in the final argument.
102 @param PeiServices General purpose services available to every PEIM.
103 @param this Pointer to the local data for the interface.
104 @param Microseconds number of microseconds for which to stall.
106 @retval EFI_SUCCESS the function provided at least the required stall.
111 IN CONST EFI_PEI_SERVICES
**PeiServices
,
112 IN CONST EFI_PEI_STALL_PPI
*This
,
113 IN UINTN Microseconds
117 This function initialize recovery functionality by installing the recovery PPI.
119 @param PeiServices General purpose services available to every PEIM.
121 @retval EFI_SUCCESS If the interface could be successfully installed.
126 IN EFI_PEI_SERVICES
**PeiServices
131 1. Calling MRC to initialize memory.
132 2. Install EFI Memory.
133 3. Capsule coalesce if capsule boot mode.
134 4. Create HOB of system memory.
136 @param PeiServices Pointer to the PEI Service Table
138 @retval EFI_SUCCESS If it completes successfully.
143 IN EFI_PEI_SERVICES
**PeiServices
147 This function provides the implementation of AtaController PPI Enable Channel function.
149 @param PeiServices General purpose services available to every PEIM.
150 @param this Pointer to the local data for the interface.
151 @param ChannelMask This parameter is used to specify primary or slavery IDE channel.
153 @retval EFI_SUCCESS Procedure returned successfully.
157 IN EFI_PEI_SERVICES
**PeiServices
,
158 IN PEI_ATA_CONTROLLER_PPI
*This
,
163 This function provides the implementation of AtaController PPI Get IDE channel Register Base Address
165 @param PeiServices General purpose services available to every PEIM.
166 @param this Pointer to the local data for the interface.
167 @param IdeRegsBaseAddr Pointer to IDE_REGS_BASE_ADDR struct, which is used to record
168 IDE Command and Control regeisters Base Address.
170 @retval EFI_SUCCESS Procedure returned successfully.
174 IN EFI_PEI_SERVICES
**PeiServices
,
175 IN PEI_ATA_CONTROLLER_PPI
*This
,
176 IN IDE_REGS_BASE_ADDR
*IdeRegsBaseAddr
180 This function provides the implementation to properly setup both LM & PDM functionality.
182 @param PeiServices General purpose services available to every PEIM.
184 @retval EFI_SUCCESS Procedure returned successfully.
189 IN EFI_PEI_SERVICES
**PeiServices
192 #include <Ppi/VlvMmioPolicy.h>
197 IN CONST EFI_PEI_SERVICES
**PeiServices
202 IN OUT EFI_BOOT_MODE
*CurrentBootMode
,
203 IN EFI_BOOT_MODE NewBootMode
208 CapsulePpiNotifyCallback (
209 IN EFI_PEI_SERVICES
**PeiServices
,
210 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,