You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UefiInternalFormRepresentation.h 58KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066
  1. /** @file
  2. This file defines the encoding for the VFR (Visual Form Representation) language.
  3. IFR is primarily consumed by the EFI presentation engine, and produced by EFI
  4. internal application and drivers as well as all add-in card option-ROM drivers
  5. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
  6. This program and the accompanying materials are licensed and made available under
  7. the terms and conditions of the BSD License that accompanies this distribution.
  8. The full text of the license may be found at
  9. http://opensource.org/licenses/bsd-license.php.
  10. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  12. @par Revision Reference:
  13. These definitions are from UEFI 2.1 and 2.2.
  14. **/
  15. #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
  16. #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
  17. #include <ipxe/efi/Guid/HiiFormMapMethodGuid.h>
  18. ///
  19. /// The following types are currently defined:
  20. ///
  21. typedef VOID* EFI_HII_HANDLE;
  22. typedef CHAR16* EFI_STRING;
  23. typedef UINT16 EFI_IMAGE_ID;
  24. typedef UINT16 EFI_QUESTION_ID;
  25. typedef UINT16 EFI_STRING_ID;
  26. typedef UINT16 EFI_FORM_ID;
  27. typedef UINT16 EFI_VARSTORE_ID;
  28. typedef UINT16 EFI_ANIMATION_ID;
  29. typedef UINT16 EFI_DEFAULT_ID;
  30. typedef UINT32 EFI_HII_FONT_STYLE;
  31. #pragma pack(1)
  32. //
  33. // Definitions for Package Lists and Package Headers
  34. // Section 27.3.1
  35. //
  36. ///
  37. /// The header found at the start of each package list.
  38. ///
  39. typedef struct {
  40. EFI_GUID PackageListGuid;
  41. UINT32 PackageLength;
  42. } EFI_HII_PACKAGE_LIST_HEADER;
  43. ///
  44. /// The header found at the start of each package.
  45. ///
  46. typedef struct {
  47. UINT32 Length:24;
  48. UINT32 Type:8;
  49. // UINT8 Data[...];
  50. } EFI_HII_PACKAGE_HEADER;
  51. //
  52. // Value of HII package type
  53. //
  54. #define EFI_HII_PACKAGE_TYPE_ALL 0x00
  55. #define EFI_HII_PACKAGE_TYPE_GUID 0x01
  56. #define EFI_HII_PACKAGE_FORMS 0x02
  57. #define EFI_HII_PACKAGE_STRINGS 0x04
  58. #define EFI_HII_PACKAGE_FONTS 0x05
  59. #define EFI_HII_PACKAGE_IMAGES 0x06
  60. #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
  61. #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
  62. #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
  63. #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
  64. #define EFI_HII_PACKAGE_END 0xDF
  65. #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
  66. #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
  67. //
  68. // Definitions for Simplified Font Package
  69. //
  70. ///
  71. /// Contents of EFI_NARROW_GLYPH.Attributes.
  72. ///@{
  73. #define EFI_GLYPH_NON_SPACING 0x01
  74. #define EFI_GLYPH_WIDE 0x02
  75. #define EFI_GLYPH_HEIGHT 19
  76. #define EFI_GLYPH_WIDTH 8
  77. ///@}
  78. ///
  79. /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
  80. ///
  81. typedef struct {
  82. ///
  83. /// The Unicode representation of the glyph. The term weight is the
  84. /// technical term for a character code.
  85. ///
  86. CHAR16 UnicodeWeight;
  87. ///
  88. /// The data element containing the glyph definitions.
  89. ///
  90. UINT8 Attributes;
  91. ///
  92. /// The column major glyph representation of the character. Bits
  93. /// with values of one indicate that the corresponding pixel is to be
  94. /// on when normally displayed; those with zero are off.
  95. ///
  96. UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
  97. } EFI_NARROW_GLYPH;
  98. ///
  99. /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
  100. /// to accommodate logographic characters.
  101. ///
  102. typedef struct {
  103. ///
  104. /// The Unicode representation of the glyph. The term weight is the
  105. /// technical term for a character code.
  106. ///
  107. CHAR16 UnicodeWeight;
  108. ///
  109. /// The data element containing the glyph definitions.
  110. ///
  111. UINT8 Attributes;
  112. ///
  113. /// The column major glyph representation of the character. Bits
  114. /// with values of one indicate that the corresponding pixel is to be
  115. /// on when normally displayed; those with zero are off.
  116. ///
  117. UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
  118. ///
  119. /// The column major glyph representation of the character. Bits
  120. /// with values of one indicate that the corresponding pixel is to be
  121. /// on when normally displayed; those with zero are off.
  122. ///
  123. UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
  124. ///
  125. /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
  126. /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
  127. /// be zero.
  128. ///
  129. UINT8 Pad[3];
  130. } EFI_WIDE_GLYPH;
  131. ///
  132. /// A simplified font package consists of a font header
  133. /// followed by a series of glyph structures.
  134. ///
  135. typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
  136. EFI_HII_PACKAGE_HEADER Header;
  137. UINT16 NumberOfNarrowGlyphs;
  138. UINT16 NumberOfWideGlyphs;
  139. // EFI_NARROW_GLYPH NarrowGlyphs[];
  140. // EFI_WIDE_GLYPH WideGlyphs[];
  141. } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
  142. //
  143. // Definitions for Font Package
  144. // Section 27.3.3
  145. //
  146. //
  147. // Value for font style
  148. //
  149. #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
  150. #define EFI_HII_FONT_STYLE_BOLD 0x00000001
  151. #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
  152. #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
  153. #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
  154. #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
  155. #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
  156. #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
  157. typedef struct _EFI_HII_GLYPH_INFO {
  158. UINT16 Width;
  159. UINT16 Height;
  160. INT16 OffsetX;
  161. INT16 OffsetY;
  162. INT16 AdvanceX;
  163. } EFI_HII_GLYPH_INFO;
  164. ///
  165. /// The fixed header consists of a standard record header,
  166. /// then the character values in this section, the flags
  167. /// (including the encoding method) and the offsets of the glyph
  168. /// information, the glyph bitmaps and the character map.
  169. ///
  170. typedef struct _EFI_HII_FONT_PACKAGE_HDR {
  171. EFI_HII_PACKAGE_HEADER Header;
  172. UINT32 HdrSize;
  173. UINT32 GlyphBlockOffset;
  174. EFI_HII_GLYPH_INFO Cell;
  175. EFI_HII_FONT_STYLE FontStyle;
  176. CHAR16 FontFamily[1];
  177. } EFI_HII_FONT_PACKAGE_HDR;
  178. //
  179. // Value of different glyph info block types
  180. //
  181. #define EFI_HII_GIBT_END 0x00
  182. #define EFI_HII_GIBT_GLYPH 0x10
  183. #define EFI_HII_GIBT_GLYPHS 0x11
  184. #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
  185. #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
  186. #define EFI_HII_GIBT_DUPLICATE 0x20
  187. #define EFI_HII_GIBT_SKIP2 0x21
  188. #define EFI_HII_GIBT_SKIP1 0x22
  189. #define EFI_HII_GIBT_DEFAULTS 0x23
  190. #define EFI_HII_GIBT_EXT1 0x30
  191. #define EFI_HII_GIBT_EXT2 0x31
  192. #define EFI_HII_GIBT_EXT4 0x32
  193. typedef struct _EFI_HII_GLYPH_BLOCK {
  194. UINT8 BlockType;
  195. } EFI_HII_GLYPH_BLOCK;
  196. //
  197. // Definition of different glyph info block types
  198. //
  199. typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
  200. EFI_HII_GLYPH_BLOCK Header;
  201. EFI_HII_GLYPH_INFO Cell;
  202. } EFI_HII_GIBT_DEFAULTS_BLOCK;
  203. typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
  204. EFI_HII_GLYPH_BLOCK Header;
  205. CHAR16 CharValue;
  206. } EFI_HII_GIBT_DUPLICATE_BLOCK;
  207. typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
  208. EFI_HII_GLYPH_BLOCK Header;
  209. } EFI_GLYPH_GIBT_END_BLOCK;
  210. typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
  211. EFI_HII_GLYPH_BLOCK Header;
  212. UINT8 BlockType2;
  213. UINT8 Length;
  214. } EFI_HII_GIBT_EXT1_BLOCK;
  215. typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
  216. EFI_HII_GLYPH_BLOCK Header;
  217. UINT8 BlockType2;
  218. UINT16 Length;
  219. } EFI_HII_GIBT_EXT2_BLOCK;
  220. typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
  221. EFI_HII_GLYPH_BLOCK Header;
  222. UINT8 BlockType2;
  223. UINT32 Length;
  224. } EFI_HII_GIBT_EXT4_BLOCK;
  225. typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
  226. EFI_HII_GLYPH_BLOCK Header;
  227. EFI_HII_GLYPH_INFO Cell;
  228. UINT8 BitmapData[1];
  229. } EFI_HII_GIBT_GLYPH_BLOCK;
  230. typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
  231. EFI_HII_GLYPH_BLOCK Header;
  232. EFI_HII_GLYPH_INFO Cell;
  233. UINT16 Count;
  234. UINT8 BitmapData[1];
  235. } EFI_HII_GIBT_GLYPHS_BLOCK;
  236. typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
  237. EFI_HII_GLYPH_BLOCK Header;
  238. UINT8 BitmapData[1];
  239. } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
  240. typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
  241. EFI_HII_GLYPH_BLOCK Header;
  242. UINT16 Count;
  243. UINT8 BitmapData[1];
  244. } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
  245. typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
  246. EFI_HII_GLYPH_BLOCK Header;
  247. UINT8 SkipCount;
  248. } EFI_HII_GIBT_SKIP1_BLOCK;
  249. typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
  250. EFI_HII_GLYPH_BLOCK Header;
  251. UINT16 SkipCount;
  252. } EFI_HII_GIBT_SKIP2_BLOCK;
  253. //
  254. // Definitions for Device Path Package
  255. // Section 27.3.4
  256. //
  257. ///
  258. /// The device path package is used to carry a device path
  259. /// associated with the package list.
  260. ///
  261. typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR {
  262. EFI_HII_PACKAGE_HEADER Header;
  263. // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
  264. } EFI_HII_DEVICE_PATH_PACKAGE_HDR;
  265. //
  266. // Definitions for GUID Package
  267. // Section 27.3.5
  268. //
  269. ///
  270. /// The GUID package is used to carry data where the format is defined by a GUID.
  271. ///
  272. typedef struct _EFI_HII_GUID_PACKAGE_HDR {
  273. EFI_HII_PACKAGE_HEADER Header;
  274. EFI_GUID Guid;
  275. // Data per GUID definition may follow
  276. } EFI_HII_GUID_PACKAGE_HDR;
  277. //
  278. // Definitions for String Package
  279. // Section 27.3.6
  280. //
  281. #define UEFI_CONFIG_LANG "x-UEFI"
  282. #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
  283. ///
  284. /// The fixed header consists of a standard record header and then the string identifiers
  285. /// contained in this section and the offsets of the string and language information.
  286. ///
  287. typedef struct _EFI_HII_STRING_PACKAGE_HDR {
  288. EFI_HII_PACKAGE_HEADER Header;
  289. UINT32 HdrSize;
  290. UINT32 StringInfoOffset;
  291. CHAR16 LanguageWindow[16];
  292. EFI_STRING_ID LanguageName;
  293. CHAR8 Language[1];
  294. } EFI_HII_STRING_PACKAGE_HDR;
  295. typedef struct {
  296. UINT8 BlockType;
  297. } EFI_HII_STRING_BLOCK;
  298. //
  299. // Value of different string information block types
  300. //
  301. #define EFI_HII_SIBT_END 0x00
  302. #define EFI_HII_SIBT_STRING_SCSU 0x10
  303. #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
  304. #define EFI_HII_SIBT_STRINGS_SCSU 0x12
  305. #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
  306. #define EFI_HII_SIBT_STRING_UCS2 0x14
  307. #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
  308. #define EFI_HII_SIBT_STRINGS_UCS2 0x16
  309. #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
  310. #define EFI_HII_SIBT_DUPLICATE 0x20
  311. #define EFI_HII_SIBT_SKIP2 0x21
  312. #define EFI_HII_SIBT_SKIP1 0x22
  313. #define EFI_HII_SIBT_EXT1 0x30
  314. #define EFI_HII_SIBT_EXT2 0x31
  315. #define EFI_HII_SIBT_EXT4 0x32
  316. #define EFI_HII_SIBT_FONT 0x40
  317. //
  318. // Definition of different string information block types
  319. //
  320. typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
  321. EFI_HII_STRING_BLOCK Header;
  322. EFI_STRING_ID StringId;
  323. } EFI_HII_SIBT_DUPLICATE_BLOCK;
  324. typedef struct _EFI_HII_SIBT_END_BLOCK {
  325. EFI_HII_STRING_BLOCK Header;
  326. } EFI_HII_SIBT_END_BLOCK;
  327. typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
  328. EFI_HII_STRING_BLOCK Header;
  329. UINT8 BlockType2;
  330. UINT8 Length;
  331. } EFI_HII_SIBT_EXT1_BLOCK;
  332. typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
  333. EFI_HII_STRING_BLOCK Header;
  334. UINT8 BlockType2;
  335. UINT16 Length;
  336. } EFI_HII_SIBT_EXT2_BLOCK;
  337. typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
  338. EFI_HII_STRING_BLOCK Header;
  339. UINT8 BlockType2;
  340. UINT32 Length;
  341. } EFI_HII_SIBT_EXT4_BLOCK;
  342. typedef struct _EFI_HII_SIBT_FONT_BLOCK {
  343. EFI_HII_SIBT_EXT2_BLOCK Header;
  344. UINT8 FontId;
  345. UINT16 FontSize;
  346. EFI_HII_FONT_STYLE FontStyle;
  347. CHAR16 FontName[1];
  348. } EFI_HII_SIBT_FONT_BLOCK;
  349. typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
  350. EFI_HII_STRING_BLOCK Header;
  351. UINT8 SkipCount;
  352. } EFI_HII_SIBT_SKIP1_BLOCK;
  353. typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
  354. EFI_HII_STRING_BLOCK Header;
  355. UINT16 SkipCount;
  356. } EFI_HII_SIBT_SKIP2_BLOCK;
  357. typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
  358. EFI_HII_STRING_BLOCK Header;
  359. UINT8 StringText[1];
  360. } EFI_HII_SIBT_STRING_SCSU_BLOCK;
  361. typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
  362. EFI_HII_STRING_BLOCK Header;
  363. UINT8 FontIdentifier;
  364. UINT8 StringText[1];
  365. } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
  366. typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
  367. EFI_HII_STRING_BLOCK Header;
  368. UINT16 StringCount;
  369. UINT8 StringText[1];
  370. } EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
  371. typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
  372. EFI_HII_STRING_BLOCK Header;
  373. UINT8 FontIdentifier;
  374. UINT16 StringCount;
  375. UINT8 StringText[1];
  376. } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
  377. typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
  378. EFI_HII_STRING_BLOCK Header;
  379. CHAR16 StringText[1];
  380. } EFI_HII_SIBT_STRING_UCS2_BLOCK;
  381. typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
  382. EFI_HII_STRING_BLOCK Header;
  383. UINT8 FontIdentifier;
  384. CHAR16 StringText[1];
  385. } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
  386. typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
  387. EFI_HII_STRING_BLOCK Header;
  388. UINT16 StringCount;
  389. CHAR16 StringText[1];
  390. } EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
  391. typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
  392. EFI_HII_STRING_BLOCK Header;
  393. UINT8 FontIdentifier;
  394. UINT16 StringCount;
  395. CHAR16 StringText[1];
  396. } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
  397. //
  398. // Definitions for Image Package
  399. // Section 27.3.7
  400. //
  401. typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
  402. EFI_HII_PACKAGE_HEADER Header;
  403. UINT32 ImageInfoOffset;
  404. UINT32 PaletteInfoOffset;
  405. } EFI_HII_IMAGE_PACKAGE_HDR;
  406. typedef struct _EFI_HII_IMAGE_BLOCK {
  407. UINT8 BlockType;
  408. } EFI_HII_IMAGE_BLOCK;
  409. //
  410. // Value of different image information block types
  411. //
  412. #define EFI_HII_IIBT_END 0x00
  413. #define EFI_HII_IIBT_IMAGE_1BIT 0x10
  414. #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
  415. #define EFI_HII_IIBT_IMAGE_4BIT 0x12
  416. #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
  417. #define EFI_HII_IIBT_IMAGE_8BIT 0x14
  418. #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
  419. #define EFI_HII_IIBT_IMAGE_24BIT 0x16
  420. #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
  421. #define EFI_HII_IIBT_IMAGE_JPEG 0x18
  422. #define EFI_HII_IIBT_DUPLICATE 0x20
  423. #define EFI_HII_IIBT_SKIP2 0x21
  424. #define EFI_HII_IIBT_SKIP1 0x22
  425. #define EFI_HII_IIBT_EXT1 0x30
  426. #define EFI_HII_IIBT_EXT2 0x31
  427. #define EFI_HII_IIBT_EXT4 0x32
  428. //
  429. // Definition of different image information block types
  430. //
  431. typedef struct _EFI_HII_IIBT_END_BLOCK {
  432. EFI_HII_IMAGE_BLOCK Header;
  433. } EFI_HII_IIBT_END_BLOCK;
  434. typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
  435. EFI_HII_IMAGE_BLOCK Header;
  436. UINT8 BlockType2;
  437. UINT8 Length;
  438. } EFI_HII_IIBT_EXT1_BLOCK;
  439. typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
  440. EFI_HII_IMAGE_BLOCK Header;
  441. UINT8 BlockType2;
  442. UINT16 Length;
  443. } EFI_HII_IIBT_EXT2_BLOCK;
  444. typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
  445. EFI_HII_IMAGE_BLOCK Header;
  446. UINT8 BlockType2;
  447. UINT32 Length;
  448. } EFI_HII_IIBT_EXT4_BLOCK;
  449. typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
  450. UINT16 Width;
  451. UINT16 Height;
  452. UINT8 Data[1];
  453. } EFI_HII_IIBT_IMAGE_1BIT_BASE;
  454. typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
  455. EFI_HII_IMAGE_BLOCK Header;
  456. UINT8 PaletteIndex;
  457. EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
  458. } EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
  459. typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
  460. EFI_HII_IMAGE_BLOCK Header;
  461. UINT8 PaletteIndex;
  462. EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
  463. } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
  464. typedef struct _EFI_HII_RGB_PIXEL {
  465. UINT8 b;
  466. UINT8 g;
  467. UINT8 r;
  468. } EFI_HII_RGB_PIXEL;
  469. typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
  470. UINT16 Width;
  471. UINT16 Height;
  472. EFI_HII_RGB_PIXEL Bitmap[1];
  473. } EFI_HII_IIBT_IMAGE_24BIT_BASE;
  474. typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
  475. EFI_HII_IMAGE_BLOCK Header;
  476. EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
  477. } EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
  478. typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
  479. EFI_HII_IMAGE_BLOCK Header;
  480. EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
  481. } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
  482. typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
  483. UINT16 Width;
  484. UINT16 Height;
  485. UINT8 Data[1];
  486. } EFI_HII_IIBT_IMAGE_4BIT_BASE;
  487. typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
  488. EFI_HII_IMAGE_BLOCK Header;
  489. UINT8 PaletteIndex;
  490. EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
  491. } EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
  492. typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
  493. EFI_HII_IMAGE_BLOCK Header;
  494. UINT8 PaletteIndex;
  495. EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
  496. } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
  497. typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
  498. UINT16 Width;
  499. UINT16 Height;
  500. UINT8 Data[1];
  501. } EFI_HII_IIBT_IMAGE_8BIT_BASE;
  502. typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
  503. EFI_HII_IMAGE_BLOCK Header;
  504. UINT8 PaletteIndex;
  505. EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
  506. } EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
  507. typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
  508. EFI_HII_IMAGE_BLOCK Header;
  509. UINT8 PaletteIndex;
  510. EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
  511. } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
  512. typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
  513. EFI_HII_IMAGE_BLOCK Header;
  514. EFI_IMAGE_ID ImageId;
  515. } EFI_HII_IIBT_DUPLICATE_BLOCK;
  516. typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
  517. EFI_HII_IMAGE_BLOCK Header;
  518. UINT32 Size;
  519. UINT8 Data[1];
  520. } EFI_HII_IIBT_JPEG_BLOCK;
  521. typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
  522. EFI_HII_IMAGE_BLOCK Header;
  523. UINT8 SkipCount;
  524. } EFI_HII_IIBT_SKIP1_BLOCK;
  525. typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
  526. EFI_HII_IMAGE_BLOCK Header;
  527. UINT16 SkipCount;
  528. } EFI_HII_IIBT_SKIP2_BLOCK;
  529. //
  530. // Definitions for Palette Information
  531. //
  532. typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
  533. UINT16 PaletteCount;
  534. } EFI_HII_IMAGE_PALETTE_INFO_HEADER;
  535. typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
  536. UINT16 PaletteSize;
  537. EFI_HII_RGB_PIXEL PaletteValue[1];
  538. } EFI_HII_IMAGE_PALETTE_INFO;
  539. //
  540. // Definitions for Forms Package
  541. // Section 27.3.8
  542. //
  543. ///
  544. /// The Form package is used to carry form-based encoding data.
  545. ///
  546. typedef struct _EFI_HII_FORM_PACKAGE_HDR {
  547. EFI_HII_PACKAGE_HEADER Header;
  548. // EFI_IFR_OP_HEADER OpCodeHeader;
  549. // More op-codes follow
  550. } EFI_HII_FORM_PACKAGE_HDR;
  551. typedef struct {
  552. UINT8 Hour;
  553. UINT8 Minute;
  554. UINT8 Second;
  555. } EFI_HII_TIME;
  556. typedef struct {
  557. UINT16 Year;
  558. UINT8 Month;
  559. UINT8 Day;
  560. } EFI_HII_DATE;
  561. typedef union {
  562. UINT8 u8;
  563. UINT16 u16;
  564. UINT32 u32;
  565. UINT64 u64;
  566. BOOLEAN b;
  567. EFI_HII_TIME time;
  568. EFI_HII_DATE date;
  569. EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
  570. // UINT8 buffer[]; ///< EFI_IFR_TYPE_ORDERED_LIST
  571. } EFI_IFR_TYPE_VALUE;
  572. //
  573. // IFR Opcodes
  574. //
  575. #define EFI_IFR_FORM_OP 0x01
  576. #define EFI_IFR_SUBTITLE_OP 0x02
  577. #define EFI_IFR_TEXT_OP 0x03
  578. #define EFI_IFR_IMAGE_OP 0x04
  579. #define EFI_IFR_ONE_OF_OP 0x05
  580. #define EFI_IFR_CHECKBOX_OP 0x06
  581. #define EFI_IFR_NUMERIC_OP 0x07
  582. #define EFI_IFR_PASSWORD_OP 0x08
  583. #define EFI_IFR_ONE_OF_OPTION_OP 0x09
  584. #define EFI_IFR_SUPPRESS_IF_OP 0x0A
  585. #define EFI_IFR_LOCKED_OP 0x0B
  586. #define EFI_IFR_ACTION_OP 0x0C
  587. #define EFI_IFR_RESET_BUTTON_OP 0x0D
  588. #define EFI_IFR_FORM_SET_OP 0x0E
  589. #define EFI_IFR_REF_OP 0x0F
  590. #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
  591. #define EFI_IFR_INCONSISTENT_IF_OP 0x11
  592. #define EFI_IFR_EQ_ID_VAL_OP 0x12
  593. #define EFI_IFR_EQ_ID_ID_OP 0x13
  594. #define EFI_IFR_EQ_ID_LIST_OP 0x14
  595. #define EFI_IFR_AND_OP 0x15
  596. #define EFI_IFR_OR_OP 0x16
  597. #define EFI_IFR_NOT_OP 0x17
  598. #define EFI_IFR_RULE_OP 0x18
  599. #define EFI_IFR_GRAY_OUT_IF_OP 0x19
  600. #define EFI_IFR_DATE_OP 0x1A
  601. #define EFI_IFR_TIME_OP 0x1B
  602. #define EFI_IFR_STRING_OP 0x1C
  603. #define EFI_IFR_REFRESH_OP 0x1D
  604. #define EFI_IFR_DISABLE_IF_OP 0x1E
  605. #define EFI_IFR_ANIMATION_OP 0x1F
  606. #define EFI_IFR_TO_LOWER_OP 0x20
  607. #define EFI_IFR_TO_UPPER_OP 0x21
  608. #define EFI_IFR_MAP_OP 0x22
  609. #define EFI_IFR_ORDERED_LIST_OP 0x23
  610. #define EFI_IFR_VARSTORE_OP 0x24
  611. #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
  612. #define EFI_IFR_VARSTORE_EFI_OP 0x26
  613. #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
  614. #define EFI_IFR_VERSION_OP 0x28
  615. #define EFI_IFR_END_OP 0x29
  616. #define EFI_IFR_MATCH_OP 0x2A
  617. #define EFI_IFR_GET_OP 0x2B
  618. #define EFI_IFR_SET_OP 0x2C
  619. #define EFI_IFR_READ_OP 0x2D
  620. #define EFI_IFR_WRITE_OP 0x2E
  621. #define EFI_IFR_EQUAL_OP 0x2F
  622. #define EFI_IFR_NOT_EQUAL_OP 0x30
  623. #define EFI_IFR_GREATER_THAN_OP 0x31
  624. #define EFI_IFR_GREATER_EQUAL_OP 0x32
  625. #define EFI_IFR_LESS_THAN_OP 0x33
  626. #define EFI_IFR_LESS_EQUAL_OP 0x34
  627. #define EFI_IFR_BITWISE_AND_OP 0x35
  628. #define EFI_IFR_BITWISE_OR_OP 0x36
  629. #define EFI_IFR_BITWISE_NOT_OP 0x37
  630. #define EFI_IFR_SHIFT_LEFT_OP 0x38
  631. #define EFI_IFR_SHIFT_RIGHT_OP 0x39
  632. #define EFI_IFR_ADD_OP 0x3A
  633. #define EFI_IFR_SUBTRACT_OP 0x3B
  634. #define EFI_IFR_MULTIPLY_OP 0x3C
  635. #define EFI_IFR_DIVIDE_OP 0x3D
  636. #define EFI_IFR_MODULO_OP 0x3E
  637. #define EFI_IFR_RULE_REF_OP 0x3F
  638. #define EFI_IFR_QUESTION_REF1_OP 0x40
  639. #define EFI_IFR_QUESTION_REF2_OP 0x41
  640. #define EFI_IFR_UINT8_OP 0x42
  641. #define EFI_IFR_UINT16_OP 0x43
  642. #define EFI_IFR_UINT32_OP 0x44
  643. #define EFI_IFR_UINT64_OP 0x45
  644. #define EFI_IFR_TRUE_OP 0x46
  645. #define EFI_IFR_FALSE_OP 0x47
  646. #define EFI_IFR_TO_UINT_OP 0x48
  647. #define EFI_IFR_TO_STRING_OP 0x49
  648. #define EFI_IFR_TO_BOOLEAN_OP 0x4A
  649. #define EFI_IFR_MID_OP 0x4B
  650. #define EFI_IFR_FIND_OP 0x4C
  651. #define EFI_IFR_TOKEN_OP 0x4D
  652. #define EFI_IFR_STRING_REF1_OP 0x4E
  653. #define EFI_IFR_STRING_REF2_OP 0x4F
  654. #define EFI_IFR_CONDITIONAL_OP 0x50
  655. #define EFI_IFR_QUESTION_REF3_OP 0x51
  656. #define EFI_IFR_ZERO_OP 0x52
  657. #define EFI_IFR_ONE_OP 0x53
  658. #define EFI_IFR_ONES_OP 0x54
  659. #define EFI_IFR_UNDEFINED_OP 0x55
  660. #define EFI_IFR_LENGTH_OP 0x56
  661. #define EFI_IFR_DUP_OP 0x57
  662. #define EFI_IFR_THIS_OP 0x58
  663. #define EFI_IFR_SPAN_OP 0x59
  664. #define EFI_IFR_VALUE_OP 0x5A
  665. #define EFI_IFR_DEFAULT_OP 0x5B
  666. #define EFI_IFR_DEFAULTSTORE_OP 0x5C
  667. #define EFI_IFR_FORM_MAP_OP 0x5D
  668. #define EFI_IFR_CATENATE_OP 0x5E
  669. #define EFI_IFR_GUID_OP 0x5F
  670. #define EFI_IFR_SECURITY_OP 0x60
  671. //
  672. // Definitions of IFR Standard Headers
  673. // Section 27.3.8.2
  674. //
  675. typedef struct _EFI_IFR_OP_HEADER {
  676. UINT8 OpCode;
  677. UINT8 Length:7;
  678. UINT8 Scope:1;
  679. } EFI_IFR_OP_HEADER;
  680. typedef struct _EFI_IFR_STATEMENT_HEADER {
  681. EFI_STRING_ID Prompt;
  682. EFI_STRING_ID Help;
  683. } EFI_IFR_STATEMENT_HEADER;
  684. typedef struct _EFI_IFR_QUESTION_HEADER {
  685. EFI_IFR_STATEMENT_HEADER Header;
  686. EFI_QUESTION_ID QuestionId;
  687. EFI_VARSTORE_ID VarStoreId;
  688. union {
  689. EFI_STRING_ID VarName;
  690. UINT16 VarOffset;
  691. } VarStoreInfo;
  692. UINT8 Flags;
  693. } EFI_IFR_QUESTION_HEADER;
  694. //
  695. // Flag values of EFI_IFR_QUESTION_HEADER
  696. //
  697. #define EFI_IFR_FLAG_READ_ONLY 0x01
  698. #define EFI_IFR_FLAG_CALLBACK 0x04
  699. #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
  700. #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
  701. //
  702. // Definition for Opcode Reference
  703. // Section 27.3.8.3
  704. //
  705. typedef struct _EFI_IFR_DEFAULTSTORE {
  706. EFI_IFR_OP_HEADER Header;
  707. EFI_STRING_ID DefaultName;
  708. UINT16 DefaultId;
  709. } EFI_IFR_DEFAULTSTORE;
  710. //
  711. // Default Identifier of default store
  712. //
  713. #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
  714. #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
  715. #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
  716. #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
  717. #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
  718. #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
  719. #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
  720. #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
  721. #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
  722. typedef struct _EFI_IFR_VARSTORE {
  723. EFI_IFR_OP_HEADER Header;
  724. EFI_GUID Guid;
  725. EFI_VARSTORE_ID VarStoreId;
  726. UINT16 Size;
  727. UINT8 Name[1];
  728. } EFI_IFR_VARSTORE;
  729. typedef struct _EFI_IFR_VARSTORE_EFI {
  730. EFI_IFR_OP_HEADER Header;
  731. EFI_VARSTORE_ID VarStoreId;
  732. EFI_GUID Guid;
  733. UINT32 Attributes;
  734. } EFI_IFR_VARSTORE_EFI;
  735. typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
  736. EFI_IFR_OP_HEADER Header;
  737. EFI_VARSTORE_ID VarStoreId;
  738. EFI_GUID Guid;
  739. } EFI_IFR_VARSTORE_NAME_VALUE;
  740. typedef struct _EFI_IFR_FORM_SET {
  741. EFI_IFR_OP_HEADER Header;
  742. EFI_GUID Guid;
  743. EFI_STRING_ID FormSetTitle;
  744. EFI_STRING_ID Help;
  745. UINT8 Flags;
  746. // EFI_GUID ClassGuid[];
  747. } EFI_IFR_FORM_SET;
  748. typedef struct _EFI_IFR_END {
  749. EFI_IFR_OP_HEADER Header;
  750. } EFI_IFR_END;
  751. typedef struct _EFI_IFR_FORM {
  752. EFI_IFR_OP_HEADER Header;
  753. UINT16 FormId;
  754. EFI_STRING_ID FormTitle;
  755. } EFI_IFR_FORM;
  756. typedef struct _EFI_IFR_IMAGE {
  757. EFI_IFR_OP_HEADER Header;
  758. EFI_IMAGE_ID Id;
  759. } EFI_IFR_IMAGE;
  760. typedef struct _EFI_IFR_LOCKED {
  761. EFI_IFR_OP_HEADER Header;
  762. } EFI_IFR_LOCKED;
  763. typedef struct _EFI_IFR_RULE {
  764. EFI_IFR_OP_HEADER Header;
  765. UINT8 RuleId;
  766. } EFI_IFR_RULE;
  767. typedef struct _EFI_IFR_DEFAULT {
  768. EFI_IFR_OP_HEADER Header;
  769. UINT16 DefaultId;
  770. UINT8 Type;
  771. EFI_IFR_TYPE_VALUE Value;
  772. } EFI_IFR_DEFAULT;
  773. typedef struct _EFI_IFR_VALUE {
  774. EFI_IFR_OP_HEADER Header;
  775. } EFI_IFR_VALUE;
  776. typedef struct _EFI_IFR_SUBTITLE {
  777. EFI_IFR_OP_HEADER Header;
  778. EFI_IFR_STATEMENT_HEADER Statement;
  779. UINT8 Flags;
  780. } EFI_IFR_SUBTITLE;
  781. #define EFI_IFR_FLAGS_HORIZONTAL 0x01
  782. typedef struct _EFI_IFR_CHECKBOX {
  783. EFI_IFR_OP_HEADER Header;
  784. EFI_IFR_QUESTION_HEADER Question;
  785. UINT8 Flags;
  786. } EFI_IFR_CHECKBOX;
  787. #define EFI_IFR_CHECKBOX_DEFAULT 0x01
  788. #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
  789. typedef struct _EFI_IFR_TEXT {
  790. EFI_IFR_OP_HEADER Header;
  791. EFI_IFR_STATEMENT_HEADER Statement;
  792. EFI_STRING_ID TextTwo;
  793. } EFI_IFR_TEXT;
  794. typedef struct _EFI_IFR_REF {
  795. EFI_IFR_OP_HEADER Header;
  796. EFI_IFR_QUESTION_HEADER Question;
  797. EFI_FORM_ID FormId;
  798. } EFI_IFR_REF;
  799. typedef struct _EFI_IFR_REF2 {
  800. EFI_IFR_OP_HEADER Header;
  801. EFI_IFR_QUESTION_HEADER Question;
  802. EFI_FORM_ID FormId;
  803. EFI_QUESTION_ID QuestionId;
  804. } EFI_IFR_REF2;
  805. typedef struct _EFI_IFR_REF3 {
  806. EFI_IFR_OP_HEADER Header;
  807. EFI_IFR_QUESTION_HEADER Question;
  808. EFI_FORM_ID FormId;
  809. EFI_QUESTION_ID QuestionId;
  810. EFI_GUID FormSetId;
  811. } EFI_IFR_REF3;
  812. typedef struct _EFI_IFR_REF4 {
  813. EFI_IFR_OP_HEADER Header;
  814. EFI_IFR_QUESTION_HEADER Question;
  815. EFI_FORM_ID FormId;
  816. EFI_QUESTION_ID QuestionId;
  817. EFI_GUID FormSetId;
  818. EFI_STRING_ID DevicePath;
  819. } EFI_IFR_REF4;
  820. typedef struct _EFI_IFR_RESET_BUTTON {
  821. EFI_IFR_OP_HEADER Header;
  822. EFI_IFR_STATEMENT_HEADER Statement;
  823. EFI_DEFAULT_ID DefaultId;
  824. } EFI_IFR_RESET_BUTTON;
  825. typedef struct _EFI_IFR_ACTION {
  826. EFI_IFR_OP_HEADER Header;
  827. EFI_IFR_QUESTION_HEADER Question;
  828. EFI_STRING_ID QuestionConfig;
  829. } EFI_IFR_ACTION;
  830. typedef struct _EFI_IFR_ACTION_1 {
  831. EFI_IFR_OP_HEADER Header;
  832. EFI_IFR_QUESTION_HEADER Question;
  833. } EFI_IFR_ACTION_1;
  834. typedef struct _EFI_IFR_DATE {
  835. EFI_IFR_OP_HEADER Header;
  836. EFI_IFR_QUESTION_HEADER Question;
  837. UINT8 Flags;
  838. } EFI_IFR_DATE;
  839. //
  840. // Flags that describe the behavior of the question.
  841. //
  842. #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
  843. #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
  844. #define EFI_QF_DATE_DAY_SUPPRESS 0x04
  845. #define EFI_QF_DATE_STORAGE 0x30
  846. #define QF_DATE_STORAGE_NORMAL 0x00
  847. #define QF_DATE_STORAGE_TIME 0x10
  848. #define QF_DATE_STORAGE_WAKEUP 0x20
  849. typedef union {
  850. struct {
  851. UINT8 MinValue;
  852. UINT8 MaxValue;
  853. UINT8 Step;
  854. } u8;
  855. struct {
  856. UINT16 MinValue;
  857. UINT16 MaxValue;
  858. UINT16 Step;
  859. } u16;
  860. struct {
  861. UINT32 MinValue;
  862. UINT32 MaxValue;
  863. UINT32 Step;
  864. } u32;
  865. struct {
  866. UINT64 MinValue;
  867. UINT64 MaxValue;
  868. UINT64 Step;
  869. } u64;
  870. } MINMAXSTEP_DATA;
  871. typedef struct _EFI_IFR_NUMERIC {
  872. EFI_IFR_OP_HEADER Header;
  873. EFI_IFR_QUESTION_HEADER Question;
  874. UINT8 Flags;
  875. MINMAXSTEP_DATA data;
  876. } EFI_IFR_NUMERIC;
  877. //
  878. // Flags related to the numeric question
  879. //
  880. #define EFI_IFR_NUMERIC_SIZE 0x03
  881. #define EFI_IFR_NUMERIC_SIZE_1 0x00
  882. #define EFI_IFR_NUMERIC_SIZE_2 0x01
  883. #define EFI_IFR_NUMERIC_SIZE_4 0x02
  884. #define EFI_IFR_NUMERIC_SIZE_8 0x03
  885. #define EFI_IFR_DISPLAY 0x30
  886. #define EFI_IFR_DISPLAY_INT_DEC 0x00
  887. #define EFI_IFR_DISPLAY_UINT_DEC 0x10
  888. #define EFI_IFR_DISPLAY_UINT_HEX 0x20
  889. typedef struct _EFI_IFR_ONE_OF {
  890. EFI_IFR_OP_HEADER Header;
  891. EFI_IFR_QUESTION_HEADER Question;
  892. UINT8 Flags;
  893. MINMAXSTEP_DATA data;
  894. } EFI_IFR_ONE_OF;
  895. typedef struct _EFI_IFR_STRING {
  896. EFI_IFR_OP_HEADER Header;
  897. EFI_IFR_QUESTION_HEADER Question;
  898. UINT8 MinSize;
  899. UINT8 MaxSize;
  900. UINT8 Flags;
  901. } EFI_IFR_STRING;
  902. #define EFI_IFR_STRING_MULTI_LINE 0x01
  903. typedef struct _EFI_IFR_PASSWORD {
  904. EFI_IFR_OP_HEADER Header;
  905. EFI_IFR_QUESTION_HEADER Question;
  906. UINT16 MinSize;
  907. UINT16 MaxSize;
  908. } EFI_IFR_PASSWORD;
  909. typedef struct _EFI_IFR_ORDERED_LIST {
  910. EFI_IFR_OP_HEADER Header;
  911. EFI_IFR_QUESTION_HEADER Question;
  912. UINT8 MaxContainers;
  913. UINT8 Flags;
  914. } EFI_IFR_ORDERED_LIST;
  915. #define EFI_IFR_UNIQUE_SET 0x01
  916. #define EFI_IFR_NO_EMPTY_SET 0x02
  917. typedef struct _EFI_IFR_TIME {
  918. EFI_IFR_OP_HEADER Header;
  919. EFI_IFR_QUESTION_HEADER Question;
  920. UINT8 Flags;
  921. } EFI_IFR_TIME;
  922. //
  923. // A bit-mask that determines which unique settings are active for this opcode.
  924. //
  925. #define QF_TIME_HOUR_SUPPRESS 0x01
  926. #define QF_TIME_MINUTE_SUPPRESS 0x02
  927. #define QF_TIME_SECOND_SUPPRESS 0x04
  928. #define QF_TIME_STORAGE 0x30
  929. #define QF_TIME_STORAGE_NORMAL 0x00
  930. #define QF_TIME_STORAGE_TIME 0x10
  931. #define QF_TIME_STORAGE_WAKEUP 0x20
  932. typedef struct _EFI_IFR_DISABLE_IF {
  933. EFI_IFR_OP_HEADER Header;
  934. } EFI_IFR_DISABLE_IF;
  935. typedef struct _EFI_IFR_SUPPRESS_IF {
  936. EFI_IFR_OP_HEADER Header;
  937. } EFI_IFR_SUPPRESS_IF;
  938. typedef struct _EFI_IFR_GRAY_OUT_IF {
  939. EFI_IFR_OP_HEADER Header;
  940. } EFI_IFR_GRAY_OUT_IF;
  941. typedef struct _EFI_IFR_INCONSISTENT_IF {
  942. EFI_IFR_OP_HEADER Header;
  943. EFI_STRING_ID Error;
  944. } EFI_IFR_INCONSISTENT_IF;
  945. typedef struct _EFI_IFR_NO_SUBMIT_IF {
  946. EFI_IFR_OP_HEADER Header;
  947. EFI_STRING_ID Error;
  948. } EFI_IFR_NO_SUBMIT_IF;
  949. typedef struct _EFI_IFR_REFRESH {
  950. EFI_IFR_OP_HEADER Header;
  951. UINT8 RefreshInterval;
  952. } EFI_IFR_REFRESH;
  953. typedef struct _EFI_IFR_VARSTORE_DEVICE {
  954. EFI_IFR_OP_HEADER Header;
  955. EFI_STRING_ID DevicePath;
  956. } EFI_IFR_VARSTORE_DEVICE;
  957. typedef struct _EFI_IFR_ONE_OF_OPTION {
  958. EFI_IFR_OP_HEADER Header;
  959. EFI_STRING_ID Option;
  960. UINT8 Flags;
  961. UINT8 Type;
  962. EFI_IFR_TYPE_VALUE Value;
  963. } EFI_IFR_ONE_OF_OPTION;
  964. //
  965. // Types of the option's value.
  966. //
  967. #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
  968. #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
  969. #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
  970. #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
  971. #define EFI_IFR_TYPE_BOOLEAN 0x04
  972. #define EFI_IFR_TYPE_TIME 0x05
  973. #define EFI_IFR_TYPE_DATE 0x06
  974. #define EFI_IFR_TYPE_STRING 0x07
  975. #define EFI_IFR_TYPE_OTHER 0x08
  976. #define EFI_IFR_TYPE_UNDEFINED 0x09
  977. #define EFI_IFR_TYPE_ACTION 0x0A
  978. #define EFI_IFR_TYPE_BUFFER 0x0B
  979. #define EFI_IFR_OPTION_DEFAULT 0x10
  980. #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
  981. typedef struct _EFI_IFR_GUID {
  982. EFI_IFR_OP_HEADER Header;
  983. EFI_GUID Guid;
  984. //Optional Data Follows
  985. } EFI_IFR_GUID;
  986. typedef struct _EFI_IFR_DUP {
  987. EFI_IFR_OP_HEADER Header;
  988. } EFI_IFR_DUP;
  989. typedef struct _EFI_IFR_EQ_ID_ID {
  990. EFI_IFR_OP_HEADER Header;
  991. EFI_QUESTION_ID QuestionId1;
  992. EFI_QUESTION_ID QuestionId2;
  993. } EFI_IFR_EQ_ID_ID;
  994. typedef struct _EFI_IFR_EQ_ID_VAL {
  995. EFI_IFR_OP_HEADER Header;
  996. EFI_QUESTION_ID QuestionId;
  997. UINT16 Value;
  998. } EFI_IFR_EQ_ID_VAL;
  999. typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
  1000. EFI_IFR_OP_HEADER Header;
  1001. EFI_QUESTION_ID QuestionId;
  1002. UINT16 ListLength;
  1003. UINT16 ValueList[1];
  1004. } EFI_IFR_EQ_ID_VAL_LIST;
  1005. typedef struct _EFI_IFR_UINT8 {
  1006. EFI_IFR_OP_HEADER Header;
  1007. UINT8 Value;
  1008. } EFI_IFR_UINT8;
  1009. typedef struct _EFI_IFR_UINT16 {
  1010. EFI_IFR_OP_HEADER Header;
  1011. UINT16 Value;
  1012. } EFI_IFR_UINT16;
  1013. typedef struct _EFI_IFR_UINT32 {
  1014. EFI_IFR_OP_HEADER Header;
  1015. UINT32 Value;
  1016. } EFI_IFR_UINT32;
  1017. typedef struct _EFI_IFR_UINT64 {
  1018. EFI_IFR_OP_HEADER Header;
  1019. UINT64 Value;
  1020. } EFI_IFR_UINT64;
  1021. typedef struct _EFI_IFR_QUESTION_REF1 {
  1022. EFI_IFR_OP_HEADER Header;
  1023. EFI_QUESTION_ID QuestionId;
  1024. } EFI_IFR_QUESTION_REF1;
  1025. typedef struct _EFI_IFR_QUESTION_REF2 {
  1026. EFI_IFR_OP_HEADER Header;
  1027. } EFI_IFR_QUESTION_REF2;
  1028. typedef struct _EFI_IFR_QUESTION_REF3 {
  1029. EFI_IFR_OP_HEADER Header;
  1030. } EFI_IFR_QUESTION_REF3;
  1031. typedef struct _EFI_IFR_QUESTION_REF3_2 {
  1032. EFI_IFR_OP_HEADER Header;
  1033. EFI_STRING_ID DevicePath;
  1034. } EFI_IFR_QUESTION_REF3_2;
  1035. typedef struct _EFI_IFR_QUESTION_REF3_3 {
  1036. EFI_IFR_OP_HEADER Header;
  1037. EFI_STRING_ID DevicePath;
  1038. EFI_GUID Guid;
  1039. } EFI_IFR_QUESTION_REF3_3;
  1040. typedef struct _EFI_IFR_RULE_REF {
  1041. EFI_IFR_OP_HEADER Header;
  1042. UINT8 RuleId;
  1043. } EFI_IFR_RULE_REF;
  1044. typedef struct _EFI_IFR_STRING_REF1 {
  1045. EFI_IFR_OP_HEADER Header;
  1046. EFI_STRING_ID StringId;
  1047. } EFI_IFR_STRING_REF1;
  1048. typedef struct _EFI_IFR_STRING_REF2 {
  1049. EFI_IFR_OP_HEADER Header;
  1050. } EFI_IFR_STRING_REF2;
  1051. typedef struct _EFI_IFR_THIS {
  1052. EFI_IFR_OP_HEADER Header;
  1053. } EFI_IFR_THIS;
  1054. typedef struct _EFI_IFR_TRUE {
  1055. EFI_IFR_OP_HEADER Header;
  1056. } EFI_IFR_TRUE;
  1057. typedef struct _EFI_IFR_FALSE {
  1058. EFI_IFR_OP_HEADER Header;
  1059. } EFI_IFR_FALSE;
  1060. typedef struct _EFI_IFR_ONE {
  1061. EFI_IFR_OP_HEADER Header;
  1062. } EFI_IFR_ONE;
  1063. typedef struct _EFI_IFR_ONES {
  1064. EFI_IFR_OP_HEADER Header;
  1065. } EFI_IFR_ONES;
  1066. typedef struct _EFI_IFR_ZERO {
  1067. EFI_IFR_OP_HEADER Header;
  1068. } EFI_IFR_ZERO;
  1069. typedef struct _EFI_IFR_UNDEFINED {
  1070. EFI_IFR_OP_HEADER Header;
  1071. } EFI_IFR_UNDEFINED;
  1072. typedef struct _EFI_IFR_VERSION {
  1073. EFI_IFR_OP_HEADER Header;
  1074. } EFI_IFR_VERSION;
  1075. typedef struct _EFI_IFR_LENGTH {
  1076. EFI_IFR_OP_HEADER Header;
  1077. } EFI_IFR_LENGTH;
  1078. typedef struct _EFI_IFR_NOT {
  1079. EFI_IFR_OP_HEADER Header;
  1080. } EFI_IFR_NOT;
  1081. typedef struct _EFI_IFR_BITWISE_NOT {
  1082. EFI_IFR_OP_HEADER Header;
  1083. } EFI_IFR_BITWISE_NOT;
  1084. typedef struct _EFI_IFR_TO_BOOLEAN {
  1085. EFI_IFR_OP_HEADER Header;
  1086. } EFI_IFR_TO_BOOLEAN;
  1087. ///
  1088. /// For EFI_IFR_TO_STRING, when converting from
  1089. /// unsigned integers, these flags control the format:
  1090. /// 0 = unsigned decimal.
  1091. /// 1 = signed decimal.
  1092. /// 2 = hexadecimal (lower-case alpha).
  1093. /// 3 = hexadecimal (upper-case alpha).
  1094. ///@{
  1095. #define EFI_IFR_STRING_UNSIGNED_DEC 0
  1096. #define EFI_IFR_STRING_SIGNED_DEC 1
  1097. #define EFI_IFR_STRING_LOWERCASE_HEX 2
  1098. #define EFI_IFR_STRING_UPPERCASE_HEX 3
  1099. ///@}
  1100. ///
  1101. /// When converting from a buffer, these flags control the format:
  1102. /// 0 = ASCII.
  1103. /// 8 = Unicode.
  1104. ///@{
  1105. #define EFI_IFR_STRING_ASCII 0
  1106. #define EFI_IFR_STRING_UNICODE 8
  1107. ///@}
  1108. typedef struct _EFI_IFR_TO_STRING {
  1109. EFI_IFR_OP_HEADER Header;
  1110. UINT8 Format;
  1111. } EFI_IFR_TO_STRING;
  1112. typedef struct _EFI_IFR_TO_UINT {
  1113. EFI_IFR_OP_HEADER Header;
  1114. } EFI_IFR_TO_UINT;
  1115. typedef struct _EFI_IFR_TO_UPPER {
  1116. EFI_IFR_OP_HEADER Header;
  1117. } EFI_IFR_TO_UPPER;
  1118. typedef struct _EFI_IFR_TO_LOWER {
  1119. EFI_IFR_OP_HEADER Header;
  1120. } EFI_IFR_TO_LOWER;
  1121. typedef struct _EFI_IFR_ADD {
  1122. EFI_IFR_OP_HEADER Header;
  1123. } EFI_IFR_ADD;
  1124. typedef struct _EFI_IFR_AND {
  1125. EFI_IFR_OP_HEADER Header;
  1126. } EFI_IFR_AND;
  1127. typedef struct _EFI_IFR_BITWISE_AND {
  1128. EFI_IFR_OP_HEADER Header;
  1129. } EFI_IFR_BITWISE_AND;
  1130. typedef struct _EFI_IFR_BITWISE_OR {
  1131. EFI_IFR_OP_HEADER Header;
  1132. } EFI_IFR_BITWISE_OR;
  1133. typedef struct _EFI_IFR_CATENATE {
  1134. EFI_IFR_OP_HEADER Header;
  1135. } EFI_IFR_CATENATE;
  1136. typedef struct _EFI_IFR_DIVIDE {
  1137. EFI_IFR_OP_HEADER Header;
  1138. } EFI_IFR_DIVIDE;
  1139. typedef struct _EFI_IFR_EQUAL {
  1140. EFI_IFR_OP_HEADER Header;
  1141. } EFI_IFR_EQUAL;
  1142. typedef struct _EFI_IFR_GREATER_EQUAL {
  1143. EFI_IFR_OP_HEADER Header;
  1144. } EFI_IFR_GREATER_EQUAL;
  1145. typedef struct _EFI_IFR_GREATER_THAN {
  1146. EFI_IFR_OP_HEADER Header;
  1147. } EFI_IFR_GREATER_THAN;
  1148. typedef struct _EFI_IFR_LESS_EQUAL {
  1149. EFI_IFR_OP_HEADER Header;
  1150. } EFI_IFR_LESS_EQUAL;
  1151. typedef struct _EFI_IFR_LESS_THAN {
  1152. EFI_IFR_OP_HEADER Header;
  1153. } EFI_IFR_LESS_THAN;
  1154. typedef struct _EFI_IFR_MATCH {
  1155. EFI_IFR_OP_HEADER Header;
  1156. } EFI_IFR_MATCH;
  1157. typedef struct _EFI_IFR_MULTIPLY {
  1158. EFI_IFR_OP_HEADER Header;
  1159. } EFI_IFR_MULTIPLY;
  1160. typedef struct _EFI_IFR_MODULO {
  1161. EFI_IFR_OP_HEADER Header;
  1162. } EFI_IFR_MODULO;
  1163. typedef struct _EFI_IFR_NOT_EQUAL {
  1164. EFI_IFR_OP_HEADER Header;
  1165. } EFI_IFR_NOT_EQUAL;
  1166. typedef struct _EFI_IFR_OR {
  1167. EFI_IFR_OP_HEADER Header;
  1168. } EFI_IFR_OR;
  1169. typedef struct _EFI_IFR_SHIFT_LEFT {
  1170. EFI_IFR_OP_HEADER Header;
  1171. } EFI_IFR_SHIFT_LEFT;
  1172. typedef struct _EFI_IFR_SHIFT_RIGHT {
  1173. EFI_IFR_OP_HEADER Header;
  1174. } EFI_IFR_SHIFT_RIGHT;
  1175. typedef struct _EFI_IFR_SUBTRACT {
  1176. EFI_IFR_OP_HEADER Header;
  1177. } EFI_IFR_SUBTRACT;
  1178. typedef struct _EFI_IFR_CONDITIONAL {
  1179. EFI_IFR_OP_HEADER Header;
  1180. } EFI_IFR_CONDITIONAL;
  1181. //
  1182. // Flags governing the matching criteria of EFI_IFR_FIND
  1183. //
  1184. #define EFI_IFR_FF_CASE_SENSITIVE 0x00
  1185. #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
  1186. typedef struct _EFI_IFR_FIND {
  1187. EFI_IFR_OP_HEADER Header;
  1188. UINT8 Format;
  1189. } EFI_IFR_FIND;
  1190. typedef struct _EFI_IFR_MID {
  1191. EFI_IFR_OP_HEADER Header;
  1192. } EFI_IFR_MID;
  1193. typedef struct _EFI_IFR_TOKEN {
  1194. EFI_IFR_OP_HEADER Header;
  1195. } EFI_IFR_TOKEN;
  1196. //
  1197. // Flags specifying whether to find the first matching string
  1198. // or the first non-matching string.
  1199. //
  1200. #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
  1201. #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
  1202. typedef struct _EFI_IFR_SPAN {
  1203. EFI_IFR_OP_HEADER Header;
  1204. UINT8 Flags;
  1205. } EFI_IFR_SPAN;
  1206. typedef struct _EFI_IFR_SECURITY {
  1207. ///
  1208. /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
  1209. ///
  1210. EFI_IFR_OP_HEADER Header;
  1211. ///
  1212. /// Security permission level.
  1213. ///
  1214. EFI_GUID Permissions;
  1215. } EFI_IFR_SECURITY;
  1216. typedef struct _EFI_IFR_FORM_MAP_METHOD {
  1217. ///
  1218. /// The string identifier which provides the human-readable name of
  1219. /// the configuration method for this standards map form.
  1220. ///
  1221. EFI_STRING_ID MethodTitle;
  1222. ///
  1223. /// Identifier which uniquely specifies the configuration methods
  1224. /// associated with this standards map form.
  1225. ///
  1226. EFI_GUID MethodIdentifier;
  1227. } EFI_IFR_FORM_MAP_METHOD;
  1228. typedef struct _EFI_IFR_FORM_MAP {
  1229. ///
  1230. /// The sequence that defines the type of opcode as well as the length
  1231. /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
  1232. ///
  1233. EFI_IFR_OP_HEADER Header;
  1234. ///
  1235. /// The unique identifier for this particular form.
  1236. ///
  1237. EFI_FORM_ID FormId;
  1238. ///
  1239. /// One or more configuration method's name and unique identifier.
  1240. ///
  1241. // EFI_IFR_FORM_MAP_METHOD Methods[];
  1242. } EFI_IFR_FORM_MAP;
  1243. typedef struct _EFI_IFR_SET {
  1244. ///
  1245. /// The sequence that defines the type of opcode as well as the length
  1246. /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
  1247. ///
  1248. EFI_IFR_OP_HEADER Header;
  1249. ///
  1250. /// Specifies the identifier of a previously declared variable store to
  1251. /// use when storing the question's value.
  1252. ///
  1253. EFI_VARSTORE_ID VarStoreId;
  1254. union {
  1255. ///
  1256. /// A 16-bit Buffer Storage offset.
  1257. ///
  1258. EFI_STRING_ID VarName;
  1259. ///
  1260. /// A Name Value or EFI Variable name (VarName).
  1261. ///
  1262. UINT16 VarOffset;
  1263. } VarStoreInfo;
  1264. ///
  1265. /// Specifies the type used for storage.
  1266. ///
  1267. UINT8 VarStoreType;
  1268. } EFI_IFR_SET;
  1269. typedef struct _EFI_IFR_GET {
  1270. ///
  1271. /// The sequence that defines the type of opcode as well as the length
  1272. /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
  1273. ///
  1274. EFI_IFR_OP_HEADER Header;
  1275. ///
  1276. /// Specifies the identifier of a previously declared variable store to
  1277. /// use when retrieving the value.
  1278. ///
  1279. EFI_VARSTORE_ID VarStoreId;
  1280. union {
  1281. ///
  1282. /// A 16-bit Buffer Storage offset.
  1283. ///
  1284. EFI_STRING_ID VarName;
  1285. ///
  1286. /// A Name Value or EFI Variable name (VarName).
  1287. ///
  1288. UINT16 VarOffset;
  1289. } VarStoreInfo;
  1290. ///
  1291. /// Specifies the type used for storage.
  1292. ///
  1293. UINT8 VarStoreType;
  1294. } EFI_IFR_GET;
  1295. typedef struct _EFI_IFR_READ {
  1296. EFI_IFR_OP_HEADER Header;
  1297. } EFI_IFR_READ;
  1298. typedef struct _EFI_IFR_WRITE {
  1299. EFI_IFR_OP_HEADER Header;
  1300. } EFI_IFR_WRITE;
  1301. typedef struct _EFI_IFR_MAP {
  1302. EFI_IFR_OP_HEADER Header;
  1303. } EFI_IFR_MAP;
  1304. //
  1305. // Definitions for Keyboard Package
  1306. // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
  1307. //
  1308. ///
  1309. /// Each enumeration values maps a physical key on a keyboard.
  1310. ///
  1311. typedef enum {
  1312. EfiKeyLCtrl,
  1313. EfiKeyA0,
  1314. EfiKeyLAlt,
  1315. EfiKeySpaceBar,
  1316. EfiKeyA2,
  1317. EfiKeyA3,
  1318. EfiKeyA4,
  1319. EfiKeyRCtrl,
  1320. EfiKeyLeftArrow,
  1321. EfiKeyDownArrow,
  1322. EfiKeyRightArrow,
  1323. EfiKeyZero,
  1324. EfiKeyPeriod,
  1325. EfiKeyEnter,
  1326. EfiKeyLShift,
  1327. EfiKeyB0,
  1328. EfiKeyB1,
  1329. EfiKeyB2,
  1330. EfiKeyB3,
  1331. EfiKeyB4,
  1332. EfiKeyB5,
  1333. EfiKeyB6,
  1334. EfiKeyB7,
  1335. EfiKeyB8,
  1336. EfiKeyB9,
  1337. EfiKeyB10,
  1338. EfiKeyRShift,
  1339. EfiKeyUpArrow,
  1340. EfiKeyOne,
  1341. EfiKeyTwo,
  1342. EfiKeyThree,
  1343. EfiKeyCapsLock,
  1344. EfiKeyC1,
  1345. EfiKeyC2,
  1346. EfiKeyC3,
  1347. EfiKeyC4,
  1348. EfiKeyC5,
  1349. EfiKeyC6,
  1350. EfiKeyC7,
  1351. EfiKeyC8,
  1352. EfiKeyC9,
  1353. EfiKeyC10,
  1354. EfiKeyC11,
  1355. EfiKeyC12,
  1356. EfiKeyFour,
  1357. EfiKeyFive,
  1358. EfiKeySix,
  1359. EfiKeyPlus,
  1360. EfiKeyTab,
  1361. EfiKeyD1,
  1362. EfiKeyD2,
  1363. EfiKeyD3,
  1364. EfiKeyD4,
  1365. EfiKeyD5,
  1366. EfiKeyD6,
  1367. EfiKeyD7,
  1368. EfiKeyD8,
  1369. EfiKeyD9,
  1370. EfiKeyD10,
  1371. EfiKeyD11,
  1372. EfiKeyD12,
  1373. EfiKeyD13,
  1374. EfiKeyDel,
  1375. EfiKeyEnd,
  1376. EfiKeyPgDn,
  1377. EfiKeySeven,
  1378. EfiKeyEight,
  1379. EfiKeyNine,
  1380. EfiKeyE0,
  1381. EfiKeyE1,
  1382. EfiKeyE2,
  1383. EfiKeyE3,
  1384. EfiKeyE4,
  1385. EfiKeyE5,
  1386. EfiKeyE6,
  1387. EfiKeyE7,
  1388. EfiKeyE8,
  1389. EfiKeyE9,
  1390. EfiKeyE10,
  1391. EfiKeyE11,
  1392. EfiKeyE12,
  1393. EfiKeyBackSpace,
  1394. EfiKeyIns,
  1395. EfiKeyHome,
  1396. EfiKeyPgUp,
  1397. EfiKeyNLck,
  1398. EfiKeySlash,
  1399. EfiKeyAsterisk,
  1400. EfiKeyMinus,
  1401. EfiKeyEsc,
  1402. EfiKeyF1,
  1403. EfiKeyF2,
  1404. EfiKeyF3,
  1405. EfiKeyF4,
  1406. EfiKeyF5,
  1407. EfiKeyF6,
  1408. EfiKeyF7,
  1409. EfiKeyF8,
  1410. EfiKeyF9,
  1411. EfiKeyF10,
  1412. EfiKeyF11,
  1413. EfiKeyF12,
  1414. EfiKeyPrint,
  1415. EfiKeySLck,
  1416. EfiKeyPause
  1417. } EFI_KEY;
  1418. typedef struct {
  1419. ///
  1420. /// Used to describe a physical key on a keyboard.
  1421. ///
  1422. EFI_KEY Key;
  1423. ///
  1424. /// Unicode character code for the Key.
  1425. ///
  1426. CHAR16 Unicode;
  1427. ///
  1428. /// Unicode character code for the key with the shift key being held down.
  1429. ///
  1430. CHAR16 ShiftedUnicode;
  1431. ///
  1432. /// Unicode character code for the key with the Alt-GR being held down.
  1433. ///
  1434. CHAR16 AltGrUnicode;
  1435. ///
  1436. /// Unicode character code for the key with the Alt-GR and shift keys being held down.
  1437. ///
  1438. CHAR16 ShiftedAltGrUnicode;
  1439. ///
  1440. /// Modifier keys are defined to allow for special functionality that is not necessarily
  1441. /// accomplished by a printable character. Many of these modifier keys are flags to toggle
  1442. /// certain state bits on and off inside of a keyboard driver.
  1443. ///
  1444. UINT16 Modifier;
  1445. UINT16 AffectedAttribute;
  1446. } EFI_KEY_DESCRIPTOR;
  1447. ///
  1448. /// A key which is affected by all the standard shift modifiers.
  1449. /// Most keys would be expected to have this bit active.
  1450. ///
  1451. #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
  1452. ///
  1453. /// This key is affected by the caps lock so that if a keyboard driver
  1454. /// would need to disambiguate between a key which had a "1" defined
  1455. /// versus an "a" character. Having this bit turned on would tell
  1456. /// the keyboard driver to use the appropriate shifted state or not.
  1457. ///
  1458. #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
  1459. ///
  1460. /// Similar to the case of CAPS lock, if this bit is active, the key
  1461. /// is affected by the num lock being turned on.
  1462. ///
  1463. #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
  1464. typedef struct {
  1465. UINT16 LayoutLength;
  1466. EFI_GUID Guid;
  1467. UINT32 LayoutDescriptorStringOffset;
  1468. UINT8 DescriptorCount;
  1469. // EFI_KEY_DESCRIPTOR Descriptors[];
  1470. } EFI_HII_KEYBOARD_LAYOUT;
  1471. typedef struct {
  1472. EFI_HII_PACKAGE_HEADER Header;
  1473. UINT16 LayoutCount;
  1474. // EFI_HII_KEYBOARD_LAYOUT Layout[];
  1475. } EFI_HII_KEYBOARD_PACKAGE_HDR;
  1476. //
  1477. // Modifier values
  1478. //
  1479. #define EFI_NULL_MODIFIER 0x0000
  1480. #define EFI_LEFT_CONTROL_MODIFIER 0x0001
  1481. #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
  1482. #define EFI_LEFT_ALT_MODIFIER 0x0003
  1483. #define EFI_RIGHT_ALT_MODIFIER 0x0004
  1484. #define EFI_ALT_GR_MODIFIER 0x0005
  1485. #define EFI_INSERT_MODIFIER 0x0006
  1486. #define EFI_DELETE_MODIFIER 0x0007
  1487. #define EFI_PAGE_DOWN_MODIFIER 0x0008
  1488. #define EFI_PAGE_UP_MODIFIER 0x0009
  1489. #define EFI_HOME_MODIFIER 0x000A
  1490. #define EFI_END_MODIFIER 0x000B
  1491. #define EFI_LEFT_SHIFT_MODIFIER 0x000C
  1492. #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
  1493. #define EFI_CAPS_LOCK_MODIFIER 0x000E
  1494. #define EFI_NUM_LOCK_MODIFIER 0x000F
  1495. #define EFI_LEFT_ARROW_MODIFIER 0x0010
  1496. #define EFI_RIGHT_ARROW_MODIFIER 0x0011
  1497. #define EFI_DOWN_ARROW_MODIFIER 0x0012
  1498. #define EFI_UP_ARROW_MODIFIER 0x0013
  1499. #define EFI_NS_KEY_MODIFIER 0x0014
  1500. #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
  1501. #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
  1502. #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
  1503. #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
  1504. #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
  1505. #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
  1506. #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
  1507. #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
  1508. #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
  1509. #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
  1510. #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
  1511. #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
  1512. #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
  1513. //
  1514. // Keys that have multiple control functions based on modifier
  1515. // settings are handled in the keyboard driver implementation.
  1516. // For instance, PRINT_KEY might have a modifier held down and
  1517. // is still a nonprinting character, but might have an alternate
  1518. // control function like SYSREQUEST
  1519. //
  1520. #define EFI_PRINT_MODIFIER 0x0022
  1521. #define EFI_SYS_REQUEST_MODIFIER 0x0023
  1522. #define EFI_SCROLL_LOCK_MODIFIER 0x0024
  1523. #define EFI_PAUSE_MODIFIER 0x0025
  1524. #define EFI_BREAK_MODIFIER 0x0026
  1525. #define EFI_LEFT_LOGO_MODIFIER 0x0027
  1526. #define EFI_RIGHT_LOGO_MODIFIER 0x0028
  1527. #define EFI_MENU_MODIFIER 0x0029
  1528. ///
  1529. /// Animation IFR opcode
  1530. ///
  1531. typedef struct _EFI_IFR_ANIMATION {
  1532. ///
  1533. /// Standard opcode header, where Header.OpCode is
  1534. /// EFI_IFR_ANIMATION_OP.
  1535. ///
  1536. EFI_IFR_OP_HEADER Header;
  1537. ///
  1538. /// Animation identifier in the HII database.
  1539. ///
  1540. EFI_ANIMATION_ID Id;
  1541. } EFI_IFR_ANIMATION;
  1542. ///
  1543. /// HII animation package header.
  1544. ///
  1545. typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
  1546. ///
  1547. /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
  1548. ///
  1549. EFI_HII_PACKAGE_HEADER Header;
  1550. ///
  1551. /// Offset, relative to this header, of the animation information. If
  1552. /// this is zero, then there are no animation sequences in the package.
  1553. ///
  1554. UINT32 AnimationInfoOffset;
  1555. } EFI_HII_ANIMATION_PACKAGE_HDR;
  1556. ///
  1557. /// Animation information is encoded as a series of blocks,
  1558. /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
  1559. ///
  1560. typedef struct _EFI_HII_ANIMATION_BLOCK {
  1561. UINT8 BlockType;
  1562. //UINT8 BlockBody[];
  1563. } EFI_HII_ANIMATION_BLOCK;
  1564. ///
  1565. /// Animation block types.
  1566. ///
  1567. #define EFI_HII_AIBT_END 0x00
  1568. #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
  1569. #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
  1570. #define EFI_HII_AIBT_RESTORE_SCRN 0x12
  1571. #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
  1572. #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
  1573. #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
  1574. #define EFI_HII_AIBT_DUPLICATE 0x20
  1575. #define EFI_HII_AIBT_SKIP2 0x21
  1576. #define EFI_HII_AIBT_SKIP1 0x22
  1577. #define EFI_HII_AIBT_EXT1 0x30
  1578. #define EFI_HII_AIBT_EXT2 0x31
  1579. #define EFI_HII_AIBT_EXT4 0x32
  1580. ///
  1581. /// Extended block headers used for variable sized animation records
  1582. /// which need an explicit length.
  1583. ///
  1584. typedef struct _EFI_HII_AIBT_EXT1_BLOCK {
  1585. ///
  1586. /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
  1587. ///
  1588. EFI_HII_ANIMATION_BLOCK Header;
  1589. ///
  1590. /// The block type.
  1591. ///
  1592. UINT8 BlockType2;
  1593. ///
  1594. /// Size of the animation block, in bytes, including the animation block header.
  1595. ///
  1596. UINT8 Length;
  1597. } EFI_HII_AIBT_EXT1_BLOCK;
  1598. typedef struct _EFI_HII_AIBT_EXT2_BLOCK {
  1599. ///
  1600. /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
  1601. ///
  1602. EFI_HII_ANIMATION_BLOCK Header;
  1603. ///
  1604. /// The block type
  1605. ///
  1606. UINT8 BlockType2;
  1607. ///
  1608. /// Size of the animation block, in bytes, including the animation block header.
  1609. ///
  1610. UINT16 Length;
  1611. } EFI_HII_AIBT_EXT2_BLOCK;
  1612. typedef struct _EFI_HII_AIBT_EXT4_BLOCK {
  1613. ///
  1614. /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
  1615. ///
  1616. EFI_HII_ANIMATION_BLOCK Header;
  1617. ///
  1618. /// The block type
  1619. ///
  1620. UINT8 BlockType2;
  1621. ///
  1622. /// Size of the animation block, in bytes, including the animation block header.
  1623. ///
  1624. UINT32 Length;
  1625. } EFI_HII_AIBT_EXT4_BLOCK;
  1626. typedef struct _EFI_HII_ANIMATION_CELL {
  1627. ///
  1628. /// The X offset from the upper left hand corner of the logical
  1629. /// window to position the indexed image.
  1630. ///
  1631. UINT16 OffsetX;
  1632. ///
  1633. /// The Y offset from the upper left hand corner of the logical
  1634. /// window to position the indexed image.
  1635. ///
  1636. UINT16 OffsetY;
  1637. ///
  1638. /// The image to display at the specified offset from the upper left
  1639. /// hand corner of the logical window.
  1640. ///
  1641. EFI_IMAGE_ID ImageId;
  1642. ///
  1643. /// The number of milliseconds to delay after displaying the indexed
  1644. /// image and before continuing on to the next linked image. If value
  1645. /// is zero, no delay.
  1646. ///
  1647. UINT16 Delay;
  1648. } EFI_HII_ANIMATION_CELL;
  1649. ///
  1650. /// An animation block to describe an animation sequence that does not cycle, and
  1651. /// where one image is simply displayed over the previous image.
  1652. ///
  1653. typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
  1654. ///
  1655. /// This is image that is to be reference by the image protocols, if the
  1656. /// animation function is not supported or disabled. This image can
  1657. /// be one particular image from the animation sequence (if any one
  1658. /// of the animation frames has a complete image) or an alternate
  1659. /// image that can be displayed alone. If the value is zero, no image
  1660. /// is displayed.
  1661. ///
  1662. EFI_IMAGE_ID DftImageId;
  1663. ///
  1664. /// The overall width of the set of images (logical window width).
  1665. ///
  1666. UINT16 Width;
  1667. ///
  1668. /// The overall height of the set of images (logical window height).
  1669. ///
  1670. UINT16 Height;
  1671. ///
  1672. /// The number of EFI_HII_ANIMATION_CELL contained in the
  1673. /// animation sequence.
  1674. ///
  1675. UINT16 CellCount;
  1676. ///
  1677. /// An array of CellCount animation cells.
  1678. ///
  1679. EFI_HII_ANIMATION_CELL AnimationCell[1];
  1680. } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK;
  1681. ///
  1682. /// An animation block to describe an animation sequence that does not cycle,
  1683. /// and where the logical window is cleared to the specified color before
  1684. /// the next image is displayed.
  1685. ///
  1686. typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
  1687. ///
  1688. /// This is image that is to be reference by the image protocols, if the
  1689. /// animation function is not supported or disabled. This image can
  1690. /// be one particular image from the animation sequence (if any one
  1691. /// of the animation frames has a complete image) or an alternate
  1692. /// image that can be displayed alone. If the value is zero, no image
  1693. /// is displayed.
  1694. ///
  1695. EFI_IMAGE_ID DftImageId;
  1696. ///
  1697. /// The overall width of the set of images (logical window width).
  1698. ///
  1699. UINT16 Width;
  1700. ///
  1701. /// The overall height of the set of images (logical window height).
  1702. ///
  1703. UINT16 Height;
  1704. ///
  1705. /// The number of EFI_HII_ANIMATION_CELL contained in the
  1706. /// animation sequence.
  1707. ///
  1708. UINT16 CellCount;
  1709. ///
  1710. /// The color to clear the logical window to before displaying the
  1711. /// indexed image.
  1712. ///
  1713. EFI_HII_RGB_PIXEL BackgndColor;
  1714. ///
  1715. /// An array of CellCount animation cells.
  1716. ///
  1717. EFI_HII_ANIMATION_CELL AnimationCell[1];
  1718. } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK;
  1719. ///
  1720. /// An animation block to describe an animation sequence that does not cycle,
  1721. /// and where the screen is restored to the original state before the next
  1722. /// image is displayed.
  1723. ///
  1724. typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
  1725. ///
  1726. /// This is image that is to be reference by the image protocols, if the
  1727. /// animation function is not supported or disabled. This image can
  1728. /// be one particular image from the animation sequence (if any one
  1729. /// of the animation frames has a complete image) or an alternate
  1730. /// image that can be displayed alone. If the value is zero, no image
  1731. /// is displayed.
  1732. ///
  1733. EFI_IMAGE_ID DftImageId;
  1734. ///
  1735. /// The overall width of the set of images (logical window width).
  1736. ///
  1737. UINT16 Width;
  1738. ///
  1739. /// The overall height of the set of images (logical window height).
  1740. ///
  1741. UINT16 Height;
  1742. ///
  1743. /// The number of EFI_HII_ANIMATION_CELL contained in the
  1744. /// animation sequence.
  1745. ///
  1746. UINT16 CellCount;
  1747. ///
  1748. /// An array of CellCount animation cells.
  1749. ///
  1750. EFI_HII_ANIMATION_CELL AnimationCell[1];
  1751. } EFI_HII_AIBT_RESTORE_SCRN_BLOCK;
  1752. ///
  1753. /// An animation block to describe an animation sequence that continuously cycles,
  1754. /// and where one image is simply displayed over the previous image.
  1755. ///
  1756. typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;
  1757. ///
  1758. /// An animation block to describe an animation sequence that continuously cycles,
  1759. /// and where the logical window is cleared to the specified color before
  1760. /// the next image is displayed.
  1761. ///
  1762. typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
  1763. ///
  1764. /// An animation block to describe an animation sequence that continuously cycles,
  1765. /// and where the screen is restored to the original state before
  1766. /// the next image is displayed.
  1767. ///
  1768. typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
  1769. ///
  1770. /// Assigns a new character value to a previously defined animation sequence.
  1771. ///
  1772. typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {
  1773. ///
  1774. /// The previously defined animation ID with the exact same
  1775. /// animation information.
  1776. ///
  1777. EFI_ANIMATION_ID AnimationId;
  1778. } EFI_HII_AIBT_DUPLICATE_BLOCK;
  1779. ///
  1780. /// Skips animation IDs.
  1781. ///
  1782. typedef struct _EFI_HII_AIBT_SKIP1_BLOCK {
  1783. ///
  1784. /// The unsigned 8-bit value to add to AnimationIdCurrent.
  1785. ///
  1786. UINT8 SkipCount;
  1787. } EFI_HII_AIBT_SKIP1_BLOCK;
  1788. ///
  1789. /// Skips animation IDs.
  1790. ///
  1791. typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
  1792. ///
  1793. /// The unsigned 16-bit value to add to AnimationIdCurrent.
  1794. ///
  1795. UINT16 SkipCount;
  1796. } EFI_HII_AIBT_SKIP2_BLOCK;
  1797. #pragma pack()
  1798. ///
  1799. /// References to string tokens must use this macro to enable scanning for
  1800. /// token usages.
  1801. ///
  1802. ///
  1803. /// STRING_TOKEN is not defined in UEFI specification. But it is placed
  1804. /// here for the easy access by C files and VFR source files.
  1805. ///
  1806. #define STRING_TOKEN(t) t
  1807. #endif