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.

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