summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBob Breuer <breuerr@mc.net>2010-12-20 11:55:33 -0600
committerBlue Swirl <blauwirbel@gmail.com>2010-12-20 21:08:07 +0000
commite0087e618552c7bc77485561ed96ec2a4f01404a (patch)
tree1b4d28bcf6adb704985e0947daaedc90e19f5c1f /hw
parentac6c41204fd33116b8943682bffe47e113c1cc6b (diff)
downloadqemu-e0087e618552c7bc77485561ed96ec2a4f01404a.tar.gz
sparc32: ledma extra registers need tracing too
Also trace the extra registers, and update the comments with new info from Artyom Tarasenko. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/sparc32_dma.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c
index 56be8c8ad6..e75694bec2 100644
--- a/hw/sparc32_dma.c
+++ b/hw/sparc32_dma.c
@@ -44,7 +44,7 @@
/* We need the mask, because one instance of the device is not page
aligned (ledma, start address 0x0010) */
#define DMA_MASK (DMA_SIZE - 1)
-/* ledma has more than 4 registers, Solaris reads the 5th one */
+/* OBP says 0x20 bytes for ledma, the extras are aliased to espdma */
#define DMA_ETH_SIZE (8 * sizeof(uint32_t))
#define DMA_MAX_REG_OFFSET (2 * DMA_SIZE - 1)
@@ -170,7 +170,10 @@ static uint32_t dma_mem_readl(void *opaque, target_phys_addr_t addr)
uint32_t saddr;
if (s->is_ledma && (addr > DMA_MAX_REG_OFFSET)) {
- return 0; /* extra mystery register(s) */
+ /* aliased to espdma, but we can't get there from here */
+ /* buggy driver if using undocumented behavior, just return 0 */
+ trace_sparc32_dma_mem_readl(addr, 0);
+ return 0;
}
saddr = (addr & DMA_MASK) >> 2;
trace_sparc32_dma_mem_readl(addr, s->dmaregs[saddr]);
@@ -183,7 +186,9 @@ static void dma_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
uint32_t saddr;
if (s->is_ledma && (addr > DMA_MAX_REG_OFFSET)) {
- return; /* extra mystery register(s) */
+ /* aliased to espdma, but we can't get there from here */
+ trace_sparc32_dma_mem_writel(addr, 0, val);
+ return;
}
saddr = (addr & DMA_MASK) >> 2;
trace_sparc32_dma_mem_writel(addr, s->dmaregs[saddr], val);