From nobody Tue Feb 10 08:03:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539363366288499.3359118564373; Fri, 12 Oct 2018 09:56:06 -0700 (PDT) Received: from localhost ([::1]:41700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB0jN-0001xJ-8m for importer@patchew.org; Fri, 12 Oct 2018 12:56:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB0XZ-0001AT-Fd for qemu-devel@nongnu.org; Fri, 12 Oct 2018 12:43:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gB0XV-00058f-AT for qemu-devel@nongnu.org; Fri, 12 Oct 2018 12:43:53 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46830 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gB0XV-00057N-2I for qemu-devel@nongnu.org; Fri, 12 Oct 2018 12:43:49 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id C3F6B1A4140; Fri, 12 Oct 2018 18:43:47 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id A0A141A4131; Fri, 12 Oct 2018 18:43:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2018 18:39:23 +0200 Message-Id: <1539362376-12010-16-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539362376-12010-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1539362376-12010-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v5 15/28] target/mips: Add CPO MemoryMapID register X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: smarkovic@wavecomp.com, riku.voipio@iki.fi, richard.henderson@linaro.org, laurent@vivier.eu, amarkovic@wavecomp.com, pjovanovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Yongbok Kim Add CPO MemoryMapID register. It is used by Global TLB Invalidate instruction (GINVT). Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/cpu.h | 1 + target/mips/internal.h | 1 + target/mips/machine.c | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 10c3813..77c6355 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -252,6 +252,7 @@ struct CPUMIPSState { #define CP0GN_VPId 0 target_ulong CP0_Context; target_ulong CP0_KScratch[MIPS_KSCRATCH_NUM]; + int32_t CP0_MemoryMapID; int32_t CP0_PageMask; int32_t CP0_PageGrain_rw_bitmask; int32_t CP0_PageGrain; diff --git a/target/mips/internal.h b/target/mips/internal.h index 2898bfc..6888a06 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -91,6 +91,7 @@ struct r4k_tlb_t { target_ulong VPN; uint32_t PageMask; uint16_t ASID; + uint32_t MMID; unsigned int G:1; unsigned int C0:3; unsigned int C1:3; diff --git a/target/mips/machine.c b/target/mips/machine.c index 5d558c1..4c80724 100644 --- a/target/mips/machine.c +++ b/target/mips/machine.c @@ -136,6 +136,7 @@ static int get_tlb(QEMUFile *f, void *pv, size_t size, = VMStateField *field) qemu_get_betls(f, &v->VPN); qemu_get_be32s(f, &v->PageMask); qemu_get_be16s(f, &v->ASID); + qemu_get_be32s(f, &v->MMID); qemu_get_be16s(f, &flags); v->G =3D (flags >> 10) & 1; v->C0 =3D (flags >> 7) & 3; @@ -161,6 +162,7 @@ static int put_tlb(QEMUFile *f, void *pv, size_t size, = VMStateField *field, r4k_tlb_t *v =3D pv; =20 uint16_t asid =3D v->ASID; + uint32_t mmid =3D v->MMID; uint16_t flags =3D ((v->EHINV << 15) | (v->RI1 << 14) | (v->RI0 << 13) | @@ -177,6 +179,7 @@ static int put_tlb(QEMUFile *f, void *pv, size_t size, = VMStateField *field, qemu_put_betls(f, &v->VPN); qemu_put_be32s(f, &v->PageMask); qemu_put_be16s(f, &asid); + qemu_put_be32s(f, &mmid); qemu_put_be16s(f, &flags); qemu_put_be64s(f, &v->PFN[0]); qemu_put_be64s(f, &v->PFN[1]); @@ -251,6 +254,7 @@ const VMStateDescription vmstate_mips_cpu =3D { VMSTATE_UINT64(env.CP0_EntryLo0, MIPSCPU), VMSTATE_UINT64(env.CP0_EntryLo1, MIPSCPU), VMSTATE_UINTTL(env.CP0_Context, MIPSCPU), + VMSTATE_INT32(env.CP0_MemoryMapID, MIPSCPU), VMSTATE_INT32(env.CP0_PageMask, MIPSCPU), VMSTATE_INT32(env.CP0_PageGrain, MIPSCPU), VMSTATE_UINTTL(env.CP0_SegCtl0, MIPSCPU), --=20 2.7.4