From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvkWg-0001Jd-6d for qemu-devel@nongnu.org; Sun, 19 Apr 2009 23:50:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvkWf-0001Hl-46 for qemu-devel@nongnu.org; Sun, 19 Apr 2009 23:50:33 -0400 Received: from [199.232.76.173] (port=55678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvkWe-0001HT-VX for qemu-devel@nongnu.org; Sun, 19 Apr 2009 23:50:33 -0400 Received: from yx-out-1718.google.com ([74.125.44.155]:31020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LvkWe-0004dd-Ik for qemu-devel@nongnu.org; Sun, 19 Apr 2009 23:50:32 -0400 Received: by yx-out-1718.google.com with SMTP id 6so323713yxn.82 for ; Sun, 19 Apr 2009 20:50:31 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1240172642.5659.25.camel@Quad> <1240174112.5659.40.camel@Quad> Date: Sun, 19 Apr 2009 20:50:30 -0700 Message-ID: From: Steven Noonan Content-Type: text/plain; charset=ISO-8859-1 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 , Laurent Vivier Cc: Alexander Graf , qemu-devel@nongnu.org On Sun, Apr 19, 2009 at 8:27 PM, Steven Noonan wrot= e: > So I decided a better idea was to keep the OpenBIOS ROM where it is > and then instead use the location 0x06800000 for the memory > allocations so that the 0x4000 block doesn't get smashed. It was far > more feasible than moving where the ROM is stored, and I don't think > anything cares about the contents of 0x06800000 to 06FFFFFF anyway. > > Also, the reason I was getting "invalid opcode" was because Open > Hack'Ware's XCOFF loader didn't take into account some other unknown > variable which PearPC accounted for. I added the necessary code to > make that work. > > So now instead of an invalid opcode, we get this (which I don't know > how to debug. it looks like a Forth exception): > > Alcarin:qemu steven$ make -C ppc-softmmu && > ppc-softmmu/qemu-system-ppc -L pc-bios -cdrom > ~/Development/MacOSX-10.4.iso -boot d -M mac99 -nographic > make: Nothing to be done for `all'. > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> OpenBIOS 1.0 [Apr 20 2009 03:23] >>> Configuration device id QEMU version 1 machine id 1 >>> CPUs: 1 >>> Memory: 128M >>> UUID: 00000000-0000-0000-0000-000000000000 >>> CPU type PowerPC,G4 > Welcome to OpenBIOS v1.0 built on Apr 20 2009 03:23 > >>> YABOOT - yaboot_startup: Entering boot, no path >>> CHRP - try_chrp_script: Trying cd:0,ppc\bootinfo.txt >>> MAC-PARTS: macparts_probe 4552 ?=3D 4552 >>> MAC-PARTS: macparts_open 0 >>> MAC-PARTS: macparts_get_info 0 2832209920 >>> MAC-PARTS: macparts_block_size =3D 200 >>> ELF - try_chrp_script: Can't open cd:0,ppc\bootinfo.txt >>> CHRP - try_chrp_script: Trying cd:0,System\Library\CoreServices\BootX >>> MAC-PARTS: macparts_probe 4552 ?=3D 4552 >>> MAC-PARTS: macparts_open 0 >>> MAC-PARTS: macparts_get_info 0 2832209920 >>> MAC-PARTS: macparts_block_size =3D 200 >>> CHRP - try_chrp_script: got bootscript >>> load-base >>> begin >>> =A0dup 6 " </CHRP" $=3D if >>> =A0 6 + dup 6 " -BOOT>" $=3D if >>> =A0 =A08 + true >>> =A0 else >>> =A0 =A0false >>> =A0 then >>> =A0else >>> =A0 1+ false >>> =A0then >>> until >>> ( xcoff-base ) >>> load-size over load-base - - >>> ( xcoff-base xcoff-size ) >>> load-base swap move >>> init-program go > >>> ELF - encode_bootpath: bootpath cd:0,\ bootargs > $=3D:>> XCOFF - load_xcoff: Loading 'System\Library\CoreServices\BootX' >>> XCOFF - load_xcoff: XCOFF file with 3 sections entry:05616ecc >>> XCOFF - load_xcoff: Read next header (5c) >>> XCOFF - load_xcoff: Load '.text' section from 5c d4 to 5600000 (28000) >>> XCOFF - load_xcoff: Found entry point offset in '.text': 94112 >>> XCOFF - load_xcoff: Read next header (84) >>> XCOFF - load_xcoff: Load '.data' section from 84 280d4 to 5628000 (2000= ) >>> XCOFF - load_xcoff: Read next header (ac) >>> XCOFF - load_xcoff: Erase '.bss' section at 562a000 size: 3a000 >>> XCOFF - load_xcoff: Found actual entry point: 05600adc >>> ELF - transfer_control_to_elf: Starting ELF boot loader > unselect-dev:interpret: exception -13 caught > EXIT > 0 > Killed > > Any ideas? > Also, my most recent changes are committed and pushed for public viewing: http://github.com/tycho/openbios/commits/macosx-boot Steven Noonan (3): ofmem: don't clobber the position that Mac OS X's kernel resides in kernel/internal.c: incorrectly uses %x format where %lx is needed qemu/main.c: load embedded XCOFF binaries in CHRP scripts - Steven