qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] (master, stable-0.13) zaurus: workaround for io bas


From: Juergen Lock
Subject: [Qemu-devel] [PATCH] (master, stable-0.13) zaurus: workaround for io base address rounded down
Date: Wed, 13 Oct 2010 21:12:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

The 2nd scoop's base address (0x08800040) now gets rounded down to
start of page which causes its io read/write callbacks to be passed
addresses 0x40 higher than the code expects:  (as witnessed by
"Bad register offset" messages and failure to attach the internal
CF disk aka microdrive at least.)

[There may be more bugs of this kind hiding in other targets, this
 was just the one I tested...]

Signed-off-by: Juergen Lock <address@hidden>

--- a/hw/zaurus.c
+++ b/hw/zaurus.c
@@ -70,6 +70,10 @@ static uint32_t scoop_readb(void *opaque
 {
     ScoopInfo *s = (ScoopInfo *) opaque;
 
+    // XXX Workaround for base address (0x08800040 in this case)
+    //     rounded down to start of page
+    addr &= 0x3f;
+
     switch (addr) {
     case SCOOP_MCR:
         return s->mcr;
@@ -104,6 +108,10 @@ static void scoop_writeb(void *opaque, t
     ScoopInfo *s = (ScoopInfo *) opaque;
     value &= 0xffff;
 
+    // XXX Workaround for base address (0x08800040 in this case)
+    //     rounded down to start of page
+    addr &= 0x3f;
+
     switch (addr) {
     case SCOOP_MCR:
         s->mcr = value;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]