Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvhB4-0007RP-Sn for qemu-devel@nongnu.org; Sun, 19 Apr 2009 20:16:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvhB4-0007R5-3l for qemu-devel@nongnu.org; Sun, 19 Apr 2009 20:16:02 -0400 Received: from [199.232.76.173] (port=33650 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvhB3-0007R2-VE for qemu-devel@nongnu.org; Sun, 19 Apr 2009 20:16:01 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:51103 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LvhB3-0003uv-Cd for qemu-devel@nongnu.org; Sun, 19 Apr 2009 20:16:01 -0400 Date: Mon, 20 Apr 2009 04:15:30 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] Re: [OpenBIOS] QEMU OpenBIOS booting? In-Reply-To: Message-ID: References: <1240171720.5659.11.camel@Quad> <1240172642.5659.25.camel@Quad> <1240174112.5659.40.camel@Quad> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="33734824-643433329-1240186530=:2512" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf , The OpenBIOS Mailinglist , Laurent Vivier This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --33734824-643433329-1240186530=:2512 Content-Type: TEXT/PLAIN; charset=koi8-r Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 19 Apr 2009, Steven Noonan wrote: > On Sun, Apr 19, 2009 at 3:28 PM, Steven Noonan wr= ote: > > On Sun, Apr 19, 2009 at 2:32 PM, Steven Noonan = wrote: > >> On Sun, Apr 19, 2009 at 2:02 PM, Steven Noonan = wrote: > >>> On Sun, Apr 19, 2009 at 1:48 PM, Laurent Vivier w= rote: > >>>> Le dimanche 19 avril 2009 ? 13:33 -0700, Steven Noonan a ?crit : > >>>>> On Sun, Apr 19, 2009 at 1:24 PM, Laurent Vivier = wrote: > >>>>> > Le dimanche 19 avril 2009 ? 13:14 -0700, Steven Noonan a ?crit : > >>>>> > The problem is in OpenBios: I put some structures in memory witho= ut > >>>>> > knowing this... but this is not part of openfirmware specificatio= n. [..snip..] > >> > >> =9A =9A =9A =9Adiff --git a/arch/ppc/qemu/ldscript b/arch/ppc/qemu/lds= cript > >> =9A =9A =9A =9Aindex 66fcbcd..8fdf654 100644 > >> =9A =9A =9A =9A--- a/arch/ppc/qemu/ldscript > >> =9A =9A =9A =9A+++ b/arch/ppc/qemu/ldscript > >> =9A =9A =9A =9A@@ -3,15 +3,15 @@ OUTPUT_ARCH(powerpc) > >> > >> =9A =9A =9A =9A /* Initial load address > >> =9A =9A =9A =9A =9A*/ > >> =9A =9A =9A =9A-BASE_ADDR =3D 0xfff00000; > >> =9A =9A =9A =9A+BASE_ADDR =3D 0x06800000; > >> > >> =9A =9A =9A =9A-/* As NVRAM is at 0xfff04000, the .text needs to be af= ter that > >> =9A =9A =9A =9A+/* As NVRAM is at 0x06804000, the .text needs to be af= ter that > >> =9A =9A =9A =9A =9A*/ > >> =9A =9A =9A =9A-TEXT_ADDR =3D 0xfff08000; > >> =9A =9A =9A =9A+TEXT_ADDR =3D 0x06808000; > >> > >> =9A =9A =9A =9A /* Hard reset vector address > >> =9A =9A =9A =9A =9A*/ > >> =9A =9A =9A =9A-HRESET_ADDR =3D 0xfffffffc; > >> =9A =9A =9A =9A+HRESET_ADDR =3D 0x06ffffff; > >> > >> =9A =9A =9A =9A CSTACK_SIZE =3D 32768; =9A /* client stack size */ > > > > With the above numbers, I get linker problems: > > > > target/arch/ppc/qemu/start.o: In function `vector__0x300': > > (.text.vectors+0x384): relocation truncated to fit: R_PPC_ADDR24 > > against `.text.vectors'+c > > target/arch/ppc/qemu/start.o: In function `vector__0x400': > > (.text.vectors+0x484): relocation truncated to fit: R_PPC_ADDR24 > > against `.text.vectors'+c > > > > I don't see why it'd do that. > > >=20 >=20 > What the hell? Why would this change resolve it? >=20 > =09diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S > =09index 66df9a2..108fd9b 100644 > =09--- a/arch/ppc/qemu/start.S > =09+++ b/arch/ppc/qemu/start.S > =09@@ -206,7 +206,7 @@ VECTOR( 0x300, "DSI" ): > =09 addi r3,r3,LO(dsi_exception) > =09 mtctr r3 > =09 bctrl > =09- ba exception_return > =09+ b exception_return > =09 Because exception_return's address (now near 0x06808000) doesn't fit into 26 bit sign extended AA field. > =09 VECTOR( 0x400, "ISI" ): > =09 EXCEPTION_PREAMBLE > =09@@ -214,7 +214,7 @@ VECTOR( 0x400, "ISI" ): > =09 addi r3,r3,LO(isi_exception) > =09 mtctr r3 > =09 bctrl > =09- ba exception_return > =09+ b exception_return > =09 > =09 ILLEGAL_VECTOR( 0x500 ) > =09 ILLEGAL_VECTOR( 0x600 ) >=20 >=20 > >> > >> The only issue with doing things this way is now to figure out what to > >> change this to: > >> > >> #define FREE_BASE =9A =9A =9A =9A =9A =9A =9A 0x00004000 > >> > >> My first thought was to utilize all 8MB of the space that Apple says > >> we can have, and use any space after the OpenBIOS image. My second > >> thought was: how do we know where the OpenBIOS executable image ends? > >> > >> Any ideas? > >> > > >=20 >=20 --=20 mailto:av1474@comtv.ru --33734824-643433329-1240186530=:2512--