3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #ifndef __PEI_DXEIPL_H__
21 #define __PEI_DXEIPL_H__
23 #define STACK_SIZE 0x20000
24 #define BSP_STORE_SIZE 0x4000
26 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))
28 extern BOOLEAN gInMemory
;
31 Transfers control to a function starting with a new stack.
33 Transfers control to the function specified by EntryPoint using the new stack
34 specified by NewStack and passing in the parameters specified by Context1 and
35 Context2. Context1 and Context2 are optional and may be NULL. The function
36 EntryPoint must never return.
38 If EntryPoint is NULL, then ASSERT().
39 If NewStack is NULL, then ASSERT().
41 @param EntryPoint A pointer to function to call with the new stack.
42 @param Context1 A pointer to the context to pass into the EntryPoint
44 @param Context2 A pointer to the context to pass into the EntryPoint
46 @param NewStack A pointer to the new stack to use for the EntryPoint
48 @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
49 Reserved on other architectures.
55 IN SWITCH_STACK_ENTRY_POINT EntryPoint
,
56 IN VOID
*Context1
, OPTIONAL
57 IN VOID
*Context2
, OPTIONAL
65 IN UINT16 SectionType
,
66 OUT EFI_GUID
*FileName
,
73 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL
*PeiEfiPeiPeCoffLoader
,
75 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
76 OUT UINT64
*ImageSize
,
77 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
83 CreateArchSpecificHobs (
84 OUT EFI_PHYSICAL_ADDRESS
*BspStore
89 GetImageReadFunction (
90 IN PE_COFF_LOADER_IMAGE_CONTEXT
*ImageContext
98 IN OUT UINTN
*ReadSize
,
106 IN EFI_PEI_FV_FILE_LOADER_PPI
*This
,
107 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
108 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
109 OUT UINT64
*ImageSize
,
110 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
115 IN EFI_FFS_FILE_HEADER
*DxeIpl
,
116 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL
*PeiEfiPeiPeCoffLoader
122 IN EFI_DXE_IPL_PPI
*This
,
123 IN EFI_PEI_SERVICES
**PeiServices
,
124 IN EFI_PEI_HOB_POINTERS HobList
129 IN UINT16 SectionType
,
130 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
132 IN EFI_PEI_HOB_POINTERS
*OrigHob
137 PeimInitializeDxeIpl (
138 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
139 IN EFI_PEI_SERVICES
**PeiServices
144 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL
*PeiEfiPeiPeCoffLoader
,
146 IN EFI_MEMORY_TYPE MemoryType
,
147 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
148 OUT UINT64
*ImageSize
,
149 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
154 CreateIdentityMappingPageTables (
155 IN UINT32 NumberOfProcessorPhysicalAddressBits
161 IN EFI_PHYSICAL_ADDRESS PageTables
,
162 IN EFI_PHYSICAL_ADDRESS HobStart
,
163 IN EFI_PHYSICAL_ADDRESS Stack
,
164 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint1
,
165 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint2