From patchwork Thu Apr 30 10:19:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 11519769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E94E4912 for ; Thu, 30 Apr 2020 10:25:25 +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 C054120787 for ; Thu, 30 Apr 2020 10:25:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LgsUcN3P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C054120787 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU6Ng-0000kz-RY for patchwork-qemu-devel@patchwork.kernel.org; Thu, 30 Apr 2020 06:25:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52454) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jU6IY-0008Dd-97 for qemu-devel@nongnu.org; Thu, 30 Apr 2020 06:20:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jU6IT-00018b-2u for qemu-devel@nongnu.org; Thu, 30 Apr 2020 06:20:06 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:44836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jU6IS-00017x-JZ for qemu-devel@nongnu.org; Thu, 30 Apr 2020 06:20:00 -0400 Received: by mail-lf1-x12c.google.com with SMTP id d25so738744lfi.11 for ; Thu, 30 Apr 2020 03:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H+LlnR11EGsPQDlPMcEJH7+ri0Xqw8l/GkcrB28PjIQ=; b=LgsUcN3Pi1rFmJAQC4KL0ptX0ErKAdH11Bor9CRVFBxjvIFz+DYtmRxtRyiXF6RN/4 fCl7MoQtn/HfPEejf3P8RdaIN6T2xinhW5/yAkvtG0kcyexLJY2ShCE/W5SsTeQLwzHf mYaM5F+I3plF/j4Ejggb0IL48qR33ZXGzDBRYJdZ+wEUGq2nApa2Y4uT2PxaWBxw8M0h VkBJFzq2wzsMuCOYyQc+Rm15sTq0MsGJOPRHOwdnIF9TTvaXkhH1htP2ShcbQsW7a6wo 0fXC9I0Qy77+exJmqcXK8PvMWh7jR2j9LkYAp+LEVM4sVNRBDnbebuDbZ/SL6+WO1SiW H+WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H+LlnR11EGsPQDlPMcEJH7+ri0Xqw8l/GkcrB28PjIQ=; b=kgsdiRK/awGY9LDMGcnG+HWYrln3OjKwYEahtqFaGBi62zeg4SN8HscZXmw+BlnyxV TDhptRV6xv899gq0uvDuphteOrcjNH1NdzGPUA4lew9bp9JQ9nV/JbVwQVF48pzbIf7w FCjJiW2+SXiNPeH0s/j8tSdvdO7mSfWJtwIc42y0xCY8sZLoG5FhWthsZ12VCttQ+KIV 6m7Gv/pR2Cda3CRWn2/XDk6iXL6X98pEyqdJU616cNcMb8qZtg2NwRz3R2y6x/GbdNQc VrSE/cTi7nvwPbyWcLEAFjXpK+2CArCObNT6Yci7TcWKXHigr2cVE0WHfdGYjS7mTkQK EJpQ== X-Gm-Message-State: AGi0PuZUx4Sk2ZUiPlCOo87nhgnR9kvLX8ztM7J8sUm1zaUY8puYnbH/ amoHjw6mWw1spfNDSlp7+iBf/vCdJ/s= X-Google-Smtp-Source: APiQypJhksrB0uY3QYRfNoPf1R3vis4aUiKeL2odqkf8KGjlsuyp8mzo7wKpUpzXA5rDwXTYJ2Fq8w== X-Received: by 2002:a05:6512:1109:: with SMTP id l9mr1731682lfg.12.1588241998767; Thu, 30 Apr 2020 03:19:58 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id s8sm4534166lfd.61.2020.04.30.03.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 03:19:57 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Subject: [PULL v1 5/6] target/microblaze: Add the pvr-user1 property Date: Thu, 30 Apr 2020 12:19:48 +0200 Message-Id: <20200430101949.7754-6-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430101949.7754-1-edgar.iglesias@gmail.com> References: <20200430101949.7754-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=edgar.iglesias@gmail.com; helo=mail-lf1-x12c.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::12c 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: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Add the pvr-user1 property to control the user-defined PVR0 User1 field. Reviewed-by: Alistair Francis Reviewed-by: Luc Michel Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.h | 1 + target/microblaze/cpu.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index ef9081db40..7bb5a3d6c6 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -307,6 +307,7 @@ struct MicroBlazeCPU { bool opcode_0_illegal; bool div_zero_exception; bool unaligned_exceptions; + uint8_t pvr_user1; char *version; uint8_t pvr; } cfg; diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 585e60e817..df5ee21dd6 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -193,7 +193,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp) (cpu->cfg.use_mmu ? PVR0_USE_MMU_MASK : 0) | (cpu->cfg.endi ? PVR0_ENDI_MASK : 0) | (version_code << PVR0_VERSION_SHIFT) | - (cpu->cfg.pvr == C_PVR_FULL ? PVR0_PVR_FULL_MASK : 0); + (cpu->cfg.pvr == C_PVR_FULL ? PVR0_PVR_FULL_MASK : 0) | + cpu->cfg.pvr_user1; env->pvr.regs[2] |= (cpu->cfg.use_fpu ? PVR2_USE_FPU_MASK : 0) | (cpu->cfg.use_fpu > 1 ? PVR2_USE_FPU2_MASK : 0) | @@ -292,6 +293,7 @@ static Property mb_properties[] = { cfg.opcode_0_illegal, false), DEFINE_PROP_STRING("version", MicroBlazeCPU, cfg.version), DEFINE_PROP_UINT8("pvr", MicroBlazeCPU, cfg.pvr, C_PVR_FULL), + DEFINE_PROP_UINT8("pvr-user1", MicroBlazeCPU, cfg.pvr_user1, 0), DEFINE_PROP_END_OF_LIST(), };