From nobody Mon Feb 9 19:43:48 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; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516650786794628.5319944292013; Mon, 22 Jan 2018 11:53:06 -0800 (PST) Received: from localhost ([::1]:33733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edi9R-000279-VR for importer@patchew.org; Mon, 22 Jan 2018 14:53:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edi4J-0006ou-Uz for qemu-devel@nongnu.org; Mon, 22 Jan 2018 14:47:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edi4I-0005sV-UV for qemu-devel@nongnu.org; Mon, 22 Jan 2018 14:47:48 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:38105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edi4I-0005rd-Nj; Mon, 22 Jan 2018 14:47:46 -0500 Received: by mail-pf0-x241.google.com with SMTP id k19so7886042pfj.5; Mon, 22 Jan 2018 11:47:46 -0800 (PST) Received: from localhost ([149.199.62.254]) by smtp.gmail.com with ESMTPSA id o25sm32163866pgc.75.2018.01.22.11.47.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 11:47:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=4PD0rX+ehRqeGVEgZCEmzpG5PrlM5EKNAZ23K4vpNvQ=; b=R5XaInUI5AqeShPSD+oXkhR3AdEKoclaQQf2rJ0ZwLZvS3EO7DWe423VkNC7sFIpQd VTg8h6lLCu5YlS5X0THYkT5vbJWFfb/SeSDcRbZmA522T6LxV1uLO1Qku/PP1099DraN xgpd4iGscnR0IPYK3zNRsMeRZ6wk+l4cCGpY7k73ouyCd2HPLZW83ZITP+4uFIIRLS1i HfCisjudDPlXKPD/+GRUkpKyCQe/kEeFjYOqh7WeCipnoim7XTH6aRK6LJsLRm9+9Hw3 HQo79MzzOx9CI2J7WO+pzMtiQrBPCoaD4wDVW0Qj3eU0txVgOkxPUyKohBJ/0EaFPFxY jAZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=4PD0rX+ehRqeGVEgZCEmzpG5PrlM5EKNAZ23K4vpNvQ=; b=ActeiUBqdgjYMSnktVlBefUdq3GK51sVruCQvOfa5RgvOSXaKeJOt2jXAHTXHx1KUH NpDn9WWb+4x35gqxyIzwrbXgOvwY1BlFfbtymuG/LBRTqNznHKjK0L9jbTptRAwnB3K0 QxdiKcVTqicLdRy/TVc+qHc5DdA9zH6jyziRcvDZkAkd2bl4FBRMuX7XTa+O5o5ro+xV EjaoENh5MGBPVdSGqRcU+DiDhGxFqJ5qFfn4RGpDZck2xaKqcIbZ6wuiJ4PTPeo5EfrB 2K/OECi3F1SG8I12wZJQzoUjlaJ6ZXyyn5m2EhdRlpcM9lCNmeMEKYcBtxSJk/5PgPpL /dcg== X-Gm-Message-State: AKwxytfvd4ltlENNG2yj3w8LEM1pw0ANk9s8m4cUUy8u9obmI5GQH/Cf GnyrYQr8AoeXtg3jjXAYznSN9cVx X-Google-Smtp-Source: AH8x227K7B6W7J48Ti4kF3yY8kjcT1iI/ahnyyiOlVdm9fAG7ONtuvkV0Av2vqUypXyT9FQV/pY6BQ== X-Received: by 10.99.107.129 with SMTP id g123mr7466528pgc.356.1516650465243; Mon, 22 Jan 2018 11:47:45 -0800 (PST) From: Alistair Francis To: qemu-devel@nongnu.org, edgar.iglesias@xilinx.com, edgar.iglesias@gmail.com Date: Mon, 22 Jan 2018 11:43:20 -0800 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v7 2/9] xlnx-zynqmp-pmu: Initial commit of the ZynqMP PMU 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: alistair23@gmail.com, qemu-arm@nongnu.org, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The Xilinx ZynqMP SoC has two main processing systems in it. The ARM processing system (which is already modeled in QEMU) and the MicroBlaze Power Management Unit (PMU). This is the inital work for adding support for the PMU. The PMU susbsystem runs along side the ARM system on hardware, but due to architecture limitations in QEMU the two instances are seperate for the time being. Let's follow the same setup we do with the ARM system, where there is an SoC device and a ZCU102 board. Although the PMU is less board specific we are still going to follow the same split as maybe in future we can connect the PMU device to the ARM ZCU102 board. As the machine will be fairly small let's keep them both together in one file. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- V4: - Rename to remove ZCU102 name hw/microblaze/xlnx-zynqmp-pmu.c | 83 +++++++++++++++++++++++++++++++++++++= ++++ hw/microblaze/Makefile.objs | 1 + 2 files changed, 84 insertions(+) create mode 100644 hw/microblaze/xlnx-zynqmp-pmu.c diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pm= u.c new file mode 100644 index 0000000000..ac0f78928a --- /dev/null +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -0,0 +1,83 @@ +/* + * Xilinx Zynq MPSoC PMU (Power Management Unit) emulation + * + * Copyright (C) 2017 Xilinx Inc + * Written by Alistair Francis + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WIT= HOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qemu-common.h" +#include "hw/boards.h" +#include "cpu.h" + +/* Define the PMU device */ + +#define TYPE_XLNX_ZYNQMP_PMU_SOC "xlnx,zynqmp-pmu-soc" +#define XLNX_ZYNQMP_PMU_SOC(obj) OBJECT_CHECK(XlnxZynqMPPMUSoCState, (obj)= , \ + TYPE_XLNX_ZYNQMP_PMU_SOC) + +typedef struct XlnxZynqMPPMUSoCState { + /*< private >*/ + DeviceState parent_obj; + + /*< public >*/ +} XlnxZynqMPPMUSoCState; + +static void xlnx_zynqmp_pmu_soc_init(Object *obj) +{ + +} + +static void xlnx_zynqmp_pmu_soc_realize(DeviceState *dev, Error **errp) +{ + +} + +static void xlnx_zynqmp_pmu_soc_class_init(ObjectClass *oc, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(oc); + + dc->realize =3D xlnx_zynqmp_pmu_soc_realize; +} + +static const TypeInfo xlnx_zynqmp_pmu_soc_type_info =3D { + .name =3D TYPE_XLNX_ZYNQMP_PMU_SOC, + .parent =3D TYPE_DEVICE, + .instance_size =3D sizeof(XlnxZynqMPPMUSoCState), + .instance_init =3D xlnx_zynqmp_pmu_soc_init, + .class_init =3D xlnx_zynqmp_pmu_soc_class_init, +}; + +static void xlnx_zynqmp_pmu_soc_register_types(void) +{ + type_register_static(&xlnx_zynqmp_pmu_soc_type_info); +} + +type_init(xlnx_zynqmp_pmu_soc_register_types) + +/* Define the PMU Machine */ + +static void xlnx_zynqmp_pmu_init(MachineState *machine) +{ + +} + +static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc) +{ + mc->desc =3D "Xilinx ZynqMP PMU machine"; + mc->init =3D xlnx_zynqmp_pmu_init; +} + +DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init) + diff --git a/hw/microblaze/Makefile.objs b/hw/microblaze/Makefile.objs index b2517d87fe..ae9fd40de7 100644 --- a/hw/microblaze/Makefile.objs +++ b/hw/microblaze/Makefile.objs @@ -1,3 +1,4 @@ obj-y +=3D petalogix_s3adsp1800_mmu.o obj-y +=3D petalogix_ml605_mmu.o +obj-y +=3D xlnx-zynqmp-pmu.o obj-y +=3D boot.o --=20 2.14.1