2 * inteltool - dump all registers on an Intel CPU + chipset based system.
4 * Copyright (C) 2008 by coresystems GmbH
5 * written by Stefan Reinauer <stepan@coresystems.de>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 #include "inteltool.h"
35 int print_rcba(struct pci_dev *sb)
38 volatile uint8_t *rcba;
41 printf("\n============= RCBA ==============\n\n");
43 switch (sb->device_id) {
44 case PCI_DEVICE_ID_INTEL_ICH7:
45 case PCI_DEVICE_ID_INTEL_ICH7M:
46 case PCI_DEVICE_ID_INTEL_ICH7DH:
47 case PCI_DEVICE_ID_INTEL_ICH7MDH:
48 rcba_phys = pci_read_long(sb, 0xf0) & 0xfffffffe;
50 case PCI_DEVICE_ID_INTEL_ICH:
51 case PCI_DEVICE_ID_INTEL_ICH0:
52 case PCI_DEVICE_ID_INTEL_ICH4:
53 case PCI_DEVICE_ID_INTEL_ICH4M:
54 printf("This southbridge does not have RCBA.\n");
57 printf("Error: Dumping RCBA on this southbridge is not (yet) supported.\n");
61 rcba = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
62 fd_mem, (off_t) rcba_phys);
64 if (rcba == MAP_FAILED) {
65 perror("Error mapping RCBA");
69 printf("RCBA = 0x%08x (MEM)\n\n", rcba_phys);
71 for (i = 0; i < size; i += 4) {
72 if (*(uint32_t *)(rcba + i))
73 printf("0x%04x: 0x%08x\n", i, *(uint32_t *)(rcba + i));
76 munmap((void *)rcba, size);