Message ID | 20220317050538.924111-28-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp877569mag; Wed, 16 Mar 2022 22:17:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmSuN9oek1gK9ZqykW4+67H0HDJj/1pwih+qbcTy4gIQOc0MB9qctlTSiT1oBviYuS1pPd X-Received: by 2002:ac8:5d94:0:b0:2e1:ce44:5041 with SMTP id d20-20020ac85d94000000b002e1ce445041mr2432171qtx.356.1647494257023; Wed, 16 Mar 2022 22:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647494257; cv=none; d=google.com; s=arc-20160816; b=WOQKZedZnHpV88ZJXMszkbcFK108vg38bI8Qu4ycuPgLS89/dH7r6KUPmtntYTpLT2 oaL+b8s97320M1XfnDZAjmEL4AqWyy2jFAFCJ6lGT+SxZc9V0iUME8ehAYZie5O3+Q0f 6airWi7EiQQFADOoHYgiv9zpOxTbj6dCdTSoCMMvtlv/Kf9ga1kZw/fqNG81dDU53mXD tkVI8EPvmzpCKBZZvQwBcDQtgO4qrN7k3EacNYwsJQn72j5R3vOd+iDGGDZvw0aJ4+Se aHjhx6j7SQ27sbgxhWzZxwq+DglpKbxQhB2VNSLJmizc/WJ/S26zPs64yqrI+VA9qMLP trIw== 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=c0ckdqiNp217KypVyC9C89ZTIDY1SBdOzGHf3qGX4Fo=; b=dAN4IJwqCwCz2rv+MTbCApc1x0AHZ/6WVs3YIdc4JbBSrSoIokpb1w0vf5fEukf54H SHCVfJq6SEgOGSv9UJN2tVb3JChjQ4GPAFR2oOA+Swb2idCDFK6gKs2tjezKPWkWBUNK KrErFOF9y/bgdztJWT2jNqy15u31g2J3K2A2toGSxTMflfjNalaQzQ5r9YxGB3GRu4Se H8k0qF9KcjykY8A9ouOTbt7Ib6RGX+5PSvigBklwm3EolTq1rj4qa/fDpJ9e7T9bCnu5 ItmXQ95SSEXlnz7rRz+DVDH2XJ5fJXGfzC9DCQA+gGLX7sXzNIu0/NecxEV/Brsq9fOx WCTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="DFbZj/n4"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r10-20020a0562140c8a00b00440ccd84566si1043129qvr.592.2022.03.16.22.17.36 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Mar 2022 22:17:37 -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=fail header.i=@linaro.org header.s=google header.b="DFbZj/n4"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nUiW0-0001QR-He for patch@linaro.org; Thu, 17 Mar 2022 01:17:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nUiKv-0001LB-9V for qemu-devel@nongnu.org; Thu, 17 Mar 2022 01:06:09 -0400 Received: from [2607:f8b0:4864:20::1033] (port=33052 helo=mail-pj1-x1033.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nUiKt-0002HY-SQ for qemu-devel@nongnu.org; Thu, 17 Mar 2022 01:06:09 -0400 Received: by mail-pj1-x1033.google.com with SMTP id q1-20020a17090a4f8100b001c6575ae105so3002124pjh.0 for <qemu-devel@nongnu.org>; Wed, 16 Mar 2022 22:06:07 -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=c0ckdqiNp217KypVyC9C89ZTIDY1SBdOzGHf3qGX4Fo=; b=DFbZj/n4jLXgZ+P3r44XxRgjycb041x1lFTkehE8E09OyMNH3EyxtM/BmH+wMF3El1 dogBt9fB8EDjYpAA1e10ocZxVbve610Ry1IOkcSS8sbC6zkdQaOYF97X+h/ae2KXDL3c 7KFecJQhSN5ycl6oEskD/2d6T+/r3uJFyVk53LxERRoxnbSjG3EEzy5hJc0KSnqF8TOJ A0Bug6yjQeb46d8mU2MjQbCDRJbn6S7sj4e9vvJvB8vDQkTBfPc0adrAsdBaJ+fAQvos AFVpUcP6KJn9wSJgPJAEhj1bxYk5SKHIpXQt4PBXc5p+MjefTIxC/gpS/7RwL7ihZPtJ unQA== 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=c0ckdqiNp217KypVyC9C89ZTIDY1SBdOzGHf3qGX4Fo=; b=0A6gOM/qE0VKuyQEJ6NXxMhVcL1gbSK0Hhnl7QXBwKq8sKC6oVkcEeMSWGnyspCWLs ZxFCzwuV4OT2SLBz5XrWvxgWkqLNmaqbtnV5CREd/a3XxkkXZTaOB/eErvVWVxwkdbLP nITjd0Xii9EwOXGjxFrkUaPJba3mi+WBihutMibo9PR951ZxB2gkT6I78BDmDVUqL9TY NmJu8TUsipMq7froI0RFuQLf2sP4DihSi5xj+QciVZGu7KFowCo/rQy/aIw4dhCdq9SX eESOEKwzhsqOxPfZA/pEmOEVt/91EpbWbKqUvKKOOcen0FxqHuwWHk/CcNLf2tgC2FfW itsg== X-Gm-Message-State: AOAM533PM1jOwDWtG/gVt4WNXxuvvrpwyROHam0pBPIi5m00aDNNnvL3 oahvd9rl9zj/Nvu9dQMjFWfp/gqm/7faaQ== X-Received: by 2002:a17:903:2341:b0:151:d33b:90f4 with SMTP id c1-20020a170903234100b00151d33b90f4mr2863983plh.22.1647493566592; Wed, 16 Mar 2022 22:06:06 -0700 (PDT) Received: from localhost.localdomain (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id h22-20020a056a001a5600b004f7c17b291asm5101357pfv.87.2022.03.16.22.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:06:06 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH for-7.1 v6 27/51] target/nios2: Implement cpuid Date: Wed, 16 Mar 2022 22:05:14 -0700 Message-Id: <20220317050538.924111-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220317050538.924111-1-richard.henderson@linaro.org> References: <20220317050538.924111-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1033 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: marex@denx.de, Peter Maydell <peter.maydell@linaro.org>, amir.gonnen@neuroblade.ai Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/nios2: Shadow register set, EIC and VIC
|
expand
|
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 8189937857..2f1f5e35aa 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -168,6 +168,7 @@ static void realize_cr_status(CPUState *cs) static void nios2_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); + Nios2CPU *cpu = NIOS2_CPU(cs); Nios2CPUClass *ncc = NIOS2_CPU_GET_CLASS(dev); Error *local_err = NULL; @@ -181,6 +182,9 @@ static void nios2_cpu_realizefn(DeviceState *dev, Error **errp) qemu_init_vcpu(cs); cpu_reset(cs); + /* We have reserved storage for cpuid; might as well use it. */ + cpu->env.ctrl[CR_CPUID] = cs->cpu_index; + ncc->parent_realize(dev, errp); }