Source code of Windows XP (NT5)
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.

1241 lines
55 KiB

  1. /*++ BUILD Version: 0011 // Increment this if a change has global effects
  2. Copyright (c) 1991-2001 Microsoft Corporation
  3. Module Name:
  4. mce.h
  5. Abstract:
  6. This header file defines the Machine Check Errors definitions.
  7. Author:
  8. David N. Cutler (davec)
  9. Revision History:
  10. Creation: 04-Apr-2001
  11. --*/
  12. #ifndef _MCE_
  13. #define _MCE_
  14. //
  15. // HalMcaLogInformation
  16. //
  17. #if defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
  18. //
  19. // ADDR register for each MCA bank
  20. //
  21. typedef union _MCI_ADDR{
  22. struct {
  23. ULONG Address;
  24. ULONG Reserved;
  25. };
  26. ULONGLONG QuadPart;
  27. } MCI_ADDR, *PMCI_ADDR;
  28. typedef enum {
  29. HAL_MCE_RECORD,
  30. HAL_MCA_RECORD
  31. } MCA_EXCEPTION_TYPE;
  32. #if defined(_AMD64_)
  33. //
  34. // STATUS register for each MCA bank.
  35. //
  36. typedef union _MCI_STATS {
  37. struct {
  38. USHORT McaCod;
  39. USHORT MsCod;
  40. ULONG OtherInfo : 25;
  41. ULONG Damage : 1;
  42. ULONG AddressValid : 1;
  43. ULONG MiscValid : 1;
  44. ULONG Enabled : 1;
  45. ULONG UnCorrected : 1;
  46. ULONG OverFlow : 1;
  47. ULONG Valid : 1;
  48. } MciStats;
  49. ULONG64 QuadPart;
  50. } MCI_STATS, *PMCI_STATS;
  51. #endif // _AMD64_
  52. #if defined(_X86_)
  53. //
  54. // STATUS register for each MCA bank.
  55. //
  56. typedef union _MCI_STATS {
  57. struct {
  58. USHORT McaCod;
  59. USHORT MsCod;
  60. ULONG OtherInfo : 25;
  61. ULONG Damage : 1;
  62. ULONG AddressValid : 1;
  63. ULONG MiscValid : 1;
  64. ULONG Enabled : 1;
  65. ULONG UnCorrected : 1;
  66. ULONG OverFlow : 1;
  67. ULONG Valid : 1;
  68. } MciStats;
  69. ULONGLONG QuadPart;
  70. } MCI_STATS, *PMCI_STATS;
  71. #endif // _X86_
  72. //
  73. // MCA exception log entry
  74. // Defined as a union to contain MCA specific log or Pentium style MCE info.
  75. //
  76. #define MCA_EXTREG_V2MAX 24 // X86: Max. Number of extended registers
  77. #if defined(_X86_) || defined(_AMD64_)
  78. typedef struct _MCA_EXCEPTION {
  79. // Begin Version 1 stuff
  80. ULONG VersionNumber; // Version number of this record type
  81. MCA_EXCEPTION_TYPE ExceptionType; // MCA or MCE
  82. LARGE_INTEGER TimeStamp; // exception recording timestamp
  83. ULONG ProcessorNumber;
  84. ULONG Reserved1;
  85. union {
  86. struct {
  87. UCHAR BankNumber;
  88. UCHAR Reserved2[7];
  89. MCI_STATS Status;
  90. MCI_ADDR Address;
  91. ULONGLONG Misc;
  92. } Mca;
  93. struct {
  94. ULONGLONG Address; // physical addr of cycle causing the error
  95. ULONGLONG Type; // cycle specification causing the error
  96. } Mce;
  97. } u;
  98. // End Version 1 stuff
  99. // Begin Version 2 stuff
  100. ULONG ExtCnt;
  101. ULONG Reserved3;
  102. ULONGLONG ExtReg[MCA_EXTREG_V2MAX];
  103. // End Version 2 stuff
  104. } MCA_EXCEPTION, *PMCA_EXCEPTION;
  105. typedef MCA_EXCEPTION CMC_EXCEPTION, *PCMC_EXCEPTION; // Corrected Machine Check
  106. typedef MCA_EXCEPTION CPE_EXCEPTION, *PCPE_EXCEPTION; // Corrected Platform Error
  107. #define MCA_EXCEPTION_V1_SIZE FIELD_OFFSET(MCA_EXCEPTION, ExtCnt)
  108. #define MCA_EXCEPTION_V2_SIZE sizeof(struct _MCA_EXCEPTION)
  109. #endif // _X86_ || _AMD64_
  110. #if defined(_IA64_)
  111. #if 0
  112. // FIXFIX: This should not be required for IA64.
  113. //
  114. // STATUS register for each MCA bank.
  115. //
  116. typedef union _MCI_STATS {
  117. struct {
  118. USHORT McaCod;
  119. USHORT MsCod;
  120. ULONG OtherInfo : 25;
  121. ULONG Damage : 1;
  122. ULONG AddressValid : 1;
  123. ULONG MiscValid : 1;
  124. ULONG Enabled : 1;
  125. ULONG UnCorrected : 1;
  126. ULONG OverFlow : 1;
  127. ULONG Valid : 1;
  128. } MciStats;
  129. ULONGLONG QuadPart;
  130. } MCI_STATS, *PMCI_STATS;
  131. #endif // 0
  132. //
  133. // IA64 ERRORS: ERROR_REVISION definitions
  134. //
  135. typedef union _ERROR_REVISION {
  136. USHORT Revision; // Major and Minor revision number of the record:
  137. struct {
  138. UCHAR Minor; // Byte0: Minor.
  139. UCHAR Major; // Byte1: Major.
  140. };
  141. } ERROR_REVISION, *PERROR_REVISION;
  142. // For Info:
  143. #define ERROR_REVISION_SAL_03_00 { 2, 0 }
  144. //
  145. // IA64 ERRORS: ERROR_SEVERITY definitions
  146. //
  147. // One day the MS compiler will support typed enums with type != int so this
  148. // type of enums (UCHAR, __int64) could be defined...
  149. //
  150. typedef UCHAR ERROR_SEVERITY, *PERROR_SEVERITY;
  151. typedef enum _ERROR_SEVERITY_VALUE {
  152. ErrorRecoverable = 0,
  153. ErrorFatal = 1,
  154. ErrorCorrected = 2,
  155. ErrorOthers = 3, // [3,...] values are reserved
  156. } ERROR_SEVERITY_VALUE;
  157. //
  158. // IA64 ERRORS: ERROR_TIMESTAMP definitions
  159. //
  160. typedef union _ERROR_TIMESTAMP {
  161. ULONGLONG TimeStamp;
  162. struct {
  163. UCHAR Seconds; // Byte0: Seconds
  164. UCHAR Minutes; // Byte1: Minutes
  165. UCHAR Hours; // Byte2: Hours
  166. UCHAR Reserved; // Byte3: Reserved
  167. UCHAR Day; // Byte4: Day
  168. UCHAR Month; // Byte5: Month
  169. UCHAR Year; // Byte6: Year
  170. UCHAR Century; // Byte7: Century
  171. };
  172. } ERROR_TIMESTAMP, *PERROR_TIMESTAMP;
  173. //
  174. // IA64 ERRORS: ERROR_GUID definitions
  175. //
  176. typedef struct _ERROR_GUID {
  177. ULONG Data1;
  178. USHORT Data2;
  179. USHORT Data3;
  180. UCHAR Data4[8];
  181. } ERROR_GUID, *PERROR_GUID;
  182. //
  183. // IA64 ERRORS: ERROR GUIDs definitions
  184. //
  185. typedef ERROR_GUID _ERROR_DEVICE_GUID;
  186. typedef _ERROR_DEVICE_GUID ERROR_DEVICE_GUID, *PERROR_DEVICE_GUID;
  187. typedef ERROR_GUID _ERROR_PLATFORM_GUID;
  188. typedef _ERROR_PLATFORM_GUID ERROR_PLATFORM_GUID, *PERROR_PLATFORM_GUID;
  189. //
  190. // IA64 ERRORS: ERROR_RECORD_HEADER definitions
  191. //
  192. typedef union _ERROR_RECORD_VALID {
  193. UCHAR Valid;
  194. struct { // Bits
  195. UCHAR OemPlatformID:1; // 0: OEM Platform Id is present in the record header
  196. UCHAR Reserved:7; // 1-7: Reserved
  197. };
  198. } ERROR_RECORD_VALID, *PERROR_RECORD_VALID;
  199. typedef struct _ERROR_RECORD_HEADER { // Offsets:
  200. ULONGLONG Id; // 0: Unique identifier
  201. ERROR_REVISION Revision; // 8: Major and Minor revision number of the record
  202. ERROR_SEVERITY ErrorSeverity; // 10: Error Severity
  203. ERROR_RECORD_VALID Valid; // 11: Validation bits
  204. ULONG Length; // 12: Length of this record in bytes, including the header
  205. ERROR_TIMESTAMP TimeStamp; // 16: Timestamp recorded when event occured
  206. UCHAR OemPlatformId[16]; // 24: Unique platform identifier. OEM defined.
  207. } ERROR_RECORD_HEADER, *PERROR_RECORD_HEADER;
  208. //
  209. // IA64 ERRORS: ERROR_SECTION_HEADER definitions
  210. //
  211. typedef union _ERROR_RECOVERY_INFO {
  212. UCHAR RecoveryInfo;
  213. struct { // Bits:
  214. UCHAR Corrected:1; // 0: Corrected
  215. UCHAR NotContained:1; // 1: Containment Warning
  216. UCHAR Reset:1; // 2: Reset
  217. UCHAR Reserved:4; // 6-3: Reserved
  218. UCHAR Valid:1; // 7: Valid Recovery Information
  219. };
  220. } ERROR_RECOVERY_INFO, *PERROR_RECOVERY_INFO;
  221. typedef struct _ERROR_SECTION_HEADER {
  222. ERROR_DEVICE_GUID Guid; // Unique identifier
  223. ERROR_REVISION Revision; // Major and Minor revision number of the section
  224. ERROR_RECOVERY_INFO RecoveryInfo; // Recovery Information
  225. UCHAR Reserved;
  226. ULONG Length; // Length of this error device section in bytes,
  227. // including the header.
  228. } ERROR_SECTION_HEADER, *PERROR_SECTION_HEADER;
  229. //
  230. // IA64 Machine Check Error Logs:
  231. // WMI requires processor LID being stored in the Log.
  232. // This LID corresponds to the processor on which the SAL_PROC was executed on.
  233. //
  234. // TEMPTEMP: Implementation is temporary, until we implement HAL SW Error Section.
  235. // Note that the current FW builds do not update the _ERROR_PROCESSOR.CRLid field,
  236. // assuming there is a _ERROR_PROCESSOR section in the record.
  237. //
  238. #if !defined(__midl)
  239. __inline
  240. USHORT
  241. GetFwMceLogProcessorNumber(
  242. PERROR_RECORD_HEADER Log
  243. )
  244. {
  245. PERROR_SECTION_HEADER section = (PERROR_SECTION_HEADER)((ULONG64)Log + sizeof(*Log));
  246. USHORT lid = (USHORT)((UCHAR)(section->Reserved));
  247. lid |= (USHORT)((UCHAR)(Log->TimeStamp.Reserved) << 8);
  248. return( lid );
  249. } // GetFwMceLogProcessorNumber()
  250. #endif // !__midl
  251. //
  252. // IA64 ERRORS: ERROR_PROCESSOR device definitions
  253. //
  254. // The MCA architecture supports five different types of error reporting functional units
  255. // with the associated error records and its error severity.
  256. // At any point in time, a processor could encounter an MCA/CMC event due to errors detected
  257. // in one or more of the following units:
  258. // - Cache Check
  259. // - TLB Check
  260. // - Bus Check
  261. // - Register File
  262. // - Micro Architectural
  263. //
  264. // Terminology:
  265. //
  266. // - Target Address:
  267. // 64-bit integer containing the physical address where the data was to be delivered or
  268. // obtained. This could also be the incoming address for external snoops and TLB shoot-downs.
  269. //
  270. // - Requestor Identifier:
  271. // 64-bit integer specifying the bus agent that generated the transaction responsible for
  272. // the Machine Check event.
  273. //
  274. // - Responder Identifier:
  275. // 64-bit integer specifying the bus agent that responded to a transaction responsible for
  276. // the Machine Check event.
  277. //
  278. // - Precise Instruction Pointer:
  279. // 64-bit integer specifying the virtual address that points to the IA-64 bundle that
  280. // contained the instruction responsible for the Machine Check event.
  281. //
  282. #define ERROR_PROCESSOR_GUID \
  283. { 0xe429faf1, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  284. typedef union _ERROR_MODINFO_VALID {
  285. ULONGLONG Valid;
  286. struct { // Bits
  287. ULONGLONG CheckInfo: 1; // 0:
  288. ULONGLONG RequestorIdentifier: 1; // 1:
  289. ULONGLONG ResponderIdentifier: 1; // 2:
  290. ULONGLONG TargetIdentifier: 1; // 3:
  291. ULONGLONG PreciseIP: 1; // 4:
  292. ULONGLONG Reserved: 59; // 5-63:
  293. };
  294. } ERROR_MODINFO_VALID, *PERROR_MODINFO_VALID;
  295. typedef enum _ERROR_CHECK_IS {
  296. isIA64 = 0,
  297. isIA32 = 1,
  298. } ERROR_CHECK_IS;
  299. typedef enum _ERROR_CACHE_CHECK_OPERATION {
  300. CacheUnknownOp = 0,
  301. CacheLoad = 1,
  302. CacheStore = 2,
  303. CacheInstructionFetch = 3,
  304. CacheDataPrefetch = 4,
  305. CacheSnoop = 5,
  306. CacheCastOut = 6,
  307. CacheMoveIn = 7,
  308. } ERROR_CACHE_CHECK_OPERATION;
  309. typedef enum _ERROR_CACHE_CHECK_MESI {
  310. CacheInvalid = 0,
  311. CacheHeldShared = 1,
  312. CacheHeldExclusive = 2,
  313. CacheModified = 3,
  314. } ERROR_CACHE_CHECK_MESI;
  315. typedef union _ERROR_CACHE_CHECK {
  316. ULONGLONG CacheCheck;
  317. struct
  318. {
  319. ULONGLONG Operation:4; // bits 0- 3: Cache operation
  320. ULONGLONG Level:2; // 4- 5: Cache Level
  321. ULONGLONG Reserved1:2; // 6- 7
  322. ULONGLONG DataLine:1; // 8 : Failure data part of cache line
  323. ULONGLONG TagLine:1; // 9 : Failure tag part of cache line
  324. ULONGLONG DataCache:1; // 10 : Failure in data cache
  325. ULONGLONG InstructionCache:1; // 11 : Failure in instruction cache
  326. ULONGLONG MESI:3; // 12-14:
  327. ULONGLONG MESIValid:1; // 15 : MESI field is valid
  328. ULONGLONG Way:5; // 16-20: Failure in Way of Cache
  329. ULONGLONG WayIndexValid:1; // 21 : Way and Index fields valid
  330. ULONGLONG Reserved2:10; // 22-31
  331. ULONGLONG Index:20; // 32-51: Index of cache line
  332. ULONGLONG Reserved3:2; // 52-53
  333. ULONGLONG InstructionSet:1; // 54 : 0 - IA64 instruction, 1- IA32 instruction
  334. ULONGLONG InstructionSetValid:1; // 55 : InstructionSet field is valid
  335. ULONGLONG PrivilegeLevel:2; // 56-57: Privlege level of instrustion
  336. ULONGLONG PrivilegeLevelValid:1; // 58 : PrivilegeLevel field is Valid
  337. ULONGLONG MachineCheckCorrected:1; // 59 : 1 - Machine Check Corrected
  338. ULONGLONG TargetAddressValid:1; // 60 : Target Address is valid
  339. ULONGLONG RequestIdValid:1; // 61 : RequestId is valid
  340. ULONGLONG ResponderIdValid:1; // 62 : ResponderId is valid
  341. ULONGLONG PreciseIPValid:1; // 63 : Precise Inststruction Pointer is Valid
  342. };
  343. } ERROR_CACHE_CHECK, *PERROR_CACHE_CHECK;
  344. typedef enum _ERROR_TLB_CHECK_OPERATION {
  345. TlbUnknownOp = 0,
  346. TlbAccessWithLoad = 1,
  347. TlbAccessWithStore = 2,
  348. TlbAccessWithInstructionFetch = 3,
  349. TlbAccessWithDataPrefetch = 4,
  350. TlbShootDown = 5,
  351. TlbProbe = 6,
  352. TlbVhptFill = 7,
  353. } ERROR_TLB_CHECK_OPERATION;
  354. typedef union _ERROR_TLB_CHECK {
  355. ULONGLONG TlbCheck;
  356. struct
  357. {
  358. ULONGLONG TRSlot:8; // bits 0- 7: Slot number of Translation Register
  359. ULONGLONG TRSlotValid:1; // 8 : TRSlot field is valid
  360. ULONGLONG Reserved1:1; // 9
  361. ULONGLONG Level:2; // 10-11: TLB Level
  362. ULONGLONG Reserved2:4; // 12-15
  363. ULONGLONG DataTransReg:1; // 16 : Error in data translation register
  364. ULONGLONG InstructionTransReg:1; // 17 : Error in instruction translation register
  365. ULONGLONG DataTransCache:1; // 18 : Error in data translation cache
  366. ULONGLONG InstructionTransCache:1; // 19 : Error in instruction translation cache
  367. ULONGLONG Operation:4; // 20-23: Operation
  368. ULONGLONG Reserved3:30; // 24-53
  369. ULONGLONG InstructionSet:1; // 54 : 0 - IA64 instruction, 1- IA32 instruction
  370. ULONGLONG InstructionSetValid:1; // 55 : InstructionSet field is valid
  371. ULONGLONG PrivilegeLevel:2; // 56-57: Privlege level of instrustion
  372. ULONGLONG PrivilegeLevelValid:1; // 58 : PrivilegeLevel field is Valid
  373. ULONGLONG MachineCheckCorrected:1; // 59 : 1 - Machine Check Corrected
  374. ULONGLONG TargetAddressValid:1; // 60 : Target Address is valid
  375. ULONGLONG RequestIdValid:1; // 61 : RequestId is valid
  376. ULONGLONG ResponderIdValid:1; // 62 : ResponderId is valid
  377. ULONGLONG PreciseIPValid:1; // 63 : Precise Inststruction Pointer is Valid
  378. };
  379. } ERROR_TLB_CHECK, *PERROR_TLB_CHECK;
  380. typedef enum _ERROR_BUS_CHECK_OPERATION {
  381. BusUnknownOp = 0,
  382. BusPartialRead = 1,
  383. BusPartialWrite = 2,
  384. BusFullLineRead = 3,
  385. BusFullLineWrite = 4,
  386. BusWriteBack = 5,
  387. BusSnoopProbe = 6,
  388. BusIncomingPtcG = 7,
  389. BusWriteCoalescing = 8,
  390. } ERROR_BUS_CHECK_OPERATION;
  391. typedef union _ERROR_BUS_CHECK {
  392. ULONGLONG BusCheck;
  393. struct
  394. {
  395. ULONGLONG Size:5; // bits 0- 4: Transaction size
  396. ULONGLONG Internal:1; // 5 : Internal bus error
  397. ULONGLONG External:1; // 6 : External bus error
  398. ULONGLONG CacheTransfer:1; // 7 : Error occured in Cache to Cache Transfer
  399. ULONGLONG Type:8; // 8-15: Transaction type
  400. ULONGLONG Severity:5; // 16-20: Error severity - platform specific
  401. ULONGLONG Hierarchy:2; // 21-22: Level or Bus hierarchy
  402. ULONGLONG Reserved1:1; // 23
  403. ULONGLONG Status:8; // 24-31: Bus error status - processor bus specific
  404. ULONGLONG Reserved2:22; // 32-53
  405. ULONGLONG InstructionSet:1; // 54 : 0 - IA64 instruction, 1- IA32 instruction
  406. ULONGLONG InstructionSetValid:1; // 55 : InstructionSet field is valid
  407. ULONGLONG PrivilegeLevel:2; // 56-57: Privlege level of instrustion
  408. ULONGLONG PrivilegeLevelValid:1; // 58 : PrivilegeLevel field is Valid
  409. ULONGLONG MachineCheckCorrected:1; // 59 : 1 - Machine Check Corrected
  410. ULONGLONG TargetAddressValid:1; // 60 : Target Address is valid
  411. ULONGLONG RequestIdValid:1; // 61 : RequestId is valid
  412. ULONGLONG ResponderIdValid:1; // 62 : ResponderId is valid
  413. ULONGLONG PreciseIPValid:1; // 63 : Precise Inststruction Pointer is Valid
  414. };
  415. } ERROR_BUS_CHECK, *PERROR_BUS_CHECK;
  416. typedef enum _ERROR_REGFILE_CHECK_IDENTIFIER {
  417. RegFileUnknownId = 0,
  418. GeneralRegisterBank1 = 1,
  419. GeneralRegisterBank0 = 2,
  420. FloatingPointRegister = 3,
  421. BranchRegister = 4,
  422. PredicateRegister = 5,
  423. ApplicationRegister = 6,
  424. ControlRegister = 7,
  425. RegionRegister = 8,
  426. ProtectionKeyRegister = 9,
  427. DataBreakPointRegister = 10,
  428. InstructionBreakPointRegister = 11,
  429. PerformanceMonitorControlRegister = 12,
  430. PerformanceMonitorDataRegister = 13,
  431. } ERROR_REGFILE_CHECK_IDENTIFIER;
  432. typedef enum _ERROR_REGFILE_CHECK_OPERATION {
  433. RegFileUnknownOp = 0,
  434. RegFileRead = 1,
  435. RegFileWrite = 2,
  436. } ERROR_REGFILE_CHECK_OPERATION;
  437. typedef union _ERROR_REGFILE_CHECK {
  438. ULONGLONG RegFileCheck;
  439. struct
  440. {
  441. ULONGLONG Identifier:4; // bits 0- 3: Register file identifier
  442. ULONGLONG Operation:4; // 4- 7: Operation that causes the MC event
  443. ULONGLONG RegisterNumber:7; // 8-14: Register number responsible for MC event
  444. ULONGLONG RegisterNumberValid:1; // 15 : Register number field is valid
  445. ULONGLONG Reserved1:38; // 16-53
  446. ULONGLONG InstructionSet:1; // 54 : 0 - IA64 instruction, 1- IA32 instruction
  447. ULONGLONG InstructionSetValid:1; // 55 : InstructionSet field is valid
  448. ULONGLONG PrivilegeLevel:2; // 56-57: Privlege level of instrustion
  449. ULONGLONG PrivilegeLevelValid:1; // 58 : PrivilegeLevel field is Valid
  450. ULONGLONG MachineCheckCorrected:1; // 59 : 1 - Machine Check Corrected
  451. ULONGLONG Reserved2:3; // 60-62
  452. ULONGLONG PreciseIPValid:1; // 63 : Precise Inststruction Pointer is Valid
  453. };
  454. } ERROR_REGFILE_CHECK, *PERROR_REGFILE_CHECK;
  455. typedef enum _ERROR_MS_CHECK_OPERATION {
  456. MsUnknownOp = 0,
  457. MsReadOrLoad = 1,
  458. MsWriteOrStore = 2,
  459. } ERROR_MS_CHECK_OPERATION;
  460. typedef union _ERROR_MS_CHECK {
  461. ULONGLONG MsCheck;
  462. struct
  463. {
  464. ULONGLONG StructureIdentifier:5; // bits 0- 4: Structure Identifier - impl. specific
  465. ULONGLONG Level:3; // 5- 7: Structure Level where error was generated
  466. ULONGLONG ArrayId:4; // 8-11: Identification of the array
  467. ULONGLONG Operation:4; // 12-15: Operation
  468. ULONGLONG Way:6; // 16-21: Way where the error was located
  469. ULONGLONG WayValid:1; // 22 : Way field is valid
  470. ULONGLONG IndexValid:1; // 23 : Index field is valid
  471. ULONGLONG Reserved1:8; // 24-31
  472. ULONGLONG Index:8; // 32-39: Index where the error was located
  473. ULONGLONG Reserved2:14; // 40-53
  474. ULONGLONG InstructionSet:1; // 54 : 0 - IA64 instruction, 1- IA32 instruction
  475. ULONGLONG InstructionSetValid:1; // 55 : InstructionSet field is valid
  476. ULONGLONG PrivilegeLevel:2; // 56-57: Privlege level of instrustion
  477. ULONGLONG PrivilegeLevelValid:1; // 58 : PrivilegeLevel field is Valid
  478. ULONGLONG MachineCheckCorrected:1; // 59 : 1 - Machine Check Corrected
  479. ULONGLONG TargetAddressValid:1; // 60 : Target Address is valid
  480. ULONGLONG RequestIdValid:1; // 61 : RequestId is valid
  481. ULONGLONG ResponderIdValid:1; // 62 : ResponderId is valid
  482. ULONGLONG PreciseIPValid:1; // 63 : Precise Inststruction Pointer is Valid
  483. };
  484. } ERROR_MS_CHECK, *PERROR_MS_CHECK;
  485. typedef union _ERROR_CHECK_INFO {
  486. ULONGLONG CheckInfo;
  487. ERROR_CACHE_CHECK CacheCheck;
  488. ERROR_TLB_CHECK TlbCheck;
  489. ERROR_BUS_CHECK BusCheck;
  490. ERROR_REGFILE_CHECK RegFileCheck;
  491. ERROR_MS_CHECK MsCheck;
  492. } ERROR_CHECK_INFO, *PERROR_CHECK_INFO;
  493. // SAL Specs July 2000: The size of _ERROR_MODINFO will always be 48 Bytes.
  494. typedef struct _ERROR_MODINFO {
  495. ERROR_MODINFO_VALID Valid;
  496. ERROR_CHECK_INFO CheckInfo;
  497. ULONGLONG RequestorId;
  498. ULONGLONG ResponderId;
  499. ULONGLONG TargetId;
  500. ULONGLONG PreciseIP;
  501. } ERROR_MODINFO, *PERROR_MODINFO;
  502. typedef union _ERROR_PROCESSOR_VALID {
  503. ULONGLONG Valid;
  504. struct { // Bits
  505. ULONGLONG ErrorMap: 1; // 0:
  506. ULONGLONG StateParameter: 1; // 1:
  507. ULONGLONG CRLid: 1; // 2:
  508. ULONGLONG StaticStruct:1; // 3: Processor Static Info error.
  509. ULONGLONG CacheCheckNum:4; // 4-7: Cache errors.
  510. ULONGLONG TlbCheckNum:4; // 8-11: Tlb errors.
  511. ULONGLONG BusCheckNum:4; // 12-15: Bus errors.
  512. ULONGLONG RegFileCheckNum:4; // 16-19: Registers file errors.
  513. ULONGLONG MsCheckNum:4; // 20-23: Micro-Architecture errors.
  514. ULONGLONG CpuIdInfo:1; // 24: CPUID Info.
  515. ULONGLONG Reserved:39; // 25-63: Reserved.
  516. };
  517. } ERROR_PROCESSOR_VALID, *PERROR_PROCESSOR_VALID;
  518. typedef union _ERROR_PROCESSOR_ERROR_MAP {
  519. ULONGLONG ErrorMap;
  520. struct {
  521. ULONGLONG Cid:4; // bits 0- 3: Processor Core Identifier
  522. ULONGLONG Tid:4; // 4- 7: Logical Thread Identifier
  523. ULONGLONG Eic:4; // 8-11: Instruction Caches Level Information
  524. ULONGLONG Edc:4; // 12-15: Data Caches Level Information
  525. ULONGLONG Eit:4; // 16-19: Instruction TLB Level Information
  526. ULONGLONG Edt:4; // 20-23: Data TLB Level Information
  527. ULONGLONG Ebh:4; // 24-27: Processor Bus Level Information
  528. ULONGLONG Erf:4; // 28-31: Register File Level Information
  529. ULONGLONG Ems:16; // 32-47: MicroArchitecture Level Information
  530. ULONGLONG Reserved:16;
  531. };
  532. } ERROR_PROCESSOR_ERROR_MAP, *PERROR_PROCESSOR_ERROR_MAP;
  533. typedef ERROR_PROCESSOR_ERROR_MAP _ERROR_PROCESSOR_LEVEL_INDEX;
  534. typedef _ERROR_PROCESSOR_LEVEL_INDEX ERROR_PROCESSOR_LEVEL_INDEX, *PERROR_PROCESSOR_LEVEL_INDEX;
  535. typedef union _ERROR_PROCESSOR_STATE_PARAMETER {
  536. ULONGLONG StateParameter;
  537. struct {
  538. ULONGLONG reserved0:2; // 0-1 : reserved
  539. ULONGLONG rz:1; // 2 : Rendez-vous successful
  540. ULONGLONG ra:1; // 3 : Rendez-vous attempted
  541. ULONGLONG me:1; // 4 : Distinct Multiple errors
  542. ULONGLONG mn:1; // 5 : Min-state Save Area registered
  543. ULONGLONG sy:1; // 6 : Storage integrity synchronized
  544. ULONGLONG co:1; // 7 : Continuable
  545. ULONGLONG ci:1; // 8 : Machine Check isolated
  546. ULONGLONG us:1; // 9 : Uncontained Storage damage
  547. ULONGLONG hd:1; // 10 : Hardware damage
  548. ULONGLONG tl:1; // 11 : Trap lost
  549. ULONGLONG mi:1; // 12 : More Information
  550. ULONGLONG pi:1; // 13 : Precise Instruction pointer
  551. ULONGLONG pm:1; // 14 : Precise Min-state Save Area
  552. ULONGLONG dy:1; // 15 : Processor Dynamic State valid
  553. ULONGLONG in:1; // 16 : INIT interruption
  554. ULONGLONG rs:1; // 17 : RSE valid
  555. ULONGLONG cm:1; // 18 : Machine Check corrected
  556. ULONGLONG ex:1; // 19 : Machine Check expected
  557. ULONGLONG cr:1; // 20 : Control Registers valid
  558. ULONGLONG pc:1; // 21 : Performance Counters valid
  559. ULONGLONG dr:1; // 22 : Debug Registers valid
  560. ULONGLONG tr:1; // 23 : Translation Registers valid
  561. ULONGLONG rr:1; // 24 : Region Registers valid
  562. ULONGLONG ar:1; // 25 : Application Registers valid
  563. ULONGLONG br:1; // 26 : Branch Registers valid
  564. ULONGLONG pr:1; // 27 : Predicate Registers valid
  565. ULONGLONG fp:1; // 28 : Floating-Point Registers valid
  566. ULONGLONG b1:1; // 29 : Preserved Bank 1 General Registers valid
  567. ULONGLONG b0:1; // 30 : Preserved Bank 0 General Registers valid
  568. ULONGLONG gr:1; // 31 : General Registers valid
  569. ULONGLONG dsize:16; // 47-32 : Processor Dynamic State size
  570. ULONGLONG reserved1:11; // 48-58 : reserved
  571. ULONGLONG cc:1; // 49 : Cache Check
  572. ULONGLONG tc:1; // 60 : TLB Check
  573. ULONGLONG bc:1; // 61 : Bus Check
  574. ULONGLONG rc:1; // 62 : Register File Check
  575. ULONGLONG uc:1; // 63 : Micro-Architectural Check
  576. };
  577. } ERROR_PROCESSOR_STATE_PARAMETER, *PERROR_PROCESSOR_STATE_PARAMETER;
  578. typedef union _PROCESSOR_LOCAL_ID {
  579. ULONGLONG LocalId;
  580. struct {
  581. ULONGLONG reserved:16; // 0-16 : reserved
  582. ULONGLONG eid:8; // 16-23 : Extended Id
  583. ULONGLONG id:8; // 24-31 : Id
  584. ULONGLONG ignored:32; // 32-63 : ignored
  585. };
  586. } PROCESSOR_LOCAL_ID, *PPROCESSOR_LOCAL_ID;
  587. typedef struct _ERROR_PROCESSOR_MS {
  588. ULONGLONG MsError [ /* Valid.MsCheckNum */ 1]; // 0 -> 15 registers file errors.
  589. } ERROR_PROCESSOR_MS, *PERROR_PROCESSOR_MS;
  590. typedef struct _ERROR_PROCESSOR_CPUID_INFO { // Must be 48 bytes.
  591. ULONGLONG CpuId0;
  592. ULONGLONG CpuId1;
  593. ULONGLONG CpuId2;
  594. ULONGLONG CpuId3;
  595. ULONGLONG CpuId4;
  596. ULONGLONG Reserved;
  597. } ERROR_PROCESSOR_CPUID_INFO, *PERROR_PROCESSOR_CPUID_INFO;
  598. typedef union _ERROR_PROCESSOR_STATIC_INFO_VALID {
  599. ULONGLONG Valid;
  600. struct { // Bits
  601. // Warning: Match the VALID fields with the _ERROR_PROCESSOR_STATIC_INFO members.
  602. // KD extensions use the field names to access the PSI structure.
  603. ULONGLONG MinState: 1; // 0: MinState valid.
  604. ULONGLONG BR: 1; // 1: Branch Registers valid.
  605. ULONGLONG CR: 1; // 2: Control Registers valid.
  606. ULONGLONG AR: 1; // 3: Application Registers valid.
  607. ULONGLONG RR: 1; // 4: Registers valid.
  608. ULONGLONG FR: 1; // 5: Registers valid.
  609. ULONGLONG Reserved: 58; // 6-63: Reserved.
  610. };
  611. } ERROR_PROCESSOR_STATIC_INFO_VALID, *PERROR_PROCESSOR_STATIC_INFO_VALID;
  612. typedef struct _ERROR_PROCESSOR_STATIC_INFO {
  613. ERROR_PROCESSOR_STATIC_INFO_VALID Valid;
  614. UCHAR MinState[ /* SAL Specs, July 2000 and Jan 2001 state approximatively: */ 1024];
  615. ULONGLONG BR [ 8 ];
  616. ULONGLONG CR [ /* SAL Specs, July 2000 states that it is processor dependent */ 128 ];
  617. ULONGLONG AR [ /* SAL Specs, July 2000 states that it is processor dependent */ 128 ];
  618. ULONGLONG RR [ 8 ];
  619. ULONGLONG FR [ 2 * 128 ];
  620. } ERROR_PROCESSOR_STATIC_INFO, *PERROR_PROCESSOR_STATIC_INFO;
  621. typedef struct _ERROR_PROCESSOR {
  622. ERROR_SECTION_HEADER Header;
  623. ERROR_PROCESSOR_VALID Valid;
  624. ERROR_PROCESSOR_ERROR_MAP ErrorMap;
  625. ERROR_PROCESSOR_STATE_PARAMETER StateParameter;
  626. PROCESSOR_LOCAL_ID CRLid;
  627. #if 0
  628. // The presence of the following data depends on the valid bits
  629. // from ERROR_PROCESSOR.Valid.
  630. //
  631. ERROR_MODINFO CacheErrorInfo [ /* Valid.CacheCheckNum */ ]; // 0->15 cache error modinfo structs.
  632. ERROR_MODINFO TlbErrorInfo [ /* Valid.TlbCheckNum */ ]; // 0->15 tlb error modinfo structs.
  633. ERROR_MODINFO BusErrorInfo [ /* Valid.BusCheckNum */ ]; // 0->15 bus error modinfo structs.
  634. ERROR_MODINFO RegFileCheckInfo [ /* Valid.RegFileCheckNum */ ]; // 0->15 registers file errors.
  635. ERROR_MODINFO MsCheckInfo [ /* Valid.MsCheckNum */ ]; // 0->15 registers file errors.
  636. ERROR_PROCESSOR_CPUID_INFO CpuIdInfo; // field will always be there but could be zero-padded.
  637. ERROR_PROCESSOR_STATIC_INFO StaticInfo; // field will always be there but could be zero-padded.
  638. #endif // 0
  639. } ERROR_PROCESSOR, *PERROR_PROCESSOR;
  640. //
  641. // IA64 ERROR PROCESSOR State Parameter - GR18 - definitions.
  642. //
  643. #define ERROR_PROCESSOR_STATE_PARAMETER_CACHE_CHECK_SHIFT 60
  644. #define ERROR_PROCESSOR_STATE_PARAMETER_CACHE_CHECK_MASK 0x1
  645. #define ERROR_PROCESSOR_STATE_PARAMETER_TLB_CHECK_SHIFT 61
  646. #define ERROR_PROCESSOR_STATE_PARAMETER_TLB_CHECK_MASK 0x1
  647. #define ERROR_PROCESSOR_STATE_PARAMETER_BUS_CHECK_SHIFT 62
  648. #define ERROR_PROCESSOR_STATE_PARAMETER_BUS_CHECK_MASK 0x1
  649. #define ERROR_PROCESSOR_STATE_PARAMETER_UNKNOWN_CHECK_SHIFT 63
  650. #define ERROR_PROCESSOR_STATE_PARAMETER_UNKNOWN_CHECK_MASK 0x1
  651. ////////////////////////////////////////////////////////////////////
  652. //
  653. // IA64 PLATFORM ERRORS Definitions
  654. //
  655. // We tried to respect the order in which these error devices are
  656. // presented in the SAL specs.
  657. //
  658. // IA64 ERRORS: _ERR_TYPE definitions
  659. //
  660. // Warning 04/01/01: "ERR_TYPE" or "ERROR_TYPE" are already used in the NT namespace.
  661. //
  662. typedef enum _ERR_TYPES {
  663. // Generic error types:
  664. ERR_INTERNAL = 1, // Error detected internal to the component
  665. ERR_BUS = 16, // Error detected in the bus
  666. // Detailed Internal Error Types:
  667. ERR_MEM = 4, // Storage error in memory (DRAM)
  668. ERR_TLB = 5, // Storage error in TLB
  669. ERR_CACHE = 6, // Storage error in cache
  670. ERR_FUNCTION = 7, // Error in one or more functional units
  671. ERR_SELFTEST = 8, // Component failed self test
  672. ERR_FLOW = 9, // Overflow or Undervalue of internal queue
  673. // Detailed Bus Error Types:
  674. ERR_MAP = 17, // Virtual address not found on IO-TLB or IO-PDIR
  675. ERR_IMPROPER = 18, // Improper access error
  676. ERR_UNIMPL = 19, // Access to a memory address which is not mapped to any component
  677. ERR_LOL = 20, // Loss Of Lockstep
  678. ERR_RESPONSE = 21, // Response to which there is no associated request
  679. ERR_PARITY = 22, // Bus parity error
  680. ERR_PROTOCOL = 23, // Detection of a protocol error
  681. ERR_ERROR = 24, // Detection of PATH_ERROR
  682. ERR_TIMEOUT = 25, // Bus operation time-out
  683. ERR_POISONED = 26, // A read was issued to data which has been poisoned
  684. } _ERR_TYPE;
  685. //
  686. // IA64 ERRORS: ERROR_STATUS definitions
  687. //
  688. typedef union _ERROR_STATUS {
  689. ULONGLONG Status;
  690. struct { // Bits:
  691. ULONGLONG Reserved0:8; // 7-0: Reserved
  692. ULONGLONG Type:8; // 15-8: Error Type - See _ERR_TYPE definitions.
  693. ULONGLONG Address:1; // 16: Error was detected on address signals or on address portion of transaction
  694. ULONGLONG Control:1; // 17: Error was detected on control signals or in control portion of transaction
  695. ULONGLONG Data:1; // 18: Error was detected on data signals or in data portion of transaction
  696. ULONGLONG Responder:1; // 19: Error was detected by responder of transaction
  697. ULONGLONG Requestor:1; // 20: Error was detected by requestor of transaction
  698. ULONGLONG FirstError:1; // 21: If multiple errors, this is the first error of the highest severity that occurred
  699. ULONGLONG Overflow:1; // 22: Additional errors occurred which were not logged because registers overflow
  700. ULONGLONG Reserved1:41; // 63-23: Reserved
  701. };
  702. } ERROR_STATUS, *PERROR_STATUS;
  703. //
  704. // IA64 ERRORS: Platform OEM_DATA definitions
  705. //
  706. typedef struct _ERROR_OEM_DATA {
  707. USHORT Length;
  708. #if 0
  709. UCHAR Data[/* ERROR_OEM_DATA.Length */];
  710. #endif // 0
  711. } ERROR_OEM_DATA, *PERROR_OEM_DATA;
  712. //
  713. // IA64 ERRORS: Platform BUS_SPECIFIC_DATA definitions
  714. //
  715. typedef union _ERROR_BUS_SPECIFIC_DATA {
  716. ULONGLONG BusSpecificData;
  717. struct { // Bits :
  718. ULONGLONG LockAsserted:1; // 0: LOCK# Asserted during request phase
  719. ULONGLONG DeferLogged:1; // 1: Defer phase is logged
  720. ULONGLONG IOQEmpty:1; // 2: IOQ is empty
  721. ULONGLONG DeferredTransaction:1; // 3: Component interface deferred transaction
  722. ULONGLONG RetriedTransaction:1; // 4: Component interface retried transaction
  723. ULONGLONG MemoryClaimedTransaction:1; // 5: memory claimed the transaction
  724. ULONGLONG IOClaimedTransaction:1; // 6: IO controller claimed the transaction
  725. ULONGLONG ResponseParitySignal:1; // 7: Response parity signal
  726. ULONGLONG DeferSignal:1; // 8: DEFER# signal
  727. ULONGLONG HitMSignal:1; // 9: HITM# signal
  728. ULONGLONG HitSignal:1; // 10: HIT# signal
  729. ULONGLONG RequestBusFirstCycle:6; // 16-11: First cycle of request bus
  730. ULONGLONG RequestBusSecondCycle:6; // 22-17: Second cycle of request bus
  731. ULONGLONG AddressParityBusFirstCycle:2; // 24-23: First cycle of address parity bus
  732. ULONGLONG AddressParityBusSecondCycle:2; // 26-25: Second cycle of address parity
  733. ULONGLONG ResponseBus:3; // 29-27: Response bus
  734. ULONGLONG RequestParitySignalFirstCycle:1; // 30: First cycle of request parity signal
  735. ULONGLONG RequestParitySignalSecondCycle:1; // 31: Second cycle of request parity signal
  736. ULONGLONG Reserved:32; // 63-32: Reserved
  737. };
  738. } ERROR_BUS_SPECIFIC_DATA, *PERROR_BUS_SPECIFIC_DATA;
  739. //
  740. // IA64 ERRORS: Platform ERROR_MEMORY device definitions
  741. //
  742. // With reference to the ACPI Memory Device.
  743. //
  744. #define ERROR_MEMORY_GUID \
  745. { 0xe429faf2, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  746. typedef union _ERROR_MEMORY_VALID {
  747. ULONGLONG Valid;
  748. struct { // Bits
  749. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  750. ULONGLONG PhysicalAddress:1; // 1: Physical Address valid bit
  751. ULONGLONG AddressMask:1; // 2: Address Mask bit
  752. ULONGLONG Node:1; // 3: Node valid bit
  753. ULONGLONG Card:1; // 4: Card valid bit
  754. ULONGLONG Module:1; // 5: Module valid bit
  755. ULONGLONG Bank:1; // 6: Bank valid bit
  756. ULONGLONG Device:1; // 7: Device valid bit
  757. ULONGLONG Row:1; // 8: Row valid bit
  758. ULONGLONG Column:1; // 9: Column valid bit
  759. ULONGLONG BitPosition:1; // 10: Bit Position valid bit
  760. ULONGLONG RequestorId:1; // 11: Platform Requestor Id valid bit
  761. ULONGLONG ResponderId:1; // 12: Platform Respinder Id valid bit
  762. ULONGLONG TargetId:1; // 13: Platform Target Id valid bit
  763. ULONGLONG BusSpecificData:1; // 14: Platform Bus specific data valid bit
  764. ULONGLONG OemId:1; // 15: Platform OEM id valid bit
  765. ULONGLONG OemData:1; // 16: Platform OEM data valid bit
  766. ULONGLONG Reserved:47; // 63-17: Reserved
  767. };
  768. } ERROR_MEMORY_VALID, *PERROR_MEMORY_VALID;
  769. typedef struct _ERROR_MEMORY {
  770. ERROR_SECTION_HEADER Header;
  771. ERROR_MEMORY_VALID Valid;
  772. ERROR_STATUS ErrorStatus; // Memory device error status fields - See ERROR_STATUS defs.
  773. ULONGLONG PhysicalAddress; // Physical Address of the memory error
  774. ULONGLONG PhysicalAddressMask; // Valid bits for Physical Address
  775. USHORT Node; // Node identifier in a multi-node system
  776. USHORT Card; // Card number of the memory error location
  777. USHORT Module; // Module number of the memory error location
  778. USHORT Bank; // Bank number of the memory error location
  779. USHORT Device; // Device number of the memory error location
  780. USHORT Row; // Row number of the memory error location
  781. USHORT Column; // Column number of the memory error location
  782. USHORT BitPosition; // Bit within the word that is in error
  783. ULONGLONG RequestorId; // Hardware address of the device or component initiating transaction
  784. ULONGLONG ResponderId; // Hardware address of the responder to transaction
  785. ULONGLONG TargetId; // Hardware address of intended target of transaction
  786. ULONGLONG BusSpecificData; // Bus dependent data of the on-board processor. It is a OEM specific field.
  787. UCHAR OemId[16]; // OEM defined identification for memory controller
  788. ERROR_OEM_DATA OemData; // OEM platform specific data.
  789. } ERROR_MEMORY, *PERROR_MEMORY;
  790. //
  791. // IA64 ERRORS: Platform ERROR_PCI_BUS device definitions
  792. //
  793. // With reference to the PCI Specifications.
  794. //
  795. #define ERROR_PCI_BUS_GUID \
  796. { 0xe429faf4, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  797. typedef union _ERROR_PCI_BUS_VALID {
  798. ULONGLONG Valid;
  799. struct { // Bits
  800. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  801. ULONGLONG ErrorType:1; // 1: Error Type valid bit
  802. ULONGLONG Id:1; // 2: Identifier valid bit
  803. ULONGLONG Address:1; // 3: Address valid bit
  804. ULONGLONG Data:1; // 4: Data valid bit
  805. ULONGLONG CmdType:1; // 5: Command Type valid bit
  806. ULONGLONG RequestorId:1; // 6: Requestor Identifier valid bit
  807. ULONGLONG ResponderId:1; // 7: Responder Identifier valid bit
  808. ULONGLONG TargetId:1; // 8: Target Identifer valid bit
  809. ULONGLONG OemId:1; // 9: OEM Identification valid bit
  810. ULONGLONG OemData:1; // 10: OEM Data valid bit
  811. ULONGLONG Reserved:57; // 11-63: Reserved
  812. };
  813. } ERROR_PCI_BUS_VALID, *PERROR_PCI_BUS_VALID;
  814. typedef struct _ERROR_PCI_BUS_TYPE {
  815. UCHAR Type;
  816. UCHAR Reserved;
  817. } ERROR_PCI_BUS_TYPE, *PERROR_PCI_BUS_TYPE;
  818. #define PciBusUnknownError ((UCHAR)0)
  819. #define PciBusDataParityError ((UCHAR)1)
  820. #define PciBusSystemError ((UCHAR)2)
  821. #define PciBusMasterAbort ((UCHAR)3)
  822. #define PciBusTimeOut ((UCHAR)4)
  823. #define PciMasterDataParityError ((UCHAR)5)
  824. #define PciAddressParityError ((UCHAR)6)
  825. #define PciCommandParityError ((UCHAR)7)
  826. // PciOtherErrors Reserved
  827. typedef struct _ERROR_PCI_BUS_ID {
  828. UCHAR BusNumber; // Bus Number
  829. UCHAR SegmentNumber; // Segment Number
  830. } ERROR_PCI_BUS_ID, *PERROR_PCI_BUS_ID;
  831. typedef struct _ERROR_PCI_BUS {
  832. ERROR_SECTION_HEADER Header;
  833. ERROR_PCI_BUS_VALID Valid;
  834. ERROR_STATUS ErrorStatus; // PCI Bus Error Status - See ERROR_STATUS definitions.
  835. ERROR_PCI_BUS_TYPE Type; // PCI Bus Error Type
  836. ERROR_PCI_BUS_ID Id; // PCI Bus Identifier
  837. UCHAR Reserved[4]; // Reserved
  838. ULONGLONG Address; // Memory or IO Address on the PCI bus at
  839. // the time of the event
  840. ULONGLONG Data; // Data on the PCI bus at time of the event
  841. ULONGLONG CmdType; // Bus Command or Operation at time of the event
  842. ULONGLONG RequestorId; // Bus Requestor Identifier at time of the event
  843. ULONGLONG ResponderId; // Bus Responder Identifier at time of the event
  844. ULONGLONG TargetId; // Intended Bus Target Identifier at time of the event
  845. UCHAR OemId[16]; // OEM defined identification for pci bus
  846. ERROR_OEM_DATA OemData; // OEM specific data.
  847. } ERROR_PCI_BUS, *PERROR_PCI_BUS;
  848. //
  849. // IA64 ERRORS: Platform ERROR_PCI_COMPONENT device definitions
  850. //
  851. // With reference to the PCI Specifications.
  852. //
  853. #define ERROR_PCI_COMPONENT_GUID \
  854. { 0xe429faf6, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  855. typedef union _ERROR_PCI_COMPONENT_VALID {
  856. ULONGLONG Valid;
  857. struct { // Bits:
  858. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  859. ULONGLONG Info:1; // 1: Information valid bit
  860. ULONGLONG MemoryMappedRegistersPairs:1; // 2: Number of Memory Mapped Registers Pairs valid bit
  861. ULONGLONG ProgrammedIORegistersPairs:1; // 3: Number of Programmed IO Registers Pairs valid bit
  862. ULONGLONG RegistersDataPairs:1; // 4: Memory Mapped Registers Pairs valid bit
  863. ULONGLONG OemData:1; // 5: OEM Data valid bit.
  864. ULONGLONG Reserved:58; // 63-6: Reserved
  865. };
  866. } ERROR_PCI_COMPONENT_VALID, *PERROR_PCI_COMPONENT_VALID;
  867. typedef struct _ERROR_PCI_COMPONENT_INFO { // Bytes:
  868. USHORT VendorId; // 0-1: Vendor Identifier
  869. USHORT DeviceId; // 2-3: Device Identifier
  870. UCHAR ClassCodeInterface; // 4: Class Code.Interface field
  871. UCHAR ClassCodeSubClass; // 5: Class Code.SubClass field
  872. UCHAR ClassCodeBaseClass; // 6: Class Code.BaseClass field
  873. UCHAR FunctionNumber; // 7: Function Number
  874. UCHAR DeviceNumber; // 8: Device Number
  875. UCHAR BusNumber; // 9: Bus Number
  876. UCHAR SegmentNumber; // 10: Segment Number
  877. UCHAR Reserved0;
  878. ULONG Reserved1;
  879. } ERROR_PCI_COMPONENT_INFO, *PERROR_PCI_COMPONENT_INFO;
  880. typedef struct _ERROR_PCI_COMPONENT {
  881. ERROR_SECTION_HEADER Header;
  882. ERROR_PCI_COMPONENT_VALID Valid;
  883. ERROR_STATUS ErrorStatus; // Component Error Status
  884. ERROR_PCI_COMPONENT_INFO Info; // Component Information
  885. ULONG MemoryMappedRegistersPairs; // Number of Memory Mapped Registers Pairs
  886. ULONG ProgrammedIORegistersPairs; // Number of Programmed IO Registers Pairs
  887. #if 0
  888. ULONGLONG RegistersPairs[/* 2 * (MemoryMappedRegistersPairs + ProgrammedIORegistersPairs) */];
  889. ERROR_OEM_DATA OemData;
  890. #endif // 0
  891. } ERROR_PCI_COMPONENT, *PERROR_PCI_COMPONENT;
  892. //
  893. // IA64 ERRORS: Platform ERROR_SYSTEM_EVENT_LOG device definitions
  894. //
  895. // With reference to the IPMI System Event Log.
  896. //
  897. #define ERROR_SYSTEM_EVENT_LOG_GUID \
  898. { 0xe429faf3, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  899. typedef union _ERROR_SYSTEM_EVENT_LOG_VALID {
  900. ULONGLONG Valid;
  901. struct { // Bits
  902. ULONGLONG RecordId:1; // 0: Record Identifier valid bit
  903. ULONGLONG RecordType:1; // 1: Record Type valid bit
  904. ULONGLONG GeneratorId:1; // 2: Generator Identifier valid bit
  905. ULONGLONG EVMRev:1; // 3: Event Format Revision valid bit
  906. ULONGLONG SensorType:1; // 4: Sensor Type valid bit
  907. ULONGLONG SensorNum:1; // 5: Sensor Number valid bit
  908. ULONGLONG EventDirType:1; // 6: Event Dir valid bit
  909. ULONGLONG EventData1:1; // 7: Event Data1 valid bit
  910. ULONGLONG EventData2:1; // 8: Event Data2 valid bit
  911. ULONGLONG EventData3:1; // 9: Event Data3 valid bit
  912. ULONGLONG Reserved:54; // 10-63:
  913. };
  914. } ERROR_SYSTEM_EVENT_LOG_VALID, *PSYSTEM_EVENT_LOG_VALID;
  915. typedef struct _ERROR_SYSTEM_EVENT_LOG {
  916. ERROR_SECTION_HEADER Header;
  917. ERROR_SYSTEM_EVENT_LOG_VALID Valid;
  918. USHORT RecordId; // Record Identifier used for SEL record access
  919. UCHAR RecordType; // Record Type:
  920. // 0x02 - System Event Record
  921. // 0xC0 - 0xDF OEM time stamped, bytes 8-16 OEM defined
  922. // 0xE0 - 0xFF OEM non-time stamped, bytes 4-16 OEM defined
  923. ULONG TimeStamp; // Time stamp of the event log
  924. USHORT GeneratorId; // Software ID if event was generated by software
  925. // Byte 1:
  926. // Bit 0 - set to 1 when using system software
  927. // Bit 7:1 - 7-bit system ID
  928. // Byte 2:
  929. // Bit 1:0 - IPMB device LUN if byte 1 holds slave
  930. // address, 0x0 otherwise
  931. // Bit 7:2 - Reserved.
  932. UCHAR EVMRevision; // Error message format version
  933. UCHAR SensorType; // Sensor Type code of the sensor that generated event
  934. UCHAR SensorNumber; // Number of the sensor that generated event
  935. UCHAR EventDir; // Event Dir
  936. // Bit 7 - 0: asserted, 1: desasserted
  937. // Event Type
  938. // Bit 6:0 - Event Type code
  939. UCHAR Data1; // Event data field
  940. UCHAR Data2; // Event data field
  941. UCHAR Data3; // Event data field
  942. } ERROR_SYSTEM_EVENT_LOG, *PERROR_SYSTEM_EVENT_LOG;
  943. //
  944. // IA64 ERRORS: Platform ERROR_SMBIOS device definitions
  945. //
  946. // With reference to the SMBIOS Specifications.
  947. //
  948. #define ERROR_SMBIOS_GUID \
  949. { 0xe429faf5, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  950. typedef union _ERROR_SMBIOS_VALID {
  951. ULONGLONG Valid;
  952. struct { // Bits
  953. ULONGLONG EventType:1; // 0: Event Type valid bit
  954. ULONGLONG Length:1; // 1: Length valid bit
  955. ULONGLONG TimeStamp:1; // 2: Time Stamp valid bit
  956. ULONGLONG OemData:1; // 3: Data valid bit
  957. ULONGLONG Reserved:60; // 4-63:
  958. };
  959. } ERROR_SMBIOS_VALID, *PERROR_SMBIOS_VALID;
  960. //
  961. // ERROR_SMBIOS.Type definitions
  962. //
  963. typedef UCHAR ERROR_SMBIOS_EVENT_TYPE, *PERROR_SMBIOS_EVENT_TYPE;
  964. // enum values defined in SMBIOS 2.3 - 3.3.16.6.1
  965. typedef struct _ERROR_SMBIOS {
  966. ERROR_SECTION_HEADER Header;
  967. ERROR_SMBIOS_VALID Valid;
  968. ERROR_SMBIOS_EVENT_TYPE EventType; // Event Type
  969. UCHAR Length; // Length of the error information in bytes
  970. ERROR_TIMESTAMP TimeStamp; // Event Time Stamp
  971. ERROR_OEM_DATA OemData; // Optional data validated by SMBIOS.Valid.Data.
  972. } ERROR_SMBIOS, *PERROR_SMBIOS;
  973. //
  974. // IA64 ERRORS: Platform Specific error device definitions
  975. //
  976. #define ERROR_PLATFORM_SPECIFIC_GUID \
  977. { 0xe429faf7, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  978. typedef union _ERROR_PLATFORM_SPECIFIC_VALID {
  979. ULONGLONG Valid;
  980. struct { // Bits:
  981. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  982. ULONGLONG RequestorId:1; // 1: Requestor Identifier valid bit
  983. ULONGLONG ResponderId:1; // 2: Responder Identifier valid bit
  984. ULONGLONG TargetId:1; // 3: Target Identifier valid bit
  985. ULONGLONG BusSpecificData:1; // 4: Bus Specific Data valid bit
  986. ULONGLONG OemId:1; // 5: OEM Identification valid bit
  987. ULONGLONG OemData:1; // 6: OEM Data valid bit
  988. ULONGLONG OemDevicePath:1; // 7: OEM Device Path valid bit
  989. ULONGLONG Reserved:56; // 63-8: Reserved
  990. };
  991. } ERROR_PLATFORM_SPECIFIC_VALID, *PERROR_PLATFORM_SPECIFIC_VALID;
  992. typedef struct _ERROR_PLATFORM_SPECIFIC {
  993. ERROR_SECTION_HEADER Header;
  994. ERROR_PLATFORM_SPECIFIC_VALID Valid;
  995. ERROR_STATUS ErrorStatus; // Platform Generic Error Status
  996. ULONGLONG RequestorId; // Bus Requestor ID at the time of the event
  997. ULONGLONG ResponderId; // Bus Responder ID at the time of the event
  998. ULONGLONG TargetId; // Bus intended Target ID at the time of the event
  999. ERROR_BUS_SPECIFIC_DATA BusSpecificData; // OEM specific Bus dependent data
  1000. UCHAR OemId[16]; // OEM specific data for bus identification
  1001. ERROR_OEM_DATA OemData; // OEM specific data
  1002. #if 0
  1003. UCHAR OemDevicePath[/* 16 ? */]; // OEM specific vendor device path.
  1004. #endif // 0
  1005. } ERROR_PLATFORM_SPECIFIC, *PERROR_PLATFORM_SPECIFIC;
  1006. //
  1007. // IA64 ERRORS: Platform Bus error device definitions
  1008. //
  1009. #define ERROR_PLATFORM_BUS_GUID \
  1010. { 0xe429faf9, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1011. typedef union _ERROR_PLATFORM_BUS_VALID {
  1012. ULONGLONG Valid;
  1013. struct { // Bits:
  1014. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  1015. ULONGLONG RequestorId:1; // 1: Requestor Identifier valid bit
  1016. ULONGLONG ResponderId:1; // 2: Responder Identifier valid bit
  1017. ULONGLONG TargetId:1; // 3: Target Identifier valid bit
  1018. ULONGLONG BusSpecificData:1; // 4: Bus Specific Data valid bit
  1019. ULONGLONG OemId:1; // 5: OEM Identification valid bit
  1020. ULONGLONG OemData:1; // 6: OEM Data valid bit
  1021. ULONGLONG OemDevicePath:1; // 7: OEM Device Path valid bit
  1022. ULONGLONG Reserved:56; // 63-8: Reserved
  1023. };
  1024. } ERROR_PLATFORM_BUS_VALID, *PERROR_PLATFORM_BUS_VALID;
  1025. typedef struct _ERROR_PLATFORM_BUS {
  1026. ERROR_SECTION_HEADER Header;
  1027. ERROR_PLATFORM_BUS_VALID Valid;
  1028. ERROR_STATUS ErrorStatus; // Bus Error Status
  1029. ULONGLONG RequestorId; // Bus Requestor ID at the time of the event
  1030. ULONGLONG ResponderId; // Bus Responder ID at the time of the event
  1031. ULONGLONG TargetId; // Bus intended Target ID at the time of the event
  1032. ERROR_BUS_SPECIFIC_DATA BusSpecificData; // OEM specific Bus dependent data
  1033. UCHAR OemId[16]; // OEM specific data for bus identification
  1034. ERROR_OEM_DATA OemData; // OEM specific data
  1035. #if 0
  1036. UCHAR OemDevicePath[/* 16 ? */]; // OEM specific vendor device path.
  1037. #endif // 0
  1038. } ERROR_PLATFORM_BUS, *PERROR_PLATFORM_BUS;
  1039. //
  1040. // IA64 ERRORS: Platform Host Controller error device definitions
  1041. //
  1042. #define ERROR_PLATFORM_HOST_CONTROLLER_GUID \
  1043. { 0xe429faf8, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1044. typedef union _ERROR_PLATFORM_HOST_CONTROLLER_VALID {
  1045. ULONGLONG Valid;
  1046. struct { // Bits:
  1047. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  1048. ULONGLONG RequestorId:1; // 1: Requestor Identifier valid bit
  1049. ULONGLONG ResponderId:1; // 2: Responder Identifier valid bit
  1050. ULONGLONG TargetId:1; // 3: Target Identifier valid bit
  1051. ULONGLONG BusSpecificData:1; // 4: Bus Specific Data valid bit
  1052. ULONGLONG OemId:1; // 5: OEM Identification valid bit
  1053. ULONGLONG OemData:1; // 6: OEM Data valid bit
  1054. ULONGLONG OemDevicePath:1; // 7: OEM Device Path valid bit
  1055. ULONGLONG Reserved:56; // 63-8: Reserved
  1056. };
  1057. } ERROR_PLATFORM_HOST_CONTROLLER_VALID, *PERROR_PLATFORM_HOST_CONTROLLER_VALID;
  1058. typedef struct _ERROR_PLATFORM_HOST_CONTROLLER {
  1059. ERROR_SECTION_HEADER Header;
  1060. ERROR_PCI_COMPONENT_VALID Valid;
  1061. ERROR_STATUS ErrorStatus; // Host Controller Error Status
  1062. ULONGLONG RequestorId; // Host controller Requestor ID at the time of the event
  1063. ULONGLONG ResponderId; // Host controller Responder ID at the time of the event
  1064. ULONGLONG TargetId; // Host controller intended Target ID at the time of the event
  1065. ERROR_BUS_SPECIFIC_DATA BusSpecificData; // OEM specific Bus dependent data
  1066. UCHAR OemId[16]; // OEM specific data for bus identification
  1067. ERROR_OEM_DATA OemData; // OEM specific data
  1068. #if 0
  1069. UCHAR OemDevicePath[/* 16 ? */]; // OEM specific vendor device path.
  1070. #endif // 0
  1071. } ERROR_PLATFORM_HOST_CONTROLLER, *PERROR_PLATFORM_HOST_CONTROLLER;
  1072. //
  1073. // IA64 ERROR_LOGRECORDS definitions
  1074. //
  1075. // MCA_EXCEPTION,
  1076. // CMC_EXCEPTION,
  1077. // CPE_EXCEPTION.
  1078. //
  1079. // For compatibility with previous versions of the definitions:
  1080. typedef ERROR_RECORD_HEADER ERROR_LOGRECORD, *PERROR_LOGRECORD;
  1081. typedef ERROR_RECORD_HEADER MCA_EXCEPTION, *PMCA_EXCEPTION; // Machine Check Abort
  1082. typedef ERROR_RECORD_HEADER CMC_EXCEPTION, *PCMC_EXCEPTION; // Corrected Machine Check
  1083. typedef ERROR_RECORD_HEADER CPE_EXCEPTION, *PCPE_EXCEPTION; // Corrected Platform Error
  1084. #endif // _IA64_
  1085. #endif // defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
  1086. #endif // _MCE_