OvmfPkg: PlatformDxe: utility functions for saving / loading configuration

The two functions introduced here allow the saving and loading of platform
configuration to/from the non-volatile variable store.

The PLATFORM_CONFIG structure and the two functions that take it / return
it are generally meant for any DXE or UEFI driver that needs to access
platform configuration. For now we keep this small "library" internal to
PlatformDxe.

The PLATFORM_CONFIG wire format is intended only to grow over time (as
long as the variable GUID remains unchanged). At the introduction of new
fields, new feature flags must be added, and recognized in
PlatformConfigLoad().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15365 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Laszlo Ersek
2014-03-22 07:13:02 +00:00
committed by jljusten
parent d945a8ba5b
commit 5267c89b4d
3 changed files with 200 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
[Sources]
Platform.c
PlatformConfig.c
[Packages]
MdePkg/MdePkg.dec
@@ -33,9 +34,17 @@
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
BaseMemoryLib
DebugLib
MemoryAllocationLib
UefiBootServicesTableLib
UefiLib
UefiRuntimeServicesTableLib
UefiDriverEntryPoint
[Guids]
gOvmfPlatformConfigGuid
[Depex]
TRUE
gEfiVariableArchProtocolGuid AND
gEfiVariableWriteArchProtocolGuid