qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Bug in Sparc64/IDE Code
@ 2009-12-11 20:16 Nick Couchman
  2009-12-12 10:12 ` Blue Swirl
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Couchman @ 2009-12-11 20:16 UTC (permalink / raw)
  To: qemu-devel

In working to try to get Sparc64 system emulation developed, we seem to have run into an issue with the IDE code in Qemu.  The OpenBIOS folks have been working quite a few issues with the OpenBIOS code that need to be resolved in order to boot 64-bit Solaris kernels correctly, but the most recent issue indicates that the IDE code for the Sparc64 emulator is reading from and writing to the wrong memory locations.  The end result is the following output when trying to boot off an ISO image in Qemu:

0 > boot cdrom 
[sparc64] Booting file 'cdrom' with parameters ''
Not a bootable ELF image
Not a Linux kernel image
Not a bootable a.out image
Loading FCode image...
Loaded 7084 bytes
entry point is 0x4000
Evaluating FCode...
qemu: unsupported keyboard cmd=0x57
sSegmentation fault

This is using the "-nographic" option - the results reported with graphics tend to be more interesting, with lots of garbage being written to the VGA device.  Turning on IDE debugging in Qemu and then trying to boot yields a lot of output - the last few lines look like this:

ide: write control addr=0x682 val=02
IDE: write addr=0x601 val=0x00
IDE: write addr=0x602 val=0x00
IDE: write addr=0x603 val=0x00
IDE: write addr=0x604 val=0x08
IDE: write addr=0x605 val=0x00
IDE: write addr=0x606 val=0x00
IDE: write addr=0x607 val=0xa0
ide: CMD=a0
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read addr=0x607 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read status addr=0x682 val=58
ide: read addr=0x607 val=58
ide: read addr=0x602 val=02
ide: read addr=0x604 val=08
ide: read addr=0x605 val=00
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read status addr=0x682 val=50
ide: read addr=0x607 val=50
ide: read status addsIDE: write addr=0x502 val=0x9a
IDE: write addr=0x503 val=0xa9
IDE: write addr=0x504 val=0x06
IDE: write addr=0x505 val=0xed
IDE: write addr=0x506 val=0x14
IDE: write addr=0x507 val=0xcd
ide: CMD=cd
ide: write control addr=0x582 val=97
IDE: write addr=0x602 val=0xba
IDE: write addr=0x603 val=0xae
IDE: write addr=0x604 val=0xce
IDE: write addr=0x605 val=0xb6
IDE: write addr=0x606 val=0x58
IDE: write addr=0x607 val=0x57
ide: CMD=57
ide: write control addr=0x682 val=70
bmdma_cmd_writeb: 0x00000054
bmdma: writeb 0x701 : 0xd7
bmdma: writeb 0x702 : 0x79
bmdma: writeb 0x703 : 0xfe
bmdma_addr_writew: 0x0000ddef
bmdma_addr_writew: 0x0000b12b
bmdma_cmd_writeb: 0x000000da
bmdma: writeb 0x709 : 0x95
Segmentation fault

On the OpenBIOS list it was pointed out that the addresses for the IDE control seem to be in the 0x6nn range (0x602 to 0x607 with the register at 0x682), but then toward the end the addresses switch over to the 0x5nn range, with the IDE code trying to write to locations 0x502 through 0x507 and the register at 0x582.  This seems to be what causes the segmentation fault and the garbage written to the screen, including the error about an invalid keyboard command.  Any help in tracking down the error would be greatly appreciated, and I'm happy to do any debugging/testing necessary!

Thanks!
-Nick


--------
This e-mail may contain confidential and privileged material for the sole use of the intended recipient.  If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information.  In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way.  If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox.  Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-15 14:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 20:16 [Qemu-devel] Bug in Sparc64/IDE Code Nick Couchman
2009-12-12 10:12 ` Blue Swirl
2009-12-12 12:18   ` Igor Kovalenko
2009-12-12 13:22     ` Igor Kovalenko
2009-12-13 19:06       ` [Qemu-devel] " Juan Quintela
2009-12-13 21:14         ` Igor Kovalenko
2009-12-13 22:41           ` Juan Quintela
2009-12-15 14:30             ` Nick Couchman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).