Skip to content

Commit

Permalink
MdeModulePkg: Add PcdCapsuleFmpSupport to set EFI_OS_INDICATIONS_FMP_…
Browse files Browse the repository at this point in the history
…CAPSULE_SUPPORTED

Don't know why EDK never sets this bit (there is only definition with no
uses), maybe nothing actually checks its value.  Whatever the reason is,
it seems like a good idea to make setting it possible.

Signed-off-by: Sergii Dmytruk <[email protected]>
  • Loading branch information
SergiiDmytruk committed Jun 30, 2024
1 parent f3f87cb commit af5902b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MdeModulePkg/MdeModulePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,14 @@
# @Prompt Maximum Number of PEI Reset Filters, Reset Notifications or Reset Handlers.
gEfiMdeModulePkgTokenSpaceGuid.PcdMaximumPeiResetNotifies|0x10|UINT32|0x0000010A

## Whether to report support of FMP capsules in OsIndicationSupport.<BR><BR>
# This PCD indicates if support of FMP capsules should be advertised.<BR>
# TRUE - support of FMP capsules is advertised.<BR>
# FALSE - support of FMP capsules is not advertised.<BR>
# If platform does not use this feature, this PCD should be set to FALSE.<BR><BR>
# @Prompt Enable advertising support of FMP capsules.
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleFmpSupport|FALSE|BOOLEAN|0x00000028

## Capsule On Disk is to deliver capsules via files on Mass Storage device.<BR><BR>
# This PCD indicates if the Capsule On Disk is supported.<BR>
# TRUE - Capsule On Disk is supported.<BR>
Expand Down
1 change: 1 addition & 0 deletions MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleFmpSupport ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformRecoverySupport ## CONSUMES

[Depex]
Expand Down
4 changes: 4 additions & 0 deletions MdeModulePkg/Universal/BdsDxe/BdsEntry.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ BdsFormalizeOSIndicationVariable (
OsIndicationSupport |= EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED;
}

if (PcdGetBool (PcdCapsuleFmpSupport)) {
OsIndicationSupport |= EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED;
}

Status = gRT->SetVariable (
EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME,
&gEfiGlobalVariableGuid,
Expand Down

0 comments on commit af5902b

Please sign in to comment.