From patchwork Wed Jan 25 13:00:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 13115613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17ABEC54E94 for ; Wed, 25 Jan 2023 13:03:23 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKfOs-0002cF-7q; Wed, 25 Jan 2023 08:01:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfOf-0002XZ-Nt; Wed, 25 Jan 2023 08:01:08 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKfOW-0007TW-Rr; Wed, 25 Jan 2023 08:01:00 -0500 Received: by mail-wm1-x329.google.com with SMTP id f19-20020a1c6a13000000b003db0ef4dedcso1156104wmc.4; Wed, 25 Jan 2023 05:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t02FRM54QiiL1KMyr24MelBP+lEUcbY35sk426ekZB4=; b=bis3miJPU464uOeuau7Gx4RsHqD4qcjUDtUgG3eGz7aI5CkjgaeAYKk5V7lDAyqmXW JdH6I8BPP3WidDwACMXXrJmPyRHbY82xSUWn3BE8t1l+G6Yf+59KUSuFIJfMyXaEMqfk RM+wCfqf998fqmFUhB3LlEOQNp+3JCRce4adeWhiGPAJzKMwFKkHUeqRsqdVMZ+9Yjjx n3ArJbv04hkv9Dix0L5irSBIchIvok0vMv7zJoLMSDp8/T7M36qTRAwJpjE8m/g0zyAG IYTimsaZ42rx49W+DYpTqKdj+5x8cv61XoHci5mppJ0antZchQRQLjikK5ZmHv9rvfHf Uf6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t02FRM54QiiL1KMyr24MelBP+lEUcbY35sk426ekZB4=; b=JGxOfCZ0g8zfjD2RJYeKLW5Bvf5fEsl/qxt7Gmi3aFfvUFJTXne+4sQMA0G4OBmanR M8TKajSW0jyK8YHADztcDwDMTZwedZqmKV/3VqPjvhLU1irdwMX2lB66pwxZdKS3h0dT CmOgSJy5ELcV/nuXkNbOWhy7xmQ1a3mb9TRNL/G5sL+0mTvFA4/4qAsyVHZGgRLDGuyE /gDhbh0s+EgVnafjeqtQiy47RySKSZl9lRo7BYVSDIeLBXAFqE+o3czx295pKrCnYYNQ ejyS/YvW0R3byeYJDpoHCR4M4+0sEgznozbdSC8DhQITDRsRjqgu/vp0LVpjdafpb+SB ORcA== X-Gm-Message-State: AFqh2krWx+RAaUyt9wKUT5/nUO64ABxPSsrKgQ+sEfKYmBxUQPXSWjhW 9482iC7XkJMjjt1t0fCyDx0fmoU3m0l24w== X-Google-Smtp-Source: AMrXdXsJpiIyLvT0V50OcCg47F3Pqqorcx6AEZ8+RFeDc75W05h47yF/qTXiDh2iP1t/NTkWo4kx0A== X-Received: by 2002:a05:600c:310e:b0:3db:eb0:6f6 with SMTP id g14-20020a05600c310e00b003db0eb006f6mr28361253wmo.13.1674651648787; Wed, 25 Jan 2023 05:00:48 -0800 (PST) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id s15-20020a05600c384f00b003d9de0c39fasm2078828wmr.36.2023.01.25.05.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 05:00:48 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, Bernhard Beschow Subject: [PATCH 1/4] hw/ppc: Set machine->fdt in e500 machines Date: Wed, 25 Jan 2023 14:00:21 +0100 Message-Id: <20230125130024.158721-2-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125130024.158721-1-shentey@gmail.com> References: <20230125130024.158721-1-shentey@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=shentey@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This enables support for the 'dumpdtb' QMP/HMP command for all e500 machines. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 9fa1f8e6cf..7239993acc 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -659,9 +659,14 @@ done: if (!dry_run) { qemu_fdt_dumpdtb(fdt, fdt_size); cpu_physical_memory_write(addr, fdt, fdt_size); + + /* Set machine->fdt for 'dumpdtb' QMP/HMP command */ + g_free(machine->fdt); + machine->fdt = fdt; + } else { + g_free(fdt); } ret = fdt_size; - g_free(fdt); out: g_free(pci_map); From patchwork Wed Jan 25 13:00:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 13115615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 331C7C54EAA for ; Wed, 25 Jan 2023 13:04:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKfOt-0002d2-6Q; Wed, 25 Jan 2023 08:01:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfOd-0002XJ-Uc; Wed, 25 Jan 2023 08:01:08 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKfOW-0007Ti-Qo; Wed, 25 Jan 2023 08:00:59 -0500 Received: by mail-wm1-x32b.google.com with SMTP id f12-20020a7bc8cc000000b003daf6b2f9b9so1155289wml.3; Wed, 25 Jan 2023 05:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=syan58S3sCnjyIRk7Y6RWSpgxK4N2Gg8GaazVOwZOpQ=; b=ehxKewQGImTzgN1gyT5ml6LlP7kfGjnv56QNI+EiiUAaZ2ORTiaHiDDeNv6471nW8k 0z2RzAsfPGydxFB9wmH78YKOFE6BT/i4+e64h3XLmDdsHhRwc0B2JRBDJRMfqGJNsKdd d6pueDtWq2l4ygpyYHRiwLZqnB8bLvv57l9j8oXtvEwiG/dr3DlhtE11YFaDVRNTMD3g OQP11kWtbJb1rPpcB9KKrzKcimRwYSRgQP88OGa2FDyVT1gJISHZjXrS106YbAHdLAkR HhH8PnEy8YncNLXx+A+uEKUHE+O2mIUgNPKMOfBaM9W11Xr8D86Kq+hVRDvXgLd8RUsj q3dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=syan58S3sCnjyIRk7Y6RWSpgxK4N2Gg8GaazVOwZOpQ=; b=PcE28+Xvuf5Skp3U/aa6TsP2vsXuAKmQ8JQGYfhd/ZKooaY9hEJUd9ZiW9nosH8bZj Jdxw1L6WGI8rCLXY43r1gt+EwSNyb/NjBY1ma++UkYL2m1MUSfduMgDJr9Qni0lFD+d0 J453mRiCPn1OtjoABY1aDpTUX7RkyhsQlt3uZcBQ8DXVC3JTkQKfR/PdyRWhm+VWYBKF SqcDgDt1ogAKcB8DTeKqKhnz8EZyeOZe7pXnC6vGhpALMTnUydaTitoxTsC2d1wuee5N uQt2hkr3gY9W2hbzrc4hs0WN/Fy9ATtftNSv/J6LQBtKSSAQJNwP7JNPfMyf3Odu7BNl /xZA== X-Gm-Message-State: AFqh2krlaO+bd1cdwkYX9qKCKK7FHt2zlCN8fCzZ9bL5rDQSoGv05XCE BAJ7rbS7gn+KFOnepRIbDfljgf8ipoSVoA== X-Google-Smtp-Source: AMrXdXuwIh1yBF/HnnHX5bRhYw4wLRF8VXpmoNUZyO+fcbCjFk+FxfEugzXbtclJofXqXymzBCzqEw== X-Received: by 2002:a05:600c:225a:b0:3d3:5c21:dd99 with SMTP id a26-20020a05600c225a00b003d35c21dd99mr30951681wmm.18.1674651649554; Wed, 25 Jan 2023 05:00:49 -0800 (PST) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id s15-20020a05600c384f00b003d9de0c39fasm2078828wmr.36.2023.01.25.05.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 05:00:49 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, Bernhard Beschow Subject: [PATCH 2/4] hw/ppc/e500{, plat}: Drop redundant checks for presence of platform bus Date: Wed, 25 Jan 2023 14:00:22 +0100 Message-Id: <20230125130024.158721-3-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125130024.158721-1-shentey@gmail.com> References: <20230125130024.158721-1-shentey@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=shentey@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This is a follow-up on commit 47a0b1dff7e9 'hw/ppc/mpc8544ds: Add platform bus': Both mpc85xx boards now have a platform bus unconditionally. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 5 ++--- hw/ppc/e500plat.c | 9 +++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 7239993acc..48288c0b41 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -643,9 +643,8 @@ static int ppce500_load_device_tree(PPCE500MachineState *pms, } g_free(soc); - if (pms->pbus_dev) { - platform_bus_create_devtree(pms, fdt, mpic); - } + platform_bus_create_devtree(pms, fdt, mpic); + g_free(mpic); pmc->fixup_devtree(fdt); diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 44bf874b0f..3032bd3f6d 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -46,13 +46,10 @@ static void e500plat_machine_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { PPCE500MachineState *pms = PPCE500_MACHINE(hotplug_dev); + MachineClass *mc = MACHINE_GET_CLASS(pms); - if (pms->pbus_dev) { - MachineClass *mc = MACHINE_GET_CLASS(pms); - - if (device_is_dynamic_sysbus(mc, dev)) { - platform_bus_link_device(pms->pbus_dev, SYS_BUS_DEVICE(dev)); - } + if (device_is_dynamic_sysbus(mc, dev)) { + platform_bus_link_device(pms->pbus_dev, SYS_BUS_DEVICE(dev)); } } From patchwork Wed Jan 25 13:00:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 13115611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AFE7C27C76 for ; Wed, 25 Jan 2023 13:01:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKfOo-0002aG-Qp; Wed, 25 Jan 2023 08:01:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfOf-0002Xb-Tt; Wed, 25 Jan 2023 08:01:08 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKfOd-0007Tq-IJ; Wed, 25 Jan 2023 08:01:01 -0500 Received: by mail-wm1-x331.google.com with SMTP id d4-20020a05600c3ac400b003db1de2aef0so1236507wms.2; Wed, 25 Jan 2023 05:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uoQgTm6KxRr/NTQpjZmPPpUvLTia7O3X8jkSnsZs31Q=; b=cr3VdEJz+5dH/UoNV4LWbUOjCF4cMKNZSM8TLXN5943jh6RBpAYLFw258ZbedGIuoY c5NbEikmou6bn5EpcpiX0eS5g28CvHNJ/TohTXAw/4MHghBGv9/M2KGwIdV7j1sFWoO4 Nz5KJMyTbhbFfaG0wNqnhLqxxP8WYIQxzTeIBf/x7setH60o+XfCb9Cb973ROVqDGkqN jX2EFnXuvvLaR3Ke/4yat+c/l+IV/0WwJKTlVRy2ua90udzgD3fRddPZeep7h3AMiq8R c7PFwHvAzY9fjj+cj5F1E4ulwkVpKGuM5/ghy0v0bDk4Qww41HgFV3z7pHeJCZqyRbWB NkCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uoQgTm6KxRr/NTQpjZmPPpUvLTia7O3X8jkSnsZs31Q=; b=kHyB/MYMuYV9iGUSthFGaC8/WloBnTiUvW44M2o8cLd7iM0rdFs8B5+/SMjdyfbcI+ /z7hq/dHZO3p+kbAahmLS/IHfmOqTsSaDHwHCLEI+YGt9r9tVBux9TiFISl9hunqs0e5 xCV5xIwN1BEoTVGT1ceUeiHWaR2OfWzQe2kn+et+D6sb+4dF2I7zbYR8cz+noB8gbukd gYgES6OWmVIsktW5WxsbQFw/0rCG34WNx7lN/wq9GhWgUv5axTnaIK5IWx72uSOkjcWA YPIwHIsNrfOYd8RgrjaSHXfElldCpRQun4HtDHYsvIqpJJEJ+3XcDgybptJrBIRrr2Wl PZog== X-Gm-Message-State: AFqh2koeOrdqxTfiQ3zn4X9E1iX8DFJpqslwCURVQ4Mf13ajDX9PiP5r 91iHv5xeVNsE6Vklqha8WjClRnpPIazuMw== X-Google-Smtp-Source: AMrXdXsVyDdMhe8TAL5VafQB7xIuh26Y9+z6acpiLotsUp3cqS+liPs0IJchlfDUxAMSXuW7voyBjg== X-Received: by 2002:a05:600c:4928:b0:3cf:a41d:844b with SMTP id f40-20020a05600c492800b003cfa41d844bmr30097893wmp.5.1674651650642; Wed, 25 Jan 2023 05:00:50 -0800 (PST) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id s15-20020a05600c384f00b003d9de0c39fasm2078828wmr.36.2023.01.25.05.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 05:00:50 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, Bernhard Beschow Subject: [PATCH 3/4] hw/ppc/e500.c: Avoid hardcoding parent device in create_devtree_etsec() Date: Wed, 25 Jan 2023 14:00:23 +0100 Message-Id: <20230125130024.158721-4-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125130024.158721-1-shentey@gmail.com> References: <20230125130024.158721-1-shentey@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=shentey@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The "platform" node is available through data->node, so use that instead of making assumptions about the parent device. Signed-off-by: Bernhard Beschow --- hw/ppc/e500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 48288c0b41..e3b29d1d97 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -241,7 +241,7 @@ static int create_devtree_etsec(SysBusDevice *sbdev, PlatformDevtreeData *data) int irq0 = platform_bus_get_irqn(pbus, sbdev, 0); int irq1 = platform_bus_get_irqn(pbus, sbdev, 1); int irq2 = platform_bus_get_irqn(pbus, sbdev, 2); - gchar *node = g_strdup_printf("/platform/ethernet@%"PRIx64, mmio0); + gchar *node = g_strdup_printf("%s/ethernet@%"PRIx64, data->node, mmio0); gchar *group = g_strdup_printf("%s/queue-group", node); void *fdt = data->fdt; From patchwork Wed Jan 25 13:00:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 13115612 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6F46C54E94 for ; Wed, 25 Jan 2023 13:01:46 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKfOz-0002ew-8Q; Wed, 25 Jan 2023 08:01:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfOf-0002Xa-OH; Wed, 25 Jan 2023 08:01:08 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKfOd-0007VX-IJ; Wed, 25 Jan 2023 08:01:00 -0500 Received: by mail-wm1-x329.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so1167169wmb.2; Wed, 25 Jan 2023 05:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Tm2HfgjxNCIKiUMmVm5C1G/KwgcC7AB6x1Fwz+gWZxc=; b=Map46ZWWhIB8ypFmRC8j6jD09Enul8Vs7UtdDpmj95Azbsq7mwyHIqldc8OJpMCavl EgitrG3IDwDMInNRLM6CzumZN/fuIQzDiUe8La2Xm/40OqVOIKVyj7tBIIEK1U4Pgqk7 kZ+F6t6JajTByjU0y/d12fOLPJ3HBeLTkvWIHzbewtzDZnVqkfcZZKCcZx4gTs0FOYSb UD5Z6way+Jbj1Jsy3M0ncVWuC525+lynPOfHEB49H80jXwr5DlQwnr0Sc55/jjibO4Bg DTTFFB2KP1taE3VpDU0xSHIuyp6cBzqlr1/qHDnD9MytL5k0Rco6cNrU6d+f2KIWdQmf 15Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tm2HfgjxNCIKiUMmVm5C1G/KwgcC7AB6x1Fwz+gWZxc=; b=yWAdlihpujbxhRdeFCkp6tkFEBhwo6x/aY+1Wva19LAe6rVMXrdcx3ib1fk6X6kM+q VkdW1HnccwxmrZDt5d7vlvbxKQ9z5Roc+R09/qmS9PtDyvhFY7nPYUhBN8wxuwDpFcua c+M7TPBrHdR3NIE22gJxtY55cXEzuPkYb1d5CRXihL4CC/9KNBQ/gPbD4w22CDFfAL3N Nc94obOvoKRptShd0a4XOiLDtz8RqgXxHuSU7KbeozRZ9r0bvRL0tsfzx/xhnvEl9KTQ AbtRrnm+5Xqqws5YmNgchWkuIIusv7vbx9hjeQGK19eiJaGYCcDB8n9WU5sNrcTHNzos uxQg== X-Gm-Message-State: AFqh2ko856ABHW3Oj6lgKPNPjLbALf0gXFgRKmov5TFGOIj/ZctjBOjM FwUT9ixGNwGqAu0mggAk7OvU0DbucBow9Q== X-Google-Smtp-Source: AMrXdXsOS80jTF/ecIuDAMH8iNQWlDb91Xg8nKHdxrGW1ptMD8YVGncW8fTDWV2/uEIX0Lnhy/t71g== X-Received: by 2002:a05:600c:3d10:b0:3d9:ee3d:2f54 with SMTP id bh16-20020a05600c3d1000b003d9ee3d2f54mr39569863wmb.13.1674651651485; Wed, 25 Jan 2023 05:00:51 -0800 (PST) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id s15-20020a05600c384f00b003d9de0c39fasm2078828wmr.36.2023.01.25.05.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 05:00:51 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, Bernhard Beschow Subject: [PATCH 4/4] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space Date: Wed, 25 Jan 2023 14:00:24 +0100 Message-Id: <20230125130024.158721-5-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125130024.158721-1-shentey@gmail.com> References: <20230125130024.158721-1-shentey@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=shentey@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Makes the unimplemented region move together with the CCSR address space if moved by a bootloader. Moving the CCSR address space isn't implemented yet but this patch is a preparation for it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index e3b29d1d97..117c9c08ed 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1022,9 +1022,13 @@ void ppce500_init(MachineState *machine) /* eSDHC */ if (pmc->has_esdhc) { - create_unimplemented_device("esdhc", - pmc->ccsrbar_base + MPC85XX_ESDHC_REGS_OFFSET, - MPC85XX_ESDHC_REGS_SIZE); + dev = qdev_new(TYPE_UNIMPLEMENTED_DEVICE); + qdev_prop_set_string(dev, "name", "esdhc"); + qdev_prop_set_uint64(dev, "size", MPC85XX_ESDHC_REGS_SIZE); + s = SYS_BUS_DEVICE(dev); + sysbus_realize_and_unref(s, &error_fatal); + memory_region_add_subregion(ccsr_addr_space, MPC85XX_ESDHC_REGS_OFFSET, + sysbus_mmio_get_region(s, 0)); /* * Compatible with: