Skip to content

Commit

Permalink
MdePkg: Modify default supported image type to PE, for both FV and NO…
Browse files Browse the repository at this point in the history
…N_FV

UE is experimental and non-standard, so should not be supported by default.

For platforms that opt in to UE, like OVMF and DUET, globally for the
platform (not overridden per-module) the FV PCD should either be PE | UE
or only UE, depending on where support is at.

Signed-off-by: Mike Beaton <[email protected]>
Signed-off-by: Marvin Häuser <[email protected]>
  • Loading branch information
mikebeaton committed Apr 22, 2024
1 parent bb321e0 commit ee4a64a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
14 changes: 10 additions & 4 deletions MdePkg/MdePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -2305,17 +2305,23 @@
# @Prompt Remove X permission from WX sections.
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderRemoveXForWX|FALSE|BOOLEAN|0x40001021

## Indicates the UEFI image file formats supported outside FVs.<BR><BR>
## Indicates the UEFI image file formats supported outside FVs.
# UE is experimental and not enabled by default.
# For correct usage in a platform which opts in to UE support, this should
# be overridden globally, not within individual modules.<BR><BR>
# BIT0 - PE.<BR>
# BIT1 - UE.<BR>
# @Prompt Supported UEFI image file formats outside FVs.
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportNonFv|0x02|UINT8|0x40002000
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportNonFv|0x01|UINT8|0x40002000

## Indicates the UEFI image file formats supported inside FVs.<BR><BR>
## Indicates the UEFI image file formats supported inside FVs.
# UE is experimental and not enabled by default.
# For correct usage in a platform which opts in to UE support, this should
# be overridden globally, not within individual modules.<BR><BR>
# BIT0 - PE.<BR>
# BIT1 - UE.<BR>
# @Prompt Supported UEFI image file formats inside FVs.
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x03|UINT8|0x40002001
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x01|UINT8|0x40002001

## Set image protection policy. The policy is applied for each source individually.
# If a bit is set, aligned images from this source will be protected and
Expand Down
5 changes: 5 additions & 0 deletions OvmfPkg/OvmfPkgIa32.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,11 @@
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x70000000
!endif

#
# Firmware volume supports UE, and may require PE.
#
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x03

################################################################################
#
# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
Expand Down
5 changes: 5 additions & 0 deletions OvmfPkg/OvmfPkgIa32X64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x00000003
!endif

#
# Firmware volume supports UE, and may require PE.
#
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x03

################################################################################
#
# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
Expand Down
5 changes: 5 additions & 0 deletions OvmfPkg/OvmfPkgX64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,11 @@
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x00000003
!endif

#
# Firmware volume supports UE, and may require PE.
#
gEfiMdePkgTokenSpaceGuid.PcdUefiImageFormatSupportFv|0x03

################################################################################
#
# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform
Expand Down

0 comments on commit ee4a64a

Please sign in to comment.