Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LF9Di-0000vD-5R for qemu-devel@nongnu.org; Tue, 23 Dec 2008 10:30:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LF9Dg-0000su-Kj for qemu-devel@nongnu.org; Tue, 23 Dec 2008 10:30:52 -0500 Received: from [199.232.76.173] (port=38383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LF9Dg-0000se-Et for qemu-devel@nongnu.org; Tue, 23 Dec 2008 10:30:52 -0500 Received: from savannah.gnu.org ([199.232.41.3]:52036 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LF9Df-0000fP-Rf for qemu-devel@nongnu.org; Tue, 23 Dec 2008 10:30:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LF9Df-0003m9-AA for qemu-devel@nongnu.org; Tue, 23 Dec 2008 15:30:51 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LF9Df-0003m4-0m for qemu-devel@nongnu.org; Tue, 23 Dec 2008 15:30:51 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Tue, 23 Dec 2008 15:30:51 +0000 Subject: [Qemu-devel] [6125] Add SuperSPARC MMU breakpoint registers (Robert Reif) 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 Revision: 6125 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6125 Author: blueswir1 Date: 2008-12-23 15:30:50 +0000 (Tue, 23 Dec 2008) Log Message: ----------- Add SuperSPARC MMU breakpoint registers (Robert Reif) Modified Paths: -------------- trunk/target-sparc/cpu.h trunk/target-sparc/op_helper.c Modified: trunk/target-sparc/cpu.h =================================================================== --- trunk/target-sparc/cpu.h 2008-12-23 15:08:13 UTC (rev 6124) +++ trunk/target-sparc/cpu.h 2008-12-23 15:30:50 UTC (rev 6125) @@ -301,6 +301,7 @@ uint32_t mmuregs[32]; uint64_t mxccdata[4]; uint64_t mxccregs[8]; + uint64_t mmubpregs[4]; uint64_t prom_addr; #endif /* temporary float registers */ Modified: trunk/target-sparc/op_helper.c =================================================================== --- trunk/target-sparc/op_helper.c 2008-12-23 15:08:13 UTC (rev 6124) +++ trunk/target-sparc/op_helper.c 2008-12-23 15:30:50 UTC (rev 6125) @@ -953,6 +953,28 @@ case 0x39: /* data cache diagnostic register */ ret = 0; break; + case 0x38: /* SuperSPARC MMU Breakpoint Control Registers */ + { + int reg = (addr >> 8) & 3; + + switch(reg) { + case 0: /* Breakpoint Value (Addr) */ + ret = env->mmubpregs[reg]; + break; + case 1: /* Breakpoint Mask */ + ret = env->mmubpregs[reg]; + break; + case 2: /* Breakpoint Control */ + ret = env->mmubpregs[reg]; + break; + case 3: /* Breakpoint Status */ + ret = env->mmubpregs[reg]; + env->mmubpregs[reg] = 0ULL; + break; + } + DPRINTF_MMU("read breakpoint reg[%d] 0x%016llx\n", reg, ret); + } + break; case 8: /* User code access, XXX */ default: do_unassigned_access(addr, 0, 0, asi, size); @@ -1283,9 +1305,30 @@ // descriptor diagnostic case 0x36: /* I-cache flash clear */ case 0x37: /* D-cache flash clear */ - case 0x38: /* breakpoint diagnostics */ case 0x4c: /* breakpoint action */ break; + case 0x38: /* SuperSPARC MMU Breakpoint Control Registers*/ + { + int reg = (addr >> 8) & 3; + + switch(reg) { + case 0: /* Breakpoint Value (Addr) */ + env->mmubpregs[reg] = (val & 0xfffffffffULL); + break; + case 1: /* Breakpoint Mask */ + env->mmubpregs[reg] = (val & 0xfffffffffULL); + break; + case 2: /* Breakpoint Control */ + env->mmubpregs[reg] = (val & 0x7fULL); + break; + case 3: /* Breakpoint Status */ + env->mmubpregs[reg] = (val & 0xfULL); + break; + } + DPRINTF_MMU("write breakpoint reg[%d] 0x%016llx\n", reg, + env->mmuregs[reg]); + } + break; case 8: /* User code access, XXX */ case 9: /* Supervisor code access, XXX */ default: