From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl5yZ-0000dX-0N for qemu-devel@nongnu.org; Wed, 11 Jan 2012 16:44:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rl5yX-0005Js-Mp for qemu-devel@nongnu.org; Wed, 11 Jan 2012 16:44:54 -0500 Message-ID: <4F0E026B.6010400@suse.de> Date: Wed, 11 Jan 2012 22:43:07 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1325783595-22962-1-git-send-email-afaerber@suse.de> In-Reply-To: <1325783595-22962-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] prep: Fix offset of BIOS MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alexander Graf , Avi Kivity Am 05.01.2012 18:13, schrieb Andreas F=C3=A4rber: > Since 0c90c52fab5ea92d7f12b29bfe26a7cd75d9efcb (ppc_prep: convert to me= mory > API) OHW was "Trying to execute code outside RAM or ROM at 0xfff00700". >=20 > The BIOS MemoryRegion is created with a fixed size of 1 MiB. > Ensure that the full size can be accessed since the exception > vectors are located at 0xfff00000 and the BIOS may want to use them. >=20 > It thereby no longer depends on the actual BIOS binary size. >=20 > Signed-off-by: Andreas F=C3=A4rber > Cc: Avi Kivity > Cc: Alexander Graf Ping! Is everyone okay with this? Should I send a PULL? Andreas > --- > hw/ppc_prep.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c > index 47dab3f..dec059a 100644 > --- a/hw/ppc_prep.c > +++ b/hw/ppc_prep.c > @@ -560,6 +560,8 @@ static void ppc_prep_init (ram_addr_t ram_size, > =20 > /* allocate and load BIOS */ > memory_region_init_ram(bios, "ppc_prep.bios", BIOS_SIZE); > + memory_region_set_readonly(bios, true); > + memory_region_add_subregion(sysmem, (uint32_t)(-BIOS_SIZE), bios); > vmstate_register_ram_global(bios); > if (bios_name =3D=3D NULL) > bios_name =3D BIOS_FILENAME; > @@ -573,8 +575,6 @@ static void ppc_prep_init (ram_addr_t ram_size, > target_phys_addr_t bios_addr; > bios_size =3D (bios_size + 0xfff) & ~0xfff; > bios_addr =3D (uint32_t)(-bios_size); > - memory_region_set_readonly(bios, true); > - memory_region_add_subregion(sysmem, bios_addr, bios); > bios_size =3D load_image_targphys(filename, bios_addr, bios_si= ze); > } > if (bios_size < 0 || bios_size > BIOS_SIZE) { --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg