ConfigVars.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /** @file
  2. *
  3. * Copyright (c) 2020, Andrei Warkentin <andrey.warkentin@gmail.com>
  4. * Copyright (c) 2020, ARM Limited. All rights reserved.
  5. *
  6. * SPDX-License-Identifier: BSD-2-Clause-Patent
  7. *
  8. **/
  9. #ifndef CONFIG_VARS_H
  10. #define CONFIG_VARS_H
  11. #pragma pack(1)
  12. typedef struct {
  13. /*
  14. * One bit for each scaled resolution supported,
  15. * these are ordered exactly like mGopModeData
  16. * in DisplayDxe.
  17. *
  18. * 800x600, 640x480, 1024x768, 720p, 1080p, native.
  19. */
  20. UINT8 v800 : 1;
  21. UINT8 v640 : 1;
  22. UINT8 v1024 : 1;
  23. UINT8 v720p : 1;
  24. UINT8 v1080p : 1;
  25. UINT8 Physical : 1;
  26. } DISPLAY_ENABLE_SCALED_VMODES_VARSTORE_DATA;
  27. #pragma pack()
  28. typedef struct {
  29. /*
  30. * 0 - No screenshot support.
  31. * 1 - Screenshot support via hotkey.
  32. */
  33. UINT32 Enable;
  34. } DISPLAY_ENABLE_SSHOT_VARSTORE_DATA;
  35. typedef struct {
  36. /*
  37. * 0 - No JTAG.
  38. * 1 - JTAG mode.
  39. */
  40. UINT32 Enable;
  41. } DEBUG_ENABLE_JTAG_VARSTORE_DATA;
  42. typedef struct {
  43. #define CHIPSET_CPU_CLOCK_LOW 0
  44. #define CHIPSET_CPU_CLOCK_DEFAULT 1
  45. #define CHIPSET_CPU_CLOCK_MAX 2
  46. #define CHIPSET_CPU_CLOCK_CUSTOM 3
  47. UINT32 Clock;
  48. } CHIPSET_CPU_CLOCK_VARSTORE_DATA;
  49. typedef struct {
  50. UINT32 Clock;
  51. } CHIPSET_CUSTOM_CPU_CLOCK_VARSTORE_DATA;
  52. typedef struct {
  53. /*
  54. * Always set by ConfigDxe prior to HII init to reflect
  55. * platform capability.
  56. */
  57. UINT32 Supported;
  58. } ADVANCED_RAM_MORE_THAN_3GB_VARSTORE_DATA;
  59. typedef struct {
  60. UINT32 Enabled;
  61. } ADVANCED_RAM_LIMIT_TO_3GB_VARSTORE_DATA;
  62. typedef struct {
  63. UINT32 Enabled;
  64. } ADVANCED_FAN_ON_GPIO_VARSTORE_DATA;
  65. typedef struct {
  66. UINT32 Value;
  67. } ADVANCED_FANTEMP_VARSTORE_DATA;
  68. typedef struct {
  69. #define SYSTEM_TABLE_MODE_ACPI 0
  70. #define SYSTEM_TABLE_MODE_BOTH 1
  71. #define SYSTEM_TABLE_MODE_DT 2
  72. UINT32 Mode;
  73. } SYSTEM_TABLE_MODE_VARSTORE_DATA;
  74. #define ASSET_TAG_STR_MAX_LEN 32
  75. #define ASSET_TAG_STR_STORAGE_SIZE 33
  76. typedef struct {
  77. CHAR16 AssetTag[ASSET_TAG_STR_STORAGE_SIZE];
  78. } ADVANCED_ASSET_TAG_VARSTORE_DATA;
  79. typedef struct {
  80. /*
  81. * 0 - uSD slot routed to Broadcom SDHOST on Pi 3 or eMMC2 on Pi 4.
  82. * 1 - uSD slot routed to Arasan SDHCI.
  83. */
  84. UINT32 Routing;
  85. } MMC_SD_VARSTORE_DATA;
  86. typedef struct {
  87. /*
  88. * 0 - Don't disable multi-block.
  89. * 1 - Disable multi-block commands.
  90. */
  91. UINT32 DisableMulti;
  92. } MMC_DISMULTI_VARSTORE_DATA;
  93. typedef struct {
  94. /*
  95. * 0 - Don't force 1 bit mode.
  96. * 1 - Force 1 bit mode.
  97. */
  98. UINT32 Force1Bit;
  99. } MMC_FORCE1BIT_VARSTORE_DATA;
  100. typedef struct {
  101. /*
  102. * 0 - Don't force default speed.
  103. * 1 - Force default speed.
  104. */
  105. UINT32 ForceDS;
  106. } MMC_FORCEDS_VARSTORE_DATA;
  107. typedef struct {
  108. /*
  109. * Default Speed MHz override (25MHz default).
  110. */
  111. UINT32 MHz;
  112. } MMC_SD_DS_MHZ_VARSTORE_DATA;
  113. typedef struct {
  114. /*
  115. * High Speed MHz override (50MHz default).
  116. */
  117. UINT32 MHz;
  118. } MMC_SD_HS_MHZ_VARSTORE_DATA;
  119. #endif /* CONFIG_VARS_H */