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.
21 #ifndef _DUET_EFI_LOADER_H_
22 #define _DUET_EFI_LOADER_H_
24 #include "FrameworkDxe.h"
26 #include "EfiLdrHandoff.h"
28 #include <Protocol/LoadedImage.h>
29 #include <Protocol/EdkDecompress.h>
30 #include <IndustryStandard/PeImage.h>
31 #include <Library/BaseLib.h>
32 #include <Library/BaseMemoryLib.h>
33 #include <Library/PrintLib.h>
35 #define INT15_E820_AddressRangeMemory 1
36 #define INT15_E820_AddressRangeReserved 2
37 #define INT15_E820_AddressRangeACPI 3
38 #define INT15_E820_AddressRangeNVS 4
40 #define EFI_FIRMWARE_BASE_ADDRESS 0x00200000
42 #define EFI_DECOMPRESSED_BUFFER_ADDRESS 0x00600000
44 #define EFI_MAX_MEMORY_DESCRIPTORS 64
46 #define LOADED_IMAGE_SIGNATURE EFI_SIGNATURE_32('l','d','r','i')
50 CHAR16
*Name
; // Displayable name
53 BOOLEAN Started
; // If entrypoint has been called
54 VOID
*StartImageContext
;
56 EFI_IMAGE_ENTRY_POINT EntryPoint
; // The image's entry point
57 EFI_LOADED_IMAGE_PROTOCOL Info
; // loaded image protocol
60 EFI_PHYSICAL_ADDRESS ImageBasePage
; // Location in memory
61 UINTN NoPages
; // Number of pages
62 UINT8
*ImageBase
; // As a char pointer
63 UINT8
*ImageEof
; // End of memory image
66 UINT8
*ImageAdjust
; // Bias for reloc calculations
68 UINT8
*FixupData
; // Original fixup data
69 } EFILDR_LOADED_IMAGE
;
76 } BIOS_MEMORY_MAP_ENTRY
;
81 BIOS_MEMORY_MAP_ENTRY MemoryMapEntry
[1];
84 EFILDR_LOADED_IMAGE DxeCoreImage
;
85 EFILDR_LOADED_IMAGE DxeIplImage
;
89 (* EFI_MAIN_ENTRYPOINT
) (
90 IN EFILDRHANDOFF
*Handoff
94 #endif //_DUET_EFI_LOADER_H_