On 26/03/2019 08:38, Berrie Schuurhuis wrote:
Op 25-Mar-19 om 22:33 schreef Mark Cave-Ayland:
On 22/03/2019 14:58, berrie.schuurhuis@gmail.com wrote:
Thanks a bunch Mark,
That was very helpful indeed. I've been able to compile the sparc64-elf cross compiler, and that in turn did successfully build openbios.
Running Solaris with Qemu (3.1.0 and 4.0.0-rc0) now seems to kick off ufsboot and unix (sun4u) from the Solaris disk, and than crash into a panic stating: "bottom of 32-bit stack not aligned".
Does that sound familiar as well? Regards!
Interesting. Certainly there is something amiss with the memory properties as Solaris 9 emits a different warning here, but it seems that you're getting a slightly more helpful message.
Can you confirm which version of Solaris you are using and also paste the output during boot in -nographic mode?
ATB,
Mark.
Hi Mark,
I've been digging around learning tons of stuff about OpenBios and QEMU, but not got to the bottom of this so far.This is what I get with the different versions of Solaris (scroll down). It seems like there's at least 2 problems: 1. until Solaris 2.6: there's some trouble in OpenBIOS causing an exception to be thrown 2. Solaris 7 and later: early start of the kernel has some kind of memory (stack?) alignment problem during the start of 'unix' by ufsboot, which is reported in 2 flavors: a) panic[cpu0]/thread=140a000: BOP_ALLOC failed b) panic[cpu0]/thread=10404040: bottom of stack not aligned
Pointers for how to troubleshoot this are appreciated.
Version I currently use: (but output for commands below is extremely similar to 3.1.0).
qemu-system-sparc64 -nographic -version
QEMU emulator version 3.1.90 (v4.0.0-rc0-12-gd97a39d-dirty) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
Here's all the detail:
Solaris 2.5.1 (11/97 Cdrom)
qemu-system-sparc64 -nographic -cdrom /sources/images/solaris_2.5.1_1197.iso -boot d
OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 6052 bytes entry point is 0x4000 Evaluating FCode... open isn't unique. ?go: byte-load: exception caught!
Solaris 2.6 (5/98 Cdrom)
qemu-system-sparc64 -nographic -cdrom /sources/images/Sol26_598.iso -boot d
OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 6344 bytes entry point is 0x4000 Evaluating FCode... open isn't unique. ?go: byte-load: exception caught!
Solaris 7 (Ultra 10 disk dd'd to a raw file while that disk was not mounted).
qemu-system-sparc64 -nographic -drive file=/sources/images/u10_disk.raw -boot c
WARNING: Image format was not specified for '/sources/images/u10_disk.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying disk:a... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 5936 bytes entry point is 0x4000 Evaluating FCode... open isn't unique. ===> A spinner was seen here... panic[cpu0]/thread=10408040: bottom of 32-bit stack not aligned rebooting... BOOTpanic - kernel: prom_reboot: reboot call returned! EXIT 0 >
Solaris 7 (8/99 Cdrom)
qemu-system-sparc64 -nographic -cdrom
/sources/images/sol_7_899_sparc_sun_srvr.iso -boot d OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 5936 bytes entry point is 0x4000 Evaluating FCode... open isn't unique. ===> A spinner was seen here... panic[cpu0]/thread=10404040: bottom of stack not aligned rebooting... BOOTpanic - kernel: prom_reboot: reboot call returned! EXIT 0 >
Solaris 8 (CD, Unknown hw version, probably initial release)
qemu-system-sparc64 -nographic -cdrom /sources/images/solaris8_sparc_install.iso
-boot d OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 5936 bytes entry point is 0x4000 Evaluating FCode... open isn't unique. ===> Spinner seen here, that stops for a few seconds before it crashes with the trace below. Alloc of 0x2000 bytes at 0x16000 refused.
panic[cpu0]/thread=10408000: BOP_ALLOC failed
0000000010406e90 unix:boot_alloc+44 (2000, 2000, 1000, 30000016000, 107777a0, 30000014000) %l0-3: 000000001041aba0 0000030ffffff138 0000000000000001 000000001044acd0 %l4-7: 0000000010449e28 0000000010449e08 000000001044ac30 000000000000000b 0000000010406f40 unix:segkmem_alloc+30 (30000016000, 2000, 0, 0, 1044def0, 1044a210) %l0-3: 0000030ffffff5c0 ffffffffffffe000 0000000000000000 000000001044acd0 %l4-7: 0000000010449e28 0000000010449e08 000000001044e750 0000000010046368 0000000010407000 genunix:vmem_xalloc+3d8 (1044d928, 1044dd30, ffffffffffffffff, ffffffffffffffff, 0, 0) %l0-3: 00000000100462e4 ffffffffffffe000 000000001044d928 0000000000002000 %l4-7: 0000000000000000 0000000000000000 0000000000002000 000000001044d948 0000000010407130 genunix:kmem_slab_create+8c (0, 0, 2000, 300000043c0, 0, 1044d928) %l0-3: 0000000000000000 0000030ffffff220 0000000000000000 000000001044acd0 %l4-7: 0000000010449e28 00000300000043c0 000000001044e750 0000000000000002 0000000010407220 genunix:kmem_cache_alloc+180 (0, 0, 0, 300000043c0, 0, 0) %l0-3: 0000030000004740 ffffffffffffe000 000000001044d928 0000000000002000 %l4-7: 0000030ffffff220 0000000000000000 0000000000002000 000000001044d948 00000000104072d0 genunix:kmem_slab_create+130 (200, 30000014000, 2000, 3000000da40, 0, 200) %l0-3: 0000000000000000 ffffffffffffe000 000000001044d928 0000000000002000 %l4-7: 0000030fffffef68 000003000000da40 0000000000002000 000000001044d948 00000000104073c0 genunix:kmem_cache_alloc+180 (0, 0, 0, 3000000da40, 0, 0) %l0-3: 000003000000ddc0 0000000000000000 0000000000010000 ffffffffffffffff %l4-7: 0000030000013fc8 00000300000052c0 0000030000013fc8 0000030000013fc0 0000000010407470 genunix:kmem_alloc+2c (2000, 0, 2000, 3000000da40, 0, 30000013fb8) %l0-3: 0000030000005640 000000001013804a 0000000000000000 0000000000000020 %l4-7: 0000000010445588 0000000010451453 0000000000000000 0000000000000000 0000000010407520 krtld:kobj_zalloc+c (2000, 1000, 2000, 300000052c0, f0, 0) %l0-3: 000003000000e740 ffffffffffffffc0 000000001044e7f0 00000000000003c0 %l4-7: 0000000010449980 0000000000000000 0000000000000000 000000000000000b 00000000104075d0 krtld:kobj_open_file+38 (2000, 30000011f88, 10438700, 0, 0, 1) %l0-3: 0000000000000008 0000000000000000 0000000000000000 0000000000000000 %l4-7: 0000000000000008 00000000100462e4 0000000010451448 0000000010046368 0000000010407680 genunix:mod_read_system_file+70 (10436c00, 2000, 1, 0, 26, 10439008) %l0-3: 0000000000004000 0000000000000008 0000000000004008 0000000000000000 %l4-7: 0000000000002000 00000000100462e4 0000000010450580 0000000010046368 00000000104077a0 genunix:kmem_init+1b8 (104607b8, 0, 0, 10616bd0, 10777bc0, 30000016160) %l0-3: 000000001041d000 0000000000002000 00000000100462e4 0000000010046368 %l4-7: 0000000010417f88 0000000000001fff 000000001040d920 0000000000000002 0000000010407870 unix:startup_memlist+a74 (10417c00, 300000160a0, 10417fc0, 10417fa8, 30000016000, 30000000000) %l0-3: 0000000000000103 0000031000000000 0000000010423400 0000000010424320 %l4-7: 0000000000002000 0000030000016000 000000001041b800 000000001041c800 0000000010407970 unix:startup+c (10428000, 0, 0, 7e7c000, 2000, ffffffffffffffff) %l0-3: 0000000010024408 000000000000cd14 0000000000000154 0000000000000000 %l4-7: 0000000010461d00 00000000002daca0 00000000000b6154 0000000000000154 0000000010407a20 genunix:main+4 (1040d400, 2000, 10407ec0, 10408030, fff2, 1004e58c) %l0-3: 0000000010408000 0000000000000001 0000000000000015 0000000000000e79 %l4-7: 0000000010428940 0000000010461d00 00000000000cbb30 0000000000000540
skipping system dump - no dump device configured rebooting... BOOTpanic - kernel: prom_reboot: reboot call returned! EXIT 0 >
Solaris 9 (8/03 Cdrom)
qemu-system-sparc64 -nographic -cdrom
/sources/images/multi_ICD_SOL_9_803_SPARC.iso -boot d OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 5936 bytes entry point is 0x4000 Evaluating FCode... open isn't unique. ===> Spinner seen here, that stops for a few seconds before it crashes with the trace below. Alloc of 0x2000 bytes at 0x30000018000 refused.
panic[cpu0]/thread=140a000: BOP_ALLOC failed
0000000001408f00 unix:boot_alloc+40 (30000018000, 2000, 1000, 0, 2a0, 1) %l0-3: 0000030000018000 0000000000002000 0000000000000015 0000000000001fff %l4-7: 0000000001472560 0000000001439400 00000000014290f0 000000000144da20 0000000001408fb0 unix:segkmem_alloc+8c (1472540, 2000, 0, 0, 0, 30000006db0) %l0-3: 0000030000018000 0000000000002000 000000000146ac00 0000000000000015 %l4-7: 0000000000000000 0000000000000008 0000000000000000 0000000000000000 0000000001409070 genunix:vmem_xalloc+4cc (ffffffffffffe000, 1479490, 0, 0, 0, 14791e0) %l0-3: 0000000000000002 000000000104be90 00000000014791c0 0000000000000000 %l4-7: 0000000000002000 0000000000000000 ffffffffffffffff ffffffffffffffff 00000000014091a0 genunix:vmem_alloc+1f4 (14791c0, 2000, 0, 144dbd3, 14091e0, ffffffffffffffff) %l0-3: 0000000000000000 000000000003c971 0000000000146050 0000000000001fff %l4-7: 00000000014791e0 0000000000347000 0000000000002000 0000000000148088 0000000001409260 genunix:kmem_slab_create+4c (3000000a6c8, 0, 20, 14091e0, 2000, 0) %l0-3: 000003000000a6c8 0000000000000008 0000000000146050 000000000003c971 %l4-7: 0000000000148088 0000000000002038 0000000000000030 0000000000000000 0000000001409330 genunix:kmem_slab_alloc+44 (3000000a6c8, 0, 20, 100, 141aaf9, 0) %l0-3: 000003000000a808 0000000000000000 000003000000a6c8 0000000000000000 %l4-7: 000003000000a7a0 000000000011b000 0000000000139c00 000000000141dde0 00000000014093e0 genunix:kmem_cache_alloc+144 (3000000a6c8, 0, 0, 1, 0, 1) %l0-3: 0000000000000000 0000000000000000 000003000000a6c8 0000000001429148 %l4-7: 000003000000a870 000003000000a898 000003000000a8c0 ffffffffffffffff 0000000001409490 genunix:kmem_alloc+28 (30, 0, 0, 141de56, 144da25, 141de38) %l0-3: 000003000000a6c8 000000000141dbb0 0000000000000008 0000000000000020 %l4-7: 000000000146f308 000000000144d0b0 0000000001161d50 0000000000000000 0000000001409540 krtld:kobj_zalloc+8 (30, 0, 20, 0, 2a0, 1) %l0-3: 0000000001429148 000000000141dde0 0000000000000015 000000000141dde0 %l4-7: 0000000000000015 0000000001439400 00000000014290f0 000000000144da20 00000000014095f0 krtld:kobj_open_file+28 (144dbc8, 0, 1166e28, 1, 0, 30000006db0) %l0-3: 000000000146ae18 0000000000000000 000000000146ac00 0000000000000015 %l4-7: 0000000000000000 0000000000000008 0000000000000000 0000000000000000 00000000014096a0 genunix:mod_read_system_file+74 (0, 0, 1166e28, 1, 0, 30000006020) %l0-3: 000000000144bc00 0000000000000000 0000000000000000 0000000000000000 %l4-7: 000000000144e600 0000000001443810 0000000001056000 0000000000000008 00000000014097c0 genunix:kmem_init+2a0 (0, 2000, 104be90, 104bf74, 0, 1431400) %l0-3: 000000000144e400 000000000113c9e0 000000000113cbe4 000000000144e580 %l4-7: 0000000001497bf8 0000000000001000 0000000000001000 0000000000000000 0000000001409890 unix:startup_memlist+b58 (12000, 142a800, 30000018000, 103, 78004000, 1431400) %l0-3: 0000000000000103 0000000001437800 0000030000000000 00000000014179b8 %l4-7: 00000000014179c8 0000000078004000 0000000000002000 0000000000012020 0000000001409970 unix:startup+14 (0, 20, 78002000, 7e7c000, 1400000, 0) %l0-3: 000000000140b400 000000000140b400 0000000001493000 0000000007e7c000 %l4-7: 00000000000cfa0d 0000000000000000 00000000000083b9 0000000001498ac0 0000000001409a20 genunix:main+4 (1409ba0, ffd0d904, 1409ec0, 332653, 2000, 500) %l0-3: 000000000140b400 0000000000000000 0000000001412c80 0000000078002000 %l4-7: 000000000140a000 0000000000334000 000000000149afd8 0000000001062db0
skipping system dump - no dump device configured rebooting... BOOTpanic - kernel: prom_reboot: reboot call returned! EXIT 0 >
Solaris 10
qemu-system-sparc64 -nographic -cdrom /sources/images/sol-10-u7-ga-sparc-v1.iso
-boot d OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 15 2019 10:05 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Not a bootable a.out image
Loading FCode image... Loaded 7420 bytes entry point is 0x4000 Evaluating FCode... Unhandled Exception 0x0000000000000030 PC = 0x00000000ffd1c3d8 NPC = 0x00000000ffd1c3dc Stopping execution
BR, Berrie
Hi Berrie,
Thanks for this! My current 64-bit Solaris test image is version 9 and I get exactly the same BOP_ALLOC error that you see, but it's interesting to see mention of a stack issue.
I'm fairly busy right now but it seems definitely worth a second look at the memory properties at the point where Solaris takes over from the PROM.
ATB,
Mark.