PlatformConfig.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /** @file
  2. Utility functions for serializing (persistently storing) and deserializing
  3. OVMF's platform configuration.
  4. Copyright (C) 2014, Red Hat, Inc.
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _PLATFORM_CONFIG_H_
  8. #define _PLATFORM_CONFIG_H_
  9. #include <Base.h>
  10. //
  11. // This structure participates in driver configuration. It does not
  12. // (necessarily) reflect the wire format in the persistent store.
  13. //
  14. #pragma pack(1)
  15. typedef struct {
  16. //
  17. // preferred graphics console resolution when booting
  18. //
  19. UINT32 HorizontalResolution;
  20. UINT32 VerticalResolution;
  21. } PLATFORM_CONFIG;
  22. #pragma pack()
  23. //
  24. // Please see the API documentation near the function definitions.
  25. //
  26. EFI_STATUS
  27. EFIAPI
  28. PlatformConfigSave (
  29. IN PLATFORM_CONFIG *PlatformConfig
  30. );
  31. EFI_STATUS
  32. EFIAPI
  33. PlatformConfigLoad (
  34. OUT PLATFORM_CONFIG *PlatformConfig,
  35. OUT UINT64 *OptionalElements
  36. );
  37. //
  38. // Feature flags for OptionalElements.
  39. //
  40. #define PLATFORM_CONFIG_F_GRAPHICS_RESOLUTION BIT0
  41. #define PLATFORM_CONFIG_F_DOWNGRADE BIT63
  42. extern CHAR16 mVariableName[];
  43. extern CHAR16 mHiiFormName[];
  44. #endif // _PLATFORM_CONFIG_H_