Windows NT 4.0 source code leak
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.

553 lines
22 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1993 Digital Equipment Corporation
  3. Module Name:
  4. gamma.h
  5. Abstract:
  6. This file defines the structures and definitions common to all
  7. sable-based platforms.
  8. Author:
  9. Joe Notarangelo 26-Oct-1993
  10. Steve Jenness 26-Oct-1993
  11. Environment:
  12. Kernel mode
  13. Revision History:
  14. 28-Dec 1994 Steve Brooks
  15. t2.h and rattler.h extracted from this file.
  16. --*/
  17. #ifndef _GAMMAH_
  18. #define _GAMMAH_
  19. #include "sableref.h" // Sable reference IO structure
  20. #include "lynxref.h" // Lynx interrupt structure
  21. #include "xioref.h" // XIO interrupt structure
  22. #if !defined(_LANGUAGE_ASSEMBLY)
  23. #include "errframe.h"
  24. #endif
  25. //
  26. // Constants used by dense space I/O routines
  27. //
  28. #define GAMMA_PCI0_DENSE_BASE_PHYSICAL_SUPERPAGE 0xfffffc83c0000000
  29. #define GAMMA_PCI1_DENSE_BASE_PHYSICAL_SUPERPAGE 0xfffffc8180000000
  30. #define PCI0_DENSE_BASE_PHYSICAL_SUPERPAGE \
  31. (GAMMA_PCI0_DENSE_BASE_PHYSICAL_SUPERPAGE - SABLE_PCI0_DENSE_MEMORY_QVA)
  32. #define PCI1_DENSE_BASE_PHYSICAL_SUPERPAGE \
  33. (GAMMA_PCI1_DENSE_BASE_PHYSICAL_SUPERPAGE - SABLE_PCI1_DENSE_MEMORY_QVA)
  34. #if !defined(_LANGUAGE_ASSEMBLY)
  35. #include "rattler.h" // Rattler chipset definitions
  36. #include "t2.h" // T2 chipset definitions
  37. #include "icic.h" // ICIC definitions
  38. #define GAMMA_QVA_PHYSICAL_BASE ((ULONGLONG)0x8000000000)
  39. //
  40. // QVA
  41. // HAL_MAKE_QVA(
  42. // ULONGLONG PhysicalAddress
  43. // )
  44. //
  45. // Routine Description:
  46. //
  47. // This macro returns the Qva for a physical address in system space.
  48. //
  49. // Arguments:
  50. //
  51. // PhysicalAddress - Supplies a 64-bit physical address.
  52. //
  53. // Return Value:
  54. //
  55. // The Qva associated with the physical address.
  56. //
  57. #define HAL_MAKE_QVA(PA) \
  58. ( (PVOID)( QVA_ENABLE | \
  59. (ULONG)( ((PA)-GAMMA_QVA_PHYSICAL_BASE) >> IO_BIT_SHIFT) ) )
  60. //
  61. // Define physical address spaces for GAMMA.
  62. //
  63. // PCI0 - 32bit PCI bus
  64. // PCI1 - 64bit PCI bus
  65. //
  66. #define GAMMA_PCI1_DENSE_MEMORY_PHYSICAL ((ULONGLONG)0x8180000000)
  67. #define GAMMA_PCI1_SPARSE_IO_PHYSICAL ((ULONGLONG)0x81C0000000)
  68. #define GAMMA_PCI0_SPARSE_MEMORY_PHYSICAL ((ULONGLONG)0x8200000000)
  69. #define GAMMA_PCI1_SPARSE_MEMORY_PHYSICAL ((ULONGLONG)0x8300000000)
  70. #define GAMMA_PCI1_SPARSE_ISA_LEGACY_MEMORY_PHYSICAL ((ULONGLONG)0x8302000000)
  71. #define GAMMA_PCI1_SPARSE_ISA_LEGACY_IO_PHYSICAL ((ULONGLONG)0x8200000000)
  72. #define GAMMA_CBUS_CSRS_PHYSICAL ((ULONGLONG)0x8380000000)
  73. #define GAMMA_CPU0_CSRS_PHYSICAL ((ULONGLONG)0x8380000000)
  74. #define GAMMA_CPU1_CSRS_PHYSICAL ((ULONGLONG)0x8381000000)
  75. #define GAMMA_CPU2_CSRS_PHYSICAL ((ULONGLONG)0x8382000000)
  76. #define GAMMA_CPU3_CSRS_PHYSICAL ((ULONGLONG)0x8383000000)
  77. #define GAMMA_CPU0_SICR_PHYSICAL ((ULONGLONG)0x8380000320)
  78. #define GAMMA_CPU1_SICR_PHYSICAL ((ULONGLONG)0x8381000320)
  79. #define GAMMA_CPU2_SICR_PHYSICAL ((ULONGLONG)0x8382000320)
  80. #define GAMMA_CPU3_SICR_PHYSICAL ((ULONGLONG)0x8383000320)
  81. #define GAMMA_MEM0_CSRS_PHYSICAL ((ULONGLONG)0x8388000000)
  82. #define GAMMA_MEM1_CSRS_PHYSICAL ((ULONGLONG)0x8389000000)
  83. #define GAMMA_MEM2_CSRS_PHYSICAL ((ULONGLONG)0x838A000000)
  84. #define GAMMA_MEM3_CSRS_PHYSICAL ((ULONGLONG)0x838B000000)
  85. #define GAMMA_T2_CSRS_PHYSICAL ((ULONGLONG)0x838E000000)
  86. #define GAMMA_T4_CSRS_PHYSICAL ((ULONGLONG)0x838F000000)
  87. #define T2_CSRS_QVA (HAL_MAKE_QVA(GAMMA_T2_CSRS_PHYSICAL))
  88. #define T4_CSRS_QVA (HAL_MAKE_QVA(GAMMA_T4_CSRS_PHYSICAL))
  89. #define GAMMA_PCI0_CONFIGURATION_PHYSICAL ((ULONGLONG)0x8390000000)
  90. #define GAMMA_PCI1_CONFIGURATION_PHYSICAL ((ULONGLONG)0x8398000000)
  91. #define GAMMA_PCI0_SPARSE_IO_PHYSICAL ((ULONGLONG)0x83A0000000)
  92. #define GAMMA_PCI0_DENSE_MEMORY_PHYSICAL ((ULONGLONG)0x83C0000000)
  93. //
  94. // Define the limits of User mode Sparse and dense space:
  95. // A special hack is applied to these values for Gamma, since these addresses
  96. // are 40 bits in length, and are therefore beyond the range of QVAs. Bit 36
  97. // is set in these constants, which will get shifted to bit 31 when a QVA is
  98. // formed. When the physical address is then generated by the access macros,
  99. // the high order bits will get set, forcing bit 39 to be set, causing a
  100. // noncached access to occur
  101. //
  102. #define GAMMA_USER_PCI1_DENSE_MEMORY_PHYSICAL ((ULONGLONG)0x8980000000)
  103. #define GAMMA_USER_PCI1_SPARSE_IO_PHYSICAL ((ULONGLONG)0x89c0000000)
  104. #define GAMMA_USER_PCI0_SPARSE_MEMORY_PHYSICAL ((ULONGLONG)0x8A00000000)
  105. #define GAMMA_USER_PCI0_SPARSE_MEMORY_END_PHYSICAL ((ULONGLONG)0x8b00000000)
  106. #define GAMMA_USER_PCI1_SPARSE_MEMORY_PHYSICAL ((ULONGLONG)0x8b00000000)
  107. #define GAMMA_USER_PCI1_SPARSE_MEMORY_END_PHYSICAL ((ULONGLONG)0x8b80000000)
  108. #define GAMMA_USER_PCI0_SPARSE_IO_PHYSICAL ((ULONGLONG)0x8ba0000000)
  109. #define GAMMA_USER_PCI0_SPARSE_IO_END_PHYSICAL ((ULONGLONG)0x8bc0000000)
  110. #define GAMMA_USER_PCI0_DENSE_MEMORY_PHYSICAL ((ULONGLONG)0x8bc0000000)
  111. #define GAMMA_EDGE_LEVEL_CSRS_PHYSICAL ((ULONGLONG)0x83A00004C0)
  112. #define GAMMA_INTERRUPT_CSRS_PHYSICAL ((ULONGLONG)0x83A000A640)
  113. #define XIO_INTERRUPT_CSRS_PHYSICAL ((ULONGLONG)0x81C000A640)
  114. //
  115. // For compatability, define the SABLE_* constants to refer to the GAMMA_*
  116. // constants. This allows gamma to share sources from the sable tree.
  117. //
  118. #define SABLE_PCI1_DENSE_MEMORY_PHYSICAL GAMMA_PCI1_DENSE_MEMORY_PHYSICAL
  119. #define SABLE_PCI1_SPARSE_IO_PHYSICAL GAMMA_PCI1_SPARSE_IO_PHYSICAL
  120. #define SABLE_PCI0_SPARSE_MEMORY_PHYSICAL GAMMA_PCI0_SPARSE_MEMORY_PHYSICAL
  121. #define SABLE_PCI1_SPARSE_MEMORY_PHYSICAL GAMMA_PCI1_SPARSE_MEMORY_PHYSICAL
  122. #define SABLE_USER_PCI1_DENSE_MEMORY_PHYSICAL GAMMA_USER_PCI1_DENSE_MEMORY_PHYSICAL
  123. #define SABLE_USER_PCI1_SPARSE_IO_PHYSICAL GAMMA_USER_PCI1_SPARSE_IO_PHYSICAL
  124. #define SABLE_USER_PCI0_SPARSE_MEMORY_PHYSICAL GAMMA_USER_PCI0_SPARSE_MEMORY_PHYSICAL
  125. #define SABLE_USER_PCI0_SPARSE_MEMORY_END_PHYSICAL GAMMA_USER_PCI0_SPARSE_MEMORY_END_PHYSICAL
  126. #define SABLE_USER_PCI1_SPARSE_MEMORY_PHYSICAL GAMMA_USER_PCI1_SPARSE_MEMORY_PHYSICAL
  127. #define SABLE_USER_PCI1_SPARSE_MEMORY_END_PHYSICAL GAMMA_USER_PCI1_SPARSE_MEMORY_END_PHYSICAL
  128. #define SABLE_USER_PCI0_SPARSE_IO_PHYSICAL GAMMA_USER_PCI0_SPARSE_IO_PHYSICAL
  129. #define SABLE_USER_PCI0_SPARSE_IO_END_PHYSICAL GAMMA_USER_PCI0_SPARSE_IO_END_PHYSICAL
  130. #define SABLE_USER_PCI0_DENSE_MEMORY_PHYSICAL GAMMA_USER_PCI0_DENSE_MEMORY_PHYSICAL
  131. #define SABLE_CBUS_CSRS_PHYSICAL GAMMA_CBUS_CSRS_PHYSICAL
  132. #define SABLE_CPU0_CSRS_PHYSICAL GAMMA_CPU0_CSRS_PHYSICAL
  133. #define SABLE_CPU1_CSRS_PHYSICAL GAMMA_CPU1_CSRS_PHYSICAL
  134. #define SABLE_CPU2_CSRS_PHYSICAL GAMMA_CPU2_CSRS_PHYSICAL
  135. #define SABLE_CPU3_CSRS_PHYSICAL GAMMA_CPU3_CSRS_PHYSICAL
  136. #define SABLE_CPU0_IPIR_PHYSICAL GAMMA_CPU0_SICR_PHYSICAL
  137. #define SABLE_CPU1_IPIR_PHYSICAL GAMMA_CPU1_SICR_PHYSICAL
  138. #define SABLE_CPU2_IPIR_PHYSICAL GAMMA_CPU2_SICR_PHYSICAL
  139. #define SABLE_CPU3_IPIR_PHYSICAL GAMMA_CPU3_SICR_PHYSICAL
  140. #define SABLE_PCI0_CONFIGURATION_PHYSICAL GAMMA_PCI0_CONFIGURATION_PHYSICAL
  141. #define SABLE_PCI1_CONFIGURATION_PHYSICAL GAMMA_PCI1_CONFIGURATION_PHYSICAL
  142. #define SABLE_PCI0_SPARSE_IO_PHYSICAL GAMMA_PCI0_SPARSE_IO_PHYSICAL
  143. #define SABLE_PCI0_DENSE_MEMORY_PHYSICAL GAMMA_PCI0_DENSE_MEMORY_PHYSICAL
  144. //
  145. // Define Interrupt Controller CSRs.
  146. //
  147. #define SABLE_EDGE_LEVEL_CSRS_QVA (HAL_MAKE_QVA(GAMMA_EDGE_LEVEL_CSRS_PHYSICAL))
  148. #define SABLE_INTERRUPT_CSRS_QVA (HAL_MAKE_QVA(GAMMA_INTERRUPT_CSRS_PHYSICAL))
  149. //
  150. // Define XIO interrupt controller CSRs.
  151. //
  152. #define XIO_INTERRUPT_CSRS_QVA (HAL_MAKE_QVA(XIO_INTERRUPT_CSRS_PHYSICAL))
  153. #define SABLE_PCI_CONFIG_BASE_QVA (HAL_MAKE_QVA(GAMMA_PCI0_CONFIGURATION_PHYSICAL))
  154. //
  155. // Gamma uses the Rattler chipset for the CBUS bridge. Define the Sable
  156. // CPU CSRS to be Rattler CPU Csrs.
  157. //
  158. #define SABLE_CPU_CSRS RATTLER_CPU_CSRS
  159. #define PSABLE_CPU_CSRS PRATTLER_CPU_CSRS
  160. //
  161. // Define CPU CSRs and masks.
  162. //
  163. #define SABLE_CPU0_CSRS_QVA (HAL_MAKE_QVA(GAMMA_CPU0_CSRS_PHYSICAL))
  164. #define SABLE_CPU1_CSRS_QVA (HAL_MAKE_QVA(GAMMA_CPU1_CSRS_PHYSICAL))
  165. #define SABLE_CPU2_CSRS_QVA (HAL_MAKE_QVA(GAMMA_CPU2_CSRS_PHYSICAL))
  166. #define SABLE_CPU3_CSRS_QVA (HAL_MAKE_QVA(GAMMA_CPU3_CSRS_PHYSICAL))
  167. #define GAMMA_MEM0_CSRS_QVA (HAL_MAKE_QVA(GAMMA_MEM0_CSRS_PHYSICAL))
  168. #define GAMMA_MEM1_CSRS_QVA (HAL_MAKE_QVA(GAMMA_MEM1_CSRS_PHYSICAL))
  169. #define GAMMA_MEM2_CSRS_QVA (HAL_MAKE_QVA(GAMMA_MEM2_CSRS_PHYSICAL))
  170. #define GAMMA_MEM3_CSRS_QVA (HAL_MAKE_QVA(GAMMA_MEM3_CSRS_PHYSICAL))
  171. #define GAMMA_PRIMARY_PROCESSOR ((ULONG)0x0)
  172. #define GAMMA_SECONDARY_PROCESSOR ((ULONG)0x1)
  173. #define GAMMA_MAXIMUM_PROCESSOR ((ULONG)0x3)
  174. #define HAL_PRIMARY_PROCESSOR (GAMMA_PRIMARY_PROCESSOR)
  175. #define HAL_MAXIMUM_PROCESSOR (GAMMA_MAXIMUM_PROCESSOR)
  176. //
  177. // Define the default processor frequency to be used before the actual
  178. // frequency can be determined.
  179. //
  180. #define DEFAULT_PROCESSOR_FREQUENCY_MHZ (275)
  181. enum {
  182. NoError,
  183. UncorrectableError,
  184. CorrectableError
  185. } ErrorType;
  186. //
  187. // Define the memory module CSRs (from chapter 10 of the GAMMA CPU spec)
  188. //
  189. //
  190. // Error Summary register
  191. //
  192. typedef struct _GAMMA_ESREG_CSR1 {
  193. union {
  194. ULONG EVBCorrecectableError0: 3; // 0-2
  195. ULONG Resrved1: 1; // 3
  196. ULONG EVBFatalError0: 4; // 4-7
  197. ULONG DTError0: 2; // 8-9
  198. ULONG DTSummary0: 1; // 10
  199. ULONG Reserved2: 1; // 11
  200. ULONG IBParError0: 1; // 12
  201. ULONG IBErrorInfo0: 2; // 13-14
  202. ULONG IBSummary0: 1; // 15
  203. ULONG CBError0: 8; // 16-23
  204. ULONG CBSummary0: 1; // 24
  205. ULONG CBCommand0: 1; // 25
  206. ULONG Reserved3: 2; // 26-27
  207. ULONG EVNoResponse0: 1; // 28
  208. ULONG Reserved4: 3; // 29-31
  209. ULONG EVBCorrecectableError1: 3; // 32-34
  210. ULONG Resrved5: 1; // 35
  211. ULONG EVBFatalError1: 4; // 36-39
  212. ULONG DTError1: 2; // 40-41
  213. ULONG DTSummary1: 1; // 42
  214. ULONG Reserved6: 1; // 43
  215. ULONG IBParError1: 1; // 44
  216. ULONG IBErrorInfo1: 2; // 45-46
  217. ULONG IBSummary1: 1; // 47
  218. ULONG CBError1: 4; // 48-51
  219. ULONG Reserved7: 4; // 52-55
  220. ULONG CBSummary1: 1; // 56
  221. ULONG CBCommand1: 1; // 57
  222. ULONG Reserved8: 2; // 58-59
  223. ULONG EVNoResponse1: 1; // 60
  224. ULONG Reserved9: 3; // 61-63
  225. };
  226. ULONGLONG all;
  227. } GAMMA_ESREG_CSR1, *PGAMMA_ESREG_CSR1;
  228. typedef struct _GAMMA_EVBCR_CSR2 {
  229. union {
  230. ULONG EnableAddressCommandBusParityCheck0: 1; // 0
  231. ULONG Reserved1: 3; // 1-3
  232. ULONG EnableCorrectionErrorInterrupt0: 1; // 4
  233. ULONG EnableECCCorrection0: 1; // 5
  234. ULONG EnableRattlerECCCheck0: 1; // 6
  235. ULONG Reserved2: 20; // 7-26
  236. ULONG ForceFilledShared: 1; // 27
  237. ULONG RmmStxcFillShared: 1; // 28
  238. ULONG Reserved3: 3; // 29-31
  239. ULONG EnableAddressCommandBusParityCheck1: 1; // 32
  240. ULONG Reserved4: 4; // 33-35
  241. ULONG EnableCorrectionErrorInterrupt1: 1; // 36
  242. ULONG EnableECCCorrection1: 1; // 37
  243. ULONG EnableRattlerECCCheck1: 1; // 38
  244. ULONG DisableEV5ECCChecking1: 1; // 39
  245. ULONG Reserved5: 24; // 40-63
  246. };
  247. ULONGLONG all;
  248. } GAMMA_EVBCR_CSR2, *PGAMMA_EVBCR_CSR2;
  249. typedef struct _GAMMA_EVBVEAR_CSR3 {
  250. union {
  251. ULONG EVBVictimErrorAddress0: 30; // 0-29
  252. ULONG Reserved1: 2; // 30-31
  253. ULONG EVBVictimErrorAddress1: 30; // 32-61
  254. ULONG Reserved2: 2; // 62-63
  255. };
  256. } GAMMA_EVBVEAR_CSR3, *PGAMMA_EVBVEAR_CSR3;
  257. typedef struct _GAMMA_EVBCER_CSR4 {
  258. union {
  259. ULONG CorrectableError0: 2; // 0-1
  260. ULONG ReadDirty0: 1; // 2
  261. ULONG MissedCorrectable0: 1; // 3
  262. ULONG Reserved1: 4; // 4-7
  263. ULONG ECCSyndrome0: 8; // 8-15
  264. ULONG ECCSyndrome2: 8; // 16-23
  265. ULONG Reserved2: 8; // 24-31
  266. ULONG CorrectableError1: 2; // 32-33
  267. ULONG ReadDirty1: 1; // 34
  268. ULONG MissedCorrectable1: 1; // 35
  269. ULONG Reserved3: 4; // 36-39
  270. ULONG ECCSyndrome1: 8; // 40-47
  271. ULONG ECCSyndrome3: 8; // 48-55
  272. ULONG Reserved4: 8; // 56-63
  273. };
  274. ULONGLONG all;
  275. } GAMMA_EVBCER_CSR4, *PGAMMA_EVBCER_CSR4;
  276. typedef struct _GAMMA_EVBCEAR_CSR5 {
  277. union {
  278. ULONG EVBCorrectableErrorAddress0: 32; // 0-31
  279. ULONG EVBCorrectableErrorAddress1: 32; // 32-63
  280. };
  281. ULONGLONG all;
  282. } GAMMA_EVBCEAR_CSR5, *PGAMMA_EVBCEAR_CSR5;
  283. typedef struct _GAMMA_EVBUER_CSR6 {
  284. union {
  285. ULONG UncorrectableError0: 2; // 0-1
  286. ULONG ReadDirty0: 1; // 2
  287. ULONG Reserved1: 1; // 3
  288. ULONG ParityErrorOnAddressCommand0: 1; // 4
  289. ULONG ParityErrorOnVictim0: 1; // 5
  290. ULONG Reserved2: 2; // 6-7
  291. ULONG ECCSyndrome0: 8; // 8-15
  292. ULONG ECCSyndrome2: 8; // 16-23
  293. ULONG Reserved3: 4; // 24-27
  294. ULONG EVBCommand0: 4; // 28-31
  295. ULONG UncorrectableError1: 2; // 32-33
  296. ULONG ReadDirty1: 1; // 34
  297. ULONG Reserved4: 1; // 35
  298. ULONG ParityErrorOnAddressCommand1: 1; // 36
  299. ULONG ParityErrorOnVictim1: 1; // 37
  300. ULONG Reserved5: 2; // 38-39
  301. ULONG ECCSyndrome1: 8; // 40-47
  302. ULONG ECCSyndrome3: 8; // 48-55
  303. ULONG Reserved6: 4; // 56-59
  304. ULONG EVBCommand1: 4; // 60-63
  305. };
  306. ULONGLONG all;
  307. } GAMMA_EVBUER_CSR6, *PGAMMA_EVBUER_CSR6;
  308. typedef struct _GAMMA_EVBUEAR_CSR7 {
  309. union {
  310. ULONG EVBUncorrectableErrorAddress0: 32; // 0-31
  311. ULONG EVBUncorrectableErrorAddress1: 32; // 32-63
  312. };
  313. ULONGLONG all;
  314. } GAMMA_EVBEUAR_CSR7, *PGAMMA_EVBUEAR_CSR7;
  315. typedef struct _GAMMA_CBER_CSR18 {
  316. union {
  317. ULONG UncorrectableReadError0: 1; // 0
  318. ULONG Reserved1: 3; // 1-3
  319. ULONG CAParity0ErrorL: 1; // 4
  320. ULONG CAParity0ErrorH: 1; // 5
  321. ULONG Reserved2: 2; // 6-7
  322. ULONG ParityErrorWriteDataLW0: 1; // 8
  323. ULONG ParityErrorWriteDataLW1: 1; // 9
  324. ULONG ParityErrorWriteDataLW4: 1; // 10
  325. ULONG ParityErrorWriteDataLW5: 1; // 11
  326. ULONG Reserved3: 4; // 12-15
  327. ULONG ParityErrorReadDataLW0: 1; // 16
  328. ULONG ParityErrorReadDataLW1: 1; // 17
  329. ULONG ParityErrorReadDataLW4: 1; // 18
  330. ULONG ParityErrorReadDataLW5: 1; // 19
  331. ULONG UnexpectedSharedResponse: 1; // 20
  332. ULONG Reserved4: 3; // 21-23
  333. ULONG CANotAcked: 1; // 24
  334. ULONG Reserved5: 3; // 25-27
  335. ULONG Data0NotAcked: 1; // 28
  336. ULONG Data1NotAcked: 1; // 29
  337. ULONG Reserved6: 2; // 30-31
  338. ULONG UncorrectableReadError1: 1; // 32
  339. ULONG Reserved7: 3; // 33-35
  340. ULONG CAParity1ErrorL: 1; // 36
  341. ULONG CAParity1ErrorH: 1; // 37
  342. ULONG Reserved8: 2; // 38-39
  343. ULONG ParityErrorWriteDataLW2: 1; // 40
  344. ULONG ParityErrorWriteDataLW3: 1; // 41
  345. ULONG ParityErrorWriteDataLW6: 1; // 42
  346. ULONG ParityErrorWriteDataLW7: 1; // 43
  347. ULONG Reserved9: 4; // 44-47
  348. ULONG ParityErrorReadDataLW2: 1; // 48
  349. ULONG ParityErrorReadDataLW3: 1; // 49
  350. ULONG ParityErrorReadDataLW6: 1; // 50
  351. ULONG ParityErrorReadDataLW7: 1; // 51
  352. ULONG Reserved10: 12; // 52-63
  353. };
  354. ULONGLONG all;
  355. } GAMMA_CBER_CSR18, *PGAMMA_CBER_CSR18;
  356. typedef struct _GAMMA_CBEALR_CSR19 {
  357. union {
  358. ULONG CBusErrorLowAddress0: 32; // 0-31
  359. ULONG CBusErrorLowAddress1: 32; // 32-63
  360. };
  361. ULONGLONG all;
  362. } GAMMA_CBEALR_CSR19, *PGAMMA_CBEALR_CSR19;
  363. typedef struct _GAMMA_CBEAHR_CSR20 {
  364. union {
  365. ULONG CBusErrorHighAddress0: 32; // 0-31
  366. ULONG CBusErrorHighAddress1: 32; // 32-63
  367. };
  368. ULONGLONG all;
  369. } GAMMA_CBEAHR_CSR20, *PGAMMA_CBEAHR_CSR20;
  370. typedef struct _SGL_MEM_CSR0 {
  371. union {
  372. ULONG ErrorSummary1: 1; // 0
  373. ULONG SyncError1: 1; // 1
  374. ULONG CAParityError1: 1; // 2
  375. ULONG CAMissedParityError1: 1; // 3
  376. ULONG WriteParityError1: 1; // 4
  377. ULONG MissedWriteParityError1: 1; // 5
  378. ULONG Reserved1: 2; // 6-7
  379. ULONG CAParityErrorLW0: 1; // 8
  380. ULONG CAParityErrorLW2: 1; // 9
  381. ULONG ParityErrorLW0: 1; // 10
  382. ULONG ParityErrorLW2: 1; // 11
  383. ULONG ParityErrorLW4: 1; // 12
  384. ULONG ParityErrorLW6: 1; // 13
  385. ULONG Reserved2: 2; // 14-15
  386. ULONG EDCUncorrectable1: 1; // 16
  387. ULONG EDCMissedUncorrectable1: 1; // 17
  388. ULONG EDCCorrectable1: 1; // 18
  389. ULONG EDCMissdedCorrectable1: 1; // 19
  390. ULONG Reserved3: 12; // 20-31
  391. ULONG ErrorSummary2: 1; // 32
  392. ULONG SyncError2: 1; // 33
  393. ULONG CAParityError2: 1; // 34
  394. ULONG CAMissedParityError2: 1; // 35
  395. ULONG WriteParityError2: 1; // 36
  396. ULONG MissedWriteParityError2: 1; // 37
  397. ULONG Reserved4: 2; // 38-39
  398. ULONG CAParityErrorLW1: 1; // 40
  399. ULONG CAParityErrorLW3: 1; // 41
  400. ULONG ParityErrorLW1: 1; // 42
  401. ULONG ParityErrorLW3: 1; // 43
  402. ULONG ParityErrorLW5: 1; // 44
  403. ULONG ParityErrorLW7: 1; // 45
  404. ULONG Reserved5: 2; // 46-47
  405. ULONG EDCUncorrectable2: 1; // 48
  406. ULONG EDCMissedUncorrectable2: 1; // 49
  407. ULONG EDCCorrectable2: 1; // 50
  408. ULONG EDCMissdedCorrectable2: 1; // 51
  409. ULONG Reserved6: 12; // 52-63
  410. };
  411. ULONGLONG all;
  412. } SGL_MEM_CSR0, *PSGL_MEM_CSR0;
  413. //
  414. // Define the per-processor data structures allocated in the PCR
  415. // for each Gamma processor.
  416. //
  417. // NOTE: If the IpirSva field is moved, the change must be reflected in
  418. // the routine HalpGammaIpiInterrupt
  419. //
  420. typedef struct _GAMMA_PCR{
  421. ULONGLONG HalpCycleCount; // 64-bit per-processor cycle count
  422. ULONGLONG IpirSva; // Superpage Va of per-processor IPIR CSR
  423. PVOID CpuCsrsQva; // Qva of per-cpu csrs
  424. EV5ProfileCount ProfileCount; // Profile counter state
  425. } GAMMA_PCR, *PGAMMA_PCR;
  426. #define HAL_PCR ( (PGAMMA_PCR)(&(PCR->HalReserved)) )
  427. //
  428. // Define Miscellaneous Gamma routines.
  429. //
  430. VOID
  431. WRITE_CPU_REGISTER(
  432. PVOID,
  433. ULONGLONG
  434. );
  435. ULONGLONG
  436. READ_CPU_REGISTER(
  437. PVOID
  438. );
  439. ULONGLONG
  440. READ_MEM_REGISTER(
  441. PVOID
  442. );
  443. BOOLEAN
  444. HalpGammaDispatch(
  445. VOID
  446. );
  447. VOID
  448. HalpGammaIpiInterrupt(
  449. VOID
  450. );
  451. #endif //!_LANGUAGE_ASSEMBLY
  452. #endif //_GAMMAH_