From patchwork Mon Feb 1 00:01:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: BALATON Zoltan X-Patchwork-Id: 12057845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87765C433E6 for ; Mon, 1 Feb 2021 00:22:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE7AB64E28 for ; Mon, 1 Feb 2021 00:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE7AB64E28 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eik.bme.hu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6MzU-00062Y-VL for qemu-devel@archiver.kernel.org; Sun, 31 Jan 2021 19:22:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6Mvb-0001mg-OU for qemu-devel@nongnu.org; Sun, 31 Jan 2021 19:18:51 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:16943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6MvX-00017d-NZ for qemu-devel@nongnu.org; Sun, 31 Jan 2021 19:18:51 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 88AD7746357; Mon, 1 Feb 2021 01:18:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 21969746351; Mon, 1 Feb 2021 01:18:44 +0100 (CET) Message-Id: <19e5c0fa8baed6479ed0502fd3deb132d19457fb.1612137712.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 4/6] m68k: add missing BUSCR/PCR CR defines, and BUSCR/PCR/CAAR CR to m68k_move_to/from Date: Mon, 01 Feb 2021 01:01:52 +0100 MIME-Version: 1.0 To: qemu-devel@nongnu.org Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Lucien Murray-Pitts Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Lucien Murray-Pitts The BUSCR/PCR CR defines were missing for 68060, and the move_to/from helper functions were also missing a decode for the 68060 M68K_CR_CAAR CR register. Added missing defines, and respective decodes for all three CR registers to the helpers. Although this patch defines them, the implementation is empty in this patch and these registers will result in a cpu abort - which is the default prior to this patch. This patch aims to reach full coverage of all CR registers within the helpers. Signed-off-by: Lucien Murray-Pitts Reviewed-by: Laurent Vivier Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- target/m68k/cpu.h | 4 ++++ target/m68k/helper.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 2b1cdf241b..ae34c94615 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -393,6 +393,10 @@ typedef enum { #define M68K_CR_DACR0 0x006 #define M68K_CR_DACR1 0x007 +/* MC68060 */ +#define M68K_CR_BUSCR 0x008 +#define M68K_CR_PCR 0x808 + #define M68K_FPIAR_SHIFT 0 #define M68K_FPIAR (1 << M68K_FPIAR_SHIFT) #define M68K_FPSR_SHIFT 1 diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 9e81ee53ad..69acdc3b35 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -255,6 +255,11 @@ void HELPER(m68k_movec_to)(CPUM68KState *env, uint32_t reg, uint32_t val) case M68K_CR_DTT1: env->mmu.ttr[M68K_DTTR1] = val; return; + /* Unimplemented Registers */ + case M68K_CR_CAAR: + case M68K_CR_PCR: + case M68K_CR_BUSCR: + break; } cpu_abort(env_cpu(env), "Unimplemented control register write 0x%x = 0x%x\n", @@ -309,6 +314,11 @@ uint32_t HELPER(m68k_movec_from)(CPUM68KState *env, uint32_t reg) /* MC68040/MC68LC040 */ case M68K_CR_DTT1: /* MC68EC040 only: M68K_CR_DACR1 */ return env->mmu.ttr[M68K_DTTR1]; + /* Unimplemented Registers */ + case M68K_CR_CAAR: + case M68K_CR_PCR: + case M68K_CR_BUSCR: + break; } cpu_abort(env_cpu(env), "Unimplemented control register read 0x%x\n", reg);