On 5/2/10, Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk wrote:
Hi everyone,
I've just committed a partial implementation of the SUNW,retain word and so have moved further into booting OpenSolaris. Currently it's only a partial implementation because I can't get Qemu to perform a warm restart without crashing the guest, so I may need to revisit this later.
I think OpenBIOS does not flush the I/D TLBs on reset.
Fortunately, the SUNW,retain word itself is there which now enables the OpenSolaris kernel to get further during boot:
0 > go Jumping to entry point 00000000010071d8 for type 0000000000000001... switching to new context: entry point 0x10071d8 stack 0x00000000ffe02a91 / panic[cpu0]/thread=180e000: portid not found
000000000180b750 unix:fill_cpu+418 (ffffffffffe2fbd8, 10b81b0, 10b83d0, 0, 10bac00, ffffffffffffffff) %l0-3: 00000000018127c0 00000000010b81b8 00000000010b8000 ffffffffffffffff %l4-7: 0000000000000000 0000000000000004 00000000ffe2fbd8 0000000000000004 000000000180b870 unix:map_wellknown+124 (ffffffffffe2fbd8, 0, 0, 180b940, 0, 10b8188) %l0-3: 0000000000000001 0000000000000000 0000000000000000 ffffffffffffffff %l4-7: 0000000000000000 00000000010b8000 0000000000000000 000000000180b92c 000000000180b960 unix:map_wellknown_devices+80 (0, f7, 0, 10bb000, 10bb000, 10b8000) %l0-3: 0000000001812c00 0000000000002000 00000000010b8000 0000000000000000 %l4-7: 000000000183ac00 0000000001812400 0000000000000010 0000000000000000 000000000180ba20 unix:mlsetup+308 (180c000, 180bec0, 10b6548, 180c000, 2000, 180e000) %l0-3: 000000000180e000 0000000070002000 0000000000000000 000000000183ac00 %l4-7: 0000000000000000 000000000180c000 0000000070002000 0000000000000000
Looking through the OpenSolaris source code[1], it appears that fill_cpu() is expecting a portid property on the CPU nodes. Also searching further within the same file, it seems have_pci() is expecting a portid property on the PCI bus node too.
Does anyone with experience with real Sun kit know what the portid property for both the CPU and PCI device should be set to? It's fairly obvious that it's an integer, but I'm not sure how it should reflect the virtual hardware.
Most PCI devices have 0x1f in 'upa-portid' and CPU has zero.
Debian package sparc-utils contains some device trees: http://packages.debian.org/lenny/sparc/sparc-utils/filelist