From aeb90c4a15e90a85121e47b541baeaeff1e150a4 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Wed, 15 Apr 2009 14:19:10 +0000 Subject: [PATCH] Add extra definition to MdePkg\Include\IndustrialStandard\Image.h: EFI_IMAGE_RESOURCE_* to handle HII resource in image git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8091 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/IndustryStandard/PeImage.h | 55 ++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/IndustryStandard/PeImage.h index 5ab1e7a9b8..b173444da3 100644 --- a/MdePkg/Include/IndustryStandard/PeImage.h +++ b/MdePkg/Include/IndustryStandard/PeImage.h @@ -598,7 +598,7 @@ typedef struct { /// -/// Debug Direcotry Format +/// Debug Directory Format /// typedef struct { UINT32 Characteristics; @@ -643,6 +643,59 @@ typedef struct { // } EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY; +/// +/// Resource format. +/// +typedef struct { + UINT32 Characteristics; + UINT32 TimeDateStamp; + UINT16 MajorVersion; + UINT16 MinorVersion; + UINT16 NumberOfNamedEntries; + UINT16 NumberOfIdEntries; + // + // Array of EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY entries goes here. + // +} EFI_IMAGE_RESOURCE_DIRECTORY; + +/// +/// Resource directory entry format. +/// +typedef struct { + union { + struct { + UINT32 NameOffset:31; + UINT32 NameIsString:1; + } s; + UINT32 Id; + } u1; + union { + UINT32 OffsetToData; + struct { + UINT32 OffsetToDirectory:31; + UINT32 DataIsDirectory:1; + } s; + } u2; +} EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY; + +/// +/// Resource directory entry for string. +/// +typedef struct { + UINT16 Length; + CHAR16 String[1]; +} EFI_IMAGE_RESOURCE_DIRECTORY_STRING; + +/// +/// Resource directory entry for data array. +/// +typedef struct { + UINT32 OffsetToData; + UINT32 Size; + UINT32 CodePage; + UINT32 Reserved; +} EFI_IMAGE_RESOURCE_DATA_ENTRY; + /// /// Header format for TE images, defined in PI Specification, 1.0 ///