From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KawDF-0006Fj-HT for qemu-devel@nongnu.org; Wed, 03 Sep 2008 13:32:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KawDE-0006Ey-U7 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 13:32:13 -0400 Received: from [199.232.76.173] (port=35890 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KawDE-0006Es-SB for qemu-devel@nongnu.org; Wed, 03 Sep 2008 13:32:12 -0400 Received: from savannah.gnu.org ([199.232.41.3]:44297 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 1KawDE-0008H0-Et for qemu-devel@nongnu.org; Wed, 03 Sep 2008 13:32:12 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KawDD-0004ZP-AH for qemu-devel@nongnu.org; Wed, 03 Sep 2008 17:32:11 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KawDD-0004ZL-33 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 17:32:11 +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: Wed, 03 Sep 2008 17:32:11 +0000 Subject: [Qemu-devel] [5148] Implement no-fault loads 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: 5148 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5148 Author: blueswir1 Date: 2008-09-03 17:32:10 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Implement no-fault loads Modified Paths: -------------- trunk/target-sparc/op_helper.c Modified: trunk/target-sparc/op_helper.c =================================================================== --- trunk/target-sparc/op_helper.c 2008-09-03 14:40:17 UTC (rev 5147) +++ trunk/target-sparc/op_helper.c 2008-09-03 17:32:10 UTC (rev 5148) @@ -1402,10 +1402,17 @@ address_mask(env, &addr); switch (asi) { + case 0x82: // Primary no-fault + case 0x8a: // Primary no-fault LE + if (page_check_range(addr, size, PAGE_READ) == -1) { +#ifdef DEBUG_ASI + dump_asi("read ", last_addr, asi, size, ret); +#endif + return 0; + } + // Fall through case 0x80: // Primary - case 0x82: // Primary no-fault case 0x88: // Primary LE - case 0x8a: // Primary no-fault LE { switch(size) { case 1: @@ -1424,10 +1431,17 @@ } } break; + case 0x83: // Secondary no-fault + case 0x8b: // Secondary no-fault LE + if (page_check_range(addr, size, PAGE_READ) == -1) { +#ifdef DEBUG_ASI + dump_asi("read ", last_addr, asi, size, ret); +#endif + return 0; + } + // Fall through case 0x81: // Secondary - case 0x83: // Secondary no-fault case 0x89: // Secondary LE - case 0x8b: // Secondary no-fault LE // XXX break; default: @@ -1564,12 +1578,19 @@ helper_check_align(addr, size - 1); switch (asi) { + case 0x82: // Primary no-fault + case 0x8a: // Primary no-fault LE + if (cpu_get_phys_page_debug(env, addr) == -1ULL) { +#ifdef DEBUG_ASI + dump_asi("read ", last_addr, asi, size, ret); +#endif + return 0; + } + // Fall through case 0x10: // As if user primary case 0x18: // As if user primary LE case 0x80: // Primary - case 0x82: // Primary no-fault case 0x88: // Primary LE - case 0x8a: // Primary no-fault LE if ((asi & 0x80) && (env->pstate & PS_PRIV)) { if ((env->def->features & CPU_FEATURE_HYPV) && env->hpstate & HS_PRIV) { @@ -1650,15 +1671,22 @@ // Only ldda allowed raise_exception(TT_ILL_INSN); return 0; + case 0x83: // Secondary no-fault + case 0x8b: // Secondary no-fault LE + if (cpu_get_phys_page_debug(env, addr) == -1ULL) { +#ifdef DEBUG_ASI + dump_asi("read ", last_addr, asi, size, ret); +#endif + return 0; + } + // Fall through case 0x04: // Nucleus case 0x0c: // Nucleus Little Endian (LE) case 0x11: // As if user secondary case 0x19: // As if user secondary LE case 0x4a: // UPA config case 0x81: // Secondary - case 0x83: // Secondary no-fault case 0x89: // Secondary LE - case 0x8b: // Secondary no-fault LE // XXX break; case 0x45: // LSU