efiprot.h 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145
  1. #ifndef _EFI_PROT_H
  2. #define _EFI_PROT_H
  3. /*++
  4. Copyright (c) 1998 Intel Corporation
  5. Module Name:
  6. efiprot.h
  7. Abstract:
  8. EFI Protocols
  9. Revision History
  10. --*/
  11. //
  12. // FPSWA library protocol
  13. //
  14. #define FPSWA_PROTOCOL \
  15. { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
  16. //
  17. // Device Path protocol
  18. //
  19. #define DEVICE_PATH_PROTOCOL \
  20. { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  21. //
  22. // Block IO protocol
  23. //
  24. #define BLOCK_IO_PROTOCOL \
  25. { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  26. #define EFI_BLOCK_IO_INTERFACE_REVISION 0x00010000
  27. #define EFI_BLOCK_IO_INTERFACE_REVISION2 0x00020001
  28. #define EFI_BLOCK_IO_INTERFACE_REVISION3 ((2<<16) | 31)
  29. INTERFACE_DECL(_EFI_BLOCK_IO);
  30. typedef
  31. EFI_STATUS
  32. (EFIAPI *EFI_BLOCK_RESET) (
  33. IN struct _EFI_BLOCK_IO *This,
  34. IN BOOLEAN ExtendedVerification
  35. );
  36. typedef
  37. EFI_STATUS
  38. (EFIAPI *EFI_BLOCK_READ) (
  39. IN struct _EFI_BLOCK_IO *This,
  40. IN UINT32 MediaId,
  41. IN EFI_LBA LBA,
  42. IN UINTN BufferSize,
  43. OUT VOID *Buffer
  44. );
  45. typedef
  46. EFI_STATUS
  47. (EFIAPI *EFI_BLOCK_WRITE) (
  48. IN struct _EFI_BLOCK_IO *This,
  49. IN UINT32 MediaId,
  50. IN EFI_LBA LBA,
  51. IN UINTN BufferSize,
  52. IN VOID *Buffer
  53. );
  54. typedef
  55. EFI_STATUS
  56. (EFIAPI *EFI_BLOCK_FLUSH) (
  57. IN struct _EFI_BLOCK_IO *This
  58. );
  59. typedef struct {
  60. UINT32 MediaId;
  61. BOOLEAN RemovableMedia;
  62. BOOLEAN MediaPresent;
  63. BOOLEAN LogicalPartition;
  64. BOOLEAN ReadOnly;
  65. BOOLEAN WriteCaching;
  66. UINT32 BlockSize;
  67. UINT32 IoAlign;
  68. EFI_LBA LastBlock;
  69. /* revision 2 */
  70. EFI_LBA LowestAlignedLba;
  71. UINT32 LogicalBlocksPerPhysicalBlock;
  72. /* revision 3 */
  73. UINT32 OptimalTransferLengthGranularity;
  74. } EFI_BLOCK_IO_MEDIA;
  75. typedef struct _EFI_BLOCK_IO {
  76. UINT64 Revision;
  77. EFI_BLOCK_IO_MEDIA *Media;
  78. EFI_BLOCK_RESET Reset;
  79. EFI_BLOCK_READ ReadBlocks;
  80. EFI_BLOCK_WRITE WriteBlocks;
  81. EFI_BLOCK_FLUSH FlushBlocks;
  82. } EFI_BLOCK_IO;
  83. //
  84. // Disk Block IO protocol
  85. //
  86. #define DISK_IO_PROTOCOL \
  87. { 0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  88. #define EFI_DISK_IO_INTERFACE_REVISION 0x00010000
  89. INTERFACE_DECL(_EFI_DISK_IO);
  90. typedef
  91. EFI_STATUS
  92. (EFIAPI *EFI_DISK_READ) (
  93. IN struct _EFI_DISK_IO *This,
  94. IN UINT32 MediaId,
  95. IN UINT64 Offset,
  96. IN UINTN BufferSize,
  97. OUT VOID *Buffer
  98. );
  99. typedef
  100. EFI_STATUS
  101. (EFIAPI *EFI_DISK_WRITE) (
  102. IN struct _EFI_DISK_IO *This,
  103. IN UINT32 MediaId,
  104. IN UINT64 Offset,
  105. IN UINTN BufferSize,
  106. IN VOID *Buffer
  107. );
  108. typedef struct _EFI_DISK_IO {
  109. UINT64 Revision;
  110. EFI_DISK_READ ReadDisk;
  111. EFI_DISK_WRITE WriteDisk;
  112. } EFI_DISK_IO;
  113. //
  114. // Simple file system protocol
  115. //
  116. #define SIMPLE_FILE_SYSTEM_PROTOCOL \
  117. { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  118. INTERFACE_DECL(_EFI_FILE_IO_INTERFACE);
  119. INTERFACE_DECL(_EFI_FILE_HANDLE);
  120. typedef
  121. EFI_STATUS
  122. (EFIAPI *EFI_VOLUME_OPEN) (
  123. IN struct _EFI_FILE_IO_INTERFACE *This,
  124. OUT struct _EFI_FILE_HANDLE **Root
  125. );
  126. #define EFI_FILE_IO_INTERFACE_REVISION 0x00010000
  127. typedef struct _EFI_FILE_IO_INTERFACE {
  128. UINT64 Revision;
  129. EFI_VOLUME_OPEN OpenVolume;
  130. } EFI_FILE_IO_INTERFACE;
  131. //
  132. //
  133. //
  134. typedef
  135. EFI_STATUS
  136. (EFIAPI *EFI_FILE_OPEN) (
  137. IN struct _EFI_FILE_HANDLE *File,
  138. OUT struct _EFI_FILE_HANDLE **NewHandle,
  139. IN CHAR16 *FileName,
  140. IN UINT64 OpenMode,
  141. IN UINT64 Attributes
  142. );
  143. // Open modes
  144. #define EFI_FILE_MODE_READ 0x0000000000000001
  145. #define EFI_FILE_MODE_WRITE 0x0000000000000002
  146. #define EFI_FILE_MODE_CREATE 0x8000000000000000
  147. // File attributes
  148. #define EFI_FILE_READ_ONLY 0x0000000000000001
  149. #define EFI_FILE_HIDDEN 0x0000000000000002
  150. #define EFI_FILE_SYSTEM 0x0000000000000004
  151. #define EFI_FILE_RESERVIED 0x0000000000000008
  152. #define EFI_FILE_DIRECTORY 0x0000000000000010
  153. #define EFI_FILE_ARCHIVE 0x0000000000000020
  154. #define EFI_FILE_VALID_ATTR 0x0000000000000037
  155. typedef
  156. EFI_STATUS
  157. (EFIAPI *EFI_FILE_CLOSE) (
  158. IN struct _EFI_FILE_HANDLE *File
  159. );
  160. typedef
  161. EFI_STATUS
  162. (EFIAPI *EFI_FILE_DELETE) (
  163. IN struct _EFI_FILE_HANDLE *File
  164. );
  165. typedef
  166. EFI_STATUS
  167. (EFIAPI *EFI_FILE_READ) (
  168. IN struct _EFI_FILE_HANDLE *File,
  169. IN OUT UINTN *BufferSize,
  170. OUT VOID *Buffer
  171. );
  172. typedef
  173. EFI_STATUS
  174. (EFIAPI *EFI_FILE_WRITE) (
  175. IN struct _EFI_FILE_HANDLE *File,
  176. IN OUT UINTN *BufferSize,
  177. IN VOID *Buffer
  178. );
  179. typedef
  180. EFI_STATUS
  181. (EFIAPI *EFI_FILE_SET_POSITION) (
  182. IN struct _EFI_FILE_HANDLE *File,
  183. IN UINT64 Position
  184. );
  185. typedef
  186. EFI_STATUS
  187. (EFIAPI *EFI_FILE_GET_POSITION) (
  188. IN struct _EFI_FILE_HANDLE *File,
  189. OUT UINT64 *Position
  190. );
  191. typedef
  192. EFI_STATUS
  193. (EFIAPI *EFI_FILE_GET_INFO) (
  194. IN struct _EFI_FILE_HANDLE *File,
  195. IN EFI_GUID *InformationType,
  196. IN OUT UINTN *BufferSize,
  197. OUT VOID *Buffer
  198. );
  199. typedef
  200. EFI_STATUS
  201. (EFIAPI *EFI_FILE_SET_INFO) (
  202. IN struct _EFI_FILE_HANDLE *File,
  203. IN EFI_GUID *InformationType,
  204. IN UINTN BufferSize,
  205. IN VOID *Buffer
  206. );
  207. typedef
  208. EFI_STATUS
  209. (EFIAPI *EFI_FILE_FLUSH) (
  210. IN struct _EFI_FILE_HANDLE *File
  211. );
  212. #define EFI_FILE_HANDLE_REVISION 0x00010000
  213. typedef struct _EFI_FILE_HANDLE {
  214. UINT64 Revision;
  215. EFI_FILE_OPEN Open;
  216. EFI_FILE_CLOSE Close;
  217. EFI_FILE_DELETE Delete;
  218. EFI_FILE_READ Read;
  219. EFI_FILE_WRITE Write;
  220. EFI_FILE_GET_POSITION GetPosition;
  221. EFI_FILE_SET_POSITION SetPosition;
  222. EFI_FILE_GET_INFO GetInfo;
  223. EFI_FILE_SET_INFO SetInfo;
  224. EFI_FILE_FLUSH Flush;
  225. } EFI_FILE, *EFI_FILE_HANDLE;
  226. //
  227. // File information types
  228. //
  229. #define EFI_FILE_INFO_ID \
  230. { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  231. typedef struct {
  232. UINT64 Size;
  233. UINT64 FileSize;
  234. UINT64 PhysicalSize;
  235. EFI_TIME CreateTime;
  236. EFI_TIME LastAccessTime;
  237. EFI_TIME ModificationTime;
  238. UINT64 Attribute;
  239. CHAR16 FileName[1];
  240. } EFI_FILE_INFO;
  241. //
  242. // The FileName field of the EFI_FILE_INFO data structure is variable length.
  243. // Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
  244. // be the size of the data structure without the FileName field. The following macro
  245. // computes this size correctly no matter how big the FileName array is declared.
  246. // This is required to make the EFI_FILE_INFO data structure ANSI compilant.
  247. //
  248. #define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
  249. #define EFI_FILE_SYSTEM_INFO_ID \
  250. { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  251. typedef struct {
  252. UINT64 Size;
  253. BOOLEAN ReadOnly;
  254. UINT64 VolumeSize;
  255. UINT64 FreeSpace;
  256. UINT32 BlockSize;
  257. CHAR16 VolumeLabel[1];
  258. } EFI_FILE_SYSTEM_INFO;
  259. //
  260. // The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
  261. // Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
  262. // to be the size of the data structure without the VolumeLable field. The following macro
  263. // computes this size correctly no matter how big the VolumeLable array is declared.
  264. // This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
  265. //
  266. #define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
  267. #define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID \
  268. { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
  269. typedef struct {
  270. CHAR16 VolumeLabel[1];
  271. } EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
  272. #define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
  273. //
  274. // Load file protocol
  275. //
  276. #define LOAD_FILE_PROTOCOL \
  277. { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
  278. INTERFACE_DECL(_EFI_LOAD_FILE_INTERFACE);
  279. typedef
  280. EFI_STATUS
  281. (EFIAPI *EFI_LOAD_FILE) (
  282. IN struct _EFI_LOAD_FILE_INTERFACE *This,
  283. IN EFI_DEVICE_PATH *FilePath,
  284. IN BOOLEAN BootPolicy,
  285. IN OUT UINTN *BufferSize,
  286. IN VOID *Buffer OPTIONAL
  287. );
  288. typedef struct _EFI_LOAD_FILE_INTERFACE {
  289. EFI_LOAD_FILE LoadFile;
  290. } EFI_LOAD_FILE_INTERFACE;
  291. //
  292. // Device IO protocol
  293. //
  294. #define DEVICE_IO_PROTOCOL \
  295. { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
  296. INTERFACE_DECL(_EFI_DEVICE_IO_INTERFACE);
  297. typedef enum {
  298. IO_UINT8,
  299. IO_UINT16,
  300. IO_UINT32,
  301. IO_UINT64,
  302. //
  303. // Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
  304. //
  305. MMIO_COPY_UINT8,
  306. MMIO_COPY_UINT16,
  307. MMIO_COPY_UINT32,
  308. MMIO_COPY_UINT64
  309. } EFI_IO_WIDTH;
  310. #define EFI_PCI_ADDRESS(_bus,_dev,_func) \
  311. ( (UINT64) ( (((UINTN)_bus) << 24) + (((UINTN)_dev) << 16) + (((UINTN)_func) << 8) ) )
  312. typedef
  313. EFI_STATUS
  314. (EFIAPI *EFI_DEVICE_IO) (
  315. IN struct _EFI_DEVICE_IO_INTERFACE *This,
  316. IN EFI_IO_WIDTH Width,
  317. IN UINT64 Address,
  318. IN UINTN Count,
  319. IN OUT VOID *Buffer
  320. );
  321. typedef struct {
  322. EFI_DEVICE_IO Read;
  323. EFI_DEVICE_IO Write;
  324. } EFI_IO_ACCESS;
  325. typedef
  326. EFI_STATUS
  327. (EFIAPI *EFI_PCI_DEVICE_PATH) (
  328. IN struct _EFI_DEVICE_IO_INTERFACE *This,
  329. IN UINT64 Address,
  330. IN OUT EFI_DEVICE_PATH **PciDevicePath
  331. );
  332. typedef enum {
  333. EfiBusMasterRead,
  334. EfiBusMasterWrite,
  335. EfiBusMasterCommonBuffer
  336. } EFI_IO_OPERATION_TYPE;
  337. typedef
  338. EFI_STATUS
  339. (EFIAPI *EFI_IO_MAP) (
  340. IN struct _EFI_DEVICE_IO_INTERFACE *This,
  341. IN EFI_IO_OPERATION_TYPE Operation,
  342. IN EFI_PHYSICAL_ADDRESS *HostAddress,
  343. IN OUT UINTN *NumberOfBytes,
  344. OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
  345. OUT VOID **Mapping
  346. );
  347. typedef
  348. EFI_STATUS
  349. (EFIAPI *EFI_IO_UNMAP) (
  350. IN struct _EFI_DEVICE_IO_INTERFACE *This,
  351. IN VOID *Mapping
  352. );
  353. typedef
  354. EFI_STATUS
  355. (EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
  356. IN struct _EFI_DEVICE_IO_INTERFACE *This,
  357. IN EFI_ALLOCATE_TYPE Type,
  358. IN EFI_MEMORY_TYPE MemoryType,
  359. IN UINTN Pages,
  360. IN OUT EFI_PHYSICAL_ADDRESS *HostAddress
  361. );
  362. typedef
  363. EFI_STATUS
  364. (EFIAPI *EFI_IO_FLUSH) (
  365. IN struct _EFI_DEVICE_IO_INTERFACE *This
  366. );
  367. typedef
  368. EFI_STATUS
  369. (EFIAPI *EFI_IO_FREE_BUFFER) (
  370. IN struct _EFI_DEVICE_IO_INTERFACE *This,
  371. IN UINTN Pages,
  372. IN EFI_PHYSICAL_ADDRESS HostAddress
  373. );
  374. typedef struct _EFI_DEVICE_IO_INTERFACE {
  375. EFI_IO_ACCESS Mem;
  376. EFI_IO_ACCESS Io;
  377. EFI_IO_ACCESS Pci;
  378. EFI_IO_MAP Map;
  379. EFI_PCI_DEVICE_PATH PciDevicePath;
  380. EFI_IO_UNMAP Unmap;
  381. EFI_IO_ALLOCATE_BUFFER AllocateBuffer;
  382. EFI_IO_FLUSH Flush;
  383. EFI_IO_FREE_BUFFER FreeBuffer;
  384. } EFI_DEVICE_IO_INTERFACE;
  385. //
  386. // Unicode Collation protocol
  387. //
  388. #define UNICODE_COLLATION_PROTOCOL \
  389. { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
  390. #define UNICODE_BYTE_ORDER_MARK (CHAR16)(0xfeff)
  391. INTERFACE_DECL(_EFI_UNICODE_COLLATION_INTERFACE);
  392. typedef
  393. INTN
  394. (EFIAPI *EFI_UNICODE_STRICOLL) (
  395. IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
  396. IN CHAR16 *s1,
  397. IN CHAR16 *s2
  398. );
  399. typedef
  400. BOOLEAN
  401. (EFIAPI *EFI_UNICODE_METAIMATCH) (
  402. IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
  403. IN CHAR16 *String,
  404. IN CHAR16 *Pattern
  405. );
  406. typedef
  407. VOID
  408. (EFIAPI *EFI_UNICODE_STRLWR) (
  409. IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
  410. IN OUT CHAR16 *Str
  411. );
  412. typedef
  413. VOID
  414. (EFIAPI *EFI_UNICODE_STRUPR) (
  415. IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
  416. IN OUT CHAR16 *Str
  417. );
  418. typedef
  419. VOID
  420. (EFIAPI *EFI_UNICODE_FATTOSTR) (
  421. IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
  422. IN UINTN FatSize,
  423. IN CHAR8 *Fat,
  424. OUT CHAR16 *String
  425. );
  426. typedef
  427. BOOLEAN
  428. (EFIAPI *EFI_UNICODE_STRTOFAT) (
  429. IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
  430. IN CHAR16 *String,
  431. IN UINTN FatSize,
  432. OUT CHAR8 *Fat
  433. );
  434. //
  435. // Hash Protocol
  436. //
  437. #define HASH_PROTOCOL \
  438. { 0xC5184932, 0xDBA5, 0x46DB, { 0xA5, 0xBA, 0xCC, 0x0B, 0xDA, 0x9C, 0x14, 0x35 } }
  439. #define EFI_HASH_ALGORITHM_SHA1 \
  440. { 0x2AE9D80F, 0x3FB2, 0x4095, { 0xB7, 0xB1, 0xE9, 0x31, 0x57, 0xB9, 0x46, 0xB6 } } // Deprecated
  441. #define EFI_HASH_ALGORITHM_SHA224 \
  442. { 0x8DF01A06, 0x9BD5, 0x4BF7, { 0xB0, 0x21, 0xDB, 0x4F, 0xD9, 0xCC, 0xF4, 0x5B } } // Deprecated
  443. #define EFI_HASH_ALGORITHM_SHA256 \
  444. { 0x51AA59DE, 0xFDF2, 0x4EA3, { 0xBC, 0x63, 0x87, 0x5F, 0xB7, 0x84, 0x2E, 0xE9 } } // Deprecated
  445. #define EFI_HASH_ALGORITHM_SHA384 \
  446. { 0xEFA96432, 0xDE33, 0x4DD2, { 0xAE, 0xE6, 0x32, 0x8C, 0x33, 0xDF, 0x77, 0x7A } } // Deprecated
  447. #define EFI_HASH_ALGORITHM_SHA512 \
  448. { 0xCAA4381E, 0x750C, 0x4770, { 0xB8, 0x70, 0x7A, 0x23, 0xB4, 0xE4, 0x21, 0x30 } } // Deprecated
  449. #define EFI_HASH_ALGORITHM_MD5 \
  450. { 0x0AF7C79C, 0x65B5, 0x4319, { 0xB0, 0xAE, 0x44, 0xEC, 0x48, 0x4E, 0x4A, 0xD7 } } // Deprecated
  451. #define EFI_HASH_ALGORITHM_SHA1_NOPAD \
  452. { 0x24C5DC2F, 0x53E2, 0x40CA, { 0x9E, 0xD6, 0xA5, 0xD9, 0xA4, 0x9F, 0x46, 0x3B } }
  453. #define EFI_HASH_ALGORITHM_SHA256_NOPAD \
  454. { 0x8628752A, 0x6CB7, 0x4814, { 0x96, 0xFC, 0x24, 0xA8, 0x15, 0xAC, 0x22, 0x26 } }
  455. INTERFACE_DECL(_EFI_HASH);
  456. typedef UINT8 EFI_MD5_HASH[16];
  457. typedef UINT8 EFI_SHA1_HASH[20];
  458. typedef UINT8 EFI_SHA224_HASH[28];
  459. typedef UINT8 EFI_SHA256_HASH[32];
  460. typedef UINT8 EFI_SHA384_HASH[48];
  461. typedef UINT8 EFI_SHA512_HASH[64];
  462. typedef union _EFI_HASH_OUTPUT {
  463. EFI_MD5_HASH *Md5Hash;
  464. EFI_SHA1_HASH *Sha1Hash;
  465. EFI_SHA224_HASH *Sha224Hash;
  466. EFI_SHA256_HASH *Sha256Hash;
  467. EFI_SHA384_HASH *Sha384Hash;
  468. EFI_SHA512_HASH *Sha512Hash;
  469. } EFI_HASH_OUTPUT;
  470. typedef
  471. EFI_STATUS
  472. (EFIAPI *EFI_HASH_GET_HASH_SIZE) (
  473. IN CONST struct _EFI_HASH *This,
  474. IN CONST EFI_GUID *HashAlgorithm,
  475. OUT UINTN *HashSize);
  476. typedef
  477. EFI_STATUS
  478. (EFIAPI *EFI_HASH_HASH) (
  479. IN CONST struct _EFI_HASH *This,
  480. IN CONST EFI_GUID *HashAlgorithm,
  481. IN BOOLEAN Extend,
  482. IN CONST UINT8 *Message,
  483. IN UINT64 MessageSize,
  484. IN OUT EFI_HASH_OUTPUT *Hash);
  485. typedef struct _EFI_HASH {
  486. EFI_HASH_GET_HASH_SIZE GetHashSize;
  487. EFI_HASH_HASH Hash;
  488. } EFI_HASH;
  489. typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
  490. // general
  491. EFI_UNICODE_STRICOLL StriColl;
  492. EFI_UNICODE_METAIMATCH MetaiMatch;
  493. EFI_UNICODE_STRLWR StrLwr;
  494. EFI_UNICODE_STRUPR StrUpr;
  495. // for supporting fat volumes
  496. EFI_UNICODE_FATTOSTR FatToStr;
  497. EFI_UNICODE_STRTOFAT StrToFat;
  498. CHAR8 *SupportedLanguages;
  499. } EFI_UNICODE_COLLATION_INTERFACE;
  500. /* Graphics output protocol */
  501. #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
  502. { \
  503. 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \
  504. }
  505. typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
  506. typedef struct {
  507. UINT32 RedMask;
  508. UINT32 GreenMask;
  509. UINT32 BlueMask;
  510. UINT32 ReservedMask;
  511. } EFI_PIXEL_BITMASK;
  512. typedef enum {
  513. PixelRedGreenBlueReserved8BitPerColor,
  514. PixelBlueGreenRedReserved8BitPerColor,
  515. PixelBitMask,
  516. PixelBltOnly,
  517. PixelFormatMax
  518. } EFI_GRAPHICS_PIXEL_FORMAT;
  519. typedef struct {
  520. UINT32 Version;
  521. UINT32 HorizontalResolution;
  522. UINT32 VerticalResolution;
  523. EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
  524. EFI_PIXEL_BITMASK PixelInformation;
  525. UINT32 PixelsPerScanLine;
  526. } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
  527. /**
  528. Return the current video mode information.
  529. @param This Protocol instance pointer.
  530. @param ModeNumber The mode number to return information on.
  531. @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
  532. @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
  533. @retval EFI_SUCCESS Mode information returned.
  534. @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
  535. @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
  536. @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
  537. @retval EFI_INVALID_PARAMETER One of the input args was NULL.
  538. **/
  539. typedef
  540. EFI_STATUS
  541. (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
  542. IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
  543. IN UINT32 ModeNumber,
  544. OUT UINTN *SizeOfInfo,
  545. OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
  546. )
  547. ;
  548. /**
  549. Return the current video mode information.
  550. @param This Protocol instance pointer.
  551. @param ModeNumber The mode number to be set.
  552. @retval EFI_SUCCESS Graphics mode was changed.
  553. @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
  554. @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
  555. **/
  556. typedef
  557. EFI_STATUS
  558. (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
  559. IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
  560. IN UINT32 ModeNumber
  561. );
  562. typedef struct {
  563. UINT8 Blue;
  564. UINT8 Green;
  565. UINT8 Red;
  566. UINT8 Reserved;
  567. } EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
  568. typedef union {
  569. EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
  570. UINT32 Raw;
  571. } EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
  572. typedef enum {
  573. EfiBltVideoFill,
  574. EfiBltVideoToBltBuffer,
  575. EfiBltBufferToVideo,
  576. EfiBltVideoToVideo,
  577. EfiGraphicsOutputBltOperationMax
  578. } EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
  579. /**
  580. The following table defines actions for BltOperations:
  581. <B>EfiBltVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
  582. directly to every pixel of the video display rectangle
  583. (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
  584. Only one pixel will be used from the BltBuffer. Delta is NOT used.
  585. <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle
  586. (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
  587. the BltBuffer rectangle (DestinationX, DestinationY )
  588. (DestinationX + Width, DestinationY + Height). If DestinationX or
  589. DestinationY is not zero then Delta must be set to the length in bytes
  590. of a row in the BltBuffer.
  591. <B>EfiBltBufferToVideo</B> - Write data from the BltBuffer rectangle
  592. (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
  593. video display rectangle (DestinationX, DestinationY)
  594. (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
  595. not zero then Delta must be set to the length in bytes of a row in the
  596. BltBuffer.
  597. <B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
  598. (SourceX + Width, SourceY + Height) .to the video display rectangle
  599. (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
  600. The BltBuffer and Delta are not used in this mode.
  601. @param This Protocol instance pointer.
  602. @param BltBuffer Buffer containing data to blit into video buffer. This
  603. buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
  604. @param BltOperation Operation to perform on BlitBuffer and video memory
  605. @param SourceX X coordinate of source for the BltBuffer.
  606. @param SourceY Y coordinate of source for the BltBuffer.
  607. @param DestinationX X coordinate of destination for the BltBuffer.
  608. @param DestinationY Y coordinate of destination for the BltBuffer.
  609. @param Width Width of rectangle in BltBuffer in pixels.
  610. @param Height Hight of rectangle in BltBuffer in pixels.
  611. @param Delta OPTIONAL
  612. @retval EFI_SUCCESS The Blt operation completed.
  613. @retval EFI_INVALID_PARAMETER BltOperation is not valid.
  614. @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
  615. **/
  616. typedef
  617. EFI_STATUS
  618. (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
  619. IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
  620. IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
  621. IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
  622. IN UINTN SourceX,
  623. IN UINTN SourceY,
  624. IN UINTN DestinationX,
  625. IN UINTN DestinationY,
  626. IN UINTN Width,
  627. IN UINTN Height,
  628. IN UINTN Delta OPTIONAL
  629. );
  630. typedef struct {
  631. UINT32 MaxMode;
  632. UINT32 Mode;
  633. EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
  634. UINTN SizeOfInfo;
  635. EFI_PHYSICAL_ADDRESS FrameBufferBase;
  636. UINTN FrameBufferSize;
  637. } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
  638. struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
  639. EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode;
  640. EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode;
  641. EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt;
  642. EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
  643. };
  644. INTERFACE_DECL(_EFI_SERVICE_BINDING);
  645. typedef
  646. EFI_STATUS
  647. (EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) (
  648. IN struct _EFI_SERVICE_BINDING *This,
  649. IN EFI_HANDLE *ChildHandle
  650. );
  651. typedef
  652. EFI_STATUS
  653. (EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) (
  654. IN struct _EFI_SERVICE_BINDING *This,
  655. IN EFI_HANDLE ChildHandle
  656. );
  657. typedef struct _EFI_SERVICE_BINDING {
  658. EFI_SERVICE_BINDING_CREATE_CHILD CreateChild;
  659. EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
  660. } EFI_SERVICE_BINDING;
  661. /*
  662. * EFI Driver Binding Protocol
  663. * UEFI Specification Version 2.5 Section 10.1
  664. */
  665. #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
  666. { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71} }
  667. INTERFACE_DECL(_EFI_DRIVER_BINDING_PROTOCOL);
  668. typedef
  669. EFI_STATUS
  670. (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED) (
  671. IN struct _EFI_DRIVER_BINDING_PROTOCOL *This,
  672. IN EFI_HANDLE ControllerHandle,
  673. IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL);
  674. typedef
  675. EFI_STATUS
  676. (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_START) (
  677. IN struct _EFI_DRIVER_BINDING_PROTOCOL *This,
  678. IN EFI_HANDLE ControllerHandle,
  679. IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL);
  680. typedef
  681. EFI_STATUS
  682. (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_STOP) (
  683. IN struct _EFI_DRIVER_BINDING_PROTOCOL *This,
  684. IN EFI_HANDLE ControllerHandle,
  685. IN UINTN NumberOfChildren,
  686. IN EFI_HANDLE *ChildHandleBuffer OPTIONAL);
  687. typedef struct _EFI_DRIVER_BINDING_PROTOCOL {
  688. EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED Supported;
  689. EFI_DRIVER_BINDING_PROTOCOL_START Start;
  690. EFI_DRIVER_BINDING_PROTOCOL_STOP Stop;
  691. UINT32 Version;
  692. EFI_HANDLE ImageHandle;
  693. EFI_HANDLE DriverBindingHandle;
  694. } EFI_DRIVER_BINDING_PROTOCOL;
  695. /*
  696. * Backwards compatibility with older GNU-EFI versions. Deprecated.
  697. */
  698. #define DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL_GUID
  699. #define EFI_DRIVER_SUPPORTED EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED
  700. #define EFI_DRIVER_START EFI_DRIVER_BINDING_PROTOCOL_START
  701. #define EFI_DRIVER_STOP EFI_DRIVER_BINDING_PROTOCOL_STOP
  702. #define _EFI_DRIVER_BINDING _EFI_DRIVER_BINDING_PROTOCOL
  703. #define EFI_DRIVER_BINDING EFI_DRIVER_BINDING_PROTOCOL
  704. /*
  705. * EFI Component Name Protocol
  706. * Deprecated - use EFI Component Name 2 Protocol instead
  707. */
  708. #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
  709. {0x107A772C, 0xD5E1, 0x11D4, { 0x9A, 0x46, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
  710. INTERFACE_DECL(_EFI_COMPONENT_NAME_PROTOCOL);
  711. typedef
  712. EFI_STATUS
  713. (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
  714. IN struct _EFI_COMPONENT_NAME_PROTOCOL *This,
  715. IN CHAR8 *Language,
  716. OUT CHAR16 **DriverName);
  717. typedef
  718. EFI_STATUS
  719. (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
  720. IN struct _EFI_COMPONENT_NAME_PROTOCOL *This,
  721. IN EFI_HANDLE ControllerHandle,
  722. IN EFI_HANDLE ChildHandle OPTIONAL,
  723. IN CHAR8 *Language,
  724. OUT CHAR16 **ControllerName);
  725. typedef struct _EFI_COMPONENT_NAME_PROTOCOL {
  726. EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
  727. EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
  728. CHAR8 *SupportedLanguages;
  729. } EFI_COMPONENT_NAME_PROTOCOL;
  730. /*
  731. * Backwards compatibility with older GNU-EFI versions. Deprecated.
  732. */
  733. #define COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL_GUID
  734. #define _EFI_COMPONENT_NAME _EFI_COMPONENT_NAME_PROTOCOL
  735. #define EFI_COMPONENT_NAME EFI_COMPONENT_NAME_PROTOCOL
  736. /*
  737. * EFI Component Name 2 Protocol
  738. * UEFI Specification Version 2.5 Section 10.5
  739. */
  740. #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
  741. {0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14} }
  742. INTERFACE_DECL(_EFI_COMPONENT_NAME2_PROTOCOL);
  743. typedef
  744. EFI_STATUS
  745. (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
  746. IN struct _EFI_COMPONENT_NAME2_PROTOCOL *This,
  747. IN CHAR8 *Language,
  748. OUT CHAR16 **DriverName);
  749. typedef
  750. EFI_STATUS
  751. (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
  752. IN struct _EFI_COMPONENT_NAME2_PROTOCOL *This,
  753. IN EFI_HANDLE ControllerHandle,
  754. IN EFI_HANDLE ChildHandle OPTIONAL,
  755. IN CHAR8 *Language,
  756. OUT CHAR16 **ControllerName);
  757. typedef struct _EFI_COMPONENT_NAME2_PROTOCOL {
  758. EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
  759. EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
  760. CHAR8 *SupportedLanguages;
  761. } EFI_COMPONENT_NAME2_PROTOCOL;
  762. /*
  763. * Backwards compatibility with older GNU-EFI versions. Deprecated.
  764. */
  765. #define COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL_GUID
  766. #define _EFI_COMPONENT_NAME2 _EFI_COMPONENT_NAME2_PROTOCOL
  767. #define EFI_COMPONENT_NAME2 EFI_COMPONENT_NAME2_PROTOCOL
  768. /*
  769. * EFI Loaded Image Protocol
  770. * UEFI Specification Version 2.5 Section 8.1
  771. */
  772. #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
  773. { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
  774. #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
  775. typedef
  776. EFI_STATUS
  777. (EFIAPI *EFI_IMAGE_UNLOAD) (
  778. IN EFI_HANDLE ImageHandle
  779. );
  780. typedef struct {
  781. UINT32 Revision;
  782. EFI_HANDLE ParentHandle;
  783. struct _EFI_SYSTEM_TABLE *SystemTable;
  784. // Source location of image
  785. EFI_HANDLE DeviceHandle;
  786. EFI_DEVICE_PATH *FilePath;
  787. VOID *Reserved;
  788. // Images load options
  789. UINT32 LoadOptionsSize;
  790. VOID *LoadOptions;
  791. // Location of where image was loaded
  792. VOID *ImageBase;
  793. UINT64 ImageSize;
  794. EFI_MEMORY_TYPE ImageCodeType;
  795. EFI_MEMORY_TYPE ImageDataType;
  796. // If the driver image supports a dynamic unload request
  797. EFI_IMAGE_UNLOAD Unload;
  798. } EFI_LOADED_IMAGE_PROTOCOL;
  799. /*
  800. * Backwards compatibility with older GNU-EFI versions. Deprecated.
  801. */
  802. #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
  803. #define EFI_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION
  804. #define EFI_LOADED_IMAGE EFI_LOADED_IMAGE_PROTOCOL
  805. /*
  806. * Random Number Generator Protocol
  807. * UEFI Specification Version 2.5 Section 35.5
  808. */
  809. #define EFI_RNG_PROTOCOL_GUID \
  810. { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44} }
  811. typedef EFI_GUID EFI_RNG_ALGORITHM;
  812. #define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID \
  813. {0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96} }
  814. #define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID \
  815. {0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7} }
  816. #define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID \
  817. {0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e} }
  818. #define EFI_RNG_ALGORITHM_X9_31_3DES_GUID \
  819. {0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46} }
  820. #define EFI_RNG_ALGORITHM_X9_31_AES_GUID \
  821. {0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9} }
  822. #define EFI_RNG_ALGORITHM_RAW \
  823. {0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61} }
  824. INTERFACE_DECL(_EFI_RNG_PROTOCOL);
  825. typedef
  826. EFI_STATUS
  827. (EFIAPI *EFI_RNG_GET_INFO) (
  828. IN struct _EFI_RNG_PROTOCOL *This,
  829. IN OUT UINTN *RNGAlgorithmListSize,
  830. OUT EFI_RNG_ALGORITHM *RNGAlgorithmList
  831. );
  832. typedef
  833. EFI_STATUS
  834. (EFIAPI *EFI_RNG_GET_RNG) (
  835. IN struct _EFI_RNG_PROTOCOL *This,
  836. IN EFI_RNG_ALGORITHM *RNGAlgorithm, OPTIONAL
  837. IN UINTN RNGValueLength,
  838. OUT UINT8 *RNGValue
  839. );
  840. typedef struct _EFI_RNG_PROTOCOL {
  841. EFI_RNG_GET_INFO GetInfo;
  842. EFI_RNG_GET_RNG GetRNG;
  843. } EFI_RNG_PROTOCOL;
  844. //
  845. // EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL
  846. //
  847. #define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID \
  848. { 0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
  849. INTERFACE_DECL(_EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL);
  850. typedef
  851. EFI_STATUS
  852. (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER) (
  853. IN struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
  854. IN EFI_HANDLE ControllerHandle,
  855. IN OUT EFI_HANDLE *DriverImageHandle);
  856. typedef
  857. EFI_STATUS
  858. (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH) (
  859. IN struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
  860. IN EFI_HANDLE ControllerHandle,
  861. IN OUT EFI_DEVICE_PATH **DriverImagePath);
  862. typedef
  863. EFI_STATUS
  864. (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED) (
  865. IN struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
  866. IN EFI_HANDLE ControllerHandle,
  867. IN EFI_DEVICE_PATH *DriverImagePath,
  868. IN EFI_HANDLE DriverImageHandle);
  869. typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {
  870. EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
  871. EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH GetDriverPath;
  872. EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED DriverLoaded;
  873. } EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;
  874. //
  875. // EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL
  876. //
  877. #define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID \
  878. { 0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65} }
  879. INTERFACE_DECL(_EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL);
  880. typedef
  881. EFI_STATUS
  882. (EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
  883. IN struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,
  884. IN OUT EFI_HANDLE *DriverImageHandle);
  885. typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
  886. EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
  887. } EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
  888. //
  889. // EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL
  890. //
  891. #define EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID \
  892. { 0xb1ee129e, 0xda36, 0x4181, {0x91, 0xf8, 0x04, 0xa4, 0x92, 0x37, 0x66, 0xa7} }
  893. INTERFACE_DECL(_EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL);
  894. typedef
  895. UINT32
  896. (EFIAPI *EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION) (
  897. IN struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL *This);
  898. typedef struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL {
  899. EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION GetVersion;
  900. } EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL;
  901. #endif