[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH][RFC] elf loader: use the virtual address
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH][RFC] elf loader: use the virtual address |
Date: |
Fri, 09 Jan 2009 17:24:08 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.17 (X11/20081018) |
Laurent Desnogues a écrit :
> On Fri, Jan 9, 2009 at 4:47 PM, Aurelien Jarno <address@hidden> wrote:
>> Most Linux kernels have their physical address corresponding to they
>> virtual address in the ELF header. This is however not true anymore for
>> the PowerPC kernels (>= 2.6.25).
>>
>> For PowerPC, the kernel needs to be started with address translation
>> enabled (that's even true for the firmware), and thus the kernel loaded
>> at the virtual address.
>>
>> As all the other kernels/bios I have looked have the same virtual and
>> physical address, I don't think it will break other targets. This is
>> what is done in the patch below. Alternatively, we can add a new
>> argument to the load_elf functions, to select between virtual and
>> physical load address.
>>
>> Any opinon?
>
> I wonder if some platforms don't use the address_offset parameter
> to simulate that behaviour.
PowerPC already does that. The offset is relative to the load address,
so it should still be read correctly.
> Anyway wouldn't a parameter be cleaner and allow more flexibility?
>
Maybe that's what I am going to implement.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' address@hidden | address@hidden
`- people.debian.org/~aurel32 | www.aurel32.net