24CHAR16 mVariableName[] = L
"PlatformConfig";
25CHAR16 mHiiFormName[] = L
"MainFormState";
48 Status =
gRT->SetVariable (
50 &gOvmfPlatformConfigGuid,
52 EFI_VARIABLE_RUNTIME_ACCESS,
53 sizeof *PlatformConfig,
80 OUT UINT64 *OptionalElements
97 &gOvmfPlatformConfigGuid,
101 if (EFI_ERROR (Status)) {
105 *OptionalElements = 0;
106 if (DataSize >
sizeof *PlatformConfig) {
110 CopyMem (PlatformConfig, Data,
sizeof *PlatformConfig);
111 *OptionalElements |= PLATFORM_CONFIG_F_DOWNGRADE;
113 CopyMem (PlatformConfig, Data, DataSize);
119 (UINT8 *)PlatformConfig + DataSize,
120 sizeof *PlatformConfig - DataSize
128 sizeof PlatformConfig->VerticalResolution))
130 *OptionalElements |= PLATFORM_CONFIG_F_GRAPHICS_RESOLUTION;
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_RUNTIME_SERVICES * gRT
#define OFFSET_OF(TYPE, Field)
EFI_STATUS EFIAPI GetVariable2(IN CONST CHAR16 *Name, IN CONST EFI_GUID *Guid, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
#define EFI_VARIABLE_NON_VOLATILE