diff --git a/UefiPayloadPkg/CfrSetupMenuDxe/SetupMenuCfr.c b/UefiPayloadPkg/CfrSetupMenuDxe/SetupMenuCfr.c index c2aeb4d829e5..16a0b51c5f25 100644 --- a/UefiPayloadPkg/CfrSetupMenuDxe/SetupMenuCfr.c +++ b/UefiPayloadPkg/CfrSetupMenuDxe/SetupMenuCfr.c @@ -602,10 +602,12 @@ CfrProcessNumericOption ( HiiDisplayStringId, HiiHelpTextId, QuestionFlags, - EFI_IFR_NUMERIC_SIZE_4 | EFI_IFR_DISPLAY_UINT_DEC, - 0x00000000, - 0xFFFFFFFF, - 0, + EFI_IFR_NUMERIC_SIZE_4 | + ((Option->flags & CFR_OPTFLAG_NUMBER_HEX) ? + EFI_IFR_DISPLAY_UINT_HEX : EFI_IFR_DISPLAY_UINT_DEC), + Option->min, + (Option->min == 0 && Option->max == 0) ? 0xFFFFFFFF : Option->max, + Option->step, DefaultOpCodeHandle ); ASSERT (TempHiiBuffer != NULL); diff --git a/UefiPayloadPkg/Include/Guid/CfrSetupMenuGuid.h b/UefiPayloadPkg/Include/Guid/CfrSetupMenuGuid.h index 335bff3d610f..f335962a09d3 100644 --- a/UefiPayloadPkg/Include/Guid/CfrSetupMenuGuid.h +++ b/UefiPayloadPkg/Include/Guid/CfrSetupMenuGuid.h @@ -33,11 +33,12 @@ extern EFI_GUID gEfiCfrSetupMenuFormGuid; * TODO: "This should be documentation instead." */ enum cfr_option_flags { - CFR_OPTFLAG_READONLY = 1 << 0, - CFR_OPTFLAG_INACTIVE = 1 << 1, - CFR_OPTFLAG_SUPPRESS = 1 << 2, - CFR_OPTFLAG_VOLATILE = 1 << 3, - CFR_OPTFLAG_RUNTIME = 1 << 4, + CFR_OPTFLAG_READONLY = 1 << 0, + CFR_OPTFLAG_INACTIVE = 1 << 1, + CFR_OPTFLAG_SUPPRESS = 1 << 2, + CFR_OPTFLAG_VOLATILE = 1 << 3, + CFR_OPTFLAG_RUNTIME = 1 << 4, + CFR_OPTFLAG_NUMBER_HEX = 1 << 5, }; #define CB_TAG_CFR_VARCHAR_OPT_NAME 0x0007 @@ -80,6 +81,9 @@ typedef struct { UINT64 dependency_id; /* Dependent object ID, or 0 */ UINT32 flags; /* enum cfr_option_flags */ UINT32 default_value; + UINT32 min; + UINT32 max; + UINT32 step; /* * CFR_VARCHAR_OPT_NAME opt_name * CFR_VARCHAR_UI_NAME ui_name