[OpenBIOS] PReP PowerPC "emulation"

Andreas Färber andreas.faerber at web.de
Sun Sep 26 01:15:09 CEST 2010


Am 15.09.2010 um 11:06 schrieb Mark Cave-Ayland:

> Andreas Färber wrote:
>
>> qemu-system-ppc64 w/ either stock QEMU OpenBIOS or r862 with OSX  
>> host and ppc MMU patches:
>> C>> annot manage 'OHCI USB controller' PCI device type 'usb':
>> >>  106b 3f (c 3 10)
>> >> =============================================================
>> >> OpenBIOS 1.0 [Aug 17 2010 14:41]
>> >> Configuration device id QEMU version 1 machine id 3
>> >> CPUs: 1
>> >> Memory: 128M
>> >> UUID: 00000000-0000-0000-0000-000000000000
>> >> CPU type PowerPC,970FX
>> Welcome to OpenBIOS v1.0 built on Aug 17 2010 14:41
>> 0 > load cd:,\ppc\chrp\bootfile.exe  ok
>> 0 > go No valid state has been set by load or init-program
>> ok
>> 0 > boot cd:,\ppc\chrp\bootfile.exe No valid state has been set by  
>> load or init-program
>> ok
>> 0 > dir cd:,\ppc\chrp
>>      2048 2007-07-03 17:39:44 .\
>>      2048 2007-07-03 17:32:05 ..\
>>  12487680 2007-07-03 17:39:24 bootfile.exe
>> ok
>> 0 >
>>> Also, what format is the AIX bootloader - is it an ELF executable?
>> $ file /Volumes/CDROM/ppc/chrp/bootfile.exe
>> /Volumes/CDROM/ppc/chrp/bootfile.exe: ELF 32-bit MSB executable,  
>> PowerPC or cisco 4500, version 1 (SYSV), statically linked,  
>> corrupted section header size
>> Andreas
>
> Right. So in the case that you see the message "No valid state has  
> been set by load or init-program", this means that either the load  
> failed or init-program failed to detect a valid ELF header for the  
> current architecture.
>
> First thing to check is that the executable is being loaded from  
> disk, e.g.
>
> load cd:,\ppc\chrp\bootfile.exe
>
> then dump the first 200 bytes of memory to make sure an ELF header  
> is present (i.e. the load from disk was successful):
>
> load-base 200 dump
>
> If the ELF header is present then it must be init-program which is  
> failing. If the ELF header is not present, you'll need to take a  
> look in either libopenbios/load.c and/or libopenbios/elf_load.c at  
> elf_load() and elf_init_program().
>
> The one thing that I did notice is that you are attempting to launch  
> a PPC32 ELF file under a PPC64 Qemu, so perhaps it is the checks in  
> is_elf() which are failing? Try taking a look at the relevant  
> constants in include/arch/ppc/elf.h.

If I can trust printk, I do not arrive in the C load() function  
(libopenbios/load.c) at all.
According to `debug open-dev`, path-resolution returns 0 for "load cd:, 
\ppc\chrp\bootfile.exe" (forth/device/pathres.fs).

Any ideas?

Andreas


More information about the OpenBIOS mailing list