summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-22 02:18:24 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-22 02:18:24 +0000
commit146332ae26390c7129513f31e7ccb6a499a89b69 (patch)
tree334aebed04beb4c74f7681b81947198359bd7e6e
parent165309aea6c119a320bd3ca00515f9fbf9e57b51 (diff)
downloadedk2-platforms-146332ae26390c7129513f31e7ccb6a499a89b69.tar.xz
Fixed typo in PiPeiCis.h.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2702 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Include/Library/HobLib.h11
-rw-r--r--MdePkg/Include/Library/PeCoffLib.h40
-rw-r--r--MdePkg/Include/Pi/PiPeiCis.h2
-rw-r--r--MdePkg/Include/Protocol/DevicePath.h12
4 files changed, 59 insertions, 6 deletions
diff --git a/MdePkg/Include/Library/HobLib.h b/MdePkg/Include/Library/HobLib.h
index 3b753a7af1..655ddfba56 100644
--- a/MdePkg/Include/Library/HobLib.h
+++ b/MdePkg/Include/Library/HobLib.h
@@ -368,4 +368,15 @@ BuildMemoryAllocationHob (
)
;
+#define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)
+#define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)
+#define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))
+#define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)
+
+//
+// Get the data and data size field of GUID
+//
+#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
+#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
+
#endif
diff --git a/MdePkg/Include/Library/PeCoffLib.h b/MdePkg/Include/Library/PeCoffLib.h
index 2bb9db58cf..a32b61f188 100644
--- a/MdePkg/Include/Library/PeCoffLib.h
+++ b/MdePkg/Include/Library/PeCoffLib.h
@@ -17,8 +17,6 @@
#ifndef __BASE_PE_COFF_LIB_H__
#define __BASE_PE_COFF_LIB_H__
-#include <Common/PeCoffLoaderImageContext.h>
-
//
// Return status codes from the PE/COFF Loader services
// BUGBUG: Find where used and see if can be replaced by RETURN_STATUS codes
@@ -35,6 +33,44 @@
#define IMAGE_ERROR_FAILED_RELOCATION 9
#define IMAGE_ERROR_FAILED_ICACHE_FLUSH 10
+//
+// PE/COFF Loader Read Function passed in by caller
+//
+typedef
+RETURN_STATUS
+(EFIAPI *PE_COFF_LOADER_READ_FILE) (
+ IN VOID *FileHandle,
+ IN UINTN FileOffset,
+ IN OUT UINTN *ReadSize,
+ OUT VOID *Buffer
+ );
+
+//
+// Context structure used while PE/COFF image is being loaded and relocated
+//
+typedef struct {
+ PHYSICAL_ADDRESS ImageAddress;
+ UINT64 ImageSize;
+ PHYSICAL_ADDRESS DestinationAddress;
+ PHYSICAL_ADDRESS EntryPoint;
+ PE_COFF_LOADER_READ_FILE ImageRead;
+ VOID *Handle;
+ VOID *FixupData;
+ UINT32 SectionAlignment;
+ UINT32 PeCoffHeaderOffset;
+ UINT32 DebugDirectoryEntryRva;
+ VOID *CodeView;
+ CHAR8 *PdbPointer;
+ UINTN SizeOfHeaders;
+ UINT32 ImageCodeMemoryType;
+ UINT32 ImageDataMemoryType;
+ UINT32 ImageError;
+ UINTN FixupDataSize;
+ UINT16 Machine;
+ UINT16 ImageType;
+ BOOLEAN RelocationsStripped;
+ BOOLEAN IsTeImage;
+} PE_COFF_LOADER_IMAGE_CONTEXT;
/**
Retrieves information about a PE/COFF image.
diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h
index 44cf1672ec..e9f83f82e6 100644
--- a/MdePkg/Include/Pi/PiPeiCis.h
+++ b/MdePkg/Include/Pi/PiPeiCis.h
@@ -688,7 +688,7 @@ EFI_STATUS
#define PEI_SERVICES_SIGNATURE 0x5652455320494550
#define PEI_SERVICES_REVISION (PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION)
-struct EFI_PEI_SERVICES {
+struct _EFI_PEI_SERVICES {
EFI_TABLE_HEADER Hdr;
//
// PPI Functions
diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h
index 77b79a0c6f..95a8be6c9b 100644
--- a/MdePkg/Include/Protocol/DevicePath.h
+++ b/MdePkg/Include/Protocol/DevicePath.h
@@ -365,7 +365,7 @@ typedef struct {
CHAR16 PathName[1];
} FILEPATH_DEVICE_PATH;
-#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
+#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
#define MEDIA_PROTOCOL_DP 0x05
typedef struct {
@@ -375,11 +375,17 @@ typedef struct {
#define MEDIA_PIWG_FW_VOL_DP 0x6
-typedef MEDIA_PROTOCOL_DEVICE_PATH MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID FvName;
+} MEDIA_FW_VOL_DEVICE_PATH;
#define MEDIA_PIWG_FW_FILE_DP 0x7
-typedef MEDIA_PROTOCOL_DEVICE_PATH MEDIA_FW_VOL_DEVICE_PATH;
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID FvFileName;
+} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
//
// BBS Device Path