Hi! I still have problems when using a disk image for the SPARC system emulator. Reading and writing now works better than in previous versions, but sometimes data written to image is simply corrupt. To find this problem I wrote a small program writing data to the beginning of a disk image. Afterwards I compared the written data in the image with the expected values. Most of the data was correct, but sometimes a few pages mostly contains only zeros.
To find this problem, I enabled debugging in the esp.c file and printed the mapped address (after iommu mapping). In some cases the mapped address is zero: Normal write: ESP: DMA Direction: r, addr 0x008fd000 0000000b ESP: DMA Direction: r, addr 0x0bea1000 0000e000 ESP: DMA address 0bea2000 ESP: DMA address 0bea4000 ESP: DMA address 0bea5000 ESP: DMA address 0bea6000 ESP: DMA address 0bea7000 ESP: DMA address 0bea8000 ESP: DMA address 0bea9000 ESP: DMA address 0beaa000 ESP: DMA address 0beab000 ESP: DMA address 0beac000 ESP: DMA address 0bead000 ESP: DMA address 0beaf000 ESP: DMA address 0beb0000 Faulty write: ESP: DMA Direction: r ESP: DMA Direction: r, addr 0x008fd000 0000000b ESP: DMA Direction: r, addr 0x0beb1000 0000e000 ESP: DMA address 0beb2000 ESP: DMA address 0beb3000 ESP: DMA address 0beb4000 ESP: DMA address 0beb5000 ESP: DMA address 0beb6000 ESP: DMA address 0beb7000 ESP: DMA address 0beb8000 ESP: DMA address 00000000 I used this code in handle_ti to produce this output: dmaptr = iommu_translate(s->espdmaregs[1] + i); if ((olddma&0xfffff000) != (dmaptr&0xfffff000)) { DPRINTF("DMA address %08x\n", dmaptr); olddma=dmaptr; } Unfortunately, I'm no hardware or SPARC expert and it took a whole day to track down this problem. So I'm not able to find the reason for this behaviour. What may cause the wrong mapping? Is this some kind of page fault, which must be handled by the kernel? Or just a bug? regards, Jörg _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel