Subject: Re: help with x86 assembly
To: Christian Limpach <chris@pin.lu>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-xen
Date: 12/23/2004 19:44:46
On Thu, Dec 23, 2004 at 12:13:51AM +0100, Christian Limpach wrote:
> Hi,
> 
> You don't want to use xen12load for xen2 since xen2 loads an elf image to
> run as kernel in dom0.

You mean, we don't need a xen12load equivalent, or a xen12load equivalent
can't work with xen 2.0 ?

> The loader is missing the part to load a NetBSD symbol table but that can be
> easily added.

Would be nice to have a ddb usable in dom0 :)

> 
> > but at compile time I get:
> > xenload.c: In function `HYPERVISOR_console_write_pic':
> > xenload.c:86: error: can't find a register in class `BREG' while reloading
> `asm'
> 
> gcc already uses %ebx to generate pic code (since xen12load is compiled
> with -fpic or -fPIC), you'd need to explicitly load %ebx like in the
> original HYPERVISOR_console_write_pic function....

Hum, I tried to add "movl    %2,%%ebx;" before TRAP_INSTR, but this didn't 
help. I guess there's something else to be done to translate the code
in hyperviror.h to PIC code.
Anyway, if a xenload isn't needed any more, I'll give up on this and try
to load a kernel directly. 

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--