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> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6454 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
		
				
					committed by
					
						
						Stefan Reinauer
					
				
			
			
				
	
			
			
			
						parent
						
							4a46e89c75
						
					
				
				
					commit
					cff573d3a4
				
			@@ -31,7 +31,7 @@ OBJS = inteltool.o cpu.o gpio.o rootcmplx.o powermgt.o memory.o pcie.o
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
OS_ARCH	= $(shell uname)
 | 
					OS_ARCH	= $(shell uname)
 | 
				
			||||||
ifeq ($(OS_ARCH), Darwin)
 | 
					ifeq ($(OS_ARCH), Darwin)
 | 
				
			||||||
LDFLAGS = -framework DirectIO -lpci -lz
 | 
					LDFLAGS = -framework DirectHW -lpci -lz
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
ifeq ($(OS_ARCH), FreeBSD)
 | 
					ifeq ($(OS_ARCH), FreeBSD)
 | 
				
			||||||
CFLAGS += -I/usr/local/include
 | 
					CFLAGS += -I/usr/local/include
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,7 +85,7 @@ static const struct {
 | 
				
			|||||||
#ifndef __DARWIN__
 | 
					#ifndef __DARWIN__
 | 
				
			||||||
static int fd_mem;
 | 
					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;
 | 
						void *virt_addr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,7 +26,7 @@
 | 
				
			|||||||
#if (defined(__MACH__) && defined(__APPLE__))
 | 
					#if (defined(__MACH__) && defined(__APPLE__))
 | 
				
			||||||
/* DirectHW is available here: http://www.coresystems.de/en/directhw */
 | 
					/* DirectHW is available here: http://www.coresystems.de/en/directhw */
 | 
				
			||||||
#define __DARWIN__
 | 
					#define __DARWIN__
 | 
				
			||||||
#include <DirectIO/darwinio.h>
 | 
					#include <DirectHW/DirectHW.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#include <pci/pci.h>
 | 
					#include <pci/pci.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -111,7 +111,7 @@ int freebsd_wrmsr(int addr, msr_t msr);
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
typedef struct { uint16_t addr; int size; char *name; } io_register_t;
 | 
					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);
 | 
					void unmap_physical(void *virt_addr, size_t len);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
unsigned int cpuid(unsigned int op);
 | 
					unsigned int cpuid(unsigned int op);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,7 +37,7 @@ OBJS += $(CLI_OBJS)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
OS_ARCH        = $(shell uname)
 | 
					OS_ARCH        = $(shell uname)
 | 
				
			||||||
ifeq ($(OS_ARCH), Darwin)
 | 
					ifeq ($(OS_ARCH), Darwin)
 | 
				
			||||||
LDFLAGS = -framework DirectIO
 | 
					LDFLAGS = -framework DirectHW
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
ifeq ($(OS_ARCH), NetBSD)
 | 
					ifeq ($(OS_ARCH), NetBSD)
 | 
				
			||||||
LDFLAGS = -l$(shell uname -p)
 | 
					LDFLAGS = -l$(shell uname -p)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
#include <sys/io.h>
 | 
					#include <sys/io.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#if (defined(__MACH__) && defined(__APPLE__))
 | 
					#if (defined(__MACH__) && defined(__APPLE__))
 | 
				
			||||||
#include <DirectIO/darwinio.h>
 | 
					#include <DirectHW/DirectHW.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#if defined(__NetBSD__)
 | 
					#if defined(__NetBSD__)
 | 
				
			||||||
#if defined(__i386__) || defined(__x86_64__) 
 | 
					#if defined(__i386__) || defined(__x86_64__) 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,7 +37,7 @@ OBJS = superiotool.o ali.o fintek.o ite.o nsc.o nuvoton.o smsc.o winbond.o
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
OS_ARCH = $(shell uname)
 | 
					OS_ARCH = $(shell uname)
 | 
				
			||||||
ifeq ($(OS_ARCH), Darwin)
 | 
					ifeq ($(OS_ARCH), Darwin)
 | 
				
			||||||
LIBS = -framework IOKit -framework DirectIO -lpci -lz
 | 
					LIBS = -framework IOKit -framework DirectHW -lpci -lz
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
ifeq ($(OS_ARCH), FreeBSD)
 | 
					ifeq ($(OS_ARCH), FreeBSD)
 | 
				
			||||||
CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
 | 
					CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,8 +33,8 @@
 | 
				
			|||||||
#include <sys/io.h>
 | 
					#include <sys/io.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#if (defined(__MACH__) && defined(__APPLE__))
 | 
					#if (defined(__MACH__) && defined(__APPLE__))
 | 
				
			||||||
/* DirectIO is available here: http://www.coresystems.de/en/directio */
 | 
					/* DirectHW is available here: http://www.coreboot.org/DirectHW */
 | 
				
			||||||
#include <DirectIO/darwinio.h>
 | 
					#include <DirectHW/DirectHW.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef PCI_SUPPORT
 | 
					#ifdef PCI_SUPPORT
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user