From: Joerg Platte <lists@naasa.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] SPARC iommu mapping
Date: Tue, 4 Apr 2006 21:27:54 +0200 [thread overview]
Message-ID: <200604042127.55487.lists@naasa.net> (raw)
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
next reply other threads:[~2006-04-04 19:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 19:27 Joerg Platte [this message]
2006-04-05 15:23 ` [Qemu-devel] SPARC iommu mapping Joerg Platte
2006-04-05 17:36 ` Blue Swirl
2006-04-05 18:14 ` Joerg Platte
2006-04-05 18:25 ` Joerg Platte
2006-04-05 20:03 ` Joerg Platte
2006-04-06 16:53 ` Joerg Platte
-- strict thread matches above, loose matches on Subject: below --
2006-04-07 15:44 Blue Swirl
2006-04-07 21:33 ` Joerg Platte
2006-04-09 16:31 ` Joerg Platte
2006-04-10 13:18 ` Joerg Platte
2006-04-11 19:21 ` Blue Swirl
2006-04-14 16:07 ` Joerg Platte
2006-04-17 8:49 ` Blue Swirl
2006-05-03 18:37 ` Joerg Platte
2006-05-03 18:52 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604042127.55487.lists@naasa.net \
--to=lists@naasa.net \
--cc=jplatte@naasa.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).