Message ID | b2fa41d60912131314m4a440a0cod043576501d28584@mail.gmail.com |
---|---|
State | New |
Headers | show |
Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote: > On Sun, Dec 13, 2009 at 10:06 PM, Juan Quintela <quintela@redhat.com> wrote: > Looks good, but runtime aborts in register_ioport_read. > > You cannot install different opaque for read and write of the same i/o address. > Seems like every other device has the same driver for reading and writing, > but in cmd646 it calls out to ide/pci.c code for bmdma_cmd_writeb write > method, whereas it reads with own bmdma_readb_0 method. Grr, another _nice_ interface. I guess that qemu should have a single method for registering both read/write functions. > Probably bmdma_writeb_* should call out to bmdma_cmd_writeb for address 0 > and whole 4 byte is to be mapped to bmdma_writeb_* > > I tested the following fix on top of yours patch with my previous workaround > reverted. Both my workaround and these two combined show the same > qemu.log trace. Nice. Blue can we got this two patches integrated instead of getting back pci_dev? I removed pci_dev from PCIIDEState because it is only used by cmd646. This two new patches just register the right opaque, that is what we need in the first place. Igor, thanks for the testing. Later, Juan.
Did these patches ever get committed to the Qemu repo? I tried applying them to the latest git repo, and they don't apply. Furthermore, building qemu out of the latest version of the repository causes very similar messages, just a few more of them. OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 CPUs: 1 x SUNW,UltraSPARC-II UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.0 built on Dec 14 2009 04:04 Type 'help' for detailed information [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 sqemu: unsupported keyboard cmd=0xca �qemu: unsupported keyboard cmd=0xdb FLOPPY ERROR: fdctrl_unimplemented: unimplemented command 0xce It looks like perhaps there are more instances where the IDE code chooses to write to the wrong memory location. I can provide detailed debug output if needed... -Nick >>> On 2009/12/13 at 15:41, Juan Quintela <quintela@redhat.com> wrote: > Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote: >> On Sun, Dec 13, 2009 at 10:06 PM, Juan Quintela <quintela@redhat.com> wrote: > >> Looks good, but runtime aborts in register_ioport_read. >> >> You cannot install different opaque for read and write of the same i/o > address. >> Seems like every other device has the same driver for reading and writing, >> but in cmd646 it calls out to ide/pci.c code for bmdma_cmd_writeb write >> method, whereas it reads with own bmdma_readb_0 method. > > Grr, another _nice_ interface. I guess that qemu should have a single > method for registering both read/write functions. > >> Probably bmdma_writeb_* should call out to bmdma_cmd_writeb for address 0 >> and whole 4 byte is to be mapped to bmdma_writeb_* >> >> I tested the following fix on top of yours patch with my previous workaround >> reverted. Both my workaround and these two combined show the same >> qemu.log trace. > > Nice. Blue can we got this two patches integrated instead of getting > back pci_dev? I removed pci_dev from PCIIDEState because it is only > used by cmd646. This two new patches just register the right opaque, > that is what we need in the first place. > > Igor, thanks for the testing. > > Later, Juan. -------- 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.
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 9d60590..07fcf4d 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -123,6 +123,9 @@ static void bmdma_writeb_common(PCIIDEState *pci_dev, BMDMAState *bm, printf("bmdma: writeb 0x%02x : 0x%02x\n", addr, val); #endif switch(addr & 3) { + case 0: + bmdma_cmd_writeb(bm, addr, val); + break; case 1: pci_dev->dev.config[MRDMODE] =