qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix -kernel on target-ppc


From: François Revol
Subject: Re: [Qemu-devel] [PATCH] Fix -kernel on target-ppc
Date: Sun, 25 Jan 2009 01:30:31 +0100 CET

> >> I have already proposed a patch to use the virtual address of the
> > > elf
> >> header as done by yaboot or quik, but I have been told it is
> > > actually
> >> wrong.
> >>
> >> We have to find another way to load the elf file at a fixed
> > > address.
> >
> > Hm - can't we just give load_elf an override value for the base
> > address?
> >
> >             /* address_offset is hack for kernel images that are
> >                linked at the wrong physical address.  */
> >             addr = ph->p_paddr + address_offset;
> >
> >             cpu_physical_memory_write_rom(addr, data, mem_size);
> >
> > Just pass another variable here that overrides addr and doesn't
> > calculate it?
>
> Except that they can be more than one segment to load, so the last
> one
> will overwrite the previous ones. The PowerPC kernels I have seen
> only
> have one load segment, but I am not sure it is always the case.

The Haiku bootloader currently has both a text and data segment, but I
suppose I can easily change the ldscript.
It's not exactly a kernel but it's what is supposed to be loaded
because we have our own way to load modules and setup things.

I'd only need -kernel to ease testing anyway, I'd rather have OpenBIOS
actually read the ISO/HFS image and dig the loader from there...
The available commands seem a bit scarce.

François.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]