From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lvde8-0000Pn-NO for qemu-devel@nongnu.org; Sun, 19 Apr 2009 16:29:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lvde4-0000P0-6K for qemu-devel@nongnu.org; Sun, 19 Apr 2009 16:29:48 -0400 Received: from [199.232.76.173] (port=43057 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lvde3-0000Ox-VK for qemu-devel@nongnu.org; Sun, 19 Apr 2009 16:29:43 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:57344) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lvde3-0000JM-AN for qemu-devel@nongnu.org; Sun, 19 Apr 2009 16:29:43 -0400 From: Laurent Vivier In-Reply-To: References: <1239525550.5516.3.camel@Quad> <1240129450.5671.7.camel@Quad> <1240170424.5659.7.camel@Quad> <1240172464.5659.22.camel@Quad> Content-Type: text/plain; charset=utf-8 Date: Sun, 19 Apr 2009 22:29:28 +0200 Message-Id: <1240172968.5659.30.camel@Quad> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [OpenBIOS] QEMU OpenBIOS booting? Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The OpenBIOS Mailinglist Cc: Alexander Graf , qemu-devel@nongnu.org Le dimanche 19 avril 2009 =C3=A0 13:23 -0700, Steven Noonan a =C3=A9crit : > On Sun, Apr 19, 2009 at 1:21 PM, Laurent Vivier wrote= : > > Le dimanche 19 avril 2009 =C3=A0 13:01 -0700, Steven Noonan a =C3=A9cri= t : > >> On Sun, Apr 19, 2009 at 12:47 PM, Laurent Vivier wrote: > >> > Le dimanche 19 avril 2009 =C3=A0 11:59 -0700, Steven Noonan a =C3=A9= crit : > >> >> On Sun, Apr 19, 2009 at 1:24 AM, Laurent Vivier wrote: > >> >> > Le dimanche 19 avril 2009 =C3=A0 00:50 -0700, Steven Noonan a =C3= =A9crit : > >> >> >> On Tue, Apr 14, 2009 at 10:46 PM, Steven Noonan wrote: > >> >> >> > On Sun, Apr 12, 2009 at 1:39 AM, Laurent Vivier wrote: > >> >> >> >> OpenBIOS is not able to boot MacOS X. > >> >> >> > > >> >> >> > Well, that's a silly limitation. Is there a reason this isn't > >> >> >> > implemented? I see that the Mac-on-Linux OpenBIOS version has = such > >> >> >> > support, so it seems strange that the QEMU version does not. > >> >> >> > >> >> >> I don't know if anyone here is actually interested (this list se= ems > >> >> >> -very- quiet), but... > >> >> > > >> >> > Hi, > >> >> > > >> >> >> I've been hacking at OpenBIOS for a bit, and I got it to properl= y read > >> >> >> Mac OS X discs (it kept failing because it would hit an Apple > >> >> >> Partition Map header instead of an HFS+ filesystem header). I'm > >> >> >> working on adding an XCOFF loader, too, so it should be able to = boot > >> >> >> Mac OS X soon. > >> >> > > >> >> > You can copy it from OpenHackWare. > >> >> > I made some tests and it seems to have some memory conflicts betw= een > >> >> > MacOS kernel and OpenBIOS. > >> > > >> > In fact what I have is a Mach-O loader which load mach_kernel from "= /". > >> > > >> >> > Good Luck. > >> >> > > >> >> > >> >> Two more pre-XCOFF loader commits up: > >> >> http://github.com/tycho/openbios/commit/e43daa3447b5ce4a2b05b2f3288= 2e49891156200 > >> >> http://github.com/tycho/openbios/commit/7023b78a10f5632fd08d4749615= efd3e73ab1036 > >> > > >> > Seems good but do you really need to check for embedded XCOFF in thi= s > >> > patch and are you really able to execute the boot-script ? > >> > >> Oh, I should say that it does _execute_ the boot-script, but I don't > >> know if it's properly handled by the Forth interpreter. Any idea what > >> the boot-script you cite is supposed to actually _do_ (I gave up > >> trying to read Forth at around 3 AM last night)? > > > > I think the script seeks in itself the address of the embedded XCOFF > > (after "-BOOT"), computes it size, copies it to load-base, initializes > > it ("init-program") and executes it ("go"). >=20 > Ah, duh, that should've been obvious to me. I'm a Forth flunkie, so if > someone could implement these: You can write it in C... I have written a Mach-O loader (but it seems broken now) > ( xcoff-base ) > load-size over load-base - - > ( xcoff-base xcoff-size ) > load-base swap move > init-program go >=20 > Then we'd be doing what we -really- should be doing instead of my > hackish "oh, there's an XCOFF here! let's load it." This explains why OpenHackware is written as it is. > > > >> > > >> > In Panther Install CD, BootX is: > >> > > >> > > >> > > >> > MacRISC MacRISC3 MacRISC4 > >> > > >> > > >> > Boot Loader for Mac OS X. > >> > > >> > > >> > > >> > > >> > ... > >> > > >> > load-base > >> > begin > >> > dup 6 " </CHRP" $=3D if > >> > 6 + dup 6 " -BOOT>" $=3D if > >> > 8 + true > >> > else > >> > false > >> > then > >> > else > >> > 1+ false > >> > then > >> > until > >> > ( xcoff-base ) > >> > load-size over load-base - - > >> > ( xcoff-base xcoff-size ) > >> > load-base swap move > >> > init-program go > >> > > >> > > >> > [...XCOFF HERE] > >> > > >> > >=20