]> git.proxmox.com Git - mirror_edk2.git/blame - DuetPkg/EfiLdr/EfiLdr.h
Fix a security hole in shell binaries:
[mirror_edk2.git] / DuetPkg / EfiLdr / EfiLdr.h
CommitLineData
9071550e 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
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
24#include "FrameworkDxe.h"\r
25#include "Uefi.h"\r
26#include "EfiLdrHandoff.h"\r
27\r
28#include <Protocol/LoadedImage.h>\r
9071550e 29#include <IndustryStandard/PeImage.h>\r
30#include <Library/BaseLib.h>\r
31#include <Library/BaseMemoryLib.h>\r
3da85e63 32#include <Library/PrintLib.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 83EFILDR_LOADED_IMAGE DxeCoreImage;\r
84EFILDR_LOADED_IMAGE DxeIplImage;\r
85\r
86typedef\r
87VOID\r
88(* EFI_MAIN_ENTRYPOINT) (\r
89 IN EFILDRHANDOFF *Handoff\r
ed66e1bc 90 );\r
9071550e 91\r
e188a609 92#endif //_DUET_EFI_LOADER_H_\r