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 @param PeiServices General purpose services available to every PEIM.
53 @retval EFI_SUCCESS if it completed successfully.
58 IN CONST EFI_PEI_SERVICES
**PeiServices
62 This function will be called when MRC is done.
64 @param PeiServices General purpose services available to every PEIM.
65 @param NotifyDescriptor Information about the notify event..
66 @param Ppi The notify context.
68 @retval EFI_SUCCESS If the function completed successfully.
72 MemoryDiscoveredPpiNotifyCallback (
73 IN EFI_PEI_SERVICES
**PeiServices
,
74 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
79 This is the callback function notified by FvFileLoader PPI, it depends on FvFileLoader PPI to load
82 @param PeiServices General purpose services available to every PEIM.
83 @param NotifyDescriptor The context of notification.
84 @param Ppi The notify PPI.
86 @retval EFI_SUCCESS if it completed successfully.
90 FvFileLoaderPpiNotifyCallback (
91 IN EFI_PEI_SERVICES
**PeiServices
,
92 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
97 This function provides a blocking stall for reset at least the given number of microseconds
98 stipulated in the final argument.
100 @param PeiServices General purpose services available to every PEIM.
101 @param this Pointer to the local data for the interface.
102 @param Microseconds number of microseconds for which to stall.
104 @retval EFI_SUCCESS the function provided at least the required stall.
109 IN CONST EFI_PEI_SERVICES
**PeiServices
,
110 IN CONST EFI_PEI_STALL_PPI
*This
,
111 IN UINTN Microseconds
115 This function initialize recovery functionality by installing the recovery PPI.
117 @param PeiServices General purpose services available to every PEIM.
119 @retval EFI_SUCCESS If the interface could be successfully installed.
124 IN EFI_PEI_SERVICES
**PeiServices
129 1. Calling MRC to initialize memory.
130 2. Install EFI Memory.
131 3. Capsule coalesce if capsule boot mode.
132 4. Create HOB of system memory.
134 @param PeiServices Pointer to the PEI Service Table
136 @retval EFI_SUCCESS If it completes successfully.
141 IN EFI_PEI_SERVICES
**PeiServices
145 This function provides the implementation of AtaController PPI Enable Channel function.
147 @param PeiServices General purpose services available to every PEIM.
148 @param this Pointer to the local data for the interface.
149 @param ChannelMask This parameter is used to specify primary or slavery IDE channel.
151 @retval EFI_SUCCESS Procedure returned successfully.
155 IN EFI_PEI_SERVICES
**PeiServices
,
156 IN PEI_ATA_CONTROLLER_PPI
*This
,
161 This function provides the implementation of AtaController PPI Get IDE channel Register Base Address
163 @param PeiServices General purpose services available to every PEIM.
164 @param this Pointer to the local data for the interface.
165 @param IdeRegsBaseAddr Pointer to IDE_REGS_BASE_ADDR struct, which is used to record
166 IDE Command and Control regeisters Base Address.
168 @retval EFI_SUCCESS Procedure returned successfully.
172 IN EFI_PEI_SERVICES
**PeiServices
,
173 IN PEI_ATA_CONTROLLER_PPI
*This
,
174 IN IDE_REGS_BASE_ADDR
*IdeRegsBaseAddr
178 This function provides the implementation to properly setup both LM & PDM functionality.
180 @param PeiServices General purpose services available to every PEIM.
182 @retval EFI_SUCCESS Procedure returned successfully.
187 IN EFI_PEI_SERVICES
**PeiServices
190 #include <Ppi/VlvMmioPolicy.h>
195 IN CONST EFI_PEI_SERVICES
**PeiServices
200 IN OUT EFI_BOOT_MODE
*CurrentBootMode
,
201 IN EFI_BOOT_MODE NewBootMode
206 CapsulePpiNotifyCallback (
207 IN EFI_PEI_SERVICES
**PeiServices
,
208 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,