Author: stepan Date: Fri Mar 18 23:08:39 2011 New Revision: 6454 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6454
Log: DirectHW fixes for coreboot utilities
See http://www.coreboot.org/DirectHW for more information
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Acked-by: Stefan Reinauer stefan.reinauer@coreboot.org
Modified: trunk/util/inteltool/Makefile trunk/util/inteltool/inteltool.c trunk/util/inteltool/inteltool.h trunk/util/nvramtool/Makefile trunk/util/nvramtool/accessors/cmos-hw-unix.c trunk/util/superiotool/Makefile trunk/util/superiotool/superiotool.h
Modified: trunk/util/inteltool/Makefile ============================================================================== --- trunk/util/inteltool/Makefile Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/inteltool/Makefile Fri Mar 18 23:08:39 2011 (r6454) @@ -31,7 +31,7 @@
OS_ARCH = $(shell uname) ifeq ($(OS_ARCH), Darwin) -LDFLAGS = -framework DirectIO -lpci -lz +LDFLAGS = -framework DirectHW -lpci -lz endif ifeq ($(OS_ARCH), FreeBSD) CFLAGS += -I/usr/local/include
Modified: trunk/util/inteltool/inteltool.c ============================================================================== --- trunk/util/inteltool/inteltool.c Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/inteltool/inteltool.c Fri Mar 18 23:08:39 2011 (r6454) @@ -85,7 +85,7 @@ #ifndef __DARWIN__ static int fd_mem;
-void *map_physical(unsigned long phys_addr, size_t len) +void *map_physical(uint64_t phys_addr, size_t len) { void *virt_addr;
Modified: trunk/util/inteltool/inteltool.h ============================================================================== --- trunk/util/inteltool/inteltool.h Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/inteltool/inteltool.h Fri Mar 18 23:08:39 2011 (r6454) @@ -26,7 +26,7 @@ #if (defined(__MACH__) && defined(__APPLE__)) /* DirectHW is available here: http://www.coresystems.de/en/directhw */ #define __DARWIN__ -#include <DirectIO/darwinio.h> +#include <DirectHW/DirectHW.h> #endif #include <pci/pci.h>
@@ -111,7 +111,7 @@ #endif typedef struct { uint16_t addr; int size; char *name; } io_register_t;
-void *map_physical(unsigned long phys_addr, size_t len); +void *map_physical(uint64_t phys_addr, size_t len); void unmap_physical(void *virt_addr, size_t len);
unsigned int cpuid(unsigned int op);
Modified: trunk/util/nvramtool/Makefile ============================================================================== --- trunk/util/nvramtool/Makefile Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/nvramtool/Makefile Fri Mar 18 23:08:39 2011 (r6454) @@ -37,7 +37,7 @@
OS_ARCH = $(shell uname) ifeq ($(OS_ARCH), Darwin) -LDFLAGS = -framework DirectIO +LDFLAGS = -framework DirectHW endif ifeq ($(OS_ARCH), NetBSD) LDFLAGS = -l$(shell uname -p)
Modified: trunk/util/nvramtool/accessors/cmos-hw-unix.c ============================================================================== --- trunk/util/nvramtool/accessors/cmos-hw-unix.c Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/nvramtool/accessors/cmos-hw-unix.c Fri Mar 18 23:08:39 2011 (r6454) @@ -15,7 +15,7 @@ #include <sys/io.h> #endif #if (defined(__MACH__) && defined(__APPLE__)) -#include <DirectIO/darwinio.h> +#include <DirectHW/DirectHW.h> #endif #if defined(__NetBSD__) #if defined(__i386__) || defined(__x86_64__)
Modified: trunk/util/superiotool/Makefile ============================================================================== --- trunk/util/superiotool/Makefile Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/superiotool/Makefile Fri Mar 18 23:08:39 2011 (r6454) @@ -37,7 +37,7 @@
OS_ARCH = $(shell uname) ifeq ($(OS_ARCH), Darwin) -LIBS = -framework IOKit -framework DirectIO -lpci -lz +LIBS = -framework IOKit -framework DirectHW -lpci -lz endif ifeq ($(OS_ARCH), FreeBSD) CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
Modified: trunk/util/superiotool/superiotool.h ============================================================================== --- trunk/util/superiotool/superiotool.h Fri Mar 18 00:14:24 2011 (r6453) +++ trunk/util/superiotool/superiotool.h Fri Mar 18 23:08:39 2011 (r6454) @@ -33,8 +33,8 @@ #include <sys/io.h> #endif #if (defined(__MACH__) && defined(__APPLE__)) -/* DirectIO is available here: http://www.coresystems.de/en/directio */ -#include <DirectIO/darwinio.h> +/* DirectHW is available here: http://www.coreboot.org/DirectHW */ +#include <DirectHW/DirectHW.h> #endif
#ifdef PCI_SUPPORT