summaryrefslogtreecommitdiff
path: root/DuetPkg/EfiLdr/EfiLdr.h
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-18 03:09:54 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-18 03:09:54 +0000
commit9071550e8697ed9df3d24b369bd30e3f0e190d1f (patch)
treeae93a60e5311a6864330e72daee092255a2e64fb /DuetPkg/EfiLdr/EfiLdr.h
parent25ab7ab110193a0b5fc468fd3839acb8ae4d93df (diff)
downloadedk2-platforms-9071550e8697ed9df3d24b369bd30e3f0e190d1f.tar.xz
Add missing module for duet package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5088 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/EfiLdr/EfiLdr.h')
-rw-r--r--DuetPkg/EfiLdr/EfiLdr.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/DuetPkg/EfiLdr/EfiLdr.h b/DuetPkg/EfiLdr/EfiLdr.h
new file mode 100644
index 0000000000..b1d0e1c272
--- /dev/null
+++ b/DuetPkg/EfiLdr/EfiLdr.h
@@ -0,0 +1,115 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+ EfiLdr.c
+
+Abstract:
+
+Revision History:
+
+--*/
+
+#ifndef _DUET_EFI_LOADER_H_
+#define _DUET_EFI_LOADER_H_
+
+#include "FrameworkDxe.h"
+#include "Uefi.h"
+#include "EfiLdrHandoff.h"
+
+#include <Protocol/LoadedImage.h>
+#include <Protocol/EdkDecompress.h>
+#include <IndustryStandard/PeImage.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+
+#define INT15_E820_AddressRangeMemory 1
+#define INT15_E820_AddressRangeReserved 2
+#define INT15_E820_AddressRangeACPI 3
+#define INT15_E820_AddressRangeNVS 4
+
+#define EFI_FIRMWARE_BASE_ADDRESS 0x00200000
+
+#define EFI_DECOMPRESSED_BUFFER_ADDRESS 0x00600000
+
+#define EFI_MAX_MEMORY_DESCRIPTORS 64
+
+#define LOADED_IMAGE_SIGNATURE EFI_SIGNATURE_32('l','d','r','i')
+
+typedef struct {
+ UINTN Signature;
+ CHAR16 *Name; // Displayable name
+ UINTN Type;
+
+ BOOLEAN Started; // If entrypoint has been called
+ VOID *StartImageContext;
+
+ EFI_IMAGE_ENTRY_POINT EntryPoint; // The image's entry point
+ EFI_LOADED_IMAGE_PROTOCOL Info; // loaded image protocol
+
+ //
+ EFI_PHYSICAL_ADDRESS ImageBasePage; // Location in memory
+ UINTN NoPages; // Number of pages
+ UINT8 *ImageBase; // As a char pointer
+ UINT8 *ImageEof; // End of memory image
+
+ // relocate info
+ UINT8 *ImageAdjust; // Bias for reloc calculations
+ UINTN StackAddress;
+ UINT8 *FixupData; // Original fixup data
+} EFILDR_LOADED_IMAGE;
+
+#pragma pack(4)
+typedef struct {
+ UINT64 BaseAddress;
+ UINT64 Length;
+ UINT32 Type;
+} BIOS_MEMORY_MAP_ENTRY;
+#pragma pack()
+
+typedef struct {
+ UINT32 MemoryMapSize;
+ BIOS_MEMORY_MAP_ENTRY MemoryMapEntry[1];
+} BIOS_MEMORY_MAP;
+
+EFI_STATUS
+EFIAPI
+UefiDecompressGetInfo (
+ IN EFI_TIANO_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SrcSize,
+ OUT UINT32 *DstSize,
+ OUT UINT32 *ScratchSize
+ );
+
+EFI_STATUS
+EFIAPI
+TianoDecompress (
+ IN EFI_TIANO_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SrcSize,
+ IN OUT VOID *Destination,
+ IN UINT32 DstSize,
+ IN OUT VOID *Scratch,
+ IN UINT32 ScratchSize
+ );
+
+EFILDR_LOADED_IMAGE DxeCoreImage;
+EFILDR_LOADED_IMAGE DxeIplImage;
+
+typedef
+VOID
+(* EFI_MAIN_ENTRYPOINT) (
+ IN EFILDRHANDOFF *Handoff
+ )
+;
+
+#endif //_DUET_EFI_LOADER_H_ \ No newline at end of file