From patchwork Tue Feb 19 11:45:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Chouteau X-Patchwork-Id: 221887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 965C62C008E for ; Wed, 20 Feb 2013 07:55:09 +1100 (EST) Received: from localhost ([::1]:59357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7pOl-0000Tl-WD for incoming@patchwork.ozlabs.org; Tue, 19 Feb 2013 10:46:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7pOZ-0000G3-MR for qemu-devel@nongnu.org; Tue, 19 Feb 2013 10:46:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7pOU-0001AE-Us for qemu-devel@nongnu.org; Tue, 19 Feb 2013 10:46:15 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:56938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7ldf-00019d-J1 for qemu-devel@nongnu.org; Tue, 19 Feb 2013 06:45:36 -0500 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id A679D29000F; Tue, 19 Feb 2013 12:45:34 +0100 (CET) X-Virus-Scanned: amavisd-new at eu.adacore.com Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id roobSCJ4Vkfd; Tue, 19 Feb 2013 12:45:34 +0100 (CET) Received: from PomPomGalli.act-europe.fr (pompomgalli.act-europe.fr [10.10.1.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 8940F29003F; Tue, 19 Feb 2013 12:45:34 +0100 (CET) From: Fabien Chouteau To: qemu-devel@nongnu.org Date: Tue, 19 Feb 2013 12:45:06 +0100 Message-Id: <1361274307-5731-3-git-send-email-chouteau@adacore.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361274307-5731-1-git-send-email-chouteau@adacore.com> References: <1361274307-5731-1-git-send-email-chouteau@adacore.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 194.98.77.210 Cc: ronald.hecht@gmx.de, blauwirbel@gmail.com, Fabien Chouteau Subject: [Qemu-devel] [PATCH 2/3] Added LEON MMU ASI mappings and corrected LEON3 MMU masks. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Ronald Hecht This patch adds SPARC ASI mappings that are used by the LEON processor.It also corrects the MMU context register and context table pointer mask of the LEON3. Signed-off-by: Ronald Hecht Signed-off-by: Fabien Chouteau --- target-sparc/cpu.c | 4 ++-- target-sparc/ldst_helper.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index ef52df6..cc1453e 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -580,8 +580,8 @@ static const sparc_def_t sparc_defs[] = { .fpu_version = 4 << 17, /* FPU version 4 (Meiko) */ .mmu_version = 0xf3000000, .mmu_bm = 0x00000000, - .mmu_ctpr_mask = 0x007ffff0, - .mmu_cxr_mask = 0x0000003f, + .mmu_ctpr_mask = 0xfffffffc, + .mmu_cxr_mask = 0x000000ff, .mmu_sfsr_mask = 0xffffffff, .mmu_trcr_mask = 0xffffffff, .nwindows = 8, diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 7decd66..6d767fb 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -514,6 +514,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, int asi, int size, #endif break; case 3: /* MMU probe */ + case 0x18: /* LEON3 MMU probe */ { int mmulev; @@ -528,6 +529,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, int asi, int size, } break; case 4: /* read MMU regs */ + case 0x19: /* LEON3 read MMU regs */ { int reg = (addr >> 8) & 0x1f; @@ -603,6 +605,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, int asi, int size, case 0xf: /* D-cache data */ break; case 0x20: /* MMU passthrough */ + case 0x1c: /* LEON MMU passthrough */ switch (size) { case 1: ret = ldub_phys(addr); @@ -844,6 +847,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr, uint64_t val, int asi, #endif break; case 3: /* MMU flush */ + case 0x18: /* LEON3 MMU flush */ { int mmulev; @@ -868,6 +872,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr, uint64_t val, int asi, } break; case 4: /* write MMU regs */ + case 0x19: /* LEON3 write MMU regs */ { int reg = (addr >> 8) & 0x1f; uint32_t oldreg; @@ -996,6 +1001,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr, uint64_t val, int asi, } break; case 0x20: /* MMU passthrough */ + case 0x1c: /* LEON MMU passthrough */ { switch (size) { case 1: