From nobody Tue Feb 10 10:59:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) client-ip=209.85.128.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615155995; cv=none; d=zohomail.com; s=zohoarc; b=aTsyDkwIGp3j/pHvB1fXLyqjgeXn17ZgjAmC3LoWBxc6UUDtxIVwyFJ3arx89y9YaL3yhnbvJD+pjngDr6lWS4Ntd8/g+AGCXLcYk9Z41BFTWxGgnyKYgtoz1mYQDTR8YuBy4GstRv3vUvNRgM2iBkF1ywDS1PcCUaZkcHyaPhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615155995; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IXFyeqK1CTpX3BeruT6hgoEpNJU4XbuAmq1jWxI1ce0=; b=hbUqtWAxfw0XnAMRaDVmCxwgr9GUwM4T08nvq88KDjsvP/we+yf6V9+McVEs18PgoCQUYVwk5/ypxis0wE4Mqjfj/e3ZAAhTi+z/SJSflqRSiAxqX4qaKUbERNzl90b+6NT1BBvERarlJ0OkotrWfLTIY3M0PafDUrJCTy8n/Lw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.zohomail.com with SMTPS id 1615155995778254.745641471431; Sun, 7 Mar 2021 14:26:35 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id r15-20020a05600c35cfb029010e639ca09eso2672875wmq.1 for ; Sun, 07 Mar 2021 14:26:35 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id y18sm7651000wrw.39.2021.03.07.14.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Mar 2021 14:26:33 -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 :mime-version:content-transfer-encoding; bh=IXFyeqK1CTpX3BeruT6hgoEpNJU4XbuAmq1jWxI1ce0=; b=sD9qbS0fWhWvt05Ei8vEt3U1rTE+JEYpE7xBlc2nN6PKRyBh7FwOysRoiav1YTgW3J J9cJlej7hFd1VkgH7PNjKyhBNIZ6W5WVFL8AaNVBt6593fc+ChvTjFyd+mt0W/At3xe7 uCtqh1T9io/O6OLYooPIv1P4YwRS+AqogTtvigSXRZMf6hMcub//UqTQQXloCAlmM8Kx RiF4a4H3PwotrmsUGTg2tHNtHQ53HRDi97rBBmee59O4XcxQD2JciGp6GBe+Ztm1olB3 6QVOIcIjt0feq9YbEJO1p21kKhcHjSzNbK2TEUYNFpsPWSYQ5WxmSCREc25C/wc3Bxjb xW9A== 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:mime-version:content-transfer-encoding; bh=IXFyeqK1CTpX3BeruT6hgoEpNJU4XbuAmq1jWxI1ce0=; b=FufGeAUxlfhILRAGeW7KVh8wK7HC2IDM0K1LK4UMd0cu3f/Kk+08ZP1xOU/KzlvjI1 cJe0PvQO8mVvLpwWhGn8Kx3MxXDczEVzSo1kEIjc+h8A+hzfFeuwnflO9eI5v98wS3iD WSYBw7M4wRMn70TX9ju9e6kHWR6eIgBpGCpUfD2nGes26UwfKMYzlhok/LjgUoz7iZZq IPJS0syy0RnvU/KGC1Ew+tif+RBWl7fxdBwFSrvYbwvRVkDqck4DrV+zgdmMuOavR8CZ 6r4OA6FPacGtaBJHNpIk4ALtzcfHUXdmF1g2qACMxC1A8ss22cJF/jpaxy2lNdn12irk a4Hw== X-Gm-Message-State: AOAM5316snul9AjVEYBW41DCmKmij6z2ZBBY1MxPT7fcQ4751NFoPSic ufPL4snmluWGsXY7G81bi9w= X-Google-Smtp-Source: ABdhPJwEZI9+cwNyR2xYkhawW7HxyYUEpg+gjWEa6EjaudXqiA063myUhNzmeMjW8Mj2LQ3RBNOtiQ== X-Received: by 2002:a1c:1fc6:: with SMTP id f189mr19409691wmf.68.1615155994040; Sun, 07 Mar 2021 14:26:34 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, "Michael S. Tsirkin" , Eduardo Habkost , Jiaxun Yang , Max Filippov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Aurelien Jarno , Paolo Bonzini , qemu-block@nongnu.org, Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Kevin Wolf , Max Reitz Subject: [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get_region() Date: Sun, 7 Mar 2021 23:26:22 +0100 Message-Id: <20210307222625.347268-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210307222625.347268-1-f4bug@amsat.org> References: <20210307222625.347268-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) TYPE_PFLASH_CFI01 is a TYPE_SYS_BUS_DEVICE which registers its romd MemoryRegion with sysbus_init_mmio(), so we can use the generic sysbus_mmio_get_region() to get the region, no need for a specific pflash_cfi01_get_memory() helper. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/pc_sysfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index 9fe72b370e8..caad9cbd5eb 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -297,7 +297,7 @@ static void pc_system_flash_map(PCMachineState *pcms, 0x100000000ULL - total_size); =20 if (i =3D=3D 0) { - flash_mem =3D pflash_cfi01_get_memory(system_flash); + flash_mem =3D sysbus_mmio_get_region(SYS_BUS_DEVICE(system_fla= sh), 0); pc_isa_bios_init(rom_memory, flash_mem, size); =20 /* Encrypt the pflash boot ROM */ --=20 2.26.2