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.

UefiPxe.h 48KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756
  1. /** @file
  2. This header file contains all of the PXE type definitions,
  3. structure prototypes, global variables and constants that
  4. are needed for porting PXE to EFI.
  5. Copyright (c) 2006 - 2008, Intel Corporation
  6. All rights reserved. This program and the accompanying materials
  7. are licensed and made available under the terms and conditions of the BSD License
  8. which accompanies this distribution. 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. 32/64-bit PXE specification:
  14. alpha-4, 99-Dec-17
  15. **/
  16. #ifndef __EFI_PXE_H__
  17. #define __EFI_PXE_H__
  18. #pragma pack(1)
  19. #define PXE_BUSTYPE(a, b, c, d) \
  20. ( \
  21. (((PXE_UINT32) (d) & 0xFF) << 24) | (((PXE_UINT32) (c) & 0xFF) << 16) | (((PXE_UINT32) (b) & 0xFF) << 8) | \
  22. ((PXE_UINT32) (a) & 0xFF) \
  23. )
  24. ///
  25. /// UNDI ROM ID and devive ID signature
  26. ///
  27. #define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E')
  28. ///
  29. /// BUS ROM ID signatures
  30. ///
  31. #define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R')
  32. #define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R')
  33. #define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R')
  34. #define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4')
  35. #define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8))
  36. #define PXE_SWAP_UINT32(n) \
  37. ((((PXE_UINT32)(n) & 0x000000FF) << 24) | \
  38. (((PXE_UINT32)(n) & 0x0000FF00) << 8) | \
  39. (((PXE_UINT32)(n) & 0x00FF0000) >> 8) | \
  40. (((PXE_UINT32)(n) & 0xFF000000) >> 24))
  41. #define PXE_SWAP_UINT64(n) \
  42. ((((PXE_UINT64)(n) & 0x00000000000000FFULL) << 56) | \
  43. (((PXE_UINT64)(n) & 0x000000000000FF00ULL) << 40) | \
  44. (((PXE_UINT64)(n) & 0x0000000000FF0000ULL) << 24) | \
  45. (((PXE_UINT64)(n) & 0x00000000FF000000ULL) << 8) | \
  46. (((PXE_UINT64)(n) & 0x000000FF00000000ULL) >> 8) | \
  47. (((PXE_UINT64)(n) & 0x0000FF0000000000ULL) >> 24) | \
  48. (((PXE_UINT64)(n) & 0x00FF000000000000ULL) >> 40) | \
  49. (((PXE_UINT64)(n) & 0xFF00000000000000ULL) >> 56))
  50. #define PXE_CPBSIZE_NOT_USED 0 ///< zero
  51. #define PXE_DBSIZE_NOT_USED 0 ///< zero
  52. #define PXE_CPBADDR_NOT_USED (PXE_UINT64) 0 ///< zero
  53. #define PXE_DBADDR_NOT_USED (PXE_UINT64) 0 ///< zero
  54. #define PXE_CONST CONST
  55. #define PXE_VOLATILE volatile
  56. typedef VOID PXE_VOID;
  57. typedef UINT8 PXE_UINT8;
  58. typedef UINT16 PXE_UINT16;
  59. typedef UINT32 PXE_UINT32;
  60. typedef UINTN PXE_UINTN;
  61. ///
  62. /// typedef unsigned long PXE_UINT64;
  63. ///
  64. typedef UINT64 PXE_UINT64;
  65. typedef PXE_UINT8 PXE_BOOL;
  66. #define PXE_FALSE 0 ///< zero
  67. #define PXE_TRUE (!PXE_FALSE)
  68. typedef PXE_UINT16 PXE_OPCODE;
  69. ///
  70. /// Return UNDI operational state.
  71. ///
  72. #define PXE_OPCODE_GET_STATE 0x0000
  73. ///
  74. /// Change UNDI operational state from Stopped to Started.
  75. ///
  76. #define PXE_OPCODE_START 0x0001
  77. ///
  78. /// Change UNDI operational state from Started to Stopped.
  79. ///
  80. #define PXE_OPCODE_STOP 0x0002
  81. ///
  82. /// Get UNDI initialization information.
  83. ///
  84. #define PXE_OPCODE_GET_INIT_INFO 0x0003
  85. ///
  86. /// Get NIC configuration information.
  87. ///
  88. #define PXE_OPCODE_GET_CONFIG_INFO 0x0004
  89. ///
  90. /// Changed UNDI operational state from Started to Initialized.
  91. ///
  92. #define PXE_OPCODE_INITIALIZE 0x0005
  93. ///
  94. /// Re-initialize the NIC H/W.
  95. ///
  96. #define PXE_OPCODE_RESET 0x0006
  97. ///
  98. /// Change the UNDI operational state from Initialized to Started.
  99. ///
  100. #define PXE_OPCODE_SHUTDOWN 0x0007
  101. ///
  102. /// Read & change state of external interrupt enables.
  103. ///
  104. #define PXE_OPCODE_INTERRUPT_ENABLES 0x0008
  105. ///
  106. /// Read & change state of packet receive filters.
  107. ///
  108. #define PXE_OPCODE_RECEIVE_FILTERS 0x0009
  109. ///
  110. /// Read & change station MAC address.
  111. ///
  112. #define PXE_OPCODE_STATION_ADDRESS 0x000A
  113. ///
  114. /// Read traffic statistics.
  115. ///
  116. #define PXE_OPCODE_STATISTICS 0x000B
  117. ///
  118. /// Convert multicast IP address to multicast MAC address.
  119. ///
  120. #define PXE_OPCODE_MCAST_IP_TO_MAC 0x000C
  121. ///
  122. /// Read or change non-volatile storage on the NIC.
  123. ///
  124. #define PXE_OPCODE_NVDATA 0x000D
  125. ///
  126. /// Get & clear interrupt status.
  127. ///
  128. #define PXE_OPCODE_GET_STATUS 0x000E
  129. ///
  130. /// Fill media header in packet for transmit.
  131. ///
  132. #define PXE_OPCODE_FILL_HEADER 0x000F
  133. ///
  134. /// Transmit packet(s).
  135. ///
  136. #define PXE_OPCODE_TRANSMIT 0x0010
  137. ///
  138. /// Receive packet.
  139. ///
  140. #define PXE_OPCODE_RECEIVE 0x0011
  141. ///
  142. /// Last valid PXE UNDI OpCode number.
  143. ///
  144. #define PXE_OPCODE_LAST_VALID 0x0011
  145. typedef PXE_UINT16 PXE_OPFLAGS;
  146. #define PXE_OPFLAGS_NOT_USED 0x0000
  147. //
  148. // //////////////////////////////////////
  149. // UNDI Get State
  150. //
  151. // No OpFlags
  152. ////////////////////////////////////////
  153. // UNDI Start
  154. //
  155. // No OpFlags
  156. ////////////////////////////////////////
  157. // UNDI Stop
  158. //
  159. // No OpFlags
  160. ////////////////////////////////////////
  161. // UNDI Get Init Info
  162. //
  163. // No Opflags
  164. ////////////////////////////////////////
  165. // UNDI Get Config Info
  166. //
  167. // No Opflags
  168. ///
  169. /// UNDI Initialize
  170. ///
  171. #define PXE_OPFLAGS_INITIALIZE_CABLE_DETECT_MASK 0x0001
  172. #define PXE_OPFLAGS_INITIALIZE_DETECT_CABLE 0x0000
  173. #define PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE 0x0001
  174. ///
  175. ///
  176. /// UNDI Reset
  177. ///
  178. #define PXE_OPFLAGS_RESET_DISABLE_INTERRUPTS 0x0001
  179. #define PXE_OPFLAGS_RESET_DISABLE_FILTERS 0x0002
  180. ///
  181. /// UNDI Shutdown
  182. ///
  183. /// No OpFlags
  184. ///
  185. /// UNDI Interrupt Enables
  186. ///
  187. ///
  188. /// Select whether to enable or disable external interrupt signals.
  189. /// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.
  190. ///
  191. #define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000
  192. #define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000
  193. #define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000
  194. #define PXE_OPFLAGS_INTERRUPT_READ 0x0000
  195. ///
  196. /// Enable receive interrupts. An external interrupt will be generated
  197. /// after a complete non-error packet has been received.
  198. ///
  199. #define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001
  200. ///
  201. /// Enable transmit interrupts. An external interrupt will be generated
  202. /// after a complete non-error packet has been transmitted.
  203. ///
  204. #define PXE_OPFLAGS_INTERRUPT_TRANSMIT 0x0002
  205. ///
  206. /// Enable command interrupts. An external interrupt will be generated
  207. /// when command execution stops.
  208. ///
  209. #define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004
  210. ///
  211. /// Generate software interrupt. Setting this bit generates an external
  212. /// interrupt, if it is supported by the hardware.
  213. ///
  214. #define PXE_OPFLAGS_INTERRUPT_SOFTWARE 0x0008
  215. ///
  216. /// UNDI Receive Filters
  217. ///
  218. ///
  219. /// Select whether to enable or disable receive filters.
  220. /// Setting both enable and disable will return PXE_STATCODE_INVALID_OPCODE.
  221. ///
  222. #define PXE_OPFLAGS_RECEIVE_FILTER_OPMASK 0xC000
  223. #define PXE_OPFLAGS_RECEIVE_FILTER_ENABLE 0x8000
  224. #define PXE_OPFLAGS_RECEIVE_FILTER_DISABLE 0x4000
  225. #define PXE_OPFLAGS_RECEIVE_FILTER_READ 0x0000
  226. ///
  227. /// To reset the contents of the multicast MAC address filter list,
  228. /// set this OpFlag:
  229. ///
  230. #define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000
  231. ///
  232. /// Enable unicast packet receiving. Packets sent to the current station
  233. /// MAC address will be received.
  234. ///
  235. #define PXE_OPFLAGS_RECEIVE_FILTER_UNICAST 0x0001
  236. ///
  237. /// Enable broadcast packet receiving. Packets sent to the broadcast
  238. /// MAC address will be received.
  239. ///
  240. #define PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST 0x0002
  241. ///
  242. /// Enable filtered multicast packet receiving. Packets sent to any
  243. /// of the multicast MAC addresses in the multicast MAC address filter
  244. /// list will be received. If the filter list is empty, no multicast
  245. ///
  246. #define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
  247. ///
  248. /// Enable promiscuous packet receiving. All packets will be received.
  249. ///
  250. #define PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS 0x0008
  251. ///
  252. /// Enable promiscuous multicast packet receiving. All multicast
  253. /// packets will be received.
  254. ///
  255. #define PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST 0x0010
  256. ///
  257. /// UNDI Station Address
  258. ///
  259. #define PXE_OPFLAGS_STATION_ADDRESS_READ 0x0000
  260. #define PXE_OPFLAGS_STATION_ADDRESS_WRITE 0x0000
  261. #define PXE_OPFLAGS_STATION_ADDRESS_RESET 0x0001
  262. ///
  263. /// UNDI Statistics
  264. ///
  265. #define PXE_OPFLAGS_STATISTICS_READ 0x0000
  266. #define PXE_OPFLAGS_STATISTICS_RESET 0x0001
  267. ///
  268. /// UNDI MCast IP to MAC
  269. ///
  270. ///
  271. /// Identify the type of IP address in the CPB.
  272. ///
  273. #define PXE_OPFLAGS_MCAST_IP_TO_MAC_OPMASK 0x0003
  274. #define PXE_OPFLAGS_MCAST_IPV4_TO_MAC 0x0000
  275. #define PXE_OPFLAGS_MCAST_IPV6_TO_MAC 0x0001
  276. ///
  277. /// UNDI NvData
  278. ///
  279. ///
  280. /// Select the type of non-volatile data operation.
  281. ///
  282. #define PXE_OPFLAGS_NVDATA_OPMASK 0x0001
  283. #define PXE_OPFLAGS_NVDATA_READ 0x0000
  284. #define PXE_OPFLAGS_NVDATA_WRITE 0x0001
  285. ///
  286. /// UNDI Get Status
  287. ///
  288. ///
  289. /// Return current interrupt status. This will also clear any interrupts
  290. /// that are currently set. This can be used in a polling routine. The
  291. /// interrupt flags are still set and cleared even when the interrupts
  292. /// are disabled.
  293. ///
  294. #define PXE_OPFLAGS_GET_INTERRUPT_STATUS 0x0001
  295. ///
  296. /// Return list of transmitted buffers for recycling. Transmit buffers
  297. /// must not be changed or unallocated until they have recycled. After
  298. /// issuing a transmit command, wait for a transmit complete interrupt.
  299. /// When a transmit complete interrupt is received, read the transmitted
  300. /// buffers. Do not plan on getting one buffer per interrupt. Some
  301. /// NICs and UNDIs may transmit multiple buffers per interrupt.
  302. ///
  303. #define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002
  304. ///
  305. /// UNDI Fill Header
  306. ///
  307. #define PXE_OPFLAGS_FILL_HEADER_OPMASK 0x0001
  308. #define PXE_OPFLAGS_FILL_HEADER_FRAGMENTED 0x0001
  309. #define PXE_OPFLAGS_FILL_HEADER_WHOLE 0x0000
  310. ///
  311. /// UNDI Transmit
  312. ///
  313. ///
  314. /// S/W UNDI only. Return after the packet has been transmitted. A
  315. /// transmit complete interrupt will still be generated and the transmit
  316. /// buffer will have to be recycled.
  317. ///
  318. #define PXE_OPFLAGS_SWUNDI_TRANSMIT_OPMASK 0x0001
  319. #define PXE_OPFLAGS_TRANSMIT_BLOCK 0x0001
  320. #define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK 0x0000
  321. #define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002
  322. #define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002
  323. #define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000
  324. ///
  325. /// UNDI Receive
  326. ///
  327. /// No OpFlags
  328. ///
  329. ///
  330. /// PXE STATFLAGS
  331. ///
  332. typedef PXE_UINT16 PXE_STATFLAGS;
  333. #define PXE_STATFLAGS_INITIALIZE 0x0000
  334. ///
  335. /// Common StatFlags that can be returned by all commands.
  336. ///
  337. ///
  338. /// The COMMAND_COMPLETE and COMMAND_FAILED status flags must be
  339. /// implemented by all UNDIs. COMMAND_QUEUED is only needed by UNDIs
  340. /// that support command queuing.
  341. ///
  342. #define PXE_STATFLAGS_STATUS_MASK 0xC000
  343. #define PXE_STATFLAGS_COMMAND_COMPLETE 0xC000
  344. #define PXE_STATFLAGS_COMMAND_FAILED 0x8000
  345. #define PXE_STATFLAGS_COMMAND_QUEUED 0x4000
  346. ///
  347. /// UNDI Get State
  348. ///
  349. #define PXE_STATFLAGS_GET_STATE_MASK 0x0003
  350. #define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002
  351. #define PXE_STATFLAGS_GET_STATE_STARTED 0x0001
  352. #define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000
  353. ///
  354. /// UNDI Start
  355. ///
  356. /// No additional StatFlags
  357. ///
  358. ///
  359. /// UNDI Get Init Info
  360. ///
  361. #define PXE_STATFLAGS_CABLE_DETECT_MASK 0x0001
  362. #define PXE_STATFLAGS_CABLE_DETECT_NOT_SUPPORTED 0x0000
  363. #define PXE_STATFLAGS_CABLE_DETECT_SUPPORTED 0x0001
  364. ///
  365. /// UNDI Initialize
  366. ///
  367. #define PXE_STATFLAGS_INITIALIZED_NO_MEDIA 0x0001
  368. ///
  369. /// UNDI Reset
  370. ///
  371. #define PXE_STATFLAGS_RESET_NO_MEDIA 0x0001
  372. ///
  373. /// UNDI Shutdown
  374. ///
  375. /// No additional StatFlags
  376. ///
  377. /// UNDI Interrupt Enables
  378. ///
  379. ///
  380. /// If set, receive interrupts are enabled.
  381. ///
  382. #define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001
  383. ///
  384. /// If set, transmit interrupts are enabled.
  385. ///
  386. #define PXE_STATFLAGS_INTERRUPT_TRANSMIT 0x0002
  387. ///
  388. /// If set, command interrupts are enabled.
  389. ///
  390. #define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004
  391. ///
  392. /// UNDI Receive Filters
  393. ///
  394. ///
  395. /// If set, unicast packets will be received.
  396. ///
  397. #define PXE_STATFLAGS_RECEIVE_FILTER_UNICAST 0x0001
  398. ///
  399. /// If set, broadcast packets will be received.
  400. ///
  401. #define PXE_STATFLAGS_RECEIVE_FILTER_BROADCAST 0x0002
  402. ///
  403. /// If set, multicast packets that match up with the multicast address
  404. /// filter list will be received.
  405. ///
  406. #define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
  407. ///
  408. /// If set, all packets will be received.
  409. ///
  410. #define PXE_STATFLAGS_RECEIVE_FILTER_PROMISCUOUS 0x0008
  411. ///
  412. /// If set, all multicast packets will be received.
  413. ///
  414. #define PXE_STATFLAGS_RECEIVE_FILTER_ALL_MULTICAST 0x0010
  415. ///
  416. /// UNDI Station Address
  417. ///
  418. /// No additional StatFlags
  419. ///
  420. ///
  421. /// UNDI Statistics
  422. ///
  423. /// No additional StatFlags
  424. ///
  425. ///
  426. //// UNDI MCast IP to MAC
  427. ////
  428. //// No additional StatFlags
  429. ///
  430. /// UNDI NvData
  431. ///
  432. /// No additional StatFlags
  433. ///
  434. ///
  435. /// UNDI Get Status
  436. ///
  437. ///
  438. /// Use to determine if an interrupt has occurred.
  439. ///
  440. #define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F
  441. #define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000
  442. ///
  443. /// If set, at least one receive interrupt occurred.
  444. ///
  445. #define PXE_STATFLAGS_GET_STATUS_RECEIVE 0x0001
  446. ///
  447. /// If set, at least one transmit interrupt occurred.
  448. ///
  449. #define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002
  450. ///
  451. /// If set, at least one command interrupt occurred.
  452. ///
  453. #define PXE_STATFLAGS_GET_STATUS_COMMAND 0x0004
  454. ///
  455. /// If set, at least one software interrupt occurred.
  456. ///
  457. #define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008
  458. ///
  459. /// This flag is set if the transmitted buffer queue is empty. This flag
  460. /// will be set if all transmitted buffer addresses get written into the DB.
  461. ///
  462. #define PXE_STATFLAGS_GET_STATUS_TXBUF_QUEUE_EMPTY 0x0010
  463. ///
  464. /// This flag is set if no transmitted buffer addresses were written
  465. /// into the DB. (This could be because DBsize was too small.)
  466. ///
  467. #define PXE_STATFLAGS_GET_STATUS_NO_TXBUFS_WRITTEN 0x0020
  468. ///
  469. /// UNDI Fill Header
  470. ///
  471. /// No additional StatFlags
  472. ///
  473. ///
  474. /// UNDI Transmit
  475. ///
  476. /// No additional StatFlags.
  477. ///
  478. /// UNDI Receive
  479. ///
  480. ///
  481. /// No additional StatFlags.
  482. ///
  483. typedef PXE_UINT16 PXE_STATCODE;
  484. #define PXE_STATCODE_INITIALIZE 0x0000
  485. ///
  486. /// Common StatCodes returned by all UNDI commands, UNDI protocol functions
  487. /// and BC protocol functions.
  488. ///
  489. #define PXE_STATCODE_SUCCESS 0x0000
  490. #define PXE_STATCODE_INVALID_CDB 0x0001
  491. #define PXE_STATCODE_INVALID_CPB 0x0002
  492. #define PXE_STATCODE_BUSY 0x0003
  493. #define PXE_STATCODE_QUEUE_FULL 0x0004
  494. #define PXE_STATCODE_ALREADY_STARTED 0x0005
  495. #define PXE_STATCODE_NOT_STARTED 0x0006
  496. #define PXE_STATCODE_NOT_SHUTDOWN 0x0007
  497. #define PXE_STATCODE_ALREADY_INITIALIZED 0x0008
  498. #define PXE_STATCODE_NOT_INITIALIZED 0x0009
  499. #define PXE_STATCODE_DEVICE_FAILURE 0x000A
  500. #define PXE_STATCODE_NVDATA_FAILURE 0x000B
  501. #define PXE_STATCODE_UNSUPPORTED 0x000C
  502. #define PXE_STATCODE_BUFFER_FULL 0x000D
  503. #define PXE_STATCODE_INVALID_PARAMETER 0x000E
  504. #define PXE_STATCODE_INVALID_UNDI 0x000F
  505. #define PXE_STATCODE_IPV4_NOT_SUPPORTED 0x0010
  506. #define PXE_STATCODE_IPV6_NOT_SUPPORTED 0x0011
  507. #define PXE_STATCODE_NOT_ENOUGH_MEMORY 0x0012
  508. #define PXE_STATCODE_NO_DATA 0x0013
  509. typedef PXE_UINT16 PXE_IFNUM;
  510. ///
  511. /// This interface number must be passed to the S/W UNDI Start command.
  512. ///
  513. #define PXE_IFNUM_START 0x0000
  514. ///
  515. /// This interface number is returned by the S/W UNDI Get State and
  516. /// Start commands if information in the CDB, CPB or DB is invalid.
  517. ///
  518. #define PXE_IFNUM_INVALID 0x0000
  519. typedef PXE_UINT16 PXE_CONTROL;
  520. ///
  521. /// Setting this flag directs the UNDI to queue this command for later
  522. /// execution if the UNDI is busy and it supports command queuing.
  523. /// If queuing is not supported, a PXE_STATCODE_INVALID_CONTROL error
  524. /// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL
  525. /// error is returned.
  526. ///
  527. #define PXE_CONTROL_QUEUE_IF_BUSY 0x0002
  528. ///
  529. /// These two bit values are used to determine if there are more UNDI
  530. /// CDB structures following this one. If the link bit is set, there
  531. /// must be a CDB structure following this one. Execution will start
  532. /// on the next CDB structure as soon as this one completes successfully.
  533. /// If an error is generated by this command, execution will stop.
  534. ///
  535. #define PXE_CONTROL_LINK 0x0001
  536. #define PXE_CONTROL_LAST_CDB_IN_LIST 0x0000
  537. typedef PXE_UINT8 PXE_FRAME_TYPE;
  538. #define PXE_FRAME_TYPE_NONE 0x00
  539. #define PXE_FRAME_TYPE_UNICAST 0x01
  540. #define PXE_FRAME_TYPE_BROADCAST 0x02
  541. #define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03
  542. #define PXE_FRAME_TYPE_PROMISCUOUS 0x04
  543. #define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05
  544. #define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST
  545. typedef PXE_UINT32 PXE_IPV4;
  546. typedef PXE_UINT32 PXE_IPV6[4];
  547. #define PXE_MAC_LENGTH 32
  548. typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];
  549. typedef PXE_UINT8 PXE_IFTYPE;
  550. typedef UINT16 PXE_MEDIA_PROTOCOL;
  551. ///
  552. /// This information is from the ARP section of RFC 1700.
  553. ///
  554. /// 1 Ethernet (10Mb) [JBP]
  555. /// 2 Experimental Ethernet (3Mb) [JBP]
  556. /// 3 Amateur Radio AX.25 [PXK]
  557. /// 4 Proteon ProNET Token Ring [JBP]
  558. /// 5 Chaos [GXP]
  559. /// 6 IEEE 802 Networks [JBP]
  560. /// 7 ARCNET [JBP]
  561. /// 8 Hyperchannel [JBP]
  562. /// 9 Lanstar [TU]
  563. /// 10 Autonet Short Address [MXB1]
  564. /// 11 LocalTalk [JKR1]
  565. /// 12 LocalNet (IBM* PCNet or SYTEK* LocalNET) [JXM]
  566. /// 13 Ultra link [RXD2]
  567. /// 14 SMDS [GXC1]
  568. /// 15 Frame Relay [AGM]
  569. /// 16 Asynchronous Transmission Mode (ATM) [JXB2]
  570. /// 17 HDLC [JBP]
  571. /// 18 Fibre Channel [Yakov Rekhter]
  572. /// 19 Asynchronous Transmission Mode (ATM) [Mark Laubach]
  573. /// 20 Serial Line [JBP]
  574. /// 21 Asynchronous Transmission Mode (ATM) [MXB1]
  575. ///
  576. /// * Other names and brands may be claimed as the property of others.
  577. ///
  578. #define PXE_IFTYPE_ETHERNET 0x01
  579. #define PXE_IFTYPE_TOKENRING 0x04
  580. #define PXE_IFTYPE_FIBRE_CHANNEL 0x12
  581. typedef struct s_pxe_hw_undi {
  582. PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE
  583. PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI)
  584. PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero
  585. PXE_UINT8 Rev; ///< PXE_ROMID_REV
  586. PXE_UINT8 IFcnt; ///< physical connector count
  587. PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER
  588. PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER
  589. PXE_UINT16 reserved; ///< zero, not used
  590. PXE_UINT32 Implementation; ///< implementation flags
  591. ///< reserved ///< vendor use
  592. ///< UINT32 Status; ///< status port
  593. ///< UINT32 Command; ///< command port
  594. ///< UINT64 CDBaddr; ///< CDB address port
  595. ///<
  596. } PXE_HW_UNDI;
  597. ///
  598. /// Status port bit definitions
  599. ///
  600. ///
  601. /// UNDI operation state
  602. ///
  603. #define PXE_HWSTAT_STATE_MASK 0xC0000000
  604. #define PXE_HWSTAT_BUSY 0xC0000000
  605. #define PXE_HWSTAT_INITIALIZED 0x80000000
  606. #define PXE_HWSTAT_STARTED 0x40000000
  607. #define PXE_HWSTAT_STOPPED 0x00000000
  608. ///
  609. /// If set, last command failed
  610. ///
  611. #define PXE_HWSTAT_COMMAND_FAILED 0x20000000
  612. ///
  613. /// If set, identifies enabled receive filters
  614. ///
  615. #define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000
  616. #define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800
  617. #define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400
  618. #define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200
  619. #define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100
  620. ///
  621. /// If set, identifies enabled external interrupts
  622. ///
  623. #define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080
  624. #define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040
  625. #define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020
  626. #define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010
  627. ///
  628. /// If set, identifies pending interrupts
  629. ///
  630. #define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008
  631. #define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004
  632. #define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002
  633. #define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001
  634. ///
  635. /// Command port definitions
  636. ///
  637. ///
  638. /// If set, CDB identified in CDBaddr port is given to UNDI.
  639. /// If not set, other bits in this word will be processed.
  640. ///
  641. #define PXE_HWCMD_ISSUE_COMMAND 0x80000000
  642. #define PXE_HWCMD_INTS_AND_FILTS 0x00000000
  643. ///
  644. /// Use these to enable/disable receive filters.
  645. ///
  646. #define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000
  647. #define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800
  648. #define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400
  649. #define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200
  650. #define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100
  651. ///
  652. /// Use these to enable/disable external interrupts
  653. ///
  654. #define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080
  655. #define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040
  656. #define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020
  657. #define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010
  658. ///
  659. /// Use these to clear pending external interrupts
  660. ///
  661. #define PXE_HWCMD_CLEAR_SOFTWARE_INT 0x00000008
  662. #define PXE_HWCMD_CLEAR_TX_COMPLETE_INT 0x00000004
  663. #define PXE_HWCMD_CLEAR_PACKET_RX_INT 0x00000002
  664. #define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT 0x00000001
  665. typedef struct s_pxe_sw_undi {
  666. PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE
  667. PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI)
  668. PXE_UINT8 Fudge; ///< makes 8-bit cksum zero
  669. PXE_UINT8 Rev; ///< PXE_ROMID_REV
  670. PXE_UINT8 IFcnt; ///< physical connector count
  671. PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER
  672. PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER
  673. PXE_UINT16 reserved1; ///< zero, not used
  674. PXE_UINT32 Implementation; ///< Implementation flags
  675. PXE_UINT64 EntryPoint; ///< API entry point
  676. PXE_UINT8 reserved2[3]; ///< zero, not used
  677. PXE_UINT8 BusCnt; ///< number of bustypes supported
  678. PXE_UINT32 BusType[1]; ///< list of supported bustypes
  679. } PXE_SW_UNDI;
  680. typedef union u_pxe_undi {
  681. PXE_HW_UNDI hw;
  682. PXE_SW_UNDI sw;
  683. } PXE_UNDI;
  684. ///
  685. /// Signature of !PXE structure
  686. ///
  687. #define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E')
  688. ///
  689. /// !PXE structure format revision
  690. ///
  691. #define PXE_ROMID_REV 0x02
  692. ///
  693. /// UNDI command interface revision. These are the values that get sent
  694. /// in option 94 (Client Network Interface Identifier) in the DHCP Discover
  695. /// and PXE Boot Server Request packets.
  696. ///
  697. #define PXE_ROMID_MAJORVER 0x03
  698. #define PXE_ROMID_MINORVER 0x01
  699. ///
  700. /// Implementation flags
  701. ///
  702. #define PXE_ROMID_IMP_HW_UNDI 0x80000000
  703. #define PXE_ROMID_IMP_SW_VIRT_ADDR 0x40000000
  704. #define PXE_ROMID_IMP_64BIT_DEVICE 0x00010000
  705. #define PXE_ROMID_IMP_FRAG_SUPPORTED 0x00008000
  706. #define PXE_ROMID_IMP_CMD_LINK_SUPPORTED 0x00004000
  707. #define PXE_ROMID_IMP_CMD_QUEUE_SUPPORTED 0x00002000
  708. #define PXE_ROMID_IMP_MULTI_FRAME_SUPPORTED 0x00001000
  709. #define PXE_ROMID_IMP_NVDATA_SUPPORT_MASK 0x00000C00
  710. #define PXE_ROMID_IMP_NVDATA_BULK_WRITABLE 0x00000C00
  711. #define PXE_ROMID_IMP_NVDATA_SPARSE_WRITABLE 0x00000800
  712. #define PXE_ROMID_IMP_NVDATA_READ_ONLY 0x00000400
  713. #define PXE_ROMID_IMP_NVDATA_NOT_AVAILABLE 0x00000000
  714. #define PXE_ROMID_IMP_STATISTICS_SUPPORTED 0x00000200
  715. #define PXE_ROMID_IMP_STATION_ADDR_SETTABLE 0x00000100
  716. #define PXE_ROMID_IMP_PROMISCUOUS_MULTICAST_RX_SUPPORTED 0x00000080
  717. #define PXE_ROMID_IMP_PROMISCUOUS_RX_SUPPORTED 0x00000040
  718. #define PXE_ROMID_IMP_BROADCAST_RX_SUPPORTED 0x00000020
  719. #define PXE_ROMID_IMP_FILTERED_MULTICAST_RX_SUPPORTED 0x00000010
  720. #define PXE_ROMID_IMP_SOFTWARE_INT_SUPPORTED 0x00000008
  721. #define PXE_ROMID_IMP_TX_COMPLETE_INT_SUPPORTED 0x00000004
  722. #define PXE_ROMID_IMP_PACKET_RX_INT_SUPPORTED 0x00000002
  723. #define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED 0x00000001
  724. typedef struct s_pxe_cdb {
  725. PXE_OPCODE OpCode;
  726. PXE_OPFLAGS OpFlags;
  727. PXE_UINT16 CPBsize;
  728. PXE_UINT16 DBsize;
  729. PXE_UINT64 CPBaddr;
  730. PXE_UINT64 DBaddr;
  731. PXE_STATCODE StatCode;
  732. PXE_STATFLAGS StatFlags;
  733. PXE_UINT16 IFnum;
  734. PXE_CONTROL Control;
  735. } PXE_CDB;
  736. typedef union u_pxe_ip_addr {
  737. PXE_IPV6 IPv6;
  738. PXE_IPV4 IPv4;
  739. } PXE_IP_ADDR;
  740. typedef union pxe_device {
  741. ///
  742. /// PCI and PC Card NICs are both identified using bus, device
  743. /// and function numbers. For PC Card, this may require PC
  744. /// Card services to be loaded in the BIOS or preboot
  745. /// environment.
  746. ///
  747. struct {
  748. ///
  749. /// See S/W UNDI ROMID structure definition for PCI and
  750. /// PCC BusType definitions.
  751. ///
  752. PXE_UINT32 BusType;
  753. ///
  754. /// Bus, device & function numbers that locate this device.
  755. ///
  756. PXE_UINT16 Bus;
  757. PXE_UINT8 Device;
  758. PXE_UINT8 Function;
  759. }
  760. PCI, PCC;
  761. } PXE_DEVICE;
  762. ///
  763. /// cpb and db definitions
  764. ///
  765. #define MAX_PCI_CONFIG_LEN 64 ///< # of dwords
  766. #define MAX_EEPROM_LEN 128 ///< # of dwords
  767. #define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done
  768. #define MAX_MCAST_ADDRESS_CNT 8
  769. typedef struct s_pxe_cpb_start_30 {
  770. ///
  771. /// PXE_VOID Delay(UINTN microseconds);
  772. ///
  773. /// UNDI will never request a delay smaller than 10 microseconds
  774. /// and will always request delays in increments of 10 microseconds.
  775. /// The Delay() CallBack routine must delay between n and n + 10
  776. /// microseconds before returning control to the UNDI.
  777. ///
  778. /// This field cannot be set to zero.
  779. ///
  780. UINT64 Delay;
  781. ///
  782. /// PXE_VOID Block(UINT32 enable);
  783. ///
  784. /// UNDI may need to block multi-threaded/multi-processor access to
  785. /// critical code sections when programming or accessing the network
  786. /// device. To this end, a blocking service is needed by the UNDI.
  787. /// When UNDI needs a block, it will call Block() passing a non-zero
  788. /// value. When UNDI no longer needs a block, it will call Block()
  789. /// with a zero value. When called, if the Block() is already enabled,
  790. /// do not return control to the UNDI until the previous Block() is
  791. /// disabled.
  792. ///
  793. /// This field cannot be set to zero.
  794. ///
  795. UINT64 Block;
  796. ///
  797. /// PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr);
  798. ///
  799. /// UNDI will pass the virtual address of a buffer and the virtual
  800. /// address of a 64-bit physical buffer. Convert the virtual address
  801. /// to a physical address and write the result to the physical address
  802. /// buffer. If virtual and physical addresses are the same, just
  803. /// copy the virtual address to the physical address buffer.
  804. ///
  805. /// This field can be set to zero if virtual and physical addresses
  806. /// are equal.
  807. ///
  808. UINT64 Virt2Phys;
  809. ///
  810. /// PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port,
  811. /// UINT64 buf_addr);
  812. ///
  813. /// UNDI will read or write the device io space using this call back
  814. /// function. It passes the number of bytes as the len parameter and it
  815. /// will be either 1,2,4 or 8.
  816. ///
  817. /// This field can not be set to zero.
  818. ///
  819. UINT64 Mem_IO;
  820. } PXE_CPB_START_30;
  821. typedef struct s_pxe_cpb_start_31 {
  822. ///
  823. /// PXE_VOID Delay(UINT64 UnqId, UINTN microseconds);
  824. ///
  825. /// UNDI will never request a delay smaller than 10 microseconds
  826. /// and will always request delays in increments of 10 microseconds.
  827. /// The Delay() CallBack routine must delay between n and n + 10
  828. /// microseconds before returning control to the UNDI.
  829. ///
  830. /// This field cannot be set to zero.
  831. ///
  832. UINT64 Delay;
  833. ///
  834. /// PXE_VOID Block(UINT64 unq_id, UINT32 enable);
  835. ///
  836. /// UNDI may need to block multi-threaded/multi-processor access to
  837. /// critical code sections when programming or accessing the network
  838. /// device. To this end, a blocking service is needed by the UNDI.
  839. /// When UNDI needs a block, it will call Block() passing a non-zero
  840. /// value. When UNDI no longer needs a block, it will call Block()
  841. /// with a zero value. When called, if the Block() is already enabled,
  842. /// do not return control to the UNDI until the previous Block() is
  843. /// disabled.
  844. ///
  845. /// This field cannot be set to zero.
  846. ///
  847. UINT64 Block;
  848. ///
  849. /// PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr);
  850. ///
  851. /// UNDI will pass the virtual address of a buffer and the virtual
  852. /// address of a 64-bit physical buffer. Convert the virtual address
  853. /// to a physical address and write the result to the physical address
  854. /// buffer. If virtual and physical addresses are the same, just
  855. /// copy the virtual address to the physical address buffer.
  856. ///
  857. /// This field can be set to zero if virtual and physical addresses
  858. /// are equal.
  859. ///
  860. UINT64 Virt2Phys;
  861. ///
  862. /// PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port,
  863. /// UINT64 buf_addr);
  864. ///
  865. /// UNDI will read or write the device io space using this call back
  866. /// function. It passes the number of bytes as the len parameter and it
  867. /// will be either 1,2,4 or 8.
  868. ///
  869. /// This field can not be set to zero.
  870. ///
  871. UINT64 Mem_IO;
  872. ///
  873. /// PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,
  874. /// UINT32 Direction, UINT64 mapped_addr);
  875. ///
  876. /// UNDI will pass the virtual address of a buffer, direction of the data
  877. /// flow from/to the mapped buffer (the constants are defined below)
  878. /// and a place holder (pointer) for the mapped address.
  879. /// This call will Map the given address to a physical DMA address and write
  880. /// the result to the mapped_addr pointer. If there is no need to
  881. /// map the given address to a lower address (i.e. the given address is
  882. /// associated with a physical address that is already compatible to be
  883. /// used with the DMA, it converts the given virtual address to it's
  884. /// physical address and write that in the mapped address pointer.
  885. ///
  886. /// This field can be set to zero if there is no mapping service available
  887. ///
  888. UINT64 Map_Mem;
  889. ///
  890. /// PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,
  891. /// UINT32 Direction, UINT64 mapped_addr);
  892. ///
  893. /// UNDI will pass the virtual and mapped addresses of a buffer
  894. /// This call will un map the given address
  895. ///
  896. /// This field can be set to zero if there is no unmapping service available
  897. ///
  898. UINT64 UnMap_Mem;
  899. ///
  900. /// PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual,
  901. /// UINT32 size, UINT32 Direction, UINT64 mapped_addr);
  902. ///
  903. /// UNDI will pass the virtual and mapped addresses of a buffer
  904. /// This call will synchronize the contents of both the virtual and mapped
  905. /// buffers for the given Direction.
  906. ///
  907. /// This field can be set to zero if there is no service available
  908. ///
  909. UINT64 Sync_Mem;
  910. ///
  911. /// protocol driver can provide anything for this Unique_ID, UNDI remembers
  912. /// that as just a 64bit value assocaited to the interface specified by
  913. /// the ifnum and gives it back as a parameter to all the call-back routines
  914. /// when calling for that interface!
  915. ///
  916. UINT64 Unique_ID;
  917. } PXE_CPB_START_31;
  918. #define TO_AND_FROM_DEVICE 0
  919. #define FROM_DEVICE 1
  920. #define TO_DEVICE 2
  921. #define PXE_DELAY_MILLISECOND 1000
  922. #define PXE_DELAY_SECOND 1000000
  923. #define PXE_IO_READ 0
  924. #define PXE_IO_WRITE 1
  925. #define PXE_MEM_READ 2
  926. #define PXE_MEM_WRITE 4
  927. typedef struct s_pxe_db_get_init_info {
  928. ///
  929. /// Minimum length of locked memory buffer that must be given to
  930. /// the Initialize command. Giving UNDI more memory will generally
  931. /// give better performance.
  932. ///
  933. /// If MemoryRequired is zero, the UNDI does not need and will not
  934. /// use system memory to receive and transmit packets.
  935. ///
  936. PXE_UINT32 MemoryRequired;
  937. ///
  938. /// Maximum frame data length for Tx/Rx excluding the media header.
  939. ///
  940. PXE_UINT32 FrameDataLen;
  941. ///
  942. /// Supported link speeds are in units of mega bits. Common ethernet
  943. /// values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero
  944. /// filled.
  945. ///
  946. PXE_UINT32 LinkSpeeds[4];
  947. ///
  948. /// Number of non-volatile storage items.
  949. ///
  950. PXE_UINT32 NvCount;
  951. ///
  952. /// Width of non-volatile storage item in bytes. 0, 1, 2 or 4
  953. ///
  954. PXE_UINT16 NvWidth;
  955. ///
  956. /// Media header length. This is the typical media header length for
  957. /// this UNDI. This information is needed when allocating receive
  958. /// and transmit buffers.
  959. ///
  960. PXE_UINT16 MediaHeaderLen;
  961. ///
  962. /// Number of bytes in the NIC hardware (MAC) address.
  963. ///
  964. PXE_UINT16 HWaddrLen;
  965. ///
  966. /// Maximum number of multicast MAC addresses in the multicast
  967. /// MAC address filter list.
  968. ///
  969. PXE_UINT16 MCastFilterCnt;
  970. ///
  971. /// Default number and size of transmit and receive buffers that will
  972. /// be allocated by the UNDI. If MemoryRequired is non-zero, this
  973. /// allocation will come out of the memory buffer given to the Initialize
  974. /// command. If MemoryRequired is zero, this allocation will come out of
  975. /// memory on the NIC.
  976. ///
  977. PXE_UINT16 TxBufCnt;
  978. PXE_UINT16 TxBufSize;
  979. PXE_UINT16 RxBufCnt;
  980. PXE_UINT16 RxBufSize;
  981. ///
  982. /// Hardware interface types defined in the Assigned Numbers RFC
  983. /// and used in DHCP and ARP packets.
  984. /// See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros.
  985. ///
  986. PXE_UINT8 IFtype;
  987. ///
  988. /// Supported duplex. See PXE_DUPLEX_xxxxx #defines below.
  989. ///
  990. PXE_UINT8 SupportedDuplexModes;
  991. ///
  992. /// Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below.
  993. ///
  994. PXE_UINT8 SupportedLoopBackModes;
  995. } PXE_DB_GET_INIT_INFO;
  996. #define PXE_MAX_TXRX_UNIT_ETHER 1500
  997. #define PXE_HWADDR_LEN_ETHER 0x0006
  998. #define PXE_MAC_HEADER_LEN_ETHER 0x000E
  999. #define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1
  1000. #define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2
  1001. #define PXE_LOOPBACK_INTERNAL_SUPPORTED 1
  1002. #define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2
  1003. typedef struct s_pxe_pci_config_info {
  1004. ///
  1005. /// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
  1006. /// For PCI bus devices, this field is set to PXE_BUSTYPE_PCI.
  1007. ///
  1008. UINT32 BusType;
  1009. ///
  1010. /// This identifies the PCI network device that this UNDI interface
  1011. /// is bound to.
  1012. ///
  1013. UINT16 Bus;
  1014. UINT8 Device;
  1015. UINT8 Function;
  1016. ///
  1017. /// This is a copy of the PCI configuration space for this
  1018. /// network device.
  1019. ///
  1020. union {
  1021. UINT8 Byte[256];
  1022. UINT16 Word[128];
  1023. UINT32 Dword[64];
  1024. } Config;
  1025. } PXE_PCI_CONFIG_INFO;
  1026. typedef struct s_pxe_pcc_config_info {
  1027. ///
  1028. /// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
  1029. /// For PCC bus devices, this field is set to PXE_BUSTYPE_PCC.
  1030. ///
  1031. PXE_UINT32 BusType;
  1032. ///
  1033. /// This identifies the PCC network device that this UNDI interface
  1034. /// is bound to.
  1035. ///
  1036. PXE_UINT16 Bus;
  1037. PXE_UINT8 Device;
  1038. PXE_UINT8 Function;
  1039. ///
  1040. /// This is a copy of the PCC configuration space for this
  1041. /// network device.
  1042. ///
  1043. union {
  1044. PXE_UINT8 Byte[256];
  1045. PXE_UINT16 Word[128];
  1046. PXE_UINT32 Dword[64];
  1047. } Config;
  1048. } PXE_PCC_CONFIG_INFO;
  1049. typedef union u_pxe_db_get_config_info {
  1050. PXE_PCI_CONFIG_INFO pci;
  1051. PXE_PCC_CONFIG_INFO pcc;
  1052. } PXE_DB_GET_CONFIG_INFO;
  1053. typedef struct s_pxe_cpb_initialize {
  1054. ///
  1055. /// Address of first (lowest) byte of the memory buffer. This buffer must
  1056. /// be in contiguous physical memory and cannot be swapped out. The UNDI
  1057. /// will be using this for transmit and receive buffering.
  1058. ///
  1059. PXE_UINT64 MemoryAddr;
  1060. ///
  1061. /// MemoryLength must be greater than or equal to MemoryRequired
  1062. /// returned by the Get Init Info command.
  1063. ///
  1064. PXE_UINT32 MemoryLength;
  1065. ///
  1066. /// Desired link speed in Mbit/sec. Common ethernet values are 10, 100
  1067. /// and 1000. Setting a value of zero will auto-detect and/or use the
  1068. /// default link speed (operation depends on UNDI/NIC functionality).
  1069. ///
  1070. PXE_UINT32 LinkSpeed;
  1071. ///
  1072. /// Suggested number and size of receive and transmit buffers to
  1073. /// allocate. If MemoryAddr and MemoryLength are non-zero, this
  1074. /// allocation comes out of the supplied memory buffer. If MemoryAddr
  1075. /// and MemoryLength are zero, this allocation comes out of memory
  1076. /// on the NIC.
  1077. ///
  1078. /// If these fields are set to zero, the UNDI will allocate buffer
  1079. /// counts and sizes as it sees fit.
  1080. ///
  1081. PXE_UINT16 TxBufCnt;
  1082. PXE_UINT16 TxBufSize;
  1083. PXE_UINT16 RxBufCnt;
  1084. PXE_UINT16 RxBufSize;
  1085. ///
  1086. /// The following configuration parameters are optional and must be zero
  1087. /// to use the default values.
  1088. ///
  1089. PXE_UINT8 DuplexMode;
  1090. PXE_UINT8 LoopBackMode;
  1091. } PXE_CPB_INITIALIZE;
  1092. #define PXE_DUPLEX_DEFAULT 0x00
  1093. #define PXE_FORCE_FULL_DUPLEX 0x01
  1094. #define PXE_ENABLE_FULL_DUPLEX 0x02
  1095. #define PXE_FORCE_HALF_DUPLEX 0x04
  1096. #define PXE_DISABLE_FULL_DUPLEX 0x08
  1097. #define LOOPBACK_NORMAL 0
  1098. #define LOOPBACK_INTERNAL 1
  1099. #define LOOPBACK_EXTERNAL 2
  1100. typedef struct s_pxe_db_initialize {
  1101. ///
  1102. /// Actual amount of memory used from the supplied memory buffer. This
  1103. /// may be less that the amount of memory suppllied and may be zero if
  1104. /// the UNDI and network device do not use external memory buffers.
  1105. ///
  1106. /// Memory used by the UNDI and network device is allocated from the
  1107. /// lowest memory buffer address.
  1108. ///
  1109. PXE_UINT32 MemoryUsed;
  1110. ///
  1111. /// Actual number and size of receive and transmit buffers that were
  1112. /// allocated.
  1113. ///
  1114. PXE_UINT16 TxBufCnt;
  1115. PXE_UINT16 TxBufSize;
  1116. PXE_UINT16 RxBufCnt;
  1117. PXE_UINT16 RxBufSize;
  1118. } PXE_DB_INITIALIZE;
  1119. typedef struct s_pxe_cpb_receive_filters {
  1120. ///
  1121. /// List of multicast MAC addresses. This list, if present, will
  1122. /// replace the existing multicast MAC address filter list.
  1123. ///
  1124. PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
  1125. } PXE_CPB_RECEIVE_FILTERS;
  1126. typedef struct s_pxe_db_receive_filters {
  1127. ///
  1128. /// Filtered multicast MAC address list.
  1129. ///
  1130. PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
  1131. } PXE_DB_RECEIVE_FILTERS;
  1132. typedef struct s_pxe_cpb_station_address {
  1133. ///
  1134. /// If supplied and supported, the current station MAC address
  1135. /// will be changed.
  1136. ///
  1137. PXE_MAC_ADDR StationAddr;
  1138. } PXE_CPB_STATION_ADDRESS;
  1139. typedef struct s_pxe_dpb_station_address {
  1140. ///
  1141. /// Current station MAC address.
  1142. ///
  1143. PXE_MAC_ADDR StationAddr;
  1144. ///
  1145. /// Station broadcast MAC address.
  1146. ///
  1147. PXE_MAC_ADDR BroadcastAddr;
  1148. ///
  1149. /// Permanent station MAC address.
  1150. ///
  1151. PXE_MAC_ADDR PermanentAddr;
  1152. } PXE_DB_STATION_ADDRESS;
  1153. typedef struct s_pxe_db_statistics {
  1154. ///
  1155. /// Bit field identifying what statistic data is collected by the
  1156. /// UNDI/NIC.
  1157. /// If bit 0x00 is set, Data[0x00] is collected.
  1158. /// If bit 0x01 is set, Data[0x01] is collected.
  1159. /// If bit 0x20 is set, Data[0x20] is collected.
  1160. /// If bit 0x21 is set, Data[0x21] is collected.
  1161. /// Etc.
  1162. ///
  1163. PXE_UINT64 Supported;
  1164. ///
  1165. /// Statistic data.
  1166. ///
  1167. PXE_UINT64 Data[64];
  1168. } PXE_DB_STATISTICS;
  1169. ///
  1170. /// Total number of frames received. Includes frames with errors and
  1171. /// dropped frames.
  1172. ///
  1173. #define PXE_STATISTICS_RX_TOTAL_FRAMES 0x00
  1174. ///
  1175. /// Number of valid frames received and copied into receive buffers.
  1176. ///
  1177. #define PXE_STATISTICS_RX_GOOD_FRAMES 0x01
  1178. ///
  1179. /// Number of frames below the minimum length for the media.
  1180. /// This would be <64 for ethernet.
  1181. ///
  1182. #define PXE_STATISTICS_RX_UNDERSIZE_FRAMES 0x02
  1183. ///
  1184. /// Number of frames longer than the maxminum length for the
  1185. /// media. This would be >1500 for ethernet.
  1186. ///
  1187. #define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03
  1188. ///
  1189. /// Valid frames that were dropped because receive buffers were full.
  1190. ///
  1191. #define PXE_STATISTICS_RX_DROPPED_FRAMES 0x04
  1192. ///
  1193. /// Number of valid unicast frames received and not dropped.
  1194. ///
  1195. #define PXE_STATISTICS_RX_UNICAST_FRAMES 0x05
  1196. ///
  1197. /// Number of valid broadcast frames received and not dropped.
  1198. ///
  1199. #define PXE_STATISTICS_RX_BROADCAST_FRAMES 0x06
  1200. ///
  1201. /// Number of valid mutlicast frames received and not dropped.
  1202. ///
  1203. #define PXE_STATISTICS_RX_MULTICAST_FRAMES 0x07
  1204. ///
  1205. /// Number of frames w/ CRC or alignment errors.
  1206. ///
  1207. #define PXE_STATISTICS_RX_CRC_ERROR_FRAMES 0x08
  1208. ///
  1209. /// Total number of bytes received. Includes frames with errors
  1210. /// and dropped frames.
  1211. ///
  1212. #define PXE_STATISTICS_RX_TOTAL_BYTES 0x09
  1213. ///
  1214. /// Transmit statistics.
  1215. ///
  1216. #define PXE_STATISTICS_TX_TOTAL_FRAMES 0x0A
  1217. #define PXE_STATISTICS_TX_GOOD_FRAMES 0x0B
  1218. #define PXE_STATISTICS_TX_UNDERSIZE_FRAMES 0x0C
  1219. #define PXE_STATISTICS_TX_OVERSIZE_FRAMES 0x0D
  1220. #define PXE_STATISTICS_TX_DROPPED_FRAMES 0x0E
  1221. #define PXE_STATISTICS_TX_UNICAST_FRAMES 0x0F
  1222. #define PXE_STATISTICS_TX_BROADCAST_FRAMES 0x10
  1223. #define PXE_STATISTICS_TX_MULTICAST_FRAMES 0x11
  1224. #define PXE_STATISTICS_TX_CRC_ERROR_FRAMES 0x12
  1225. #define PXE_STATISTICS_TX_TOTAL_BYTES 0x13
  1226. ///
  1227. /// Number of collisions detection on this subnet.
  1228. ///
  1229. #define PXE_STATISTICS_COLLISIONS 0x14
  1230. ///
  1231. /// Number of frames destined for unsupported protocol.
  1232. ///
  1233. #define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15
  1234. typedef struct s_pxe_cpb_mcast_ip_to_mac {
  1235. ///
  1236. /// Multicast IP address to be converted to multicast MAC address.
  1237. ///
  1238. PXE_IP_ADDR IP;
  1239. } PXE_CPB_MCAST_IP_TO_MAC;
  1240. typedef struct s_pxe_db_mcast_ip_to_mac {
  1241. ///
  1242. /// Multicast MAC address.
  1243. ///
  1244. PXE_MAC_ADDR MAC;
  1245. } PXE_DB_MCAST_IP_TO_MAC;
  1246. typedef struct s_pxe_cpb_nvdata_sparse {
  1247. ///
  1248. /// NvData item list. Only items in this list will be updated.
  1249. ///
  1250. struct {
  1251. ///
  1252. /// Non-volatile storage address to be changed.
  1253. ///
  1254. PXE_UINT32 Addr;
  1255. ///
  1256. /// Data item to write into above storage address.
  1257. ///
  1258. union {
  1259. PXE_UINT8 Byte;
  1260. PXE_UINT16 Word;
  1261. PXE_UINT32 Dword;
  1262. } Data;
  1263. } Item[MAX_EEPROM_LEN];
  1264. } PXE_CPB_NVDATA_SPARSE;
  1265. ///
  1266. /// When using bulk update, the size of the CPB structure must be
  1267. /// the same size as the non-volatile NIC storage.
  1268. ///
  1269. typedef union u_pxe_cpb_nvdata_bulk {
  1270. ///
  1271. /// Array of byte-wide data items.
  1272. ///
  1273. PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
  1274. ///
  1275. /// Array of word-wide data items.
  1276. ///
  1277. PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
  1278. ///
  1279. /// Array of dword-wide data items.
  1280. ///
  1281. PXE_UINT32 Dword[MAX_EEPROM_LEN];
  1282. } PXE_CPB_NVDATA_BULK;
  1283. typedef struct s_pxe_db_nvdata {
  1284. ///
  1285. /// Arrays of data items from non-volatile storage.
  1286. ///
  1287. union {
  1288. ///
  1289. /// Array of byte-wide data items.
  1290. ///
  1291. PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
  1292. ///
  1293. /// Array of word-wide data items.
  1294. ///
  1295. PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
  1296. ///
  1297. /// Array of dword-wide data items.
  1298. ///
  1299. PXE_UINT32 Dword[MAX_EEPROM_LEN];
  1300. } Data;
  1301. } PXE_DB_NVDATA;
  1302. typedef struct s_pxe_db_get_status {
  1303. ///
  1304. /// Length of next receive frame (header + data). If this is zero,
  1305. /// there is no next receive frame available.
  1306. ///
  1307. PXE_UINT32 RxFrameLen;
  1308. ///
  1309. /// Reserved, set to zero.
  1310. ///
  1311. PXE_UINT32 reserved;
  1312. ///
  1313. /// Addresses of transmitted buffers that need to be recycled.
  1314. ///
  1315. PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];
  1316. } PXE_DB_GET_STATUS;
  1317. typedef struct s_pxe_cpb_fill_header {
  1318. ///
  1319. /// Source and destination MAC addresses. These will be copied into
  1320. /// the media header without doing byte swapping.
  1321. ///
  1322. PXE_MAC_ADDR SrcAddr;
  1323. PXE_MAC_ADDR DestAddr;
  1324. ///
  1325. /// Address of first byte of media header. The first byte of packet data
  1326. /// follows the last byte of the media header.
  1327. ///
  1328. PXE_UINT64 MediaHeader;
  1329. ///
  1330. /// Length of packet data in bytes (not including the media header).
  1331. ///
  1332. PXE_UINT32 PacketLen;
  1333. ///
  1334. /// Protocol type. This will be copied into the media header without
  1335. /// doing byte swapping. Protocol type numbers can be obtained from
  1336. /// the Assigned Numbers RFC 1700.
  1337. ///
  1338. PXE_UINT16 Protocol;
  1339. ///
  1340. /// Length of the media header in bytes.
  1341. ///
  1342. PXE_UINT16 MediaHeaderLen;
  1343. } PXE_CPB_FILL_HEADER;
  1344. #define PXE_PROTOCOL_ETHERNET_IP 0x0800
  1345. #define PXE_PROTOCOL_ETHERNET_ARP 0x0806
  1346. #define MAX_XMIT_FRAGMENTS 16
  1347. typedef struct s_pxe_cpb_fill_header_fragmented {
  1348. ///
  1349. /// Source and destination MAC addresses. These will be copied into
  1350. /// the media header without doing byte swapping.
  1351. ///
  1352. PXE_MAC_ADDR SrcAddr;
  1353. PXE_MAC_ADDR DestAddr;
  1354. ///
  1355. /// Length of packet data in bytes (not including the media header).
  1356. ///
  1357. PXE_UINT32 PacketLen;
  1358. ///
  1359. /// Protocol type. This will be copied into the media header without
  1360. /// doing byte swapping. Protocol type numbers can be obtained from
  1361. /// the Assigned Numbers RFC 1700.
  1362. ///
  1363. PXE_MEDIA_PROTOCOL Protocol;
  1364. ///
  1365. /// Length of the media header in bytes.
  1366. ///
  1367. PXE_UINT16 MediaHeaderLen;
  1368. ///
  1369. /// Number of packet fragment descriptors.
  1370. ///
  1371. PXE_UINT16 FragCnt;
  1372. ///
  1373. /// Reserved, must be set to zero.
  1374. ///
  1375. PXE_UINT16 reserved;
  1376. ///
  1377. /// Array of packet fragment descriptors. The first byte of the media
  1378. /// header is the first byte of the first fragment.
  1379. ///
  1380. struct {
  1381. ///
  1382. /// Address of this packet fragment.
  1383. ///
  1384. PXE_UINT64 FragAddr;
  1385. ///
  1386. /// Length of this packet fragment.
  1387. ///
  1388. PXE_UINT32 FragLen;
  1389. ///
  1390. /// Reserved, must be set to zero.
  1391. ///
  1392. PXE_UINT32 reserved;
  1393. } FragDesc[MAX_XMIT_FRAGMENTS];
  1394. }
  1395. PXE_CPB_FILL_HEADER_FRAGMENTED;
  1396. typedef struct s_pxe_cpb_transmit {
  1397. ///
  1398. /// Address of first byte of frame buffer. This is also the first byte
  1399. /// of the media header.
  1400. ///
  1401. PXE_UINT64 FrameAddr;
  1402. ///
  1403. /// Length of the data portion of the frame buffer in bytes. Do not
  1404. /// include the length of the media header.
  1405. ///
  1406. PXE_UINT32 DataLen;
  1407. ///
  1408. /// Length of the media header in bytes.
  1409. ///
  1410. PXE_UINT16 MediaheaderLen;
  1411. ///
  1412. /// Reserved, must be zero.
  1413. ///
  1414. PXE_UINT16 reserved;
  1415. } PXE_CPB_TRANSMIT;
  1416. typedef struct s_pxe_cpb_transmit_fragments {
  1417. ///
  1418. /// Length of packet data in bytes (not including the media header).
  1419. ///
  1420. PXE_UINT32 FrameLen;
  1421. ///
  1422. /// Length of the media header in bytes.
  1423. ///
  1424. PXE_UINT16 MediaheaderLen;
  1425. ///
  1426. /// Number of packet fragment descriptors.
  1427. ///
  1428. PXE_UINT16 FragCnt;
  1429. ///
  1430. /// Array of frame fragment descriptors. The first byte of the first
  1431. /// fragment is also the first byte of the media header.
  1432. ///
  1433. struct {
  1434. ///
  1435. /// Address of this frame fragment.
  1436. ///
  1437. PXE_UINT64 FragAddr;
  1438. ///
  1439. /// Length of this frame fragment.
  1440. ///
  1441. PXE_UINT32 FragLen;
  1442. ///
  1443. /// Reserved, must be set to zero.
  1444. ///
  1445. PXE_UINT32 reserved;
  1446. } FragDesc[MAX_XMIT_FRAGMENTS];
  1447. }
  1448. PXE_CPB_TRANSMIT_FRAGMENTS;
  1449. typedef struct s_pxe_cpb_receive {
  1450. ///
  1451. /// Address of first byte of receive buffer. This is also the first byte
  1452. /// of the frame header.
  1453. ///
  1454. PXE_UINT64 BufferAddr;
  1455. ///
  1456. /// Length of receive buffer. This must be large enough to hold the
  1457. /// received frame (media header + data). If the length of smaller than
  1458. /// the received frame, data will be lost.
  1459. ///
  1460. PXE_UINT32 BufferLen;
  1461. ///
  1462. /// Reserved, must be set to zero.
  1463. ///
  1464. PXE_UINT32 reserved;
  1465. } PXE_CPB_RECEIVE;
  1466. typedef struct s_pxe_db_receive {
  1467. ///
  1468. /// Source and destination MAC addresses from media header.
  1469. ///
  1470. PXE_MAC_ADDR SrcAddr;
  1471. PXE_MAC_ADDR DestAddr;
  1472. ///
  1473. /// Length of received frame. May be larger than receive buffer size.
  1474. /// The receive buffer will not be overwritten. This is how to tell
  1475. /// if data was lost because the receive buffer was too small.
  1476. ///
  1477. PXE_UINT32 FrameLen;
  1478. ///
  1479. /// Protocol type from media header.
  1480. ///
  1481. PXE_MEDIA_PROTOCOL Protocol;
  1482. ///
  1483. /// Length of media header in received frame.
  1484. ///
  1485. PXE_UINT16 MediaHeaderLen;
  1486. ///
  1487. /// Type of receive frame.
  1488. ///
  1489. PXE_FRAME_TYPE Type;
  1490. ///
  1491. /// Reserved, must be zero.
  1492. ///
  1493. PXE_UINT8 reserved[7];
  1494. } PXE_DB_RECEIVE;
  1495. #pragma pack()
  1496. #endif