diff --git a/MdePkg/Include/Library/UefiImageLib.h b/MdePkg/Include/Library/UefiImageLib.h index 58573746a7..ecdb706fd9 100644 --- a/MdePkg/Include/Library/UefiImageLib.h +++ b/MdePkg/Include/Library/UefiImageLib.h @@ -125,6 +125,18 @@ UefiImageInitializeContext ( IN UINT32 FileSize ); +/** + Retrieves the UefiImageLib Image format identifier. + + @param[out] Context The context describing the Image. + + @returns The UefiImageLib format identifier. +**/ +UINT8 +UefiImageGetFormat ( + IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context + ); + /** Hashes the Image using the format's default hashing algorithm. diff --git a/MdePkg/Library/BaseUefiImageLib/UefiImageLibPeCoff.c b/MdePkg/Library/BaseUefiImageLib/UefiImageLibPeCoff.c index 7c7666c077..78f3419177 100644 --- a/MdePkg/Library/BaseUefiImageLib/UefiImageLibPeCoff.c +++ b/MdePkg/Library/BaseUefiImageLib/UefiImageLibPeCoff.c @@ -46,6 +46,14 @@ UefiImageInitializeContextPostHash ( return RETURN_SUCCESS; } +UINT8 +UefiImageGetFormat ( + IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context + ) +{ + return UefiImageFormatPe; +} + BOOLEAN UefiImageHashImageDefault ( IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context,