We'll need a C language (ie. structure) representation for the state of the visual elements on the form. We choose the Buffer Storage kind (see 29.2.5.6 "Storage" in UEFI 2.4A), because it's easy to work with.
Note that the structure added in this patch has nothing to do with UEFI non-volatile variables. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- OvmfPkg/PlatformConfigDxe/PlatformConfig.h | 12 ++++++++++++ OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/OvmfPkg/PlatformConfigDxe/PlatformConfig.h b/OvmfPkg/PlatformConfigDxe/PlatformConfig.h index 8efe789..5d9874f 100644 --- a/OvmfPkg/PlatformConfigDxe/PlatformConfig.h +++ b/OvmfPkg/PlatformConfigDxe/PlatformConfig.h @@ -18,6 +18,18 @@ // // Macro and type definitions that connect the form with the HII driver code. // +#define FORMSTATEID_MAIN_FORM 1 #define FORMID_MAIN_FORM 1 +#define MAXSIZE_RES_CUR 16 + +// +// This structure describes the form state. Its fields relate strictly to the +// visual widgets on the form. +// +typedef struct { + UINT16 CurrentPreferredResolution[MAXSIZE_RES_CUR]; + UINT32 NextPreferredResolution; +} MAIN_FORM_STATE; + #endif // _PLATFORM_CONFIG_H_ diff --git a/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr b/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr index 1576199..5dc4843 100644 --- a/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr +++ b/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr @@ -30,6 +30,11 @@ formset title = STRING_TOKEN(STR_FORMSET_TITLE), help = STRING_TOKEN(STR_FORMSET_HELP), + varstore MAIN_FORM_STATE, + varid = FORMSTATEID_MAIN_FORM, + name = MainFormState, + guid = OVMF_PLATFORM_CONFIG_GUID; + form formid = FORMID_MAIN_FORM, title = STRING_TOKEN(STR_MAIN_FORM_TITLE); -- 1.8.3.1 ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel