3 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4 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_
25 #include "EfiLdrHandoff.h"
27 #include <Protocol/LoadedImage.h>
28 #include <IndustryStandard/PeImage.h>
29 #include <Library/BaseLib.h>
30 #include <Library/BaseMemoryLib.h>
31 #include <Library/PrintLib.h>
32 #include <Library/SerialPortLib.h>
34 #define INT15_E820_AddressRangeMemory 1
35 #define INT15_E820_AddressRangeReserved 2
36 #define INT15_E820_AddressRangeACPI 3
37 #define INT15_E820_AddressRangeNVS 4
39 #define EFI_FIRMWARE_BASE_ADDRESS 0x00200000
41 #define EFI_DECOMPRESSED_BUFFER_ADDRESS 0x00600000
43 #define EFI_MAX_MEMORY_DESCRIPTORS 64
45 #define LOADED_IMAGE_SIGNATURE SIGNATURE_32('l','d','r','i')
49 CHAR16
*Name
; // Displayable name
52 BOOLEAN Started
; // If entrypoint has been called
53 VOID
*StartImageContext
;
55 EFI_IMAGE_ENTRY_POINT EntryPoint
; // The image's entry point
56 EFI_LOADED_IMAGE_PROTOCOL Info
; // loaded image protocol
59 EFI_PHYSICAL_ADDRESS ImageBasePage
; // Location in memory
60 UINTN NoPages
; // Number of pages
61 UINT8
*ImageBase
; // As a char pointer
62 UINT8
*ImageEof
; // End of memory image
65 UINT8
*ImageAdjust
; // Bias for reloc calculations
67 UINT8
*FixupData
; // Original fixup data
68 } EFILDR_LOADED_IMAGE
;
75 } BIOS_MEMORY_MAP_ENTRY
;
80 BIOS_MEMORY_MAP_ENTRY MemoryMapEntry
[1];
83 EFILDR_LOADED_IMAGE DxeCoreImage
;
84 EFILDR_LOADED_IMAGE DxeIplImage
;
88 (EFIAPI
* EFI_MAIN_ENTRYPOINT
) (
89 IN EFILDRHANDOFF
*Handoff
92 #endif //_DUET_EFI_LOADER_H_