From 1162f25a49e8f39822123d664cda10fef466b351 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 4 Dec 2008 15:18:20 +0000 Subject: Patch to util/inteltool: * PMBASE dumping now knows the registers. * Add support for i965, i975, ICH8M * Add support for Darwin OS using DirectIO Signed-off-by: Stefan Reinauer Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3794 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/inteltool/rootcmplx.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'util/inteltool/rootcmplx.c') diff --git a/util/inteltool/rootcmplx.c b/util/inteltool/rootcmplx.c index 7e2b665ce6..438e5b0b11 100644 --- a/util/inteltool/rootcmplx.c +++ b/util/inteltool/rootcmplx.c @@ -18,18 +18,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include - #include "inteltool.h" int print_rcba(struct pci_dev *sb) @@ -45,6 +35,7 @@ int print_rcba(struct pci_dev *sb) case PCI_DEVICE_ID_INTEL_ICH7M: case PCI_DEVICE_ID_INTEL_ICH7DH: case PCI_DEVICE_ID_INTEL_ICH7MDH: + case PCI_DEVICE_ID_INTEL_ICH8M: rcba_phys = pci_read_long(sb, 0xf0) & 0xfffffffe; break; case PCI_DEVICE_ID_INTEL_ICH: @@ -58,10 +49,9 @@ int print_rcba(struct pci_dev *sb) return 1; } - rcba = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED, - fd_mem, (off_t) rcba_phys); + rcba = map_physical(rcba_phys, size); - if (rcba == MAP_FAILED) { + if (rcba == NULL) { perror("Error mapping RCBA"); exit(1); } @@ -73,7 +63,7 @@ int print_rcba(struct pci_dev *sb) printf("0x%04x: 0x%08x\n", i, *(uint32_t *)(rcba + i)); } - munmap((void *)rcba, size); + unmap_physical((void *)rcba, size); return 0; } -- cgit v1.2.3