From nobody Tue Feb 10 20:28:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530350567024784.7955683147742; Sat, 30 Jun 2018 02:22:47 -0700 (PDT) Received: from localhost ([::1]:46213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZC5T-0000l1-4f for importer@patchew.org; Sat, 30 Jun 2018 05:22:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZC3X-0008DK-9Z for qemu-devel@nongnu.org; Sat, 30 Jun 2018 05:20:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZC3W-0001oq-97 for qemu-devel@nongnu.org; Sat, 30 Jun 2018 05:20:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37642 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fZC3T-0001k3-2j; Sat, 30 Jun 2018 05:20:31 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A70D67264E; Sat, 30 Jun 2018 09:20:30 +0000 (UTC) Received: from localhost (unknown [10.33.36.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D1D47C3F; Sat, 30 Jun 2018 09:20:28 +0000 (UTC) From: Stefan Hajnoczi To: Date: Sat, 30 Jun 2018 10:13:42 +0100 Message-Id: <20180630091343.14391-3-stefanha@redhat.com> In-Reply-To: <20180630091343.14391-1-stefanha@redhat.com> References: <20180630091343.14391-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 30 Jun 2018 09:20:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 30 Jun 2018 09:20:30 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'stefanha@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v2 2/3] hw/arm: add ARMv6M object 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: Peter Maydell , jim@groklearning.com, mail@steffen-goertz.de, ilg@livius.net, Alistair Francis , Subbaraya Sundeep , qemu-arm@nongnu.org, joel@jms.id.au, Stefan Hajnoczi , jusual@mail.ru Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The ARMv6M object will be used by machine types that need ARMv6-M CPUs. There is no logic beyond what the ARMMProfile base class already provides because ARMv6-M is a pretty small microcontroller without many bells and whistles. Signed-off-by: Stefan Hajnoczi Reviewed-by: Peter Maydell --- hw/arm/Makefile.objs | 1 + include/hw/arm/armv6m.h | 24 ++++++++++++++++++++++++ hw/arm/armv6m.c | 23 +++++++++++++++++++++++ default-configs/arm-softmmu.mak | 1 + 4 files changed, 49 insertions(+) create mode 100644 include/hw/arm/armv6m.h create mode 100644 hw/arm/armv6m.c diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs index 2c43d34c64..e693d86cd3 100644 --- a/hw/arm/Makefile.objs +++ b/hw/arm/Makefile.objs @@ -17,6 +17,7 @@ obj-$(CONFIG_VERSATILE) +=3D vexpress.o versatilepb.o obj-$(CONFIG_ZYNQ) +=3D xilinx_zynq.o =20 obj-$(CONFIG_ARM_M_PROFILE) +=3D arm-m-profile.o +obj-$(CONFIG_ARM_V6M) +=3D armv6m.o obj-$(CONFIG_ARM_V7M) +=3D armv7m.o obj-$(CONFIG_EXYNOS4) +=3D exynos4210.o obj-$(CONFIG_PXA2XX) +=3D pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o diff --git a/include/hw/arm/armv6m.h b/include/hw/arm/armv6m.h new file mode 100644 index 0000000000..5f80120266 --- /dev/null +++ b/include/hw/arm/armv6m.h @@ -0,0 +1,24 @@ +/* + * ARMv6M CPU object + * + * Copyright (C) 2018 Red Hat, Inc. + * + * This code is licensed under the GPL version 2 or later. + */ + +#ifndef HW_ARM_ARMV6M_H +#define HW_ARM_ARMV6M_H + +#include "hw/arm/arm-m-profile.h" + +#define TYPE_ARMV6M "armv6m" +#define ARMV6M(obj) OBJECT_CHECK(ARMv6MState, (obj), TYPE_ARMV6M) + +/* ARMv6M container object. + */ +typedef struct ARMv6MState { + /*< private >*/ + ARMMProfileState parent_obj; +} ARMv6MState; + +#endif diff --git a/hw/arm/armv6m.c b/hw/arm/armv6m.c new file mode 100644 index 0000000000..89c4727a87 --- /dev/null +++ b/hw/arm/armv6m.c @@ -0,0 +1,23 @@ +/* + * ARMv6M CPU object + * + * Copyright (C) 2018 Red Hat, Inc. + * + * This code is licensed under the GPL version 2 or later. + */ + +#include "qemu/osdep.h" +#include "hw/arm/armv6m.h" + +static const TypeInfo armv6m_info =3D { + .name =3D TYPE_ARMV6M, + .parent =3D TYPE_ARM_M_PROFILE, + .instance_size =3D sizeof(ARMv6MState), +}; + +static void armv6m_register_types(void) +{ + type_register_static(&armv6m_info); +} + +type_init(armv6m_register_types) diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.= mak index e704cb6e34..a381817126 100644 --- a/default-configs/arm-softmmu.mak +++ b/default-configs/arm-softmmu.mak @@ -49,6 +49,7 @@ CONFIG_A9MPCORE=3Dy CONFIG_A15MPCORE=3Dy =20 CONFIG_ARM_M_PROFILE=3Dy +CONFIG_ARM_V6M=3Dy CONFIG_ARM_V7M=3Dy CONFIG_NETDUINO2=3Dy =20 --=20 2.17.1