Skip to content

Commit

Permalink
UefiPayloadPkg: Sync CFR option flags with coreboot
Browse files Browse the repository at this point in the history
Change the GRAYOUT CFR option flag to INACTIVE and add the RUNTIME flag
to match coreboot.

Signed-off-by: Filip Brozovic <[email protected]>
  • Loading branch information
fbrozovic committed Jan 15, 2025
1 parent a42154f commit 4930619
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions UefiPayloadPkg/CfrSetupMenuDxe/SetupMenuCfr.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ CfrProcessFormOption (
if (Option->flags & CFR_OPTFLAG_SUPPRESS) {
CfrProduceHiiForFlags (StartOpCodeHandle, EFI_IFR_SUPPRESS_IF_OP);
}
if (Option->flags & CFR_OPTFLAG_GRAYOUT) {
if (Option->flags & CFR_OPTFLAG_INACTIVE) {
CfrProduceHiiForFlags (StartOpCodeHandle, EFI_IFR_GRAY_OUT_IF_OP);
}

Expand All @@ -412,7 +412,7 @@ CfrProcessFormOption (
);
ASSERT (TempHiiBuffer != NULL);

if (Option->flags & CFR_OPTFLAG_GRAYOUT) {
if (Option->flags & CFR_OPTFLAG_INACTIVE) {
TempHiiBuffer = HiiCreateEndOpCode (StartOpCodeHandle);
ASSERT (TempHiiBuffer != NULL);
}
Expand Down Expand Up @@ -523,7 +523,7 @@ CfrProcessNumericOption (
if (Option->flags & CFR_OPTFLAG_SUPPRESS) {
CfrProduceHiiForFlags (StartOpCodeHandle, EFI_IFR_SUPPRESS_IF_OP);
}
if (Option->flags & CFR_OPTFLAG_GRAYOUT) {
if (Option->flags & CFR_OPTFLAG_INACTIVE) {
CfrProduceHiiForFlags (StartOpCodeHandle, EFI_IFR_GRAY_OUT_IF_OP);
}

Expand Down Expand Up @@ -622,7 +622,7 @@ CfrProcessNumericOption (
ASSERT (TempHiiBuffer != NULL);
}

if (Option->flags & CFR_OPTFLAG_GRAYOUT) {
if (Option->flags & CFR_OPTFLAG_INACTIVE) {
TempHiiBuffer = HiiCreateEndOpCode (StartOpCodeHandle);
ASSERT (TempHiiBuffer != NULL);
}
Expand Down Expand Up @@ -766,7 +766,7 @@ CfrProcessCharacterOption (
if (Option->flags & CFR_OPTFLAG_SUPPRESS) {
CfrProduceHiiForFlags (StartOpCodeHandle, EFI_IFR_SUPPRESS_IF_OP);
}
if (Option->flags & CFR_OPTFLAG_GRAYOUT) {
if (Option->flags & CFR_OPTFLAG_INACTIVE) {
CfrProduceHiiForFlags (StartOpCodeHandle, EFI_IFR_GRAY_OUT_IF_OP);
}

Expand Down Expand Up @@ -827,7 +827,7 @@ CfrProcessCharacterOption (
ASSERT (TempHiiBuffer != NULL);
}

if (Option->flags & CFR_OPTFLAG_GRAYOUT) {
if (Option->flags & CFR_OPTFLAG_INACTIVE) {
TempHiiBuffer = HiiCreateEndOpCode (StartOpCodeHandle);
ASSERT (TempHiiBuffer != NULL);
}
Expand Down
3 changes: 2 additions & 1 deletion UefiPayloadPkg/Include/Guid/CfrSetupMenuGuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ extern EFI_GUID gEfiCfrSetupMenuFormGuid;
*/
enum cfr_option_flags {
CFR_OPTFLAG_READONLY = 1 << 0,
CFR_OPTFLAG_GRAYOUT = 1 << 1,
CFR_OPTFLAG_INACTIVE = 1 << 1,
CFR_OPTFLAG_SUPPRESS = 1 << 2,
CFR_OPTFLAG_VOLATILE = 1 << 3,
CFR_OPTFLAG_RUNTIME = 1 << 4,
};

#define CB_TAG_CFR_VARCHAR_OPT_NAME 0x0007
Expand Down

0 comments on commit 4930619

Please sign in to comment.