Skip to content

Commit

Permalink
UE: Made UE the only supported format outside FVs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Krichanov committed Oct 27, 2023
1 parent 4964f0a commit be94902
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions MdeModulePkg/Core/Dxe/Image/Image.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ CoreLoadImageCommon (
&ImageContext,
FHand.Source,
(UINT32) FHand.SourceSize,
ImageIsFromFv
UEFI_IMAGE_SOURCE_FV
);
if (EFI_ERROR (Status)) {
ASSERT (FALSE);
Expand All @@ -1240,8 +1240,8 @@ CoreLoadImageCommon (
SecurityStatus = gSecurity2->FileAuthentication (
gSecurity2,
OriginalFilePath,
&ImageContext,
sizeof (ImageContext),
&ImageContext,
sizeof (ImageContext),
BootPolicy
);
if (!EFI_ERROR (SecurityStatus) && ImageIsFromFv) {
Expand Down
4 changes: 2 additions & 2 deletions MdePkg/Include/Library/UefiImageLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <Library/PeCoffLib2.h>

typedef enum {
UefiImageFormatUe = 0,
UefiImageFormatPe = 1,
UefiImageFormatPe = 0,
UefiImageFormatUe = 1,
UefiImageFormatMax
} UEFI_IMAGE_FORMAT;

Expand Down
2 changes: 1 addition & 1 deletion MdePkg/Library/BaseUefiImageLib/UefiImageLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ UefiImageInitializeContextPreHash (
Status = RETURN_UNSUPPORTED;

STATIC_ASSERT (
UefiImageFormatPe == UefiImageFormatMax - 1,
UefiImageFormatUe == UefiImageFormatMax - 1,
"Support for more formats needs to be added above."
);

Expand Down
2 changes: 2 additions & 0 deletions MdePkg/MdePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -2306,11 +2306,13 @@

## Indicates the UEFI image file formats supported outside FVs.<BR><BR>
# BIT0 - PE.<BR>
# BIT1 - UE.<BR>
# @Prompt Supported UEFI image file formats outside FVs.
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportNonFv|0x02|UINT8|0x40002000

## Indicates the UEFI image file formats supported inside FVs.<BR><BR>
# BIT0 - PE.<BR>
# BIT1 - UE.<BR>
# @Prompt Supported UEFI image file formats inside FVs.
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x03|UINT8|0x40002001

Expand Down

0 comments on commit be94902

Please sign in to comment.