From patchwork Tue Apr 26 18:18:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566109 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3866271map; Tue, 26 Apr 2022 12:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF5d6VGiAFOt9NtxQ6Ww9dkE0EduVVoB7cMwkOH07XcQNHMFl0t9JH+VCHmBbPN3eJcUWU X-Received: by 2002:a81:2d03:0:b0:2f4:d064:6d26 with SMTP id t3-20020a812d03000000b002f4d0646d26mr23262335ywt.397.1651000120607; Tue, 26 Apr 2022 12:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651000120; cv=none; d=google.com; s=arc-20160816; b=ELuJ1RXlEEi3EALp8TiWNCZdJH8p9JDDXKairiqWZ1/NVotKqrXHTyC83xOEWRB9Zr l0EmuZB6i9+5NfhE/csSeH3du/kTzLr+En+KYnyfjCN57v86hW7CBT7bvL2sc8XXRSFH L/acoFZ0PIZddYaDTOTqHgrQ311JLqZIM9HP5hQWPKrwZPW37gCSSL+Algnoek03lFX5 QM3OkkTU9sMyHQZrmvH50jYriJGi9A2Zpp0wCJPD7iRA15wcYAGQl2qIIjzyJs3EcDkU rGY7JuVD4TPAvu6gO/2er5wi+KhiFweaglmNca2HDLLLpg7vR7BfFV1QXb7OA1J9YISa hsQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xZiQ5sI/cjyhT5QWt0cEWlmc3OyTlqSds1eKWRRIBd0=; b=NUnApJSBl2HTx2MZ6ZMkTcIeBDGswu5fnKkQ+edyiyICvMeeUoqxNkCIXMMReeYZ1l hU0FXj+GcmibAKss/spIaObYrfIJuQq8QvV2Yyikdna6GYVfaJE990A8CaFxU077tz2Q w6j7c5R/iJbr2PeE4+wPLFzy+dz3ZD/tb24qjLgMY+AINF9SK/nzCQyNMF9as00oYXE7 80Wr/lu7kx7uHfLaw8jr9foI3HIkvDGMtL+cDKdoXRlw9T2AwYOBWTgrNcm/ulh+m2Uj DOVXfIoS+8hVMqz832oYTCnIFCgCr7saOxma+bErAhja8AqIHYXm8l+VdpFSVE+V0hTb AwLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oWKXsm6F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b10-20020a252e4a000000b00648cad5f739si962884ybn.465.2022.04.26.12.08.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 12:08:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oWKXsm6F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njQYB-0006bL-OZ for patch@linaro.org; Tue, 26 Apr 2022 15:08:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njPmt-00036x-J2 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 14:19:47 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:42544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njPmr-0004Tr-WB for qemu-devel@nongnu.org; Tue, 26 Apr 2022 14:19:47 -0400 Received: by mail-pg1-x52c.google.com with SMTP id bg9so16714677pgb.9 for ; Tue, 26 Apr 2022 11:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xZiQ5sI/cjyhT5QWt0cEWlmc3OyTlqSds1eKWRRIBd0=; b=oWKXsm6Fvpz4owPvl7ah9WpanGyQFjkx7XSPNHrXpZ6V6nckqLMmciJ6MAcY84tSmE bBwXqKYUKX/QAXpXC4+/8lLUxEYT1aufk5qoTMvUAvg+rjFMjfZk4CWzHBy+M4EuABkd OjCmDkyF5+hGj0aXTwAXcn6sLK9dBonvr0M3efoLo5KSZeaxSIRXXxvGFSr4OZF0Gkjv jpTmI6btkvgaS8MVvtfSxwYExOXV9hiZJTEvnaaGhIybZj+dZ6szRlfYkPZKTPYowjMg XFXzqy35vn/epgehLCvb7QwwIdUNg0xtNjULGetwwsdqmqePKvMRHsmIciK5qTspOuG3 rh6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xZiQ5sI/cjyhT5QWt0cEWlmc3OyTlqSds1eKWRRIBd0=; b=WITKrBaUGsDGOQ3b8RyopGYUX3WE9h1OTxfKUEjso/othg8b9e9SXmKTu27iFThobk AySjPVCNVz8ykk93d/8D00F+n8vDIZ2ORyNc8UyJAFua9m2hehuBxupYp2nKod3tonvF KS/BnObxN1V0crReAu3eOr+CB1rh/bU74qcwlKBsCY7QBWGgdc5ihLfZ2mRScfV3e9aM NO1p2iDYyWFsTWoXBtPk54mxYJxHdEZV8dOX6NnAfERayX4jXN0l2oTXtzpFdRHMXA1K YxduHrnEZl5sLkLHSPt7IEbGhfJYVzgkiSXHukkkuu/UBu6CkA13NxvWA2y0ZHq4xtH4 Tg+Q== X-Gm-Message-State: AOAM5310XF4HUMTDTFHMaqfLtaafiLzSAV2XUNDzM3FQrTQ91eWiyda7 qkP+laGFMRh2JcJVRDov8TTHYeUmkRORfw== X-Received: by 2002:a05:6a00:1d24:b0:50c:ec18:5085 with SMTP id a36-20020a056a001d2400b0050cec185085mr24219178pfx.60.1650997184740; Tue, 26 Apr 2022 11:19:44 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id j7-20020a056a00130700b004b9f7cd94a4sm16482827pfu.56.2022.04.26.11.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:19:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 39/68] target/nios2: Implement CR_STATUS.RSIE Date: Tue, 26 Apr 2022 11:18:38 -0700 Message-Id: <20220426181907.103691-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426181907.103691-1-richard.henderson@linaro.org> References: <20220426181907.103691-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Without EIC, this bit is RES1. So set the bit at reset, and add it to the readonly fields of CR_STATUS. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-Id: <20220421151735.31996-40-richard.henderson@linaro.org> --- target/nios2/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index a0c3e97d72..7d734280d1 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -54,9 +54,9 @@ static void nios2_cpu_reset(DeviceState *dev) #if defined(CONFIG_USER_ONLY) /* Start in user mode with interrupts enabled. */ - env->ctrl[CR_STATUS] = CR_STATUS_U | CR_STATUS_PIE; + env->ctrl[CR_STATUS] = CR_STATUS_RSIE | CR_STATUS_U | CR_STATUS_PIE; #else - env->ctrl[CR_STATUS] = 0; + env->ctrl[CR_STATUS] = CR_STATUS_RSIE; #endif } @@ -127,6 +127,7 @@ static void realize_cr_status(CPUState *cs) WR_REG(CR_BADADDR); /* TODO: These control registers are not present with the EIC. */ + RO_FIELD(CR_STATUS, RSIE); WR_REG(CR_IENABLE); RO_REG(CR_IPENDING);