]> git.proxmox.com Git - mirror_edk2.git/blame - DuetPkg/EfiLdr/EfiLdr.h
DuetPkg: Removing ipf which is no longer supported from edk2.
[mirror_edk2.git] / DuetPkg / EfiLdr / EfiLdr.h
CommitLineData
9071550e 1/*++\r
2\r
b68b78e6 3Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
b1f700a8 4This program and the accompanying materials \r
9071550e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 EfiLdr.c\r
14\r
15Abstract:\r
16\r
17Revision History:\r
18\r
19--*/\r
20\r
21#ifndef _DUET_EFI_LOADER_H_\r
22#define _DUET_EFI_LOADER_H_\r
23\r
9071550e 24#include "Uefi.h"\r
25#include "EfiLdrHandoff.h"\r
26\r
27#include <Protocol/LoadedImage.h>\r
9071550e 28#include <IndustryStandard/PeImage.h>\r
29#include <Library/BaseLib.h>\r
30#include <Library/BaseMemoryLib.h>\r
3da85e63 31#include <Library/PrintLib.h>\r
b68b78e6 32#include <Library/SerialPortLib.h>\r
9071550e 33\r
34#define INT15_E820_AddressRangeMemory 1\r
35#define INT15_E820_AddressRangeReserved 2\r
36#define INT15_E820_AddressRangeACPI 3\r
37#define INT15_E820_AddressRangeNVS 4\r
38\r
39#define EFI_FIRMWARE_BASE_ADDRESS 0x00200000\r
40\r
41#define EFI_DECOMPRESSED_BUFFER_ADDRESS 0x00600000\r
42\r
43#define EFI_MAX_MEMORY_DESCRIPTORS 64\r
44\r
eea53ce1 45#define LOADED_IMAGE_SIGNATURE SIGNATURE_32('l','d','r','i')\r
9071550e 46\r
47typedef struct {\r
48 UINTN Signature;\r
49 CHAR16 *Name; // Displayable name\r
50 UINTN Type;\r
51\r
52 BOOLEAN Started; // If entrypoint has been called\r
53 VOID *StartImageContext;\r
54\r
55 EFI_IMAGE_ENTRY_POINT EntryPoint; // The image's entry point\r
56 EFI_LOADED_IMAGE_PROTOCOL Info; // loaded image protocol\r
57\r
58 // \r
59 EFI_PHYSICAL_ADDRESS ImageBasePage; // Location in memory\r
60 UINTN NoPages; // Number of pages \r
61 UINT8 *ImageBase; // As a char pointer\r
62 UINT8 *ImageEof; // End of memory image\r
63\r
64 // relocate info\r
65 UINT8 *ImageAdjust; // Bias for reloc calculations\r
66 UINTN StackAddress;\r
67 UINT8 *FixupData; // Original fixup data\r
68} EFILDR_LOADED_IMAGE;\r
69\r
70#pragma pack(4)\r
71typedef struct { \r
72 UINT64 BaseAddress;\r
73 UINT64 Length;\r
74 UINT32 Type;\r
75} BIOS_MEMORY_MAP_ENTRY;\r
76#pragma pack()\r
77\r
78typedef struct { \r
79 UINT32 MemoryMapSize;\r
80 BIOS_MEMORY_MAP_ENTRY MemoryMapEntry[1];\r
81} BIOS_MEMORY_MAP;\r
82\r
9071550e 83typedef\r
84VOID\r
0492698a 85(EFIAPI * EFI_MAIN_ENTRYPOINT) (\r
9071550e 86 IN EFILDRHANDOFF *Handoff\r
ed66e1bc 87 );\r
9071550e 88\r
e188a609 89#endif //_DUET_EFI_LOADER_H_\r