qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH prep for-1.5] prep: Add ELF support f


From: Fabien Chouteau
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH prep for-1.5] prep: Add ELF support for -bios
Date: Mon, 29 Apr 2013 12:14:19 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

On 04/28/2013 12:16 PM, Andreas Färber wrote:
> Am 28.04.2013 11:44, schrieb Alexander Graf:
>>
>> On 28.04.2013, at 02:32, Andreas Färber wrote:
>>
>>> This prepares for switching from OpenHack'Ware to OpenBIOS.
>>>
>>> Signed-off-by: Andreas Färber <address@hidden>
>>> ---
>>> hw/ppc/prep.c | 21 +++++++++++++--------
>>> 1 file changed, 13 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
>>> index cceab3e..9bb0119 100644
>>> --- a/hw/ppc/prep.c
>>> +++ b/hw/ppc/prep.c
>>> @@ -41,6 +41,7 @@
>>> #include "sysemu/blockdev.h"
>>> #include "sysemu/arch_init.h"
>>> #include "exec/address-spaces.h"
>>> +#include "elf.h"
>>>
>>> //#define HARD_DEBUG_PPC_IO
>>> //#define DEBUG_PPC_IO
>>> @@ -502,18 +503,22 @@ static void ppc_prep_init(QEMUMachineInitArgs *args)
>>>         bios_name = BIOS_FILENAME;
>>>     filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
>>>     if (filename) {
>>> -        bios_size = get_image_size(filename);
>>> +        bios_size = load_elf(filename, NULL, NULL, NULL,
>>> +                             NULL, NULL, 1, ELF_MACHINE, 0);
>>
>> This leaves bios_addr unset, no?
> 
> bios_addr is not yet defined in this scope and doesn't seem needed here?
> It's been a while that I wrote this (extracted it from a larger patch
> since Fabien had a need for ELF support), thought I copied this from one
> of the other ppc machines at the time...

Thanks Andreas, that will be very useful.

-- 
Fabien Chouteau



reply via email to

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