From patchwork Tue Sep 18 12:07:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronald Hecht X-Patchwork-Id: 184694 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 AC9342C0094 for ; Tue, 18 Sep 2012 22:14:47 +1000 (EST) Received: from localhost ([::1]:50453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDwhQ-00036U-HN for incoming@patchwork.ozlabs.org; Tue, 18 Sep 2012 08:14:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDwh7-0002wg-D7 for qemu-devel@nongnu.org; Tue, 18 Sep 2012 08:14:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDwh0-0000aQ-FO for qemu-devel@nongnu.org; Tue, 18 Sep 2012 08:14:25 -0400 Received: from [212.211.133.158] (port=39886 helo=rhe.ulm.sysgo.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDwh0-0000aL-5F for qemu-devel@nongnu.org; Tue, 18 Sep 2012 08:14:18 -0400 Received: from rhe.ulm.sysgo.com (localhost [127.0.0.1]) by rhe.ulm.sysgo.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8IC7dfH006571; Tue, 18 Sep 2012 14:07:39 +0200 Received: (from rhe@localhost) by rhe.ulm.sysgo.com (8.14.3/8.14.3/Submit) id q8IC7drg006569; Tue, 18 Sep 2012 14:07:39 +0200 From: Ronald Hecht To: qemu-devel@nongnu.org Date: Tue, 18 Sep 2012 14:07:37 +0200 Message-Id: <1347970057-6535-1-git-send-email-ronald.hecht@gmx.de> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.211.133.158 Cc: Ronald Hecht Subject: [Qemu-devel] [PATCH] 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 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 --- 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 f7c004c..0d5abb8 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -583,8 +583,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 9bec7a9..684b73b 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -511,6 +511,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; @@ -525,6 +526,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; @@ -600,6 +602,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); @@ -841,6 +844,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; @@ -865,6 +869,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; @@ -993,6 +998,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: