WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [PATCH] x64-vmxassist-fix2.patch

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [PATCH] x64-vmxassist-fix2.patch
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 13 Jun 2005 22:49:32 +0000
Delivery-date: Mon, 13 Jun 2005 23:02:27 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1719, 2005/06/13 23:49:32+01:00, arun.sharma@xxxxxxxxx

        [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@xxxxxxxxx>



 Makefile |   14 +++++++++++---
 head.S   |    1 +
 trap.S   |    3 ++-
 3 files changed, 14 insertions(+), 4 deletions(-)


diff -Nru a/tools/firmware/vmxassist/Makefile 
b/tools/firmware/vmxassist/Makefile
--- a/tools/firmware/vmxassist/Makefile 2005-06-13 19:03:29 -04:00
+++ b/tools/firmware/vmxassist/Makefile 2005-06-13 19:03:29 -04:00
@@ -18,6 +18,9 @@
 # Place - Suite 330, Boston, MA 02111-1307 USA.
 #
 
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
 # The emulator code lives in ROM space
 TEXTADDR=0x000D0000
 DEFINES=-DDEBUG -DTEXTADDR=${TEXTADDR}
@@ -32,19 +35,24 @@
 OBJCOPY=objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0
 CFLAGS=${DEFINES} -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
 
+ifeq ($(XEN_COMPILE_ARCH),x86_64)
+CFLAGS  += -m32 -march=i686
+LDFLAGS += -m elf_i386
+endif
+
 OBJECTS = head.o trap.o vm86.o setup.o util.o
 
 all: vmxloader
 
 vmxloader: roms.h vmxloader.c
-       ${CC} ${DEFINES} -c vmxloader.c
-       $(CC) -o vmxloader.tmp -nostdlib -Wl,-N -Wl,-Ttext -Wl,0x100000 
vmxloader.o
+       ${CC} ${CFLAGS} ${DEFINES} -c vmxloader.c
+       $(CC) -o vmxloader.tmp -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,0x100000 
vmxloader.o
        objcopy --change-addresses=0xC0000000 vmxloader.tmp vmxloader
        rm -f vmxloader.tmp
 
 vmxassist.bin: vmxassist.ld ${OBJECTS}
        ${CPP} ${DEFINES} vmxassist.ld > vmxassist.tmp
-       ${LD} -o vmxassist -nostdlib --fatal-warnings -N -T vmxassist.tmp 
${OBJECTS}
+       ${LD} -o vmxassist ${LDFLAGS} -nostdlib --fatal-warnings -N -T 
vmxassist.tmp ${OBJECTS}
        nm -n vmxassist > vmxassist.sym
        ${OBJCOPY} vmxassist vmxassist.tmp
        dd if=vmxassist.tmp of=vmxassist.bin ibs=512 conv=sync
diff -Nru a/tools/firmware/vmxassist/head.S b/tools/firmware/vmxassist/head.S
--- a/tools/firmware/vmxassist/head.S   2005-06-13 19:03:29 -04:00
+++ b/tools/firmware/vmxassist/head.S   2005-06-13 19:03:29 -04:00
@@ -106,6 +106,7 @@
  * main and setup our own environment.
  */
        .globl  _start
+       .code32
 _start:
        cli
 
diff -Nru a/tools/firmware/vmxassist/trap.S b/tools/firmware/vmxassist/trap.S
--- a/tools/firmware/vmxassist/trap.S   2005-06-13 19:03:29 -04:00
+++ b/tools/firmware/vmxassist/trap.S   2005-06-13 19:03:29 -04:00
@@ -20,7 +20,6 @@
 #include "machine.h"
 #include "offsets.h"
 
-
 /*
  * All processor exception/faults/interrupts end up here.
  *
@@ -43,6 +42,7 @@
        .endm
 
        .section .rodata
+       .code32
        .align  4
        .global trap_handlers
 trap_handlers:
@@ -96,6 +96,7 @@
        TRAP_HANDLER    47, 0   /* irq 15 */
 
        .text
+       .code32
        .align  16
 common_trap:                           /* common trap handler */
        pushl   %gs

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [PATCH] x64-vmxassist-fix2.patch, BitKeeper Bot <=