Skip to content

Commit

Permalink
UE: Made UE the only supported format in FVs.
Browse files Browse the repository at this point in the history
Outside FVs both UE and PE are allowed.
  • Loading branch information
Mikhail Krichanov committed Oct 27, 2023
1 parent 4964f0a commit 10ada77
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
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
6 changes: 4 additions & 2 deletions MdePkg/MdePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -2306,13 +2306,15 @@

## 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
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportNonFv|0x03|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
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x02|UINT8|0x40002001

[PcdsFixedAtBuild,PcdsPatchableInModule]
## Indicates the maximum length of unicode string used in the following
Expand Down

0 comments on commit 10ada77

Please sign in to comment.