Author: stepan Date: Tue Mar 23 16:53:38 2010 New Revision: 5276 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5276
Log: Use coreboot-internal version of x86emu for the vgabios utility. Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Joseph Smith joe@settoplinux.org
Added: trunk/util/vgabios/include/ trunk/util/vgabios/include/arch/ trunk/util/vgabios/include/arch/io.h trunk/util/vgabios/include/console/ trunk/util/vgabios/include/console/console.h Deleted: trunk/util/vgabios/x86emu/ Modified: trunk/util/vgabios/Makefile trunk/util/vgabios/helper_exec.c trunk/util/vgabios/test.h trunk/util/vgabios/testbios.c
Modified: trunk/util/vgabios/Makefile ============================================================================== --- trunk/util/vgabios/Makefile Tue Mar 23 16:49:44 2010 (r5275) +++ trunk/util/vgabios/Makefile Tue Mar 23 16:53:38 2010 (r5276) @@ -7,29 +7,27 @@ #
CC = gcc -CFLAGS = -Wall -Ix86emu/include -O2 -g +CFLAGS = -Wall -Iinclude -I../../src/devices/oprom/include/ -O2 -g
-INTOBJS = int10.o int15.o int16.o int1a.o inte6.o -OBJECTS = testbios.o helper_exec.o helper_mem.o $(INTOBJS) - -LIBS = x86emu/src/x86emu/libx86emu.a +INTOBJS = int10.o int15.o int16.o int1a.o inte6.o +X86EMUOBJS = sys.o decode.o ops.o ops2.o prim_ops.o fpu.o debug.o +OBJS = testbios.o helper_exec.o helper_mem.o $(INTOBJS) $(X86EMUOBJS)
# user space pci is the only option right now. -OBJECTS += pci-userspace.o +OBJS += pci-userspace.o + +LIBS=-lpci
all: testbios
-testbios: $(OBJECTS) $(LIBS) - $(CC) -o testbios $(OBJECTS) $(LIBS) -lpci +testbios: $(OBJS) + $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
helper_exec.o: helper_exec.c test.h
-x86emu/src/x86emu/libx86emu.a: - $(MAKE) -C x86emu/src/x86emu/ -f makefile.linux - clean: - $(MAKE) -C x86emu/src/x86emu/ -f makefile.linux clean rm -f *.o *~ testbios
-distclean: clean - $(MAKE) -C x86emu/src/x86emu/ -f makefile.linux clean +%.o: ../../src/devices/oprom/x86emu/%.c + $(CC) $(CFLAGS) -include stdio.h -c -o $@ $^ +
Modified: trunk/util/vgabios/helper_exec.c ============================================================================== --- trunk/util/vgabios/helper_exec.c Tue Mar 23 16:49:44 2010 (r5275) +++ trunk/util/vgabios/helper_exec.c Tue Mar 23 16:53:38 2010 (r5276) @@ -14,7 +14,7 @@ * in xf86EnableIO(). Otherwise we won't trap * on PIO. */ -#include <x86emu.h> +#include <x86emu/x86emu.h> #include "helper_exec.h" #include "test.h" #include <sys/io.h>
Added: trunk/util/vgabios/include/arch/io.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/util/vgabios/include/arch/io.h Tue Mar 23 16:53:38 2010 (r5276) @@ -0,0 +1,4 @@ +#ifndef _ASM_IO_H +#define _ASM_IO_H +#include <sys/io.h> +#endif
Added: trunk/util/vgabios/include/console/console.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/util/vgabios/include/console/console.h Tue Mar 23 16:53:38 2010 (r5276) @@ -0,0 +1,3 @@ +#ifndef _CONSOLE_CONSOLE_H +#define _CONSOLE_CONSOLE_H +#endif
Modified: trunk/util/vgabios/test.h ============================================================================== --- trunk/util/vgabios/test.h Tue Mar 23 16:49:44 2010 (r5275) +++ trunk/util/vgabios/test.h Tue Mar 23 16:53:38 2010 (r5276) @@ -6,7 +6,7 @@ */ #ifndef XF86X86EMU_H_ #define XF86X86EMU_H_ -#include <x86emu.h> +#include <x86emu/x86emu.h>
#define M _X86EMU_env
Modified: trunk/util/vgabios/testbios.c ============================================================================== --- trunk/util/vgabios/testbios.c Tue Mar 23 16:49:44 2010 (r5275) +++ trunk/util/vgabios/testbios.c Tue Mar 23 16:53:38 2010 (r5276) @@ -10,7 +10,7 @@ #define die(x) { perror(x); exit(1); } #define warn(x) { perror(x); }
-#include <x86emu.h> +#include <x86emu/x86emu.h> #include "helper_exec.h" #include "test.h" #include "pci-userspace.h" @@ -139,7 +139,6 @@ unsigned short initialip = 0, initialcs = 0, devfn = 0; X86EMU_intrFuncs intFuncs[256]; void X86EMU_setMemBase(void *base, size_t size); - void X86EMU_setabseg(void *abseg); void x86emu_dump_xregs(void); int X86EMU_set_debug(int debug); int debugflag = 0; @@ -277,7 +276,7 @@
current = &p; X86EMU_setMemBase(biosmem, sizeof(biosmem)); - X86EMU_setabseg(abseg); + M.abseg = (unsigned long)abseg; X86EMU_setupPioFuncs(&myfuncs); ioperm(0, 0x400, 1);