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: 1034873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ROBk8pRg"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43rhwK2T4kz9sDX for ; Sat, 2 Feb 2019 03:13:00 +1100 (AEDT) Received: from localhost ([127.0.0.1]:57310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbR0-0003a8-OJ for incoming@patchwork.ozlabs.org; Fri, 01 Feb 2019 11:12:54 -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-Google-Smtp-Source: ALg8bN56wMh0Iki+Jam6UUBbVSVS1E1IelfJWNChqelJkkfh4ZeNXCHDeOZcvSZ7lDPAwfB8nuP0HQ== 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+incoming=patchwork.ozlabs.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(+) 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(), };