qemu FreeBSD/sparc64 host - a bit of debugging
Hi!
I'm the FreeBSD qemu port maintainer and don't have a sparc64 box
myself, but Jashank Jeremy (Cc'd) now was so kind to test qemu 0.14.1 on a FreeBSD/sparc64 box booting a FreeBSD 8/i386 install iso using i386-softmmu and we found two things:
1. The hang people have been reporting seems to be caused by this tb:
IN: 0x000e7a31: in $0xb3,%al 0x000e7a33: test %al,%al 0x000e7a35: jne 0xe7a31
i.e. it (the qemu bios I suppose) is waiting for x86 ioport 0xb3 to become zero. This port is #defined in hw/apm.c as:
qemu-0.14.1/hw/apm.c:#define APM_STS_IOPORT 0xb3
but the definition seems to be used nowhere in that source file. Anyone have an idea why this port is never zero on sparc64 hosts but seems to be on others? (endian issue? uninitialized variable?)
2. Booting the same guest with -no-acpi gets further, bios and bootloader messages are printed until it hangs again, this time while handling a guest irq 8 which seems to be rtc.
Maybe this is useful to some... :)
Thanx,
Juergen
Quoted 6 lines · Juergen Lock
Hi!
I'm the FreeBSD qemu port maintainer and don't have a sparc64 box
myself, but Jashank Jeremy (Cc'd) now was so kind to test qemu 0.14.1 on a FreeBSD/sparc64 box booting a FreeBSD 8/i386 install iso using i386-softmmu
What's the difference- an honest question- between this and a normal qemu boot?
Quoted 9 lines
and we found two things:
1. The hang people have been reporting seems to be caused by this tb:
IN: 0x000e7a31: in $0xb3,%al 0x000e7a33: test %al,%al 0x000e7a35: jne 0xe7a31
Quoted 9 lines
i.e. it (the qemu bios I suppose) is waiting for x86 ioport
0xb3to become zero. This port is #defined inhw/apm.cas:qemu-0.14.1/hw/apm.c:#define APM_STS_IOPORT 0xb3but the definition seems to be used nowhere in that source file. Anyone have an idea why this port is never zero on sparc64 hosts but seems to be on others? (endian issue? uninitialized variable?)
Have you asked Whitehorn what it my be?
Quoted 5 lines
2. Booting the same guest with -no-acpi gets further, bios and bootloader messages are printed until it hangs again, this time while handling a guest irq 8 which seems to be rtc.
Is there a way of disabling the clock? If not, then would it be useful to set the emulated cpu speed?
Quoted 3 lines
Maybe this is useful to some... :)
Actually, it's quite useful to me.
Quoted 4 lines
Thanx,
Juergen
Thanks here the same.
Quoted 4 lines · Super Bisquit
Quoted 2 lines · Juergen Lock
Hi!
Quoted 9 lines
Quoted 4 lines
I'm the FreeBSD qemu port maintainer and don't have a sparc64 box
myself, but Jashank Jeremy (Cc'd) now was so kind to test qemu 0.14.1 on a FreeBSD/sparc64 box booting a FreeBSD 8/i386 install iso using i386-softmmuWhat's the difference- an honest question- between this and a normal qemu boot?
Depends on what you mean by normal qemu boot... If you are wondering about the i386-softmmu, that's just the name of the 32bit x86 system emulation target, the executable is called qemu. So he ran something like:
qemu -cdrom FreeBSD-8.2-i386-bootonly.iso -vnc ...
Quoted 12 lines
Quoted 12 lines
and we found two things:
1. The hang people have been reporting seems to be caused by this tb:
IN: 0x000e7a31: in $0xb3,%al 0x000e7a33: test %al,%al 0x000e7a35: jne 0xe7a31i.e. it (the qemu bios I suppose) is waiting for x86 ioport
0xb3to become zero. This port is #defined inhw/apm.cas:
Quoted 8 lines
Quoted 6 lines
qemu-0.14.1/hw/apm.c:#define APM_STS_IOPORT 0xb3but the definition seems to be used nowhere in that source file. Anyone have an idea why this port is never zero on sparc64 hosts but seems to be on others? (endian issue? uninitialized variable?)
Have you asked Whitehorn what it my be?
No but I can Cc him... Actually I can Cc the freebsd-sparc64 list too.
Quoted 9 lines
Quoted 5 lines
2. Booting the same guest with -no-acpi gets further, bios and bootloader messages are printed until it hangs again, this time while handling a guest irq 8 which seems to be rtc.
Is there a way of disabling the clock? If not, then would it be useful to set the emulated cpu speed?
I don't think any of these two are possible.
Quoted 5 lines
Quoted 3 lines
Maybe this is useful to some... :)
Actually, it's quite useful to me.
That's good to hear. :)
Juergen
Quoted 14 lines · Juergen Lock
Hi!
I'm the FreeBSD qemu port maintainer and don't have a sparc64 box myself, but Jashank Jeremy (Cc'd) now was so kind to test qemu 0.14.1 on a FreeBSD/sparc64 box booting a FreeBSD 8/i386 install iso using i386-softmmu and we found two things:
1. The hang people have been reporting seems to be caused by this tb:
IN:
0x000e7a31: in $0xb3,%al
0x000e7a33: test %al,%al
0x000e7a35: jne 0xe7a31
Quoted 8 lines
i.e. it (the qemu bios I suppose) is waiting for x86 ioport
0xb3to become zero. This port is #defined inhw/apm.cas:qemu-0.14.1/hw/apm.c:#define
APM_STS_IOPORT0xb3but the definition seems to be used nowhere in that source file. Anyone have an idea why this port is never zero on sparc64 hosts but seems to be on others? (endian issue? uninitialized variable?)
The port belongs to SMI, it's PORT_SMI_STATUS in Seabios.
There is a crash on OpenBSD/Sparc64 at this point. The problem is that somewhere in do_smm_enter() or the functions that it calls, global register for CPUState %g5 gets a different value that it should have. Probably a system library uses it. I'll try if dropping -ffixed-g5 changes anything.
Quoted 3 lines
2. Booting the same guest with -no-acpi gets further, bios and bootloader messages are printed until it hangs again, this time while handling a guest irq 8 which seems to be rtc.
Yes, same here.
Quoted 5 lines
Maybe this is useful to some... :)
Thanx,
Juergen