From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWl6M-0000eU-1y for qemu-devel@nongnu.org; Mon, 29 Apr 2013 06:14:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWl6K-0007lQ-VM for qemu-devel@nongnu.org; Mon, 29 Apr 2013 06:14:29 -0400 Message-ID: <517E47FB.3020205@adacore.com> Date: Mon, 29 Apr 2013 12:14:19 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1367109168-3673-1-git-send-email-andreas.faerber@web.de> <7F54D756-8594-4181-A2FC-75E0DA568770@suse.de> <517CF710.3000900@web.de> In-Reply-To: <517CF710.3000900@web.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH prep for-1.5] prep: Add ELF support for -bios List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, Alexander Graf , PReP , Paolo Bonzini , =?ISO-8859-1?Q?Herv=E9_Poussineau?= On 04/28/2013 12:16 PM, Andreas F=E4rber wrote: > Am 28.04.2013 11:44, schrieb Alexander Graf: >> >> On 28.04.2013, at 02:32, Andreas F=E4rber wrote: >> >>> This prepares for switching from OpenHack'Ware to OpenBIOS. >>> >>> Signed-off-by: Andreas F=E4rber >>> --- >>> 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 =3D BIOS_FILENAME; >>> filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); >>> if (filename) { >>> - bios_size =3D get_image_size(filename); >>> + bios_size =3D load_elf(filename, NULL, NULL, NULL, >>> + NULL, NULL, 1, ELF_MACHINE, 0); >> >> This leaves bios_addr unset, no? >=20 > 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 on= e > of the other ppc machines at the time... Thanks Andreas, that will be very useful. --=20 Fabien Chouteau