Leaked source code of windows server 2003
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.

2111 lines
51 KiB

  1. /*++ BUILD Version: 0010 // Increment this if a change has global effects
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. arc.h
  5. Abstract:
  6. This header file defines the ARC system firmware interface and the
  7. NT structures that are dependent on ARC types.
  8. Author:
  9. David N. Cutler (davec) 18-May-1991
  10. Revision History:
  11. --*/
  12. #ifndef _ARC_
  13. #define _ARC_
  14. #include "profiles.h"
  15. //
  16. // Define console input and console output file ids.
  17. //
  18. #define ARC_CONSOLE_INPUT 0
  19. #define ARC_CONSOLE_OUTPUT 1
  20. //
  21. // Define ARC_STATUS type.
  22. //
  23. typedef ULONG ARC_STATUS;
  24. //
  25. // Define the firmware entry point numbers.
  26. //
  27. typedef enum _FIRMWARE_ENTRY {
  28. LoadRoutine,
  29. InvokeRoutine,
  30. ExecuteRoutine,
  31. HaltRoutine,
  32. PowerDownRoutine,
  33. RestartRoutine,
  34. RebootRoutine,
  35. InteractiveModeRoutine,
  36. Reserved1,
  37. GetPeerRoutine,
  38. GetChildRoutine,
  39. GetParentRoutine,
  40. GetDataRoutine,
  41. AddChildRoutine,
  42. DeleteComponentRoutine,
  43. GetComponentRoutine,
  44. SaveConfigurationRoutine,
  45. GetSystemIdRoutine,
  46. MemoryRoutine,
  47. Reserved2,
  48. GetTimeRoutine,
  49. GetRelativeTimeRoutine,
  50. GetDirectoryEntryRoutine,
  51. OpenRoutine,
  52. CloseRoutine,
  53. ReadRoutine,
  54. ReadStatusRoutine,
  55. WriteRoutine,
  56. SeekRoutine,
  57. MountRoutine,
  58. GetEnvironmentRoutine,
  59. SetEnvironmentRoutine,
  60. GetFileInformationRoutine,
  61. SetFileInformationRoutine,
  62. FlushAllCachesRoutine,
  63. TestUnicodeCharacterRoutine,
  64. GetDisplayStatusRoutine,
  65. MaximumRoutine
  66. } FIRMWARE_ENTRY;
  67. //
  68. // Define software loading and execution routine types.
  69. //
  70. typedef
  71. ARC_STATUS
  72. (*PARC_EXECUTE_ROUTINE) (
  73. IN CHAR * FIRMWARE_PTR ImagePath,
  74. IN ULONG Argc,
  75. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Argv,
  76. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Envp
  77. );
  78. typedef
  79. ARC_STATUS
  80. (*PARC_INVOKE_ROUTINE) (
  81. IN ULONG EntryAddress,
  82. IN ULONG StackAddress,
  83. IN ULONG Argc,
  84. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Argv,
  85. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Envp
  86. );
  87. typedef
  88. ARC_STATUS
  89. (*PARC_LOAD_ROUTINE) (
  90. IN CHAR * FIRMWARE_PTR ImagePath,
  91. IN ULONG TopAddress,
  92. OUT ULONG * FIRMWARE_PTR EntryAddress,
  93. OUT ULONG * FIRMWARE_PTR LowAddress
  94. );
  95. //
  96. // Define firmware software loading and execution prototypes.
  97. //
  98. ARC_STATUS
  99. FwExecute (
  100. IN CHAR * FIRMWARE_PTR ImagePath,
  101. IN ULONG Argc,
  102. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Argv,
  103. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Envp
  104. );
  105. ARC_STATUS
  106. FwInvoke (
  107. IN ULONG EntryAddress,
  108. IN ULONG StackAddress,
  109. IN ULONG Argc,
  110. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Argv,
  111. IN CHAR * FIRMWARE_PTR * FIRMWARE_PTR Envp
  112. );
  113. ARC_STATUS
  114. FwLoad (
  115. IN CHAR * FIRMWARE_PTR ImagePath,
  116. IN ULONG TopAddress,
  117. OUT ULONG * FIRMWARE_PTR EntryAddress,
  118. OUT ULONG * FIRMWARE_PTR LowAddress
  119. );
  120. //
  121. // Define program termination routine types.
  122. //
  123. typedef
  124. VOID
  125. (*PARC_HALT_ROUTINE) (
  126. VOID
  127. );
  128. typedef
  129. VOID
  130. (*PARC_POWERDOWN_ROUTINE) (
  131. VOID
  132. );
  133. typedef
  134. VOID
  135. (*PARC_RESTART_ROUTINE) (
  136. VOID
  137. );
  138. typedef
  139. VOID
  140. (*PARC_REBOOT_ROUTINE) (
  141. VOID
  142. );
  143. typedef
  144. VOID
  145. (*PARC_INTERACTIVE_MODE_ROUTINE) (
  146. VOID
  147. );
  148. //
  149. // Define firmware program termination prototypes.
  150. //
  151. VOID
  152. FwHalt (
  153. VOID
  154. );
  155. VOID
  156. FwPowerDown (
  157. VOID
  158. );
  159. VOID
  160. FwRestart (
  161. VOID
  162. );
  163. VOID
  164. FwReboot (
  165. VOID
  166. );
  167. VOID
  168. FwEnterInteractiveMode (
  169. VOID
  170. );
  171. // begin_ntddk
  172. //
  173. // Define configuration routine types.
  174. //
  175. // Configuration information.
  176. //
  177. // end_ntddk
  178. typedef enum _CONFIGURATION_CLASS {
  179. SystemClass,
  180. ProcessorClass,
  181. CacheClass,
  182. AdapterClass,
  183. ControllerClass,
  184. PeripheralClass,
  185. MemoryClass,
  186. MaximumClass
  187. } CONFIGURATION_CLASS, *PCONFIGURATION_CLASS;
  188. // begin_ntddk
  189. typedef enum _CONFIGURATION_TYPE {
  190. ArcSystem,
  191. CentralProcessor,
  192. FloatingPointProcessor,
  193. PrimaryIcache,
  194. PrimaryDcache,
  195. SecondaryIcache,
  196. SecondaryDcache,
  197. SecondaryCache,
  198. EisaAdapter,
  199. TcAdapter,
  200. ScsiAdapter,
  201. DtiAdapter,
  202. MultiFunctionAdapter,
  203. DiskController,
  204. TapeController,
  205. CdromController,
  206. WormController,
  207. SerialController,
  208. NetworkController,
  209. DisplayController,
  210. ParallelController,
  211. PointerController,
  212. KeyboardController,
  213. AudioController,
  214. OtherController,
  215. DiskPeripheral,
  216. FloppyDiskPeripheral,
  217. TapePeripheral,
  218. ModemPeripheral,
  219. MonitorPeripheral,
  220. PrinterPeripheral,
  221. PointerPeripheral,
  222. KeyboardPeripheral,
  223. TerminalPeripheral,
  224. OtherPeripheral,
  225. LinePeripheral,
  226. NetworkPeripheral,
  227. SystemMemory,
  228. DockingInformation,
  229. RealModeIrqRoutingTable,
  230. RealModePCIEnumeration,
  231. MaximumType
  232. } CONFIGURATION_TYPE, *PCONFIGURATION_TYPE;
  233. // end_ntddk
  234. typedef struct _CONFIGURATION_COMPONENT {
  235. CONFIGURATION_CLASS Class;
  236. CONFIGURATION_TYPE Type;
  237. DEVICE_FLAGS Flags;
  238. USHORT Version;
  239. USHORT Revision;
  240. ULONG Key;
  241. ULONG AffinityMask;
  242. ULONG ConfigurationDataLength;
  243. ULONG IdentifierLength;
  244. CHAR * FIRMWARE_PTR Identifier;
  245. } CONFIGURATION_COMPONENT, * FIRMWARE_PTR PCONFIGURATION_COMPONENT;
  246. typedef
  247. PCONFIGURATION_COMPONENT
  248. (*PARC_GET_CHILD_ROUTINE) (
  249. IN PCONFIGURATION_COMPONENT Component OPTIONAL
  250. );
  251. typedef
  252. PCONFIGURATION_COMPONENT
  253. (*PARC_GET_PARENT_ROUTINE) (
  254. IN PCONFIGURATION_COMPONENT Component
  255. );
  256. typedef
  257. PCONFIGURATION_COMPONENT
  258. (*PARC_GET_PEER_ROUTINE) (
  259. IN PCONFIGURATION_COMPONENT Component
  260. );
  261. typedef
  262. PCONFIGURATION_COMPONENT
  263. (*PARC_ADD_CHILD_ROUTINE) (
  264. IN PCONFIGURATION_COMPONENT Component,
  265. IN PCONFIGURATION_COMPONENT NewComponent,
  266. IN VOID * FIRMWARE_PTR ConfigurationData
  267. );
  268. typedef
  269. ARC_STATUS
  270. (*PARC_DELETE_COMPONENT_ROUTINE) (
  271. IN PCONFIGURATION_COMPONENT Component
  272. );
  273. typedef
  274. PCONFIGURATION_COMPONENT
  275. (*PARC_GET_COMPONENT_ROUTINE) (
  276. IN CHAR * FIRMWARE_PTR Path
  277. );
  278. typedef
  279. ARC_STATUS
  280. (*PARC_GET_DATA_ROUTINE) (
  281. OUT VOID * FIRMWARE_PTR ConfigurationData,
  282. IN PCONFIGURATION_COMPONENT Component
  283. );
  284. typedef
  285. ARC_STATUS
  286. (*PARC_SAVE_CONFIGURATION_ROUTINE) (
  287. VOID
  288. );
  289. //
  290. // Define firmware configuration prototypes.
  291. //
  292. PCONFIGURATION_COMPONENT
  293. FwGetChild (
  294. IN PCONFIGURATION_COMPONENT Component OPTIONAL
  295. );
  296. PCONFIGURATION_COMPONENT
  297. FwGetParent (
  298. IN PCONFIGURATION_COMPONENT Component
  299. );
  300. PCONFIGURATION_COMPONENT
  301. FwGetPeer (
  302. IN PCONFIGURATION_COMPONENT Component
  303. );
  304. PCONFIGURATION_COMPONENT
  305. FwAddChild (
  306. IN PCONFIGURATION_COMPONENT Component,
  307. IN PCONFIGURATION_COMPONENT NewComponent,
  308. IN VOID * FIRMWARE_PTR ConfigurationData OPTIONAL
  309. );
  310. ARC_STATUS
  311. FwDeleteComponent (
  312. IN PCONFIGURATION_COMPONENT Component
  313. );
  314. PCONFIGURATION_COMPONENT
  315. FwGetComponent(
  316. IN CHAR * FIRMWARE_PTR Path
  317. );
  318. ARC_STATUS
  319. FwGetConfigurationData (
  320. OUT VOID * FIRMWARE_PTR ConfigurationData,
  321. IN PCONFIGURATION_COMPONENT Component
  322. );
  323. ARC_STATUS
  324. FwSaveConfiguration (
  325. VOID
  326. );
  327. //
  328. // System information.
  329. //
  330. typedef struct _SYSTEM_ID {
  331. CHAR VendorId[8];
  332. CHAR ProductId[8];
  333. } SYSTEM_ID, * FIRMWARE_PTR PSYSTEM_ID;
  334. typedef
  335. PSYSTEM_ID
  336. (*PARC_GET_SYSTEM_ID_ROUTINE) (
  337. VOID
  338. );
  339. //
  340. // Define system identifier query routine type.
  341. //
  342. PSYSTEM_ID
  343. FwGetSystemId (
  344. VOID
  345. );
  346. //
  347. // Memory information.
  348. //
  349. typedef enum _MEMORY_TYPE {
  350. MemoryExceptionBlock,
  351. MemorySystemBlock,
  352. MemoryFree,
  353. MemoryBad,
  354. MemoryLoadedProgram,
  355. MemoryFirmwareTemporary,
  356. MemoryFirmwarePermanent,
  357. MemoryFreeContiguous,
  358. MemorySpecialMemory,
  359. MemoryMaximum
  360. } MEMORY_TYPE;
  361. typedef struct _MEMORY_DESCRIPTOR {
  362. MEMORY_TYPE MemoryType;
  363. ULONG BasePage;
  364. ULONG PageCount;
  365. } MEMORY_DESCRIPTOR, * FIRMWARE_PTR PMEMORY_DESCRIPTOR;
  366. #if defined(_IA64_)
  367. //
  368. // Cache Attribute.
  369. //
  370. #define WTU 0x1
  371. #define WTO 0x2
  372. #define WBO 0x4
  373. #define WBU 0x8
  374. #define WCU 0x10
  375. #define UCU 0x20
  376. #define UCUE 0x40
  377. #define UCO 0x80
  378. typedef enum _MEMORY_USAGE_TYPE {
  379. RegularMemory,
  380. MemoryMappedIo,
  381. ProcessorIoBlock,
  382. BootServicesCode,
  383. BootServicesData,
  384. RuntimeServicesCode,
  385. RuntimeServicesData,
  386. FirmwareSpace,
  387. DisplayMemory,
  388. CacheAttributeMaximum
  389. } MEMORY_USAGE_TYPE;
  390. typedef struct _CACHE_ATTRIBUTE_DESCRIPTOR {
  391. LIST_ENTRY ListEntry;
  392. MEMORY_USAGE_TYPE MemoryUsage;
  393. ULONG CacheAttribute;
  394. ULONG BasePage;
  395. ULONG PageCount;
  396. } CACHE_ATTRIBUTE_DESCRIPTOR, *PCACHE_ATTRIBUTE_DESCRIPTOR;
  397. #endif // defined(_IA64_)
  398. typedef
  399. PMEMORY_DESCRIPTOR
  400. (*PARC_MEMORY_ROUTINE) (
  401. IN PMEMORY_DESCRIPTOR MemoryDescriptor OPTIONAL
  402. );
  403. //
  404. // Define memory query routine type.
  405. //
  406. PMEMORY_DESCRIPTOR
  407. FwGetMemoryDescriptor (
  408. IN PMEMORY_DESCRIPTOR MemoryDescriptor OPTIONAL
  409. );
  410. //
  411. // Query time functions.
  412. //
  413. typedef
  414. PTIME_FIELDS
  415. (*PARC_GET_TIME_ROUTINE) (
  416. VOID
  417. );
  418. typedef
  419. ULONG
  420. (*PARC_GET_RELATIVE_TIME_ROUTINE) (
  421. VOID
  422. );
  423. //
  424. // Define query time routine types.
  425. //
  426. PTIME_FIELDS
  427. FwGetTime (
  428. VOID
  429. );
  430. ULONG
  431. FwGetRelativeTime (
  432. VOID
  433. );
  434. //
  435. // Define I/O routine types.
  436. //
  437. #define ArcReadOnlyFile 1
  438. #define ArcHiddenFile 2
  439. #define ArcSystemFile 4
  440. #define ArcArchiveFile 8
  441. #define ArcDirectoryFile 16
  442. #define ArcDeleteFile 32
  443. typedef enum _OPEN_MODE {
  444. ArcOpenReadOnly,
  445. ArcOpenWriteOnly,
  446. ArcOpenReadWrite,
  447. ArcCreateWriteOnly,
  448. ArcCreateReadWrite,
  449. ArcSupersedeWriteOnly,
  450. ArcSupersedeReadWrite,
  451. ArcOpenDirectory,
  452. ArcCreateDirectory,
  453. ArcOpenMaximumMode
  454. } OPEN_MODE;
  455. typedef struct _FILE_INFORMATION {
  456. LARGE_INTEGER StartingAddress;
  457. LARGE_INTEGER EndingAddress;
  458. LARGE_INTEGER CurrentPosition;
  459. CONFIGURATION_TYPE Type;
  460. ULONG FileNameLength;
  461. UCHAR Attributes;
  462. CHAR FileName[32];
  463. } FILE_INFORMATION, * FIRMWARE_PTR PFILE_INFORMATION;
  464. typedef enum _SEEK_MODE {
  465. SeekAbsolute,
  466. SeekRelative,
  467. SeekMaximum
  468. } SEEK_MODE;
  469. typedef enum _MOUNT_OPERATION {
  470. MountLoadMedia,
  471. MountUnloadMedia,
  472. MountMaximum
  473. } MOUNT_OPERATION;
  474. typedef struct _DIRECTORY_ENTRY {
  475. ULONG FileNameLength;
  476. UCHAR FileAttribute;
  477. CHAR FileName[32];
  478. } DIRECTORY_ENTRY, * FIRMWARE_PTR PDIRECTORY_ENTRY;
  479. typedef
  480. ARC_STATUS
  481. (*PARC_CLOSE_ROUTINE) (
  482. IN ULONG FileId
  483. );
  484. typedef
  485. ARC_STATUS
  486. (*PARC_MOUNT_ROUTINE) (
  487. IN CHAR * FIRMWARE_PTR MountPath,
  488. IN MOUNT_OPERATION Operation
  489. );
  490. typedef
  491. ARC_STATUS
  492. (*PARC_OPEN_ROUTINE) (
  493. IN CHAR * FIRMWARE_PTR OpenPath,
  494. IN OPEN_MODE OpenMode,
  495. OUT ULONG * FIRMWARE_PTR FileId
  496. );
  497. typedef
  498. ARC_STATUS
  499. (*PARC_READ_ROUTINE) (
  500. IN ULONG FileId,
  501. OUT VOID * FIRMWARE_PTR Buffer,
  502. IN ULONG Length,
  503. OUT ULONG * FIRMWARE_PTR Count
  504. );
  505. typedef
  506. ARC_STATUS
  507. (*PARC_READ_STATUS_ROUTINE) (
  508. IN ULONG FileId
  509. );
  510. typedef
  511. ARC_STATUS
  512. (*PARC_SEEK_ROUTINE) (
  513. IN ULONG FileId,
  514. IN LARGE_INTEGER * FIRMWARE_PTR Offset,
  515. IN SEEK_MODE SeekMode
  516. );
  517. typedef
  518. ARC_STATUS
  519. (*PARC_WRITE_ROUTINE) (
  520. IN ULONG FileId,
  521. IN VOID * FIRMWARE_PTR Buffer,
  522. IN ULONG Length,
  523. OUT ULONG * FIRMWARE_PTR Count
  524. );
  525. typedef
  526. ARC_STATUS
  527. (*PARC_GET_FILE_INFO_ROUTINE) (
  528. IN ULONG FileId,
  529. OUT PFILE_INFORMATION FileInformation
  530. );
  531. typedef
  532. ARC_STATUS
  533. (*PARC_SET_FILE_INFO_ROUTINE) (
  534. IN ULONG FileId,
  535. IN ULONG AttributeFlags,
  536. IN ULONG AttributeMask
  537. );
  538. typedef
  539. ARC_STATUS
  540. (*PARC_GET_DIRECTORY_ENTRY_ROUTINE) (
  541. IN ULONG FileId,
  542. OUT PDIRECTORY_ENTRY Buffer,
  543. IN ULONG Length,
  544. OUT ULONG * FIRMWARE_PTR Count
  545. );
  546. //
  547. // Define firmware I/O prototypes.
  548. //
  549. ARC_STATUS
  550. FwClose (
  551. IN ULONG FileId
  552. );
  553. ARC_STATUS
  554. FwMount (
  555. IN CHAR * FIRMWARE_PTR MountPath,
  556. IN MOUNT_OPERATION Operation
  557. );
  558. ARC_STATUS
  559. FwOpen (
  560. IN CHAR * FIRMWARE_PTR OpenPath,
  561. IN OPEN_MODE OpenMode,
  562. OUT ULONG * FIRMWARE_PTR FileId
  563. );
  564. ARC_STATUS
  565. FwRead (
  566. IN ULONG FileId,
  567. OUT VOID * FIRMWARE_PTR Buffer,
  568. IN ULONG Length,
  569. OUT ULONG * FIRMWARE_PTR Count
  570. );
  571. ARC_STATUS
  572. FwGetReadStatus (
  573. IN ULONG FileId
  574. );
  575. ARC_STATUS
  576. FwSeek (
  577. IN ULONG FileId,
  578. IN LARGE_INTEGER * FIRMWARE_PTR Offset,
  579. IN SEEK_MODE SeekMode
  580. );
  581. ARC_STATUS
  582. FwWrite (
  583. IN ULONG FileId,
  584. IN VOID * FIRMWARE_PTR Buffer,
  585. IN ULONG Length,
  586. OUT ULONG * FIRMWARE_PTR Count
  587. );
  588. ARC_STATUS
  589. FwGetFileInformation (
  590. IN ULONG FileId,
  591. OUT PFILE_INFORMATION FileInformation
  592. );
  593. ARC_STATUS
  594. FwSetFileInformation (
  595. IN ULONG FileId,
  596. IN ULONG AttributeFlags,
  597. IN ULONG AttributeMask
  598. );
  599. ARC_STATUS
  600. FwGetDirectoryEntry (
  601. IN ULONG FileId,
  602. OUT PDIRECTORY_ENTRY Buffer,
  603. IN ULONG Length,
  604. OUT ULONG * FIRMWARE_PTR Count
  605. );
  606. //
  607. // Define environment routine types.
  608. //
  609. typedef
  610. CHAR * FIRMWARE_PTR
  611. (*PARC_GET_ENVIRONMENT_ROUTINE) (
  612. IN CHAR * FIRMWARE_PTR Variable
  613. );
  614. typedef
  615. ARC_STATUS
  616. (*PARC_SET_ENVIRONMENT_ROUTINE) (
  617. IN CHAR * FIRMWARE_PTR Variable,
  618. IN CHAR * FIRMWARE_PTR Value
  619. );
  620. //
  621. // Define firmware environment prototypes.
  622. //
  623. CHAR * FIRMWARE_PTR
  624. FwGetEnvironmentVariable (
  625. IN CHAR * FIRMWARE_PTR Variable
  626. );
  627. ARC_STATUS
  628. FwSetEnvironmentVariable (
  629. IN CHAR * FIRMWARE_PTR Variable,
  630. IN CHAR * FIRMWARE_PTR Value
  631. );
  632. //
  633. // Define functions to acquire and release the firmware lock and the stub
  634. // function prototypes necessary to interface with the 32-bit firmware on
  635. // 64-bit systems.
  636. //
  637. // These routines are required for the 64-bit system until (if) 64-bit
  638. // firmware is ever supplied.
  639. //
  640. #if defined(_AXP64_) && defined(_NTHAL_)
  641. extern ULONGLONG HalpMarshallBuffer[];
  642. extern KSPIN_LOCK HalpFirmwareLock;
  643. CHAR * FIRMWARE_PTR
  644. HalpArcGetEnvironmentVariable(
  645. IN CHAR * FIRMWARE_PTR Variable
  646. );
  647. ARC_STATUS
  648. HalpArcSetEnvironmentVariable(
  649. IN CHAR * FIRMWARE_PTR Variable,
  650. IN CHAR * FIRMWARE_PTR Value
  651. );
  652. KIRQL
  653. FwAcquireFirmwareLock(
  654. VOID
  655. );
  656. VOID
  657. FwReleaseFirmwareLock(
  658. IN KIRQL OldIrql
  659. );
  660. #endif // _AXP64_ && defined(_NTHAL_)
  661. //
  662. // Define cache flush routine types
  663. //
  664. typedef
  665. VOID
  666. (*PARC_FLUSH_ALL_CACHES_ROUTINE) (
  667. VOID
  668. );
  669. //
  670. // Define firmware cache flush prototypes.
  671. //
  672. VOID
  673. FwFlushAllCaches (
  674. VOID
  675. );
  676. //
  677. // Define TestUnicodeCharacter and GetDisplayStatus routines.
  678. //
  679. typedef struct _ARC_DISPLAY_STATUS {
  680. USHORT CursorXPosition;
  681. USHORT CursorYPosition;
  682. USHORT CursorMaxXPosition;
  683. USHORT CursorMaxYPosition;
  684. UCHAR ForegroundColor;
  685. UCHAR BackgroundColor;
  686. BOOLEAN HighIntensity;
  687. BOOLEAN Underscored;
  688. BOOLEAN ReverseVideo;
  689. } ARC_DISPLAY_STATUS, * FIRMWARE_PTR PARC_DISPLAY_STATUS;
  690. typedef
  691. ARC_STATUS
  692. (*PARC_TEST_UNICODE_CHARACTER_ROUTINE) (
  693. IN ULONG FileId,
  694. IN WCHAR UnicodeCharacter
  695. );
  696. typedef
  697. PARC_DISPLAY_STATUS
  698. (*PARC_GET_DISPLAY_STATUS_ROUTINE) (
  699. IN ULONG FileId
  700. );
  701. ARC_STATUS
  702. FwTestUnicodeCharacter(
  703. IN ULONG FileId,
  704. IN WCHAR UnicodeCharacter
  705. );
  706. PARC_DISPLAY_STATUS
  707. FwGetDisplayStatus(
  708. IN ULONG FileId
  709. );
  710. //
  711. // Define low memory data structures.
  712. //
  713. // Define debug block structure.
  714. //
  715. typedef struct _DEBUG_BLOCK {
  716. ULONG Signature;
  717. ULONG Length;
  718. } DEBUG_BLOCK, * FIRMWARE_PTR PDEBUG_BLOCK;
  719. //
  720. // Define restart block structure.
  721. //
  722. #define ARC_RESTART_BLOCK_SIGNATURE 0x42545352
  723. typedef struct _BOOT_STATUS {
  724. ULONG BootStarted : 1;
  725. ULONG BootFinished : 1;
  726. ULONG RestartStarted : 1;
  727. ULONG RestartFinished : 1;
  728. ULONG PowerFailStarted : 1;
  729. ULONG PowerFailFinished : 1;
  730. ULONG ProcessorReady : 1;
  731. ULONG ProcessorRunning : 1;
  732. ULONG ProcessorStart : 1;
  733. } BOOT_STATUS, * FIRMWARE_PTR PBOOT_STATUS;
  734. typedef struct _ALPHA_RESTART_STATE {
  735. #if defined(_ALPHA_) || defined(_AXP64_)
  736. //
  737. // Control information
  738. //
  739. ULONG HaltReason;
  740. VOID * FIRMWARE_PTR LogoutFrame;
  741. ULONGLONG PalBase;
  742. //
  743. // Integer Save State
  744. //
  745. ULONGLONG IntV0;
  746. ULONGLONG IntT0;
  747. ULONGLONG IntT1;
  748. ULONGLONG IntT2;
  749. ULONGLONG IntT3;
  750. ULONGLONG IntT4;
  751. ULONGLONG IntT5;
  752. ULONGLONG IntT6;
  753. ULONGLONG IntT7;
  754. ULONGLONG IntS0;
  755. ULONGLONG IntS1;
  756. ULONGLONG IntS2;
  757. ULONGLONG IntS3;
  758. ULONGLONG IntS4;
  759. ULONGLONG IntS5;
  760. ULONGLONG IntFp;
  761. ULONGLONG IntA0;
  762. ULONGLONG IntA1;
  763. ULONGLONG IntA2;
  764. ULONGLONG IntA3;
  765. ULONGLONG IntA4;
  766. ULONGLONG IntA5;
  767. ULONGLONG IntT8;
  768. ULONGLONG IntT9;
  769. ULONGLONG IntT10;
  770. ULONGLONG IntT11;
  771. ULONGLONG IntRa;
  772. ULONGLONG IntT12;
  773. ULONGLONG IntAT;
  774. ULONGLONG IntGp;
  775. ULONGLONG IntSp;
  776. ULONGLONG IntZero;
  777. //
  778. // Floating Point Save State
  779. //
  780. ULONGLONG Fpcr;
  781. ULONGLONG FltF0;
  782. ULONGLONG FltF1;
  783. ULONGLONG FltF2;
  784. ULONGLONG FltF3;
  785. ULONGLONG FltF4;
  786. ULONGLONG FltF5;
  787. ULONGLONG FltF6;
  788. ULONGLONG FltF7;
  789. ULONGLONG FltF8;
  790. ULONGLONG FltF9;
  791. ULONGLONG FltF10;
  792. ULONGLONG FltF11;
  793. ULONGLONG FltF12;
  794. ULONGLONG FltF13;
  795. ULONGLONG FltF14;
  796. ULONGLONG FltF15;
  797. ULONGLONG FltF16;
  798. ULONGLONG FltF17;
  799. ULONGLONG FltF18;
  800. ULONGLONG FltF19;
  801. ULONGLONG FltF20;
  802. ULONGLONG FltF21;
  803. ULONGLONG FltF22;
  804. ULONGLONG FltF23;
  805. ULONGLONG FltF24;
  806. ULONGLONG FltF25;
  807. ULONGLONG FltF26;
  808. ULONGLONG FltF27;
  809. ULONGLONG FltF28;
  810. ULONGLONG FltF29;
  811. ULONGLONG FltF30;
  812. ULONGLONG FltF31;
  813. //
  814. // Architected Internal Processor State.
  815. //
  816. ULONG Asn;
  817. VOID * FIRMWARE_PTR GeneralEntry;
  818. VOID * FIRMWARE_PTR Iksp;
  819. VOID * FIRMWARE_PTR InterruptEntry;
  820. VOID * FIRMWARE_PTR Kgp;
  821. ULONG Mces;
  822. VOID * FIRMWARE_PTR MemMgmtEntry;
  823. VOID * FIRMWARE_PTR PanicEntry;
  824. VOID * FIRMWARE_PTR Pcr;
  825. VOID * FIRMWARE_PTR Pdr;
  826. ULONG Psr;
  827. VOID * FIRMWARE_PTR ReiRestartAddress;
  828. ULONG Sirr;
  829. VOID * FIRMWARE_PTR SyscallEntry;
  830. VOID * FIRMWARE_PTR Teb;
  831. VOID * FIRMWARE_PTR Thread;
  832. //
  833. // Processor Implementation-dependent State.
  834. //
  835. ULONGLONG PerProcessorState[175]; // allocate 2K maximum restart block
  836. #else
  837. ULONG PlaceHolder;
  838. #endif
  839. } ALPHA_RESTART_STATE, * FIRMWARE_PTR PALPHA_RESTART_STATE;
  840. typedef struct _I386_RESTART_STATE {
  841. #if defined(_X86_)
  842. //
  843. // Put state structure here.
  844. //
  845. ULONG PlaceHolder;
  846. #else
  847. ULONG PlaceHolder;
  848. #endif
  849. } I386_RESTART_STATE, *PI386_RESTART_STATE;
  850. #if defined(_IA64_)
  851. #include "pshpck16.h"
  852. #endif
  853. typedef struct _IA64_RESTART_STATE {
  854. #if defined(_IA64_)
  855. //
  856. // This structure is copied from CONTEXT structure in sdk/ntia64.h.
  857. //
  858. //
  859. // The flags values within this flag control the contents of
  860. // a CONTEXT record.
  861. //
  862. // If the context record is used as an input parameter, then
  863. // for each portion of the context record controlled by a flag
  864. // whose value is set, it is assumed that that portion of the
  865. // context record contains valid context. If the context record
  866. // is being used to modify a thread's context, then only that
  867. // portion of the threads context will be modified.
  868. //
  869. // If the context record is used as an IN OUT parameter to capture
  870. // the context of a thread, then only those portions of the thread's
  871. // context corresponding to set flags will be returned.
  872. //
  873. // The context record is never used as an OUT only parameter.
  874. //
  875. ULONG ContextFlags;
  876. ULONG Fill1[3]; // for alignment of following on 16-byte boundary
  877. //
  878. // This section is specified/returned if the ContextFlags word contains
  879. // the flag CONTEXT_DEBUG.
  880. //
  881. // N.B. CONTEXT_DEBUG is *not* part of CONTEXT_FULL.
  882. //
  883. ULONGLONG DbI0; // Instruction debug registers
  884. ULONGLONG DbI1;
  885. ULONGLONG DbI2;
  886. ULONGLONG DbI3;
  887. ULONGLONG DbI4;
  888. ULONGLONG DbI5;
  889. ULONGLONG DbI6;
  890. ULONGLONG DbI7;
  891. ULONGLONG DbD0; // Data debug registers
  892. ULONGLONG DbD1;
  893. ULONGLONG DbD2;
  894. ULONGLONG DbD3;
  895. ULONGLONG DbD4;
  896. ULONGLONG DbD5;
  897. ULONGLONG DbD6;
  898. ULONGLONG DbD7;
  899. //
  900. // This section is specified/returned if the ContextFlags word contains
  901. // the flag CONTEXT_LOWER_FLOATING_POINT.
  902. //
  903. FLOAT128 FltS0; // Lower saved (preserved)
  904. FLOAT128 FltS1;
  905. FLOAT128 FltS2;
  906. FLOAT128 FltS3;
  907. FLOAT128 FltS4;
  908. FLOAT128 FltS5;
  909. FLOAT128 FltT0; // Lower temporary (scratch)
  910. FLOAT128 FltT1;
  911. FLOAT128 FltT2;
  912. FLOAT128 FltT3;
  913. FLOAT128 FltT4;
  914. FLOAT128 FltT5;
  915. FLOAT128 FltT6;
  916. FLOAT128 FltT7;
  917. //
  918. // This section is specified/returned if the ContextFlags word contains
  919. // the flag CONTEXT_HIGHER_FLOATING_POINT.
  920. //
  921. FLOAT128 FltS6; // Higher saved (preserved) floats
  922. FLOAT128 FltS7;
  923. FLOAT128 FltS8;
  924. FLOAT128 FltS9;
  925. FLOAT128 FltS10;
  926. FLOAT128 FltS11;
  927. FLOAT128 FltS12;
  928. FLOAT128 FltS13;
  929. FLOAT128 FltS14;
  930. FLOAT128 FltS15;
  931. FLOAT128 FltS16;
  932. FLOAT128 FltS17;
  933. FLOAT128 FltS18;
  934. FLOAT128 FltS19;
  935. FLOAT128 FltS20;
  936. FLOAT128 FltS21;
  937. FLOAT128 FltF32;
  938. FLOAT128 FltF33;
  939. FLOAT128 FltF34;
  940. FLOAT128 FltF35;
  941. FLOAT128 FltF36;
  942. FLOAT128 FltF37;
  943. FLOAT128 FltF38;
  944. FLOAT128 FltF39;
  945. FLOAT128 FltF40;
  946. FLOAT128 FltF41;
  947. FLOAT128 FltF42;
  948. FLOAT128 FltF43;
  949. FLOAT128 FltF44;
  950. FLOAT128 FltF45;
  951. FLOAT128 FltF46;
  952. FLOAT128 FltF47;
  953. FLOAT128 FltF48;
  954. FLOAT128 FltF49;
  955. FLOAT128 FltF50;
  956. FLOAT128 FltF51;
  957. FLOAT128 FltF52;
  958. FLOAT128 FltF53;
  959. FLOAT128 FltF54;
  960. FLOAT128 FltF55;
  961. FLOAT128 FltF56;
  962. FLOAT128 FltF57;
  963. FLOAT128 FltF58;
  964. FLOAT128 FltF59;
  965. FLOAT128 FltF60;
  966. FLOAT128 FltF61;
  967. FLOAT128 FltF62;
  968. FLOAT128 FltF63;
  969. FLOAT128 FltF64;
  970. FLOAT128 FltF65;
  971. FLOAT128 FltF66;
  972. FLOAT128 FltF67;
  973. FLOAT128 FltF68;
  974. FLOAT128 FltF69;
  975. FLOAT128 FltF70;
  976. FLOAT128 FltF71;
  977. FLOAT128 FltF72;
  978. FLOAT128 FltF73;
  979. FLOAT128 FltF74;
  980. FLOAT128 FltF75;
  981. FLOAT128 FltF76;
  982. FLOAT128 FltF77;
  983. FLOAT128 FltF78;
  984. FLOAT128 FltF79;
  985. FLOAT128 FltF80;
  986. FLOAT128 FltF81;
  987. FLOAT128 FltF82;
  988. FLOAT128 FltF83;
  989. FLOAT128 FltF84;
  990. FLOAT128 FltF85;
  991. FLOAT128 FltF86;
  992. FLOAT128 FltF87;
  993. FLOAT128 FltF88;
  994. FLOAT128 FltF89;
  995. FLOAT128 FltF90;
  996. FLOAT128 FltF91;
  997. FLOAT128 FltF92;
  998. FLOAT128 FltF93;
  999. FLOAT128 FltF94;
  1000. FLOAT128 FltF95;
  1001. FLOAT128 FltF96;
  1002. FLOAT128 FltF97;
  1003. FLOAT128 FltF98;
  1004. FLOAT128 FltF99;
  1005. FLOAT128 FltF100;
  1006. FLOAT128 FltF101;
  1007. FLOAT128 FltF102;
  1008. FLOAT128 FltF103;
  1009. FLOAT128 FltF104;
  1010. FLOAT128 FltF105;
  1011. FLOAT128 FltF106;
  1012. FLOAT128 FltF107;
  1013. FLOAT128 FltF108;
  1014. FLOAT128 FltF109;
  1015. FLOAT128 FltF110;
  1016. FLOAT128 FltF111;
  1017. FLOAT128 FltF112;
  1018. FLOAT128 FltF113;
  1019. FLOAT128 FltF114;
  1020. FLOAT128 FltF115;
  1021. FLOAT128 FltF116;
  1022. FLOAT128 FltF117;
  1023. FLOAT128 FltF118;
  1024. FLOAT128 FltF119;
  1025. FLOAT128 FltF120;
  1026. FLOAT128 FltF121;
  1027. FLOAT128 FltF122;
  1028. FLOAT128 FltF123;
  1029. FLOAT128 FltF124;
  1030. FLOAT128 FltF125;
  1031. FLOAT128 FltF126;
  1032. FLOAT128 FltF127;
  1033. //
  1034. // This section is specified/returned if the ContextFlags word contains
  1035. // the flag CONTEXT_LOWER_FLOATING_POINT | CONTEXT_HIGHER_FLOATING_POINT.
  1036. // **** TBD **** in some cases it may more efficient to return with
  1037. // CONTEXT_CONTROL
  1038. //
  1039. ULONGLONG StFPSR; // FP status
  1040. //
  1041. // This section is specified/returned if the ContextFlags word contains
  1042. // the flag CONTEXT_INTEGER.
  1043. //
  1044. // N.B. The registers gp, sp, rp are part of the control context
  1045. //
  1046. ULONGLONG IntGp; // global pointer (r1)
  1047. ULONGLONG IntT0;
  1048. ULONGLONG IntT1;
  1049. ULONGLONG IntS0;
  1050. ULONGLONG IntS1;
  1051. ULONGLONG IntS2;
  1052. ULONGLONG IntS3;
  1053. ULONGLONG IntV0; // return value (r8)
  1054. ULONGLONG IntAp; // argument pointer (r9)
  1055. ULONGLONG IntT2;
  1056. ULONGLONG IntT3;
  1057. ULONGLONG IntSp; // stack pointer (r12)
  1058. ULONGLONG IntT4;
  1059. ULONGLONG IntT5;
  1060. ULONGLONG IntT6;
  1061. ULONGLONG IntT7;
  1062. ULONGLONG IntT8;
  1063. ULONGLONG IntT9;
  1064. ULONGLONG IntT10;
  1065. ULONGLONG IntT11;
  1066. ULONGLONG IntT12;
  1067. ULONGLONG IntT13;
  1068. ULONGLONG IntT14;
  1069. ULONGLONG IntT15;
  1070. ULONGLONG IntT16;
  1071. ULONGLONG IntT17;
  1072. ULONGLONG IntT18;
  1073. ULONGLONG IntT19;
  1074. ULONGLONG IntT20;
  1075. ULONGLONG IntT21;
  1076. ULONGLONG IntT22;
  1077. ULONGLONG IntNats; // Nat bits for general registers
  1078. // r1-r31 in bit positions 1 to 31.
  1079. ULONGLONG Preds; // Predicates
  1080. ULONGLONG BrS0l; // Branch registers
  1081. ULONGLONG BrS0h;
  1082. ULONGLONG BrS1l;
  1083. ULONGLONG BrS1h;
  1084. ULONGLONG BrS2l;
  1085. ULONGLONG BrS2h;
  1086. ULONGLONG BrS3l;
  1087. ULONGLONG BrS3h;
  1088. ULONGLONG BrS4l;
  1089. ULONGLONG BrS4h;
  1090. ULONGLONG BrT0l;
  1091. ULONGLONG BrT0h;
  1092. ULONGLONG BrT1l;
  1093. ULONGLONG BrT1h;
  1094. ULONGLONG BrRpl; // return pointer
  1095. ULONGLONG BrRph;
  1096. ULONGLONG BrT2l;
  1097. ULONGLONG BrT2h;
  1098. ULONGLONG BrT3l;
  1099. ULONGLONG BrT3h;
  1100. ULONGLONG BrT4l;
  1101. ULONGLONG BrT4h;
  1102. ULONGLONG BrT5l;
  1103. ULONGLONG BrT5h;
  1104. ULONGLONG BrT6l;
  1105. ULONGLONG BrT6h;
  1106. ULONGLONG BrT7l;
  1107. ULONGLONG BrT7h;
  1108. ULONGLONG BrT8l;
  1109. ULONGLONG BrT8h;
  1110. ULONGLONG BrT9l;
  1111. ULONGLONG BrT9h;
  1112. // This section is specified/returned if the ContextFlags word contains
  1113. // the flag CONTEXT_CONTROL.
  1114. //
  1115. // Other application registers
  1116. ULONGLONG ApSunatcr; // User Nat collection register (preserved)
  1117. ULONGLONG ApSlc; // Loop counter register (preserved)
  1118. ULONGLONG ApTccv; // CMPXCHG value register (volatile)
  1119. ULONGLONG ApDCR;
  1120. // Register stack info
  1121. ULONGLONG RsPFS;
  1122. ULONGLONG RsBSP;
  1123. ULONGLONG RsBSPStore;
  1124. ULONGLONG RsRSC;
  1125. ULONGLONG RsRNAT;
  1126. // Trap Status Information
  1127. ULONGLONG StIPSR; // Interrupt Processor Status
  1128. ULONGLONG StIIP; // Interrupt IP
  1129. ULONGLONG StIFS; // Interrupt Frame Marker
  1130. ULONGLONG Fill; // padding for 16-byte alignment on stack, if needed
  1131. #else
  1132. ULONG PlaceHolder;
  1133. #endif // defined(_IA64_)
  1134. } IA64_RESTART_STATE, *PIA64_RESTART_STATE;
  1135. typedef struct _RESTART_BLOCK {
  1136. ULONG Signature;
  1137. ULONG Length;
  1138. USHORT Version;
  1139. USHORT Revision;
  1140. struct _RESTART_BLOCK * FIRMWARE_PTR NextRestartBlock;
  1141. VOID * FIRMWARE_PTR RestartAddress;
  1142. ULONG BootMasterId;
  1143. ULONG ProcessorId;
  1144. volatile BOOT_STATUS BootStatus;
  1145. ULONG CheckSum;
  1146. ULONG SaveAreaLength;
  1147. union {
  1148. ULONG SaveArea[1];
  1149. ALPHA_RESTART_STATE Alpha;
  1150. I386_RESTART_STATE I386;
  1151. IA64_RESTART_STATE Ia64;
  1152. } u;
  1153. } RESTART_BLOCK, * FIRMWARE_PTR PRESTART_BLOCK;
  1154. #if defined(_IA64_)
  1155. #include "poppack.h"
  1156. #endif
  1157. //
  1158. // Define system parameter block structure.
  1159. //
  1160. typedef struct _SYSTEM_PARAMETER_BLOCK {
  1161. ULONG Signature;
  1162. ULONG Length;
  1163. USHORT Version;
  1164. USHORT Revision;
  1165. PRESTART_BLOCK RestartBlock;
  1166. PDEBUG_BLOCK DebugBlock;
  1167. VOID * FIRMWARE_PTR GenerateExceptionVector;
  1168. VOID * FIRMWARE_PTR TlbMissExceptionVector;
  1169. ULONG FirmwareVectorLength;
  1170. VOID * FIRMWARE_PTR * FIRMWARE_PTR FirmwareVector;
  1171. ULONG VendorVectorLength;
  1172. VOID * FIRMWARE_PTR * FIRMWARE_PTR VendorVector;
  1173. ULONG AdapterCount;
  1174. ULONG Adapter0Type;
  1175. ULONG Adapter0Length;
  1176. VOID * FIRMWARE_PTR * FIRMWARE_PTR Adapter0Vector;
  1177. } SYSTEM_PARAMETER_BLOCK, * FIRMWARE_PTR PSYSTEM_PARAMETER_BLOCK;
  1178. //
  1179. // structure defining the function types passed in the FirmwareVector
  1180. // of the system block.
  1181. // define this because the compiler does not like the casting of
  1182. // void * pointers to function pointers
  1183. //
  1184. typedef struct _GLOBAL_FIRMWARE_VECTOR {
  1185. ARC_STATUS (* LoadRoutine)(CHAR * FIRMWARE_PTR, ULONG, ULONG * FIRMWARE_PTR, ULONG * FIRMWARE_PTR);
  1186. ARC_STATUS (* InvokeRoutine)(ULONG, ULONG, ULONG, CHAR * FIRMWARE_PTR * FIRMWARE_PTR, CHAR * FIRMWARE_PTR * FIRMWARE_PTR);
  1187. ARC_STATUS (* ExecuteRoutine)(CHAR * FIRWARE_PTR, ULONG, CHAR * FIRMWARE_PTR * FIRMWARE_PTR, CHAR * FIRMWARE_PTR * FIRMWARE_PTR);
  1188. VOID (* HaltRoutine)(VOID);
  1189. VOID (* PowerDownRoutine)(VOID);
  1190. VOID (* RestartRoutine)(VOID);
  1191. VOID (* RebootRoutine)(VOID);
  1192. VOID (* InteractiveModeRoutine)(VOID);
  1193. VOID (* Reserved1)(VOID);
  1194. PCONFIGURATION_COMPONENT (* GetPeerRoutine)(PCONFIGURATION_COMPONENT);
  1195. PCONFIGURATION_COMPONENT (* GetChildRoutine)(PCONFIGURATION_COMPONENT);
  1196. PCONFIGURATION_COMPONENT (* GetParentRoutine)(PCONFIGURATION_COMPONENT);
  1197. ARC_STATUS (* GetDataRoutine)(VOID * FIRMWARE_PTR, PCONFIGURATION_COMPONENT);
  1198. PCONFIGURATION_COMPONENT (* AddChildRoutine)(PCONFIGURATION_COMPONENT, PCONFIGURATION_COMPONENT, VOID * FIRMWARE_PTR);
  1199. ARC_STATUS (* DeleteComponentRoutine)(PCONFIGURATION_COMPONENT);
  1200. PCONFIGURATION_COMPONENT (* GetComponentRoutine)(CHAR * FIRMWARE_PTR);
  1201. ARC_STATUS (* SaveConfigurationRoutine)(VOID);
  1202. PSYSTEM_ID (* GetSystemIdRoutine)(VOID);
  1203. PMEMORY_DESCRIPTOR (* MemoryRoutine)(PMEMORY_DESCRIPTOR);
  1204. VOID (* Reserved2)(VOID);
  1205. PTIME_FIELDS (* GetTimeRoutine)(VOID);
  1206. ULONG (* GetRelativeTimeRoutine)(VOID);
  1207. ARC_STATUS (* GetDirectoryEntryRoutine)(ULONG, PDIRECTORY_ENTRY, ULONG, ULONG * FIRMWARE_PTR);
  1208. ARC_STATUS (* OpenRoutine)(CHAR * FIRMWARE_PTR, OPEN_MODE, ULONG * FIRMWARE_PTR);
  1209. ARC_STATUS (* CloseRoutine)(ULONG);
  1210. ARC_STATUS (* ReadRoutine)(ULONG, VOID * FIRMWARE_PTR, ULONG, ULONG * FIRMWARE_PTR);
  1211. ARC_STATUS (* ReadStatusRoutine)(ULONG);
  1212. ARC_STATUS (* WriteRoutine)(ULONG, VOID * FIRMWARE_PTR, ULONG, ULONG * FIRMWARE_PTR);
  1213. ARC_STATUS (* SeekRoutine)(ULONG, LARGE_INTEGER * FIRMWARE_PTR, SEEK_MODE);
  1214. ARC_STATUS (* MountRoutine)(CHAR * FIRMWARE_PTR, MOUNT_OPERATION);
  1215. CHAR * FIRMWARE_PTR (* GetEnvironmentRoutine)(CHAR * FIRMWARE_PTR);
  1216. ARC_STATUS (* SetEnvironmentRoutine)(CHAR * FIRMWARE_PTR, CHAR * FIRMWARE_PTR);
  1217. ARC_STATUS (* GetFileInformationRoutine)(ULONG, PFILE_INFORMATION);
  1218. ARC_STATUS (* SetFileInformationRoutine)(ULONG, ULONG, ULONG);
  1219. VOID (* FlushAllCachesRoutine)(VOID);
  1220. ARC_STATUS (* TestUnicodeCharacterRoutine)(ULONG, WCHAR);
  1221. PARC_DISPLAY_STATUS (* GetDisplayStatusRoutine)(ULONG);
  1222. } GLOBAL_FIRMWARE_VECTOR, * FIRMWARE_PTR PGLOBAL_FIRMWARE_VECTOR;
  1223. //
  1224. // Define macros that call firmware routines indirectly through the firmware
  1225. // vector and provide type checking of argument values.
  1226. //
  1227. #if defined(_ALPHA_) || defined(_AXP64_)
  1228. #define SYSTEM_BLOCK ((SYSTEM_PARAMETER_BLOCK *)(KSEG0_BASE | 0x6FE000))
  1229. #elif defined(_IA64_)
  1230. extern SYSTEM_PARAMETER_BLOCK GlobalSystemBlock;
  1231. #define SYSTEM_BLOCK (&GlobalSystemBlock)
  1232. #elif defined(_X86_)
  1233. #if defined(ARCI386)
  1234. #define SYSTEM_BLOCK ((PSYSTEM_PARAMETER_BLOCK)(0x1000))
  1235. #else
  1236. extern SYSTEM_PARAMETER_BLOCK GlobalSystemBlock;
  1237. #define SYSTEM_BLOCK (&GlobalSystemBlock)
  1238. #endif
  1239. #endif
  1240. #define FIRMWARE_VECTOR_BLOCK ((PGLOBAL_FIRMWARE_VECTOR) (SYSTEM_BLOCK->FirmwareVector))
  1241. //
  1242. // Define software loading and execution functions.
  1243. //
  1244. #define ArcExecute FIRMWARE_VECTOR_BLOCK->ExecuteRoutine
  1245. #define ArcInvoke FIRMWARE_VECTOR_BLOCK->InvokeRoutine
  1246. #define ArcLoad FIRMWARE_VECTOR_BLOCK->LoadRoutine
  1247. //
  1248. // Define program termination functions.
  1249. //
  1250. #define ArcHalt FIRMWARE_VECTOR_BLOCK->HaltRoutine
  1251. #define ArcPowerDown FIRMWARE_VECTOR_BLOCK->PowerDownRoutine
  1252. #define ArcRestart FIRMWARE_VECTOR_BLOCK->RestartRoutine
  1253. #define ArcReboot FIRMWARE_VECTOR_BLOCK->RebootRoutine
  1254. #define ArcEnterInteractiveMode FIRMWARE_VECTOR_BLOCK->InteractiveModeRoutine
  1255. //
  1256. // Define configuration functions.
  1257. //
  1258. #define ArcGetChild FIRMWARE_VECTOR_BLOCK->GetChildRoutine
  1259. #define ArcGetParent FIRMWARE_VECTOR_BLOCK->GetParentRoutine
  1260. #define ArcGetPeer FIRMWARE_VECTOR_BLOCK->GetPeerRoutine
  1261. #define ArcAddChild FIRMWARE_VECTOR_BLOCK->AddChildRoutine
  1262. #define ArcDeleteComponent FIRMWARE_VECTOR_BLOCK->DeleteComponentRoutine
  1263. #define ArcGetComponent FIRMWARE_VECTOR_BLOCK->GetComponentRoutine
  1264. #define ArcGetConfigurationData FIRMWARE_VECTOR_BLOCK->GetDataRoutine
  1265. #define ArcSaveConfiguration FIRMWARE_VECTOR_BLOCK->SaveConfigurationRoutine
  1266. #define ArcGetSystemId FIRMWARE_VECTOR_BLOCK->GetSystemIdRoutine
  1267. #define ArcGetMemoryDescriptor FIRMWARE_VECTOR_BLOCK->MemoryRoutine
  1268. #define ArcGetTime FIRMWARE_VECTOR_BLOCK->GetTimeRoutine
  1269. #define ArcGetRelativeTime FIRMWARE_VECTOR_BLOCK->GetRelativeTimeRoutine
  1270. //
  1271. // Define I/O functions.
  1272. //
  1273. #define ArcClose FIRMWARE_VECTOR_BLOCK->CloseRoutine
  1274. #define ArcGetReadStatus FIRMWARE_VECTOR_BLOCK->ReadStatusRoutine
  1275. #define ArcMount FIRMWARE_VECTOR_BLOCK->MountRoutine
  1276. #define ArcOpen FIRMWARE_VECTOR_BLOCK->OpenRoutine
  1277. #define ArcRead FIRMWARE_VECTOR_BLOCK->ReadRoutine
  1278. #define ArcSeek FIRMWARE_VECTOR_BLOCK->SeekRoutine
  1279. #define ArcWrite FIRMWARE_VECTOR_BLOCK->WriteRoutine
  1280. #define ArcGetFileInformation FIRMWARE_VECTOR_BLOCK->GetFileInformationRoutine
  1281. #define ArcSetFileInformation FIRMWARE_VECTOR_BLOCK->SetFileInformationRoutine
  1282. #define ArcGetDirectoryEntry FIRMWARE_VECTOR_BLOCK->GetDirectoryEntryRoutine
  1283. //
  1284. // Define environment functions.
  1285. //
  1286. #if defined(_AXP64_) && defined(_NTHAL_)
  1287. __inline
  1288. CHAR * FIRMWARE_PTR
  1289. ArcGetEnvironmentVariable(
  1290. IN PCHAR Variable
  1291. )
  1292. {
  1293. CHAR * FIRMWARE_PTR FwValue;
  1294. CHAR * FIRMWARE_PTR FwVariable;
  1295. //
  1296. // Raise IRQL to high level and acquire firmware lock.
  1297. //
  1298. KIRQL OldIrql = FwAcquireFirmwareLock();
  1299. //
  1300. // Copy variable name to a buffer that is addressable by firmware
  1301. // and query the firmware for the variable value.
  1302. //
  1303. FwVariable = (CHAR * FIRMWARE_PTR)&HalpMarshallBuffer[0];
  1304. strcpy(FwVariable, Variable);
  1305. FwValue = HalpArcGetEnvironmentVariable(FwVariable);
  1306. //
  1307. // Release the firmware lock and lower IRQL to its previous level.
  1308. //
  1309. FwReleaseFirmwareLock(OldIrql);
  1310. return FwValue;
  1311. }
  1312. #else
  1313. #define ArcGetEnvironmentVariable FIRMWARE_VECTOR_BLOCK->GetEnvironmentRoutine
  1314. #endif // _AXP64_ && defined(_NTHAL_)
  1315. #if defined(_AXP64_) && defined(_NTHAL_)
  1316. __inline
  1317. ARC_STATUS
  1318. ArcSetEnvironmentVariable(
  1319. IN PCHAR Variable,
  1320. IN PCHAR Value
  1321. )
  1322. {
  1323. ARC_STATUS ArcStatus;
  1324. CHAR * FIRMWARE_PTR FwValue;
  1325. CHAR * FIRMWARE_PTR FwVariable;
  1326. ULONG Length;
  1327. //
  1328. // Raise IRQL to high level and acquire firmware lock.
  1329. //
  1330. KIRQL OldIrql = FwAcquireFirmwareLock();
  1331. //
  1332. // Copy variable name and value to a buffer that is addressable by
  1333. // firmware and call firmware to set the variable value.
  1334. //
  1335. Length = strlen(Variable);
  1336. FwVariable = (CHAR * FIRMWARE_PTR)&HalpMarshallBuffer[0];
  1337. FwValue = FwVariable + Length + 1;
  1338. strcpy(FwVariable, Variable);
  1339. strcpy(FwValue, Value);
  1340. ArcStatus = HalpArcSetEnvironmentVariable(FwVariable, FwValue);
  1341. //
  1342. // Release the firmware lock and lower IRQL to its previous level.
  1343. //
  1344. FwReleaseFirmwareLock(OldIrql);
  1345. return ArcStatus;
  1346. }
  1347. #else
  1348. #define ArcSetEnvironmentVariable FIRMWARE_VECTOR_BLOCK->SetEnvironmentRoutine
  1349. #endif // _AXP64_ && defined(_NTHAL_)
  1350. //
  1351. // Define cache flush functions.
  1352. //
  1353. #define ArcFlushAllCaches FIRMWARE_VECTOR_BLOCK->FlushAllCachesRoutine
  1354. //
  1355. // Define TestUnicodeCharacter and GetDisplayStatus functions.
  1356. //
  1357. #define ArcTestUnicodeCharacter FIRMWARE_VECTOR_BLOCK->TestUnicodeCharacterRoutine
  1358. #define ArcGetDisplayStatus FIRMWARE_VECTOR_BLOCK->GetDisplayStatusRoutine
  1359. //
  1360. // Define configuration data structure used in all systems.
  1361. //
  1362. typedef struct _CONFIGURATION_COMPONENT_DATA {
  1363. struct _CONFIGURATION_COMPONENT_DATA *Parent;
  1364. struct _CONFIGURATION_COMPONENT_DATA *Child;
  1365. struct _CONFIGURATION_COMPONENT_DATA *Sibling;
  1366. CONFIGURATION_COMPONENT ComponentEntry;
  1367. PVOID ConfigurationData;
  1368. } CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
  1369. //
  1370. // Define generic display configuration data structure.
  1371. //
  1372. typedef struct _MONITOR_CONFIGURATION_DATA {
  1373. USHORT Version;
  1374. USHORT Revision;
  1375. USHORT HorizontalResolution;
  1376. USHORT HorizontalDisplayTime;
  1377. USHORT HorizontalBackPorch;
  1378. USHORT HorizontalFrontPorch;
  1379. USHORT HorizontalSync;
  1380. USHORT VerticalResolution;
  1381. USHORT VerticalBackPorch;
  1382. USHORT VerticalFrontPorch;
  1383. USHORT VerticalSync;
  1384. USHORT HorizontalScreenSize;
  1385. USHORT VerticalScreenSize;
  1386. } MONITOR_CONFIGURATION_DATA, *PMONITOR_CONFIGURATION_DATA;
  1387. //
  1388. // Define generic floppy configuration data structure.
  1389. //
  1390. typedef struct _FLOPPY_CONFIGURATION_DATA {
  1391. USHORT Version;
  1392. USHORT Revision;
  1393. CHAR Size[8];
  1394. ULONG MaxDensity;
  1395. ULONG MountDensity;
  1396. } FLOPPY_CONFIGURATION_DATA, *PFLOPPY_CONFIGURATION_DATA;
  1397. //
  1398. // Define memory allocation structures used in all systems.
  1399. //
  1400. typedef enum _TYPE_OF_MEMORY {
  1401. LoaderExceptionBlock = MemoryExceptionBlock, // 0
  1402. LoaderSystemBlock = MemorySystemBlock, // 1
  1403. LoaderFree = MemoryFree, // 2
  1404. LoaderBad = MemoryBad, // 3
  1405. LoaderLoadedProgram = MemoryLoadedProgram, // 4
  1406. LoaderFirmwareTemporary = MemoryFirmwareTemporary, // 5
  1407. LoaderFirmwarePermanent = MemoryFirmwarePermanent, // 6
  1408. LoaderOsloaderHeap, // 7
  1409. LoaderOsloaderStack, // 8
  1410. LoaderSystemCode, // 9
  1411. LoaderHalCode, // a
  1412. LoaderBootDriver, // b
  1413. LoaderConsoleInDriver, // c
  1414. LoaderConsoleOutDriver, // d
  1415. LoaderStartupDpcStack, // e
  1416. LoaderStartupKernelStack, // f
  1417. LoaderStartupPanicStack, // 10
  1418. LoaderStartupPcrPage, // 11
  1419. LoaderStartupPdrPage, // 12
  1420. LoaderRegistryData, // 13
  1421. LoaderMemoryData, // 14
  1422. LoaderNlsData, // 15
  1423. LoaderSpecialMemory, // 16
  1424. LoaderBBTMemory, // 17
  1425. LoaderReserve, // 18
  1426. LoaderXIPRom, // 19
  1427. LoaderHALCachedMemory, // 1a
  1428. LoaderMaximum // 1b
  1429. } TYPE_OF_MEMORY;
  1430. typedef struct _MEMORY_ALLOCATION_DESCRIPTOR {
  1431. LIST_ENTRY ListEntry;
  1432. TYPE_OF_MEMORY MemoryType;
  1433. ULONG BasePage;
  1434. ULONG PageCount;
  1435. } MEMORY_ALLOCATION_DESCRIPTOR, *PMEMORY_ALLOCATION_DESCRIPTOR;
  1436. //
  1437. // Define loader parameter block structure.
  1438. //
  1439. typedef struct _NLS_DATA_BLOCK {
  1440. PVOID AnsiCodePageData;
  1441. PVOID OemCodePageData;
  1442. PVOID UnicodeCaseTableData;
  1443. } NLS_DATA_BLOCK, *PNLS_DATA_BLOCK;
  1444. typedef struct _ARC_DISK_SIGNATURE {
  1445. LIST_ENTRY ListEntry;
  1446. ULONG Signature;
  1447. PCHAR ArcName;
  1448. ULONG CheckSum;
  1449. BOOLEAN ValidPartitionTable;
  1450. BOOLEAN xInt13;
  1451. BOOLEAN IsGpt;
  1452. UCHAR Reserved;
  1453. UCHAR GptSignature[16];
  1454. } ARC_DISK_SIGNATURE, *PARC_DISK_SIGNATURE;
  1455. typedef struct _ARC_DISK_INFORMATION {
  1456. LIST_ENTRY DiskSignatures;
  1457. } ARC_DISK_INFORMATION, *PARC_DISK_INFORMATION;
  1458. typedef struct _I386_LOADER_BLOCK {
  1459. #if defined(_X86_) || defined(_AMD64_)
  1460. PVOID CommonDataArea;
  1461. ULONG MachineType; // Temporary only
  1462. ULONG VirtualBias;
  1463. #else
  1464. ULONG PlaceHolder;
  1465. #endif
  1466. } I386_LOADER_BLOCK, *PI386_LOADER_BLOCK;
  1467. typedef struct _ALPHA_LOADER_BLOCK {
  1468. #if defined(_ALPHA_) || defined(_AXP64_)
  1469. ULONG_PTR DpcStack;
  1470. ULONG FirstLevelDcacheSize;
  1471. ULONG FirstLevelDcacheFillSize;
  1472. ULONG FirstLevelIcacheSize;
  1473. ULONG FirstLevelIcacheFillSize;
  1474. ULONG_PTR GpBase;
  1475. ULONG_PTR PanicStack;
  1476. ULONG PcrPage;
  1477. ULONG PdrPage;
  1478. ULONG SecondLevelDcacheSize;
  1479. ULONG SecondLevelDcacheFillSize;
  1480. ULONG SecondLevelIcacheSize;
  1481. ULONG SecondLevelIcacheFillSize;
  1482. ULONG PhysicalAddressBits;
  1483. ULONG MaximumAddressSpaceNumber;
  1484. UCHAR SystemSerialNumber[16];
  1485. UCHAR SystemType[8];
  1486. ULONG SystemVariant;
  1487. ULONG SystemRevision;
  1488. ULONG ProcessorType;
  1489. ULONG ProcessorRevision;
  1490. ULONG CycleClockPeriod;
  1491. ULONG PageSize;
  1492. PVOID RestartBlock;
  1493. ULONGLONG FirmwareRestartAddress;
  1494. ULONG FirmwareRevisionId;
  1495. PVOID PalBaseAddress;
  1496. UCHAR FirmwareVersion[16];
  1497. UCHAR FirmwareBuildTimeStamp[20];
  1498. #else
  1499. ULONG PlaceHolder;
  1500. #endif
  1501. } ALPHA_LOADER_BLOCK, *PALPHA_LOADER_BLOCK;
  1502. #if defined(_IA64_)
  1503. typedef struct _TR_INFO {
  1504. BOOLEAN Valid;
  1505. UCHAR Index;
  1506. USHORT Spare0;
  1507. ULONG PageSize;
  1508. ULONGLONG VirtualAddress;
  1509. ULONGLONG PhysicalAddress;
  1510. ULONGLONG PhysicalAddressMemoryDescriptor;
  1511. ULONG PageSizeMemoryDescriptor;
  1512. ULONG Spare1;
  1513. } TR_INFO, *PTR_INFO;
  1514. typedef struct _EFI_MEM_MAP_PARAM {
  1515. PUCHAR MemoryMap;
  1516. ULONGLONG MemoryMapSize;
  1517. ULONGLONG MapKey;
  1518. ULONGLONG DescriptorSize;
  1519. ULONG DescriptorVersion;
  1520. ULONG InitialPlatformPropertiesEfiFlags;
  1521. } EFI_MEM_MAP_PARAM, *PEFI_MEM_MAP_PARAM;
  1522. //
  1523. // VM info structure definitions
  1524. //
  1525. typedef union _IA64_VM_SUMMARY1 {
  1526. struct {
  1527. ULONGLONG HwWalker : 1;
  1528. ULONGLONG PhysAddrSize : 7;
  1529. ULONGLONG KeySize : 8;
  1530. ULONGLONG MaxPkr : 8;
  1531. ULONGLONG HashTagId : 8;
  1532. ULONGLONG MaxDtrEntry : 8;
  1533. ULONGLONG MaxItrEntry : 8;
  1534. ULONGLONG NumUniqueTcs : 8;
  1535. ULONGLONG NumTcLevels : 8;
  1536. };
  1537. ULONGLONG Ulong64;
  1538. } IA64_VM_SUMMARY1;
  1539. typedef union _IA64_VM_SUMMARY2 {
  1540. struct {
  1541. ULONGLONG ImplVaMsb : 8;
  1542. ULONGLONG RidSize : 8;
  1543. ULONGLONG Rsvd : 48;
  1544. };
  1545. ULONGLONG Ulong64;
  1546. } IA64_VM_SUMMARY2;
  1547. typedef union _IA64_DEPENDENT_FEATURES {
  1548. struct {
  1549. ULONGLONG Rsvd : 41;
  1550. ULONGLONG XIregResource : 1;
  1551. ULONGLONG XRegResource : 1;
  1552. ULONGLONG DisableDynamicPrediatePrediction : 1;
  1553. ULONGLONG DisableProcessorPhysicalNumber : 1;
  1554. ULONGLONG DisableDynamicDataCachePrefetch : 1;
  1555. ULONGLONG DisableDynamicInstructionCache : 1;
  1556. ULONGLONG DisableDynamicBranchPrediction : 1;
  1557. ULONGLONG Rsvd2 : 8;
  1558. ULONGLONG DisableBINIT : 1;
  1559. ULONGLONG DisableCoherency : 1;
  1560. ULONGLONG DisableCache : 1;
  1561. ULONGLONG EnableCMCIPromotion : 1;
  1562. ULONGLONG EnableMCAtoBINIT : 1;
  1563. };
  1564. ULONGLONG Ulong64;
  1565. } IA64_DEPENDENT_FEATURES;
  1566. typedef struct _IA64_PTCE_INFO {
  1567. ULONGLONG PtceBase;
  1568. union {
  1569. struct {
  1570. ULONG Count1;
  1571. ULONG Count2;
  1572. };
  1573. ULONGLONG Ulong64;
  1574. } PtceTcCount;
  1575. union {
  1576. struct {
  1577. ULONG Strides1;
  1578. ULONG Strides2;
  1579. };
  1580. ULONGLONG Ulong64;
  1581. } PtceStrides;
  1582. } IA64_PTCE_INFO;
  1583. typedef union _IA64_CACHE_INFO1 {
  1584. ULONGLONG Ulong64;
  1585. struct {
  1586. ULONGLONG Unified : 1;
  1587. ULONGLONG Attributes : 2;
  1588. ULONGLONG Reserved : 5;
  1589. ULONGLONG Associativity : 8;
  1590. ULONGLONG LineSize : 8;
  1591. ULONGLONG Stride : 8;
  1592. ULONGLONG StoreLatency : 8;
  1593. ULONGLONG LoadLatency : 8;
  1594. ULONGLONG StoreHints : 8;
  1595. ULONGLONG LoadHints : 8;
  1596. };
  1597. }IA64_CACHE_INFO1, *PIA64_CACHE_INFO1;
  1598. typedef union _IA64_CACHE_INFO2 {
  1599. ULONGLONG Ulong64;
  1600. struct {
  1601. ULONGLONG Size : 32;
  1602. ULONGLONG Alias : 8;
  1603. ULONGLONG TagLeastBit : 8;
  1604. ULONGLONG TagMostBit : 8;
  1605. ULONGLONG Reserved : 8;
  1606. };
  1607. }IA64_CACHE_INFO2, *PIA64_CACHE_INFO2;
  1608. #define CONFIG_INFO_CACHE_LEVELS 3
  1609. #define CONFIG_INFO_ICACHE 0
  1610. #define CONFIG_INFO_DCACHE 1
  1611. typedef struct _IA64_DEBUG_INFO {
  1612. ULONGLONG Status; // The following fields are only valid if Status = 0.
  1613. ULONGLONG InstDebugRegisterPairs; // Number of pairs of Instruction debug registers.
  1614. ULONGLONG DataDebugRegisterPairs; // Number of pairs of Data debug registers.
  1615. } IA64_DEBUG_INFO, *PIA64_DEBUG_INFO;
  1616. typedef struct _IA64_PERFMON_INFO {
  1617. ULONGLONG Status; // The following fields are only valid if Status = 0.
  1618. union {
  1619. ULONGLONG Ulong64;
  1620. struct {
  1621. ULONGLONG PerfMonGenericPairs : 8;
  1622. ULONGLONG ImplementedCounterWidth : 8;
  1623. ULONGLONG ProcessorCyclesEventType : 8;
  1624. ULONGLONG RetiredInstructionBundlesEventType : 8;
  1625. ULONGLONG Reserved : 32;
  1626. };
  1627. };
  1628. // Note: The next following 128 bytes have to be continuous.
  1629. UCHAR PerfMonCnfgMask[32]; // which PMC registers are implemented
  1630. UCHAR PerfMonDataMask[32]; // which PMD registers are implemented
  1631. UCHAR ProcessorCyclesMask[32]; // which registers can count cycles
  1632. UCHAR RetiredInstructionBundlesMask[32]; // which registers can count retired bundles
  1633. } IA64_PERFMON_INFO, *PIA64_PERFMON_INFO;
  1634. typedef struct _PROCESSOR_CONFIG_INFO {
  1635. ULONGLONG InsertPageSizeInfo;
  1636. ULONGLONG PurgePageSizeInfo;
  1637. IA64_VM_SUMMARY1 VmSummaryInfo1;
  1638. IA64_VM_SUMMARY2 VmSummaryInfo2;
  1639. ULONGLONG NumOfPhysStackedRegs;
  1640. ULONGLONG RseHints;
  1641. IA64_PTCE_INFO PtceInfo;
  1642. IA64_DEPENDENT_FEATURES FeaturesImplemented;
  1643. IA64_DEPENDENT_FEATURES FeaturesCurSetting;
  1644. IA64_DEPENDENT_FEATURES FeaturesSoftControl;
  1645. ULONGLONG ImplRegisterInfo1;
  1646. ULONGLONG ImplRegisterInfo2;
  1647. ULONG CacheFlushStride;
  1648. ULONG LargestCacheLine;
  1649. ULONG NumberOfCacheLevels;
  1650. IA64_CACHE_INFO1 CacheInfo1[2][CONFIG_INFO_CACHE_LEVELS]; // Pass several levels of cache information
  1651. IA64_CACHE_INFO2 CacheInfo2[2][CONFIG_INFO_CACHE_LEVELS]; // One each for instruction and data.
  1652. ULONGLONG CpuId3;
  1653. IA64_DEBUG_INFO DebugInfo;
  1654. IA64_PERFMON_INFO PerfMonInfo;
  1655. } PROCESSOR_CONFIG_INFO, *PPROCESSOR_CONFIG_INFO;
  1656. #endif
  1657. typedef struct _IA64_LOADER_BLOCK {
  1658. #if defined(_IA64_)
  1659. ULONG MachineType;
  1660. ULONG WakeupVector;
  1661. ULONG_PTR KernelPhysicalBase;
  1662. ULONG_PTR KernelVirtualBase;
  1663. ULONG_PTR InterruptStack;
  1664. ULONG_PTR PanicStack;
  1665. ULONG_PTR PcrPage;
  1666. ULONG_PTR PdrPage;
  1667. ULONG_PTR PcrPage2;
  1668. ULONG_PTR FpswaInterface;
  1669. ULONG_PTR EfiSystemTable;
  1670. ULONG_PTR AcpiRsdt;
  1671. TR_INFO Pal;
  1672. //
  1673. // K.B. We don't really use a TR to map these, but the TR_INFO structure
  1674. // is useful to comminicate info about these entries to the system.
  1675. //
  1676. TR_INFO Sal;
  1677. TR_INFO SalGP;
  1678. TR_INFO ItrInfo[8];
  1679. TR_INFO DtrInfo[8];
  1680. EFI_MEM_MAP_PARAM EfiMemMapParam;
  1681. ULONG_PTR Reserved[10];
  1682. PROCESSOR_CONFIG_INFO ProcessorConfigInfo;
  1683. #else
  1684. ULONG PlaceHolder;
  1685. #endif
  1686. } IA64_LOADER_BLOCK, *PIA64_LOADER_BLOCK;
  1687. typedef struct _LOADER_PARAMETER_EXTENSION {
  1688. ULONG Size; // set to sizeof (struct _LOADER_PARAMETER_EXTENSION)
  1689. PROFILE_PARAMETER_BLOCK Profile;
  1690. ULONG MajorVersion;
  1691. ULONG MinorVersion;
  1692. PVOID InfFileImage; // Inf used to identify "broken" machines.
  1693. ULONG InfFileSize;
  1694. //
  1695. // Pointer to the triage block, if present.
  1696. //
  1697. PVOID TriageDumpBlock;
  1698. ULONG LoaderPagesSpanned; // Virtual Memory spanned by the loader
  1699. // that MM cannot recover the VA for.
  1700. struct _HEADLESS_LOADER_BLOCK *HeadlessLoaderBlock;
  1701. struct _SMBIOS_TABLE_HEADER *SMBiosEPSHeader;
  1702. PVOID DrvDBImage; // Database used to identify "broken" drivers.
  1703. ULONG DrvDBSize;
  1704. // If booting from the Network (PXE) then we will
  1705. // save the Network boot params in this loader block
  1706. struct _NETWORK_LOADER_BLOCK *NetworkLoaderBlock;
  1707. #if defined(_X86_)
  1708. //
  1709. // Pointers to IRQL translation tables that reside in the HAL
  1710. // and are exposed to the kernel for use in the "inlined IRQL"
  1711. // build
  1712. //
  1713. PUCHAR HalpIRQLToTPR;
  1714. PUCHAR HalpVectorToIRQL;
  1715. #endif
  1716. //
  1717. // Firmware Location
  1718. //
  1719. LIST_ENTRY FirmwareDescriptorListHead;
  1720. } LOADER_PARAMETER_EXTENSION, *PLOADER_PARAMETER_EXTENSION;
  1721. struct _SETUP_LOADER_BLOCK;
  1722. struct _HEADLESS_LOADER_BLOCK;
  1723. struct _SMBIOS_TABLE_HEADER;
  1724. typedef struct _NETWORK_LOADER_BLOCK {
  1725. // Binary contents of the entire DHCP Acknowledgment
  1726. // packet received by PXE.
  1727. PUCHAR DHCPServerACK;
  1728. ULONG DHCPServerACKLength;
  1729. // Binary contents of the entire BINL Reply
  1730. // packet received by PXE.
  1731. PUCHAR BootServerReplyPacket;
  1732. ULONG BootServerReplyPacketLength;
  1733. } NETWORK_LOADER_BLOCK, * PNETWORK_LOADER_BLOCK;
  1734. typedef struct _LOADER_PARAMETER_BLOCK {
  1735. LIST_ENTRY LoadOrderListHead;
  1736. LIST_ENTRY MemoryDescriptorListHead;
  1737. LIST_ENTRY BootDriverListHead;
  1738. ULONG_PTR KernelStack;
  1739. ULONG_PTR Prcb;
  1740. ULONG_PTR Process;
  1741. ULONG_PTR Thread;
  1742. ULONG RegistryLength;
  1743. PVOID RegistryBase;
  1744. PCONFIGURATION_COMPONENT_DATA ConfigurationRoot;
  1745. PCHAR ArcBootDeviceName;
  1746. PCHAR ArcHalDeviceName;
  1747. PCHAR NtBootPathName;
  1748. PCHAR NtHalPathName;
  1749. PCHAR LoadOptions;
  1750. PNLS_DATA_BLOCK NlsData;
  1751. PARC_DISK_INFORMATION ArcDiskInformation;
  1752. PVOID OemFontFile;
  1753. struct _SETUP_LOADER_BLOCK *SetupLoaderBlock;
  1754. PLOADER_PARAMETER_EXTENSION Extension;
  1755. union {
  1756. I386_LOADER_BLOCK I386;
  1757. ALPHA_LOADER_BLOCK Alpha;
  1758. IA64_LOADER_BLOCK Ia64;
  1759. } u;
  1760. } LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
  1761. #endif // _ARC_