From nobody Fri Nov 7 12:04:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548096986979281.9240299823989; Mon, 21 Jan 2019 10:56:26 -0800 (PST) Received: from localhost ([127.0.0.1]:58146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glejz-0004Wm-0F for importer@patchew.org; Mon, 21 Jan 2019 13:56:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glefQ-0000qv-0N for qemu-devel@nongnu.org; Mon, 21 Jan 2019 13:51:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glefN-0002Yn-4G for qemu-devel@nongnu.org; Mon, 21 Jan 2019 13:51:27 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:39573) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glefM-0002Vi-QW for qemu-devel@nongnu.org; Mon, 21 Jan 2019 13:51:25 -0500 Received: by mail-wr1-x442.google.com with SMTP id t27so24610627wra.6 for ; Mon, 21 Jan 2019 10:51:24 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n82sm50386660wma.42.2019.01.21.10.51.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Jan 2019 10:51:23 -0800 (PST) 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=WmmMPknEg5hUgKMPxj3CIX2ru0eV6+lHEZhIc4wzqM8=; b=kH4B50dshKqdlBEi6X0rMUGnH6egzwECFs6BSbOgtvrdRxemJY4HfY13l7SC5DYKHB 7OER1cxXNm7G6ztPQKqunG7Hnzaum2GCAifUl3gx/wr9h0pVFo3Z/e+uYtRevlhvoVhU vn+oclbjsas45TKGbePHHNtXJbMLFnYIQNe6w= 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=WmmMPknEg5hUgKMPxj3CIX2ru0eV6+lHEZhIc4wzqM8=; b=iz95HZV3DAu4p47gS4wnYonRt1n+ceTACuPDIaKyAIX6FleHQd4p0GUPjjoDDO5n8m QLTRMElOdicTiN+OtDuBhcdTwsIsPaVSHUdFNf6wOENn85ikc+vKBk4zG6kptI6hUv1z nSIjCy1wEl4zuQixAgNmkB3OKxm153Xz75hw3HVZ4vD+wfHQTB8OvodjjMIPqFXMIYKz sPQCkMhwQrHHABxjvAK/kYyN19uKGopuFGgihvZMsVXoU29lUy/gCN2emq+E1jKdjeEb aPz3Z8FgeQsjte0laLCzIOoxCGD649BSoP/8iMB/OADUFP9kp5YnNUknC+06xhXkqT3/ 8/xQ== X-Gm-Message-State: AJcUukcKBfBNqouIWgnTDug3uPlnqrkP29T0QoVYngArBhz6IS+VX/Vs HGQMGuG/BMhiBTpi3oPZLArQr55XHj6/RA== X-Google-Smtp-Source: ALg8bN40GC0rRvzHIHkzbMX64/LuIT+NuKFgFmD8W/jqvnmInODPCvaQJF732AZaeVE/iazwYrb35g== X-Received: by 2002:adf:9f10:: with SMTP id l16mr30472796wrf.206.1548096683696; Mon, 21 Jan 2019 10:51:23 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Mon, 21 Jan 2019 18:50:58 +0000 Message-Id: <20190121185118.18550-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121185118.18550-1-peter.maydell@linaro.org> References: <20190121185118.18550-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 03/23] 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: , Cc: patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 --- 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; =20 #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 **e= rrp) 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 !=3D NULL) { + error_propagate(errp, err); + return; + } + } =20 /* * Tell the CPU where the NVIC is; it will fail realize if it doesn't @@ -250,6 +258,8 @@ static Property armv7m_properties[] =3D { DEFINE_PROP_LINK("idau", ARMv7MState, idau, TYPE_IDAU_INTERFACE, Objec= t *), 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(), }; =20 --=20 2.20.1