]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Core/DxeIplX64Peim/DxeIpl.h
Identify SupArch for .msa
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplX64Peim / DxeIpl.h
1 /*++
2
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
8
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.
11
12 Module Name:
13
14 DxeIpl.h
15
16 Abstract:
17
18 --*/
19
20 #ifndef __PEI_DXEIPL_H__
21 #define __PEI_DXEIPL_H__
22
23 #define STACK_SIZE 0x20000
24 #define BSP_STORE_SIZE 0x4000
25
26 extern BOOLEAN gInMemory;
27
28 VOID
29 SwitchIplStacks (
30 VOID *EntryPoint,
31 UINTN Parameter1,
32 UINTN Parameter2,
33 VOID *NewStack,
34 VOID *NewBsp
35 )
36 ;
37
38 EFI_STATUS
39 PeiFindFile (
40 IN UINT8 Type,
41 IN UINT16 SectionType,
42 OUT EFI_GUID *FileName,
43 OUT VOID **Pe32Data
44 )
45 ;
46
47 EFI_STATUS
48 PeiLoadFile (
49 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,
50 IN VOID *Pe32Data,
51 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
52 OUT UINT64 *ImageSize,
53 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
54 )
55 ;
56
57
58 EFI_STATUS
59 CreateArchSpecificHobs (
60 OUT EFI_PHYSICAL_ADDRESS *BspStore
61 )
62 ;
63
64 EFI_STATUS
65 GetImageReadFunction (
66 IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
67 )
68 ;
69
70 EFI_STATUS
71 PeiImageRead (
72 IN VOID *FileHandle,
73 IN UINTN FileOffset,
74 IN OUT UINTN *ReadSize,
75 OUT VOID *Buffer
76 )
77 ;
78
79 EFI_STATUS
80 EFIAPI
81 DxeIplLoadFile (
82 IN EFI_PEI_FV_FILE_LOADER_PPI *This,
83 IN EFI_FFS_FILE_HEADER *FfsHeader,
84 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
85 OUT UINT64 *ImageSize,
86 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
87 );
88
89 EFI_STATUS
90 ShadowDxeIpl (
91 IN EFI_FFS_FILE_HEADER *DxeIpl,
92 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader
93 );
94
95 EFI_STATUS
96 EFIAPI
97 DxeLoadCore (
98 IN EFI_DXE_IPL_PPI *This,
99 IN EFI_PEI_SERVICES **PeiServices,
100 IN EFI_PEI_HOB_POINTERS HobList
101 );
102
103 EFI_STATUS
104 PeiProcessFile (
105 IN UINT16 SectionType,
106 IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,
107 OUT VOID **Pe32Data
108 );
109
110 EFI_STATUS
111 EFIAPI
112 PeimInitializeDxeIpl (
113 IN EFI_FFS_FILE_HEADER *FfsHeader,
114 IN EFI_PEI_SERVICES **PeiServices
115 );
116
117 EFI_STATUS
118 PeiLoadx64File (
119 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,
120 IN VOID *Pe32Data,
121 IN EFI_MEMORY_TYPE MemoryType,
122 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
123 OUT UINT64 *ImageSize,
124 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
125 )
126 ;
127
128 EFI_PHYSICAL_ADDRESS
129 CreateIdentityMappingPageTables (
130 IN UINT32 NumberOfProcessorPhysicalAddressBits
131 )
132 ;
133
134 VOID
135 ActivateLongMode (
136 IN EFI_PHYSICAL_ADDRESS PageTables,
137 IN EFI_PHYSICAL_ADDRESS HobStart,
138 IN EFI_PHYSICAL_ADDRESS Stack,
139 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint1,
140 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint2
141 );
142
143 VOID
144 LoadGo64Gdt();
145
146 #endif