direct-io.hg

changeset 5449:463317d0dd8b

bitkeeper revision 1.1713.1.6 (42ae0d7cI1fdGe88s6RyEx8d0oy2wg)

[PATCH] x64-vmxassist-fix2.patch

Fix 64 bit build. Tested the binary built on a 64 bit platform on a 32 bit platform.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author arun.sharma@intel.com[kaf24]
date Mon Jun 13 22:49:32 2005 +0000 (2005-06-13)
parents a382b5e24996
children 066293b6c029
files tools/firmware/vmxassist/Makefile tools/firmware/vmxassist/head.S tools/firmware/vmxassist/trap.S
line diff
     1.1 --- a/tools/firmware/vmxassist/Makefile	Mon Jun 13 22:48:36 2005 +0000
     1.2 +++ b/tools/firmware/vmxassist/Makefile	Mon Jun 13 22:49:32 2005 +0000
     1.3 @@ -18,6 +18,9 @@
     1.4  # Place - Suite 330, Boston, MA 02111-1307 USA.
     1.5  #
     1.6  
     1.7 +XEN_ROOT = ../../..
     1.8 +include $(XEN_ROOT)/tools/Rules.mk
     1.9 +
    1.10  # The emulator code lives in ROM space
    1.11  TEXTADDR=0x000D0000
    1.12  DEFINES=-DDEBUG -DTEXTADDR=${TEXTADDR}
    1.13 @@ -32,19 +35,24 @@ CPP=cpp -P
    1.14  OBJCOPY=objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0
    1.15  CFLAGS=${DEFINES} -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
    1.16  
    1.17 +ifeq ($(XEN_COMPILE_ARCH),x86_64)
    1.18 +CFLAGS  += -m32 -march=i686
    1.19 +LDFLAGS += -m elf_i386
    1.20 +endif
    1.21 +
    1.22  OBJECTS = head.o trap.o vm86.o setup.o util.o
    1.23  
    1.24  all: vmxloader
    1.25  
    1.26  vmxloader: roms.h vmxloader.c
    1.27 -	${CC} ${DEFINES} -c vmxloader.c
    1.28 -	$(CC) -o vmxloader.tmp -nostdlib -Wl,-N -Wl,-Ttext -Wl,0x100000 vmxloader.o
    1.29 +	${CC} ${CFLAGS} ${DEFINES} -c vmxloader.c
    1.30 +	$(CC) -o vmxloader.tmp -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,0x100000 vmxloader.o
    1.31  	objcopy --change-addresses=0xC0000000 vmxloader.tmp vmxloader
    1.32  	rm -f vmxloader.tmp
    1.33  
    1.34  vmxassist.bin: vmxassist.ld ${OBJECTS}
    1.35  	${CPP} ${DEFINES} vmxassist.ld > vmxassist.tmp
    1.36 -	${LD} -o vmxassist -nostdlib --fatal-warnings -N -T vmxassist.tmp ${OBJECTS}
    1.37 +	${LD} -o vmxassist ${LDFLAGS} -nostdlib --fatal-warnings -N -T vmxassist.tmp ${OBJECTS}
    1.38  	nm -n vmxassist > vmxassist.sym
    1.39  	${OBJCOPY} vmxassist vmxassist.tmp
    1.40  	dd if=vmxassist.tmp of=vmxassist.bin ibs=512 conv=sync
     2.1 --- a/tools/firmware/vmxassist/head.S	Mon Jun 13 22:48:36 2005 +0000
     2.2 +++ b/tools/firmware/vmxassist/head.S	Mon Jun 13 22:49:32 2005 +0000
     2.3 @@ -106,6 +106,7 @@ 1:
     2.4   * main and setup our own environment.
     2.5   */
     2.6  	.globl	_start
     2.7 +	.code32
     2.8  _start:
     2.9  	cli
    2.10  
     3.1 --- a/tools/firmware/vmxassist/trap.S	Mon Jun 13 22:48:36 2005 +0000
     3.2 +++ b/tools/firmware/vmxassist/trap.S	Mon Jun 13 22:49:32 2005 +0000
     3.3 @@ -20,7 +20,6 @@
     3.4  #include "machine.h"
     3.5  #include "offsets.h"
     3.6  
     3.7 -
     3.8  /*
     3.9   * All processor exception/faults/interrupts end up here.
    3.10   *
    3.11 @@ -43,6 +42,7 @@ 1:	.if	\error == 0
    3.12  	.endm
    3.13  
    3.14  	.section .rodata
    3.15 +	.code32
    3.16  	.align	4
    3.17  	.global	trap_handlers
    3.18  trap_handlers:
    3.19 @@ -96,6 +96,7 @@ trap_handlers:
    3.20  	TRAP_HANDLER	47, 0	/* irq 15 */
    3.21  
    3.22  	.text
    3.23 +	.code32
    3.24  	.align	16
    3.25  common_trap:				/* common trap handler */
    3.26  	pushl	%gs