pnd2_edac.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. /*
  2. * Register bitfield descriptions for Pondicherry2 memory controller.
  3. *
  4. * Copyright (c) 2016, Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. */
  15. #ifndef _PND2_REGS_H
  16. #define _PND2_REGS_H
  17. struct b_cr_touud_lo_pci {
  18. u32 lock : 1;
  19. u32 reserved_1 : 19;
  20. u32 touud : 12;
  21. };
  22. #define b_cr_touud_lo_pci_port 0x4c
  23. #define b_cr_touud_lo_pci_offset 0xa8
  24. #define b_cr_touud_lo_pci_r_opcode 0x04
  25. struct b_cr_touud_hi_pci {
  26. u32 touud : 7;
  27. u32 reserved_0 : 25;
  28. };
  29. #define b_cr_touud_hi_pci_port 0x4c
  30. #define b_cr_touud_hi_pci_offset 0xac
  31. #define b_cr_touud_hi_pci_r_opcode 0x04
  32. struct b_cr_tolud_pci {
  33. u32 lock : 1;
  34. u32 reserved_0 : 19;
  35. u32 tolud : 12;
  36. };
  37. #define b_cr_tolud_pci_port 0x4c
  38. #define b_cr_tolud_pci_offset 0xbc
  39. #define b_cr_tolud_pci_r_opcode 0x04
  40. struct b_cr_mchbar_lo_pci {
  41. u32 enable : 1;
  42. u32 pad_3_1 : 3;
  43. u32 pad_14_4: 11;
  44. u32 base: 17;
  45. };
  46. struct b_cr_mchbar_hi_pci {
  47. u32 base : 7;
  48. u32 pad_31_7 : 25;
  49. };
  50. /* Symmetric region */
  51. struct b_cr_slice_channel_hash {
  52. u64 slice_1_disabled : 1;
  53. u64 hvm_mode : 1;
  54. u64 interleave_mode : 2;
  55. u64 slice_0_mem_disabled : 1;
  56. u64 reserved_0 : 1;
  57. u64 slice_hash_mask : 14;
  58. u64 reserved_1 : 11;
  59. u64 enable_pmi_dual_data_mode : 1;
  60. u64 ch_1_disabled : 1;
  61. u64 reserved_2 : 1;
  62. u64 sym_slice0_channel_enabled : 2;
  63. u64 sym_slice1_channel_enabled : 2;
  64. u64 ch_hash_mask : 14;
  65. u64 reserved_3 : 11;
  66. u64 lock : 1;
  67. };
  68. #define b_cr_slice_channel_hash_port 0x4c
  69. #define b_cr_slice_channel_hash_offset 0x4c58
  70. #define b_cr_slice_channel_hash_r_opcode 0x06
  71. struct b_cr_mot_out_base_mchbar {
  72. u32 reserved_0 : 14;
  73. u32 mot_out_base : 15;
  74. u32 reserved_1 : 1;
  75. u32 tr_en : 1;
  76. u32 imr_en : 1;
  77. };
  78. #define b_cr_mot_out_base_mchbar_port 0x4c
  79. #define b_cr_mot_out_base_mchbar_offset 0x6af0
  80. #define b_cr_mot_out_base_mchbar_r_opcode 0x00
  81. struct b_cr_mot_out_mask_mchbar {
  82. u32 reserved_0 : 14;
  83. u32 mot_out_mask : 15;
  84. u32 reserved_1 : 1;
  85. u32 ia_iwb_en : 1;
  86. u32 gt_iwb_en : 1;
  87. };
  88. #define b_cr_mot_out_mask_mchbar_port 0x4c
  89. #define b_cr_mot_out_mask_mchbar_offset 0x6af4
  90. #define b_cr_mot_out_mask_mchbar_r_opcode 0x00
  91. struct b_cr_asym_mem_region0_mchbar {
  92. u32 pad : 4;
  93. u32 slice0_asym_base : 11;
  94. u32 pad_18_15 : 4;
  95. u32 slice0_asym_limit : 11;
  96. u32 slice0_asym_channel_select : 1;
  97. u32 slice0_asym_enable : 1;
  98. };
  99. #define b_cr_asym_mem_region0_mchbar_port 0x4c
  100. #define b_cr_asym_mem_region0_mchbar_offset 0x6e40
  101. #define b_cr_asym_mem_region0_mchbar_r_opcode 0x00
  102. struct b_cr_asym_mem_region1_mchbar {
  103. u32 pad : 4;
  104. u32 slice1_asym_base : 11;
  105. u32 pad_18_15 : 4;
  106. u32 slice1_asym_limit : 11;
  107. u32 slice1_asym_channel_select : 1;
  108. u32 slice1_asym_enable : 1;
  109. };
  110. #define b_cr_asym_mem_region1_mchbar_port 0x4c
  111. #define b_cr_asym_mem_region1_mchbar_offset 0x6e44
  112. #define b_cr_asym_mem_region1_mchbar_r_opcode 0x00
  113. /* Some bit fields moved in above two structs on Denverton */
  114. struct b_cr_asym_mem_region_denverton {
  115. u32 pad : 4;
  116. u32 slice_asym_base : 8;
  117. u32 pad_19_12 : 8;
  118. u32 slice_asym_limit : 8;
  119. u32 pad_28_30 : 3;
  120. u32 slice_asym_enable : 1;
  121. };
  122. struct b_cr_asym_2way_mem_region_mchbar {
  123. u32 pad : 2;
  124. u32 asym_2way_intlv_mode : 2;
  125. u32 asym_2way_base : 11;
  126. u32 pad_16_15 : 2;
  127. u32 asym_2way_limit : 11;
  128. u32 pad_30_28 : 3;
  129. u32 asym_2way_interleave_enable : 1;
  130. };
  131. #define b_cr_asym_2way_mem_region_mchbar_port 0x4c
  132. #define b_cr_asym_2way_mem_region_mchbar_offset 0x6e50
  133. #define b_cr_asym_2way_mem_region_mchbar_r_opcode 0x00
  134. /* Apollo Lake d-unit */
  135. struct d_cr_drp0 {
  136. u32 rken0 : 1;
  137. u32 rken1 : 1;
  138. u32 ddmen : 1;
  139. u32 rsvd3 : 1;
  140. u32 dwid : 2;
  141. u32 dden : 3;
  142. u32 rsvd13_9 : 5;
  143. u32 rsien : 1;
  144. u32 bahen : 1;
  145. u32 rsvd18_16 : 3;
  146. u32 caswizzle : 2;
  147. u32 eccen : 1;
  148. u32 dramtype : 3;
  149. u32 blmode : 3;
  150. u32 addrdec : 2;
  151. u32 dramdevice_pr : 2;
  152. };
  153. #define d_cr_drp0_offset 0x1400
  154. #define d_cr_drp0_r_opcode 0x00
  155. /* Denverton d-unit */
  156. struct d_cr_dsch {
  157. u32 ch0en : 1;
  158. u32 ch1en : 1;
  159. u32 ddr4en : 1;
  160. u32 coldwake : 1;
  161. u32 newbypdis : 1;
  162. u32 chan_width : 1;
  163. u32 rsvd6_6 : 1;
  164. u32 ooodis : 1;
  165. u32 rsvd18_8 : 11;
  166. u32 ic : 1;
  167. u32 rsvd31_20 : 12;
  168. };
  169. #define d_cr_dsch_port 0x16
  170. #define d_cr_dsch_offset 0x0
  171. #define d_cr_dsch_r_opcode 0x0
  172. struct d_cr_ecc_ctrl {
  173. u32 eccen : 1;
  174. u32 rsvd31_1 : 31;
  175. };
  176. #define d_cr_ecc_ctrl_offset 0x180
  177. #define d_cr_ecc_ctrl_r_opcode 0x0
  178. struct d_cr_drp {
  179. u32 rken0 : 1;
  180. u32 rken1 : 1;
  181. u32 rken2 : 1;
  182. u32 rken3 : 1;
  183. u32 dimmdwid0 : 2;
  184. u32 dimmdden0 : 2;
  185. u32 dimmdwid1 : 2;
  186. u32 dimmdden1 : 2;
  187. u32 rsvd15_12 : 4;
  188. u32 dimmflip : 1;
  189. u32 rsvd31_17 : 15;
  190. };
  191. #define d_cr_drp_offset 0x158
  192. #define d_cr_drp_r_opcode 0x0
  193. struct d_cr_dmap {
  194. u32 ba0 : 5;
  195. u32 ba1 : 5;
  196. u32 bg0 : 5; /* if ddr3, ba2 = bg0 */
  197. u32 bg1 : 5; /* if ddr3, ba3 = bg1 */
  198. u32 rs0 : 5;
  199. u32 rs1 : 5;
  200. u32 rsvd : 2;
  201. };
  202. #define d_cr_dmap_offset 0x174
  203. #define d_cr_dmap_r_opcode 0x0
  204. struct d_cr_dmap1 {
  205. u32 ca11 : 6;
  206. u32 bxor : 1;
  207. u32 rsvd : 25;
  208. };
  209. #define d_cr_dmap1_offset 0xb4
  210. #define d_cr_dmap1_r_opcode 0x0
  211. struct d_cr_dmap2 {
  212. u32 row0 : 5;
  213. u32 row1 : 5;
  214. u32 row2 : 5;
  215. u32 row3 : 5;
  216. u32 row4 : 5;
  217. u32 row5 : 5;
  218. u32 rsvd : 2;
  219. };
  220. #define d_cr_dmap2_offset 0x148
  221. #define d_cr_dmap2_r_opcode 0x0
  222. struct d_cr_dmap3 {
  223. u32 row6 : 5;
  224. u32 row7 : 5;
  225. u32 row8 : 5;
  226. u32 row9 : 5;
  227. u32 row10 : 5;
  228. u32 row11 : 5;
  229. u32 rsvd : 2;
  230. };
  231. #define d_cr_dmap3_offset 0x14c
  232. #define d_cr_dmap3_r_opcode 0x0
  233. struct d_cr_dmap4 {
  234. u32 row12 : 5;
  235. u32 row13 : 5;
  236. u32 row14 : 5;
  237. u32 row15 : 5;
  238. u32 row16 : 5;
  239. u32 row17 : 5;
  240. u32 rsvd : 2;
  241. };
  242. #define d_cr_dmap4_offset 0x150
  243. #define d_cr_dmap4_r_opcode 0x0
  244. struct d_cr_dmap5 {
  245. u32 ca3 : 4;
  246. u32 ca4 : 4;
  247. u32 ca5 : 4;
  248. u32 ca6 : 4;
  249. u32 ca7 : 4;
  250. u32 ca8 : 4;
  251. u32 ca9 : 4;
  252. u32 rsvd : 4;
  253. };
  254. #define d_cr_dmap5_offset 0x154
  255. #define d_cr_dmap5_r_opcode 0x0
  256. #endif /* _PND2_REGS_H */