From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J9AzL-00035B-I5 for qemu-devel@nongnu.org; Sun, 30 Dec 2007 22:06:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J9AzJ-00032Z-UW for qemu-devel@nongnu.org; Sun, 30 Dec 2007 22:06:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J9AzJ-00032S-Qg for qemu-devel@nongnu.org; Sun, 30 Dec 2007 22:06:49 -0500 Received: from pop-satin.atl.sa.earthlink.net ([207.69.195.63]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J9AzJ-0004Fi-GI for qemu-devel@nongnu.org; Sun, 30 Dec 2007 22:06:49 -0500 Received: from user-142h2k8.cable.mindspring.com ([72.40.138.136] helo=earthlink.net) by pop-satin.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1J9AzI-0001r2-00 for qemu-devel@nongnu.org; Sun, 30 Dec 2007 22:06:48 -0500 Message-ID: <47785CC9.4000100@earthlink.net> Date: Sun, 30 Dec 2007 22:06:49 -0500 From: Robert Reif MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050102070003040600050808" Subject: [Qemu-devel] [PATCH] sparc32: fix power address Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------050102070003040600050808 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Fix obio/power address for ss10 and ss20. ss600mp doesn't have obio/power so fix slavio_misc to work without it. --------------050102070003040600050808 Content-Type: text/plain; name="power.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="power.diff.txt" 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, --------------050102070003040600050808--