]>
Commit | Line | Data |
---|---|---|
18b84857 | 1 | /** @file\r |
ca162103 | 2 | \r |
3 | Copyright (c) 2006 - 2007, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | HobGeneration.h\r | |
14 | \r | |
15 | Abstract:\r | |
16 | \r | |
17 | Revision History:\r | |
18 | \r | |
18b84857 | 19 | **/\r |
ca162103 | 20 | \r |
21 | #ifndef _DXELDR_HOB_GENERATION_H_\r | |
22 | #define _DXELDR_HOB_GENERATION_H_\r | |
23 | \r | |
24 | #include "DxeIpl.h"\r | |
25 | \r | |
26 | #define EFI_MEMORY_BELOW_1MB_START 0x86000\r | |
27 | #define EFI_MEMORY_BELOW_1MB_END 0x9F800\r | |
28 | #define EFI_MEMORY_STACK_PAGE_NUM 0x20\r | |
29 | #define CONSUMED_MEMORY 0x2000000\r | |
30 | \r | |
31 | #define NV_STORAGE_START 0x15000\r | |
32 | #define NV_STORAGE_STATE 0x19000\r | |
33 | \r | |
34 | #define EFI_LDR_MEMORY_DESCRIPTOR_GUID \\r | |
35 | { 0x7701d7e5, 0x7d1d, 0x4432, 0xa4, 0x68, 0x67, 0x3d, 0xab, 0x8a, 0xde, 0x60 }\r | |
36 | \r | |
37 | #pragma pack(1)\r | |
38 | \r | |
39 | typedef struct {\r | |
40 | EFI_HOB_GUID_TYPE Hob;\r | |
41 | EFI_MEMORY_TYPE_INFORMATION Info[10];\r | |
42 | } MEMORY_TYPE_INFORMATION_HOB;\r | |
43 | \r | |
44 | typedef struct {\r | |
45 | EFI_HOB_GUID_TYPE Hob;\r | |
46 | EFI_PHYSICAL_ADDRESS Table;\r | |
47 | } TABLE_HOB;\r | |
48 | \r | |
49 | typedef struct {\r | |
50 | EFI_HOB_GUID_TYPE Hob;\r | |
51 | VOID *Interface;\r | |
52 | } PROTOCOL_HOB;\r | |
53 | \r | |
54 | typedef struct {\r | |
55 | EFI_HOB_GUID_TYPE Hob;\r | |
56 | UINTN MemDescCount;\r | |
57 | EFI_MEMORY_DESCRIPTOR *MemDesc;\r | |
58 | } MEMORY_DESC_HOB;\r | |
59 | \r | |
60 | typedef struct {\r | |
61 | EFI_HOB_GUID_TYPE Hob;\r | |
62 | // Note: we get only one PCI Segment now.\r | |
63 | EFI_PCI_EXPRESS_BASE_ADDRESS_INFORMATION PciExpressBaseAddressInfo;\r | |
64 | } PCI_EXPRESS_BASE_HOB;\r | |
65 | \r | |
66 | typedef struct {\r | |
67 | EFI_HOB_GUID_TYPE Hob;\r | |
68 | EFI_ACPI_DESCRIPTION AcpiDescription;\r | |
69 | } ACPI_DESCRIPTION_HOB;\r | |
70 | \r | |
71 | typedef struct {\r | |
72 | EFI_HOB_GUID_TYPE Hob;\r | |
73 | EFI_FLASH_MAP_FS_ENTRY_DATA FvbInfo;\r | |
74 | } FVB_HOB;\r | |
75 | \r | |
76 | typedef struct {\r | |
77 | EFI_HOB_HANDOFF_INFO_TABLE Phit;\r | |
78 | EFI_HOB_FIRMWARE_VOLUME Bfv;\r | |
79 | EFI_HOB_RESOURCE_DESCRIPTOR BfvResource;\r | |
80 | EFI_HOB_CPU Cpu;\r | |
81 | EFI_HOB_MEMORY_ALLOCATION_STACK Stack;\r | |
82 | EFI_HOB_MEMORY_ALLOCATION MemoryAllocation;\r | |
83 | EFI_HOB_RESOURCE_DESCRIPTOR MemoryFreeUnder1MB;\r | |
84 | EFI_HOB_RESOURCE_DESCRIPTOR MemoryAbove1MB;\r | |
85 | EFI_HOB_RESOURCE_DESCRIPTOR MemoryAbove4GB;\r | |
86 | EFI_HOB_MEMORY_ALLOCATION_MODULE DxeCore;\r | |
87 | MEMORY_TYPE_INFORMATION_HOB MemoryTypeInfo;\r | |
88 | TABLE_HOB Acpi;\r | |
89 | TABLE_HOB Acpi20;\r | |
90 | TABLE_HOB Smbios;\r | |
91 | TABLE_HOB Mps;\r | |
92 | /**\r | |
93 | PROTOCOL_HOB FlushInstructionCache;\r | |
94 | PROTOCOL_HOB TransferControl;\r | |
95 | PROTOCOL_HOB PeCoffLoader;\r | |
96 | PROTOCOL_HOB EfiDecompress;\r | |
97 | PROTOCOL_HOB TianoDecompress;\r | |
98 | **/\r | |
99 | PROTOCOL_HOB SerialStatusCode;\r | |
100 | MEMORY_DESC_HOB MemoryDescriptor;\r | |
101 | PCI_EXPRESS_BASE_HOB PciExpress;\r | |
102 | ACPI_DESCRIPTION_HOB AcpiInfo;\r | |
103 | \r | |
104 | EFI_HOB_RESOURCE_DESCRIPTOR NvStorageFvResource;\r | |
105 | \r | |
106 | FVB_HOB NvStorageFvb;\r | |
107 | FVB_HOB NvStorage;\r | |
108 | \r | |
109 | FVB_HOB NvFtwFvb;\r | |
110 | FVB_HOB NvFtwWorking;\r | |
111 | FVB_HOB NvFtwSpare;\r | |
112 | \r | |
113 | EFI_HOB_GENERIC_HEADER EndOfHobList;\r | |
114 | } HOB_TEMPLATE;\r | |
115 | \r | |
116 | #pragma pack()\r | |
117 | \r | |
118 | extern HOB_TEMPLATE *gHob;\r | |
119 | \r | |
120 | VOID *\r | |
121 | PrepareHobStack (\r | |
122 | IN VOID *StackTop\r | |
123 | );\r | |
124 | \r | |
125 | VOID\r | |
126 | PrepareHobBfv (\r | |
127 | VOID *Bfv,\r | |
128 | UINTN BfvLength\r | |
129 | );\r | |
130 | \r | |
131 | VOID *\r | |
132 | PrepareHobMemory (\r | |
133 | IN UINTN NumberOfMemoryMapEntries,\r | |
134 | IN EFI_MEMORY_DESCRIPTOR *EfiMemoryDescriptor\r | |
135 | );\r | |
136 | \r | |
137 | VOID\r | |
138 | PrepareHobDxeCore (\r | |
139 | VOID *DxeCoreEntryPoint,\r | |
140 | EFI_PHYSICAL_ADDRESS DxeCoreImageBase,\r | |
141 | UINT64 DxeCoreLength\r | |
142 | );\r | |
143 | \r | |
144 | VOID *\r | |
145 | PreparePageTable (\r | |
146 | VOID *PageNumberTop,\r | |
147 | UINT8 SizeOfMemorySpace\r | |
148 | );\r | |
149 | \r | |
150 | VOID *\r | |
151 | PrepareHobMemoryDescriptor (\r | |
152 | VOID *MemoryDescriptorTop,\r | |
153 | UINTN MemDescCount,\r | |
154 | EFI_MEMORY_DESCRIPTOR *MemDesc\r | |
155 | );\r | |
156 | \r | |
157 | VOID\r | |
158 | PrepareHobPhit (\r | |
159 | VOID *MemoryTop,\r | |
160 | VOID *FreeMemoryTop\r | |
161 | );\r | |
162 | \r | |
163 | VOID *\r | |
164 | PrepareHobNvStorage (\r | |
165 | VOID *NvStorageTop\r | |
166 | );\r | |
167 | \r | |
168 | VOID\r | |
169 | PrepareHobCpu (\r | |
170 | VOID\r | |
171 | );\r | |
172 | \r | |
173 | VOID\r | |
174 | CompleteHobGeneration (\r | |
175 | VOID\r | |
176 | );\r | |
177 | \r | |
178 | #endif\r |