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-devel

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

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x64-vmxassist-fix2.patch
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Mon, 13 Jun 2005 12:12:02 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 13 Jun 2005 19:08:30 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
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>

--- a/tools/firmware/vmxassist/Makefile Mon Jun 13 17:54:12 2005
+++ b/tools/firmware/vmxassist/Makefile Mon Jun 13 11:28:41 2005
@@ -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
--- a/tools/firmware/vmxassist/head.S   Mon Jun 13 17:54:12 2005
+++ b/tools/firmware/vmxassist/head.S   Mon Jun 13 11:28:41 2005
@@ -106,6 +106,7 @@
  * main and setup our own environment.
  */
        .globl  _start
+       .code32
 _start:
        cli
 
--- a/tools/firmware/vmxassist/trap.S   Mon Jun 13 17:54:12 2005
+++ b/tools/firmware/vmxassist/trap.S   Mon Jun 13 11:28:41 2005
@@ -19,7 +19,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x64-vmxassist-fix2.patch, Arun Sharma <=