From patchwork Mon Jan 11 14:49:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 42625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 749B0B7C16 for ; Tue, 12 Jan 2010 02:03:34 +1100 (EST) Received: from localhost ([127.0.0.1]:49418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NULmD-0004Cj-OU for incoming@patchwork.ozlabs.org; Mon, 11 Jan 2010 10:01:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NULg7-0001QZ-48 for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:55:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NULg2-0001MK-HQ for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:55:34 -0500 Received: from [199.232.76.173] (port=58797 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NULg1-0001MB-TE for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:55:29 -0500 Received: from miranda.se.axis.com ([193.13.178.8]:43295) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NULfz-0003kU-GH for qemu-devel@nongnu.org; Mon, 11 Jan 2010 09:55:29 -0500 Received: from edde (edgar.se.axis.com [10.93.151.1]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with SMTP id o0BEt9LL022039; Mon, 11 Jan 2010 15:55:09 +0100 Received: by edde (sSMTP sendmail emulation); Mon, 11 Jan 2010 15:49:57 +0100 From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Mon, 11 Jan 2010 15:49:50 +0100 Message-Id: <1263221391-3642-4-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.6.4.4 In-Reply-To: <1263221391-3642-3-git-send-email-edgar.iglesias@gmail.com> References: <1263221391-3642-1-git-send-email-edgar.iglesias@gmail.com> <1263221391-3642-2-git-send-email-edgar.iglesias@gmail.com> <1263221391-3642-3-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: "Edgar E. Iglesias" Subject: [Qemu-devel] [PATCH 3/4] ppc-40x: Correct decoding of zone protection bits. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The 40x MMU has 15 zones in the ZPR register. Signed-off-by: Edgar E. Iglesias --- target-ppc/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index b233d4f..f9b5589 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -1155,7 +1155,7 @@ static int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx, env->spr[SPR_40x_PID], 0, i) < 0) continue; zsel = (tlb->attr >> 4) & 0xF; - zpr = (env->spr[SPR_40x_ZPR] >> (28 - (2 * zsel))) & 0x3; + zpr = (env->spr[SPR_40x_ZPR] >> (30 - (2 * zsel))) & 0x3; LOG_SWTLB("%s: TLB %d zsel %d zpr %d rw %d attr %08x\n", __func__, i, zsel, zpr, rw, tlb->attr); /* Check execute enable bit */