Fix obio/power address for ss10 and ss20.
ss600mp doesn't have obio/power so fix slavio_misc to work without it.
Index: hw/slavio_misc.c
===================================================================
RCS file: /sources/qemu/qemu/hw/slavio_misc.c,v
retrieving revision 1.16
diff -p -u -r1.16 slavio_misc.c
--- hw/slavio_misc.c    1 Dec 2007 15:02:20 -0000       1.16
+++ hw/slavio_misc.c    31 Dec 2007 02:55:57 -0000
@@ -146,7 +146,7 @@ static void slavio_misc_mem_writeb(void 
         s->mctrl = val & 0xff;
         break;
     default:
-        if (addr == s->power_base) {
+        if (s->power_base != -1 && addr == s->power_base) {
             MISC_DPRINTF("Write power management %2.2x\n", val & 0xff);
             cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HALT);
         }
@@ -181,7 +181,7 @@ static uint32_t slavio_misc_mem_readb(vo
         MISC_DPRINTF("Read modem control %2.2x\n", ret);
         break;
     default:
-        if (addr == s->power_base) {
+        if (s->power_base != -1 && addr == s->power_base) {
             MISC_DPRINTF("Read power management %2.2x\n", ret);
         }
         break;
@@ -366,7 +366,9 @@ void *slavio_misc_init(target_phys_addr_
     cpu_register_physical_memory(base + MISC_MDM, MISC_SIZE,
                                  slavio_misc_io_memory);
     // Power management
-    cpu_register_physical_memory(power_base, MISC_SIZE, slavio_misc_io_memory);
+    if (power_base != -1)
+        cpu_register_physical_memory(power_base, MISC_SIZE,
+                                     slavio_misc_io_memory);
     s->power_base = power_base;
 
     /* 16 bit registers */
Index: hw/sun4m.c
===================================================================
RCS file: /sources/qemu/qemu/hw/sun4m.c,v
retrieving revision 1.77
diff -p -u -r1.77 sun4m.c
--- hw/sun4m.c  29 Dec 2007 20:09:57 -0000      1.77
+++ hw/sun4m.c  31 Dec 2007 02:55:58 -0000
@@ -724,7 +724,7 @@ static const struct hwdef hwdefs[] = {
         .dma_base     = 0xef0400000ULL,
         .esp_base     = 0xef0800000ULL,
         .le_base      = 0xef0c00000ULL,
-        .power_base   = 0xefa000000ULL,
+        .power_base   = 0xff1a01000ULL,
         .ecc_base     = 0xf00000000ULL,
         .ecc_version  = 0x10000000, // version 0, implementation 1
         .sun4c_intctl_base  = -1,
@@ -765,7 +765,7 @@ static const struct hwdef hwdefs[] = {
         .dma_base     = 0xef0081000ULL,
         .esp_base     = 0xef0080000ULL,
         .le_base      = 0xef0060000ULL,
-        .power_base   = 0xefa000000ULL,
+        .power_base   = -1,
         .ecc_base     = 0xf00000000ULL,
         .ecc_version  = 0x00000000, // version 0, implementation 0
         .sun4c_intctl_base  = -1,
@@ -806,7 +806,7 @@ static const struct hwdef hwdefs[] = {
         .dma_base     = 0xef0400000ULL,
         .esp_base     = 0xef0800000ULL,
         .le_base      = 0xef0c00000ULL,
-        .power_base   = 0xefa000000ULL,
+        .power_base   = 0xff1a01000ULL,
         .ecc_base     = 0xf00000000ULL,
         .ecc_version  = 0x20000000, // version 0, implementation 2
         .sun4c_intctl_base  = -1,

Reply via email to