From patchwork Fri Feb 1 16:06:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 157257 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp624630jaa; Fri, 1 Feb 2019 08:12:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN6BUvFMe2GNBUcf84aURX6GK1TeSK5kNJ/votqLcKGpQrNFw7N6MfhrBlBIRbOHBt05QE3Q X-Received: by 2002:a81:4646:: with SMTP id t67mr38648665ywa.331.1549037550659; Fri, 01 Feb 2019 08:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549037550; cv=none; d=google.com; s=arc-20160816; b=suLrEgdBQLaVK0IIqc0kXiBI/8CtCPsSHsV0GSkwhm1cBn/7CjlcmANvkjeLreIsu4 c2+qyVVQsp20BZpEy+y/a/c4zPb76H1QFMMYsWZLkdyvQjDIn8MrT4wM1gfVswf5+4wk FxrqEPvVvRd1fXODqmM6+bouNI+p6teWw1TzIuDJ8TVsKKlV56uYREA8rGMh0+Ziyziw yxT4c2xzfsM+rF2cEOe1xyvSFdQTk73yEXf+ScJN5Y8x5lx5FfHw71YS5I+e3mUiesSR e6RkVfDypNampvkEbX2d5gJ9OJZ8DmT+7qlqwcq4h5gFHexCZkGUXH+cd7XgzdxMal52 RJzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=IscdVf/HXxPbIrc/TqyQxvqsof5sUf013Np+BeLvhfg=; b=xDi2bC+rSRazh7gC6mrv3zTtpirXCaYeBITeO4CEjfIXXbI4VeVCCcqZk82eqvgntt nbydXkWuQzKY/ym1q5Btmn9TpHqVRLrRatEXBJUHpAlvtEXntJHtvwZQCpiVDVqL0EDk SispjOOq6z8J9DzgnU05TlLcJ5w5u2BKvWFjEl2VlTdEcSOr6RxiRaLkI9mL2OxB+9hu A+YIff/U3rN3WocTvLx68Xr2XTldXstMatDab+UdCpyc1cGTWEbZot8IYn3ZFKxyQpmb 4QaT3IPnwaIgAnXZHO0ShvTli/dbw/J3xbd6s/znnx8inH28jxngZEXZozD4mJH8JhXb 5LEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ROBk8pRg; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d7si4587031ybs.425.2019.02.01.08.12.30 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 Feb 2019 08:12:30 -0800 (PST) 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=ROBk8pRg; 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 ([127.0.0.1]:57310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbQc-0003a8-4V for patch@linaro.org; Fri, 01 Feb 2019 11:12:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbLd-0007m8-LM for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpbLX-0003L7-2C for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:19 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:33223) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpbLN-0003Ge-N5 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:09 -0500 Received: by mail-wr1-x42d.google.com with SMTP id a16so2066178wrv.0 for ; Fri, 01 Feb 2019 08:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=IscdVf/HXxPbIrc/TqyQxvqsof5sUf013Np+BeLvhfg=; b=ROBk8pRgV71z3420nLTGOc7oAT6bdPyjEVU24Y9SxfHMZPSP9iQfJQ6ZjvJsOdfZZ0 NngbzQkM9T1UxmufZYGN62GvYb+CzTOZsrCCUkXdhuVyD8v3U97h1JwreFPtz6G6w8W/ 8Vi3gBb89kSvLnUNfQVk6t0x3JZPVygm0+eLE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IscdVf/HXxPbIrc/TqyQxvqsof5sUf013Np+BeLvhfg=; b=keziZIG9E6A1NjHffX1LCofxbVeCJi1i1qlvYAb6m0Qlz98PbBLd2ALo+Cx/cCL1K1 Ava9b1geufEW05xhO4vFGbiGGmJ/CRQZox0tQm5CMlQlzcVf05VEfYemxL7vt2eJOUD+ czSMRMsNCpHfJd0gWIj6dZFBRrB3n+S9tM5W0m2mfc3wAFbJ1fekK82yRT8ks40t6/Dq 1c4FIp9QXRXgGc3GhZnqOWRw8NHqxuooRatBbL5hI30sWbnpbcLj36nmhvFST3MnPUHU AH5ZbS9S9qNoe8f2Ia+UTCaa/wm9QEPV88iA0jVDXeuwTbkZnjneYgAQ5G4e4fEt0VsN Oa5g== X-Gm-Message-State: AJcUukcdfgvlf3py+LU1TapYmNkkF/j8jJPa/oknm04WNMzr09xioxS5 rnyu/FOknYggPD03qwyryhMeY8PsZfdZGw== X-Received: by 2002:a5d:6549:: with SMTP id z9mr38151002wrv.116.1549037220983; Fri, 01 Feb 2019 08:07:00 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n6sm2847250wmk.9.2019.02.01.08.06.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 08:07:00 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 16:06:10 +0000 Message-Id: <20190201160653.13829-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201160653.13829-1-peter.maydell@linaro.org> References: <20190201160653.13829-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d Subject: [Qemu-devel] [PULL 04/47] armv7m: Pass through start-powered-off CPU property 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Expose "start-powered-off" as a property of the ARMv7M container, which we just pass through to the CPU object in the same way that we do for "init-svtor" and "idau". (We want this for the SSE-200, which powers up only the first CPU at reset and leaves the second powered down.) As with the other CPU properties here, we can't just use alias properties, because the CPU QOM object is not created until armv7m realize time. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20190121185118.18550-4-peter.maydell@linaro.org --- include/hw/arm/armv7m.h | 1 + hw/arm/armv7m.c | 10 ++++++++++ 2 files changed, 11 insertions(+) -- 2.20.1 diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h index 2ba24953b63..e96a98f8093 100644 --- a/include/hw/arm/armv7m.h +++ b/include/hw/arm/armv7m.h @@ -65,6 +65,7 @@ typedef struct ARMv7MState { Object *idau; uint32_t init_svtor; bool enable_bitband; + bool start_powered_off; } ARMv7MState; #endif diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 0f2c8e066cf..adae11e76ed 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -182,6 +182,14 @@ static void armv7m_realize(DeviceState *dev, Error **errp) return; } } + if (object_property_find(OBJECT(s->cpu), "start-powered-off", NULL)) { + object_property_set_bool(OBJECT(s->cpu), s->start_powered_off, + "start-powered-off", &err); + if (err != NULL) { + error_propagate(errp, err); + return; + } + } /* * Tell the CPU where the NVIC is; it will fail realize if it doesn't @@ -250,6 +258,8 @@ static Property armv7m_properties[] = { DEFINE_PROP_LINK("idau", ARMv7MState, idau, TYPE_IDAU_INTERFACE, Object *), DEFINE_PROP_UINT32("init-svtor", ARMv7MState, init_svtor, 0), DEFINE_PROP_BOOL("enable-bitband", ARMv7MState, enable_bitband, false), + DEFINE_PROP_BOOL("start-powered-off", ARMv7MState, start_powered_off, + false), DEFINE_PROP_END_OF_LIST(), };