3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #ifndef __PEI_PLATFORM_H__
19 #define __PEI_PLATFORM_H__
21 #define PEI_STALL_RESOLUTION 1
22 #define STALL_PEIM_SIGNATURE SIGNATURE_32('p','p','u','s')
26 EFI_FFS_FILE_HEADER
*FfsHeader
;
27 EFI_PEI_NOTIFY_DESCRIPTOR StallNotify
;
28 } STALL_CALLBACK_STATE_INFORMATION
;
30 #define STALL_PEIM_FROM_THIS(a) CR (a, STALL_CALLBACK_STATE_INFORMATION, StallNotify, STALL_PEIM_SIGNATURE)
32 #ifdef NOCS_S3_SUPPORT
35 Peform the boot mode determination logic
36 If the box is closed, then
37 1. If it's first time to boot, it's boot with full config .
38 2. If the ChassisIntrution is selected, force to be a boot with full config
39 3. Otherwise it's boot with no change.
41 @param PeiServices General purpose services available to every PEIM.
42 @param BootMode The detected boot mode.
44 @retval EFI_SUCCESS if the boot mode could be set
48 IN CONST EFI_PEI_SERVICES
**PeiServices
53 This function reset the entire platform, including all processor and devices, and
56 @param PeiServices General purpose services available to every PEIM.
58 @retval EFI_SUCCESS if it completed successfully.
63 IN CONST EFI_PEI_SERVICES
**PeiServices
67 This function will be called when MRC is done.
69 @param PeiServices General purpose services available to every PEIM.
70 @param NotifyDescriptor Information about the notify event..
71 @param Ppi The notify context.
73 @retval EFI_SUCCESS If the function completed successfully.
77 MemoryDiscoveredPpiNotifyCallback (
78 IN EFI_PEI_SERVICES
**PeiServices
,
79 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
84 This is the callback function notified by FvFileLoader PPI, it depends on FvFileLoader PPI to load
87 @param PeiServices General purpose services available to every PEIM.
88 @param NotifyDescriptor The context of notification.
89 @param Ppi The notify PPI.
91 @retval EFI_SUCCESS if it completed successfully.
95 FvFileLoaderPpiNotifyCallback (
96 IN EFI_PEI_SERVICES
**PeiServices
,
97 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
102 This function provides a blocking stall for reset at least the given number of microseconds
103 stipulated in the final argument.
105 @param PeiServices General purpose services available to every PEIM.
106 @param this Pointer to the local data for the interface.
107 @param Microseconds number of microseconds for which to stall.
109 @retval EFI_SUCCESS the function provided at least the required stall.
114 IN CONST EFI_PEI_SERVICES
**PeiServices
,
115 IN CONST EFI_PEI_STALL_PPI
*This
,
116 IN UINTN Microseconds
120 This function initialize recovery functionality by installing the recovery PPI.
122 @param PeiServices General purpose services available to every PEIM.
124 @retval EFI_SUCCESS If the interface could be successfully installed.
129 IN EFI_PEI_SERVICES
**PeiServices
134 1. Calling MRC to initialize memory.
135 2. Install EFI Memory.
136 3. Capsule coalesce if capsule boot mode.
137 4. Create HOB of system memory.
139 @param PeiServices Pointer to the PEI Service Table
141 @retval EFI_SUCCESS If it completes successfully.
146 IN EFI_PEI_SERVICES
**PeiServices
150 This function provides the implementation of AtaController PPI Enable Channel function.
152 @param PeiServices General purpose services available to every PEIM.
153 @param this Pointer to the local data for the interface.
154 @param ChannelMask This parameter is used to specify primary or slavery IDE channel.
156 @retval EFI_SUCCESS Procedure returned successfully.
160 IN EFI_PEI_SERVICES
**PeiServices
,
161 IN PEI_ATA_CONTROLLER_PPI
*This
,
166 This function provides the implementation of AtaController PPI Get IDE channel Register Base Address
168 @param PeiServices General purpose services available to every PEIM.
169 @param this Pointer to the local data for the interface.
170 @param IdeRegsBaseAddr Pointer to IDE_REGS_BASE_ADDR struct, which is used to record
171 IDE Command and Control regeisters Base Address.
173 @retval EFI_SUCCESS Procedure returned successfully.
177 IN EFI_PEI_SERVICES
**PeiServices
,
178 IN PEI_ATA_CONTROLLER_PPI
*This
,
179 IN IDE_REGS_BASE_ADDR
*IdeRegsBaseAddr
183 This function provides the implementation to properly setup both LM & PDM functionality.
185 @param PeiServices General purpose services available to every PEIM.
187 @retval EFI_SUCCESS Procedure returned successfully.
192 IN EFI_PEI_SERVICES
**PeiServices
195 #include <Ppi/VlvMmioPolicy.h>
200 IN CONST EFI_PEI_SERVICES
**PeiServices
205 IN OUT EFI_BOOT_MODE
*CurrentBootMode
,
206 IN EFI_BOOT_MODE NewBootMode
211 CapsulePpiNotifyCallback (
212 IN EFI_PEI_SERVICES
**PeiServices
,
213 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,