1 /* inteltool - dump all registers on an Intel CPU + chipset based system */
2 /* SPDX-License-Identifier: GPL-2.0-only */
8 int print_rcba(struct pci_dev
*sb
)
11 volatile uint8_t *rcba
;
14 printf("\n============= RCBA ==============\n\n");
16 switch (sb
->device_id
) {
17 case PCI_DEVICE_ID_INTEL_ICH6
:
18 case PCI_DEVICE_ID_INTEL_ICH7
:
19 case PCI_DEVICE_ID_INTEL_ICH7M
:
20 case PCI_DEVICE_ID_INTEL_ICH7DH
:
21 case PCI_DEVICE_ID_INTEL_ICH7MDH
:
22 case PCI_DEVICE_ID_INTEL_ICH8
:
23 case PCI_DEVICE_ID_INTEL_ICH8M
:
24 case PCI_DEVICE_ID_INTEL_ICH8ME
:
25 case PCI_DEVICE_ID_INTEL_ICH9DH
:
26 case PCI_DEVICE_ID_INTEL_ICH9DO
:
27 case PCI_DEVICE_ID_INTEL_ICH9R
:
28 case PCI_DEVICE_ID_INTEL_ICH9
:
29 case PCI_DEVICE_ID_INTEL_ICH9M
:
30 case PCI_DEVICE_ID_INTEL_ICH9ME
:
31 case PCI_DEVICE_ID_INTEL_ICH10
:
32 case PCI_DEVICE_ID_INTEL_ICH10DO
:
33 case PCI_DEVICE_ID_INTEL_ICH10R
:
34 case PCI_DEVICE_ID_INTEL_NM10
:
35 case PCI_DEVICE_ID_INTEL_I63XX
:
36 case PCI_DEVICE_ID_INTEL_3400
:
37 case PCI_DEVICE_ID_INTEL_3420
:
38 case PCI_DEVICE_ID_INTEL_3450
:
39 case PCI_DEVICE_ID_INTEL_3400_DESKTOP
:
40 case PCI_DEVICE_ID_INTEL_3400_MOBILE
:
41 case PCI_DEVICE_ID_INTEL_3400_MOBILE_SFF
:
42 case PCI_DEVICE_ID_INTEL_B55_A
:
43 case PCI_DEVICE_ID_INTEL_B55_B
:
44 case PCI_DEVICE_ID_INTEL_H55
:
45 case PCI_DEVICE_ID_INTEL_H57
:
46 case PCI_DEVICE_ID_INTEL_HM55
:
47 case PCI_DEVICE_ID_INTEL_HM57
:
48 case PCI_DEVICE_ID_INTEL_P55
:
49 case PCI_DEVICE_ID_INTEL_PM55
:
50 case PCI_DEVICE_ID_INTEL_Q57
:
51 case PCI_DEVICE_ID_INTEL_QM57
:
52 case PCI_DEVICE_ID_INTEL_QS57
:
53 case PCI_DEVICE_ID_INTEL_Z68
:
54 case PCI_DEVICE_ID_INTEL_P67
:
55 case PCI_DEVICE_ID_INTEL_UM67
:
56 case PCI_DEVICE_ID_INTEL_HM65
:
57 case PCI_DEVICE_ID_INTEL_H67
:
58 case PCI_DEVICE_ID_INTEL_HM67
:
59 case PCI_DEVICE_ID_INTEL_Q65
:
60 case PCI_DEVICE_ID_INTEL_QS67
:
61 case PCI_DEVICE_ID_INTEL_Q67
:
62 case PCI_DEVICE_ID_INTEL_QM67
:
63 case PCI_DEVICE_ID_INTEL_B65
:
64 case PCI_DEVICE_ID_INTEL_C202
:
65 case PCI_DEVICE_ID_INTEL_C204
:
66 case PCI_DEVICE_ID_INTEL_C206
:
67 case PCI_DEVICE_ID_INTEL_H61
:
68 case PCI_DEVICE_ID_INTEL_Z77
:
69 case PCI_DEVICE_ID_INTEL_Z75
:
70 case PCI_DEVICE_ID_INTEL_Q77
:
71 case PCI_DEVICE_ID_INTEL_Q75
:
72 case PCI_DEVICE_ID_INTEL_B75
:
73 case PCI_DEVICE_ID_INTEL_H77
:
74 case PCI_DEVICE_ID_INTEL_C216
:
75 case PCI_DEVICE_ID_INTEL_QM77
:
76 case PCI_DEVICE_ID_INTEL_QS77
:
77 case PCI_DEVICE_ID_INTEL_HM77
:
78 case PCI_DEVICE_ID_INTEL_UM77
:
79 case PCI_DEVICE_ID_INTEL_HM76
:
80 case PCI_DEVICE_ID_INTEL_HM75
:
81 case PCI_DEVICE_ID_INTEL_HM70
:
82 case PCI_DEVICE_ID_INTEL_NM70
:
83 case PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_FULL
:
84 case PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_PREM
:
85 case PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_BASE
:
86 case PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_PREM
:
87 case PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP
:
88 case PCI_DEVICE_ID_INTEL_C8_MOBILE
:
89 case PCI_DEVICE_ID_INTEL_C8_DESKTOP
:
90 case PCI_DEVICE_ID_INTEL_Z87
:
91 case PCI_DEVICE_ID_INTEL_Z85
:
92 case PCI_DEVICE_ID_INTEL_HM86
:
93 case PCI_DEVICE_ID_INTEL_H87
:
94 case PCI_DEVICE_ID_INTEL_HM87
:
95 case PCI_DEVICE_ID_INTEL_Q85
:
96 case PCI_DEVICE_ID_INTEL_Q87
:
97 case PCI_DEVICE_ID_INTEL_QM87
:
98 case PCI_DEVICE_ID_INTEL_B85
:
99 case PCI_DEVICE_ID_INTEL_C222
:
100 case PCI_DEVICE_ID_INTEL_C224
:
101 case PCI_DEVICE_ID_INTEL_C226
:
102 case PCI_DEVICE_ID_INTEL_H81
:
103 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_PRE
:
104 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_SKL
:
105 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_SKL
:
106 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_SKL
:
107 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_KBL
:
108 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_KBL
:
109 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_KBL
:
110 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_BASE
:
111 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_PREM
:
112 case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_IHDCP_PREM
:
113 rcba_phys
= pci_read_long(sb
, 0xf0) & 0xfffffffe;
115 case PCI_DEVICE_ID_INTEL_ICH
:
116 case PCI_DEVICE_ID_INTEL_ICH0
:
117 case PCI_DEVICE_ID_INTEL_ICH2
:
118 case PCI_DEVICE_ID_INTEL_ICH4
:
119 case PCI_DEVICE_ID_INTEL_ICH4M
:
120 case PCI_DEVICE_ID_INTEL_ICH5
:
121 printf("This southbridge does not have RCBA.\n");
124 printf("Error: Dumping RCBA on this southbridge is not (yet) supported.\n");
128 rcba
= map_physical(rcba_phys
, size
);
131 perror("Error mapping RCBA");
135 printf("RCBA = 0x%08x (MEM)\n\n", rcba_phys
);
137 for (i
= 0; i
< size
; i
+= 4) {
138 if (read32(rcba
+ i
))
139 printf("0x%04x: 0x%08x\n", i
, read32(rcba
+ i
));
142 unmap_physical((void *)rcba
, size
);