PlatformConfig.h 1.2 KB

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