From nobody Tue Feb 10 08:40:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.65 as permitted sender) client-ip=209.85.128.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1600674995; cv=none; d=zohomail.com; s=zohoarc; b=SCl/WVdmdc5PfVowWU2ychQY3Gq5X9iGC0TBFCiTrpXy4A6FWcwnAUmMBnzVNV3WJTBT8N+2+2OQGFvtOCkWTXn2+wMlJx782VULiIlEywlm2mLhe+YYX+43gnvg1DFwzLlI08bwJ/WdnzLAdEG/EV4fH54xuaO02Nn3PNxVjQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600674995; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=T9CL3aNfJM88wMcSnRqWzQ2xospTK9SQCj76tJrEnoI=; b=DHh4cTDtRlKHOQxBUZbytKVpdJBYpnlC97cyKNJOTiaLrKMNcWD/yiA3wMyw3drgEkTZ1lVAK23vVIyVeYr7ay/8zL+VOrtIvoSq7MXHSQ44DIo8ew8AIxTBfOS85f/3MfWu9mP+v3XIJ+ATUBYNax0pGGHfrOVF3jepBdHXwns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.zohomail.com with SMTPS id 1600674995633301.13417171604965; Mon, 21 Sep 2020 00:56:35 -0700 (PDT) Received: by mail-wm1-f65.google.com with SMTP id e17so11141144wme.0 for ; Mon, 21 Sep 2020 00:56:35 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id o15sm17807538wmh.29.2020.09.21.00.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 00:56:33 -0700 (PDT) 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=T9CL3aNfJM88wMcSnRqWzQ2xospTK9SQCj76tJrEnoI=; b=RxVC2BnMBeL9NBjUrIxUrgrg8eOQiVmLqhTQJrs8VJQL5/BsPWTVbrJ/P119c6OVMa 8Y0pphLCwbt+h2ihO4+OMLKkpO6DPBPUdk6DelkWKqALEnc7DgH359YnNawqZ2afVseI pLSUfeJhKmlQqoifVg4t/9KloV5ias9uRYpDVFhkZxFQ1qlUlz7EJUQ3AnaSvrWO9drn GKIl17Yj79ij/Y2qQW9yd8euijg19+aYLeh9hqjYcPx55RB9Cp/yTAs4y7UgLIEbyT02 wc4EF6QFYCgQLORikc5rkXH8si3F0WPkMm+A0IrpG6NztTW1HhANkI+ysP+cXStyXjEy Kugg== 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=T9CL3aNfJM88wMcSnRqWzQ2xospTK9SQCj76tJrEnoI=; b=pDpQfzDFGU71bxD9PiS50tikOspS/5u3igGhgzuz+x2xKxTsQeWacFucslbDz49R/U /RzQUUchvvbRTkgdM7Qcwx7MoBUTWVPW4QiePsRmXql22EEHouh5j6mxVJc+Wrcwra32 e/pEzCuPFUjFRcr86mLR2MzA5JsINAnVhudMBrMXmVJZrmT8nce1aWHancXKOXx5fZPa 9W09Qgrimrnhl6BMeoX3YyYzt/4pj9o8sMx1P4Cpx2JvBZKAZD2ROKtq+av/9Tr+A28R vKLFYbykY1xmE7B4lCaXSZX0k6pK1IiG29Xmyp7R7sMU2kPoDQAjDeXpL9BsAkns0d/V WChA== X-Gm-Message-State: AOAM5303g/9wHnFqnqKcgIgaKvEgCJqkR3CJCOIqm3ovaFT+Rqw+a2oU TujPR42ZwmNuIX07xLLovLk= X-Google-Smtp-Source: ABdhPJwQQZ6qeIcNDvel4K4aXMQoh+tQwuc9xTBRkdA6XBsgrYhDOHJsRr3QGkI4G7+RBSjBMem1lA== X-Received: by 2002:a05:600c:221a:: with SMTP id z26mr30293349wml.131.1600674993864; Mon, 21 Sep 2020 00:56:33 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paul Zimmerman , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Luc Michel , Andrew Baumann , qemu-arm@nongnu.org Subject: [PATCH v3 3/8] hw/arm/raspi: Move arm_boot_info structure to RaspiMachineState Date: Mon, 21 Sep 2020 09:56:23 +0200 Message-Id: <20200921075628.466506-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200921075628.466506-1-f4bug@amsat.org> References: <20200921075628.466506-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) The arm_boot_info structure belong to the machine, move it to RaspiMachineState. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Luc Michel --- hw/arm/raspi.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 8716a80a75e..16e6c83c925 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -41,6 +41,7 @@ struct RaspiMachineState { MachineState parent_obj; /*< public >*/ BCM283XState soc; + struct arm_boot_info binfo; }; typedef struct RaspiMachineState RaspiMachineState; =20 @@ -206,12 +207,11 @@ static void reset_secondary(ARMCPU *cpu, const struct= arm_boot_info *info) static void setup_boot(MachineState *machine, int version, size_t ram_size) { RaspiMachineState *s =3D RASPI_MACHINE(machine); - static struct arm_boot_info binfo; int r; =20 - binfo.board_id =3D MACH_TYPE_BCM2708; - binfo.ram_size =3D ram_size; - binfo.nb_cpus =3D machine->smp.cpus; + s->binfo.board_id =3D MACH_TYPE_BCM2708; + s->binfo.ram_size =3D ram_size; + s->binfo.nb_cpus =3D machine->smp.cpus; =20 if (version <=3D 2) { /* The rpi1 and 2 require some custom setup code to run in Secure @@ -220,21 +220,21 @@ static void setup_boot(MachineState *machine, int ver= sion, size_t ram_size) * firmware for some cache maintenance operations. * The rpi3 doesn't need this. */ - binfo.board_setup_addr =3D BOARDSETUP_ADDR; - binfo.write_board_setup =3D write_board_setup; - binfo.secure_board_setup =3D true; - binfo.secure_boot =3D true; + s->binfo.board_setup_addr =3D BOARDSETUP_ADDR; + s->binfo.write_board_setup =3D write_board_setup; + s->binfo.secure_board_setup =3D true; + s->binfo.secure_boot =3D true; } =20 /* Pi2 and Pi3 requires SMP setup */ if (version >=3D 2) { - binfo.smp_loader_start =3D SMPBOOT_ADDR; + s->binfo.smp_loader_start =3D SMPBOOT_ADDR; if (version =3D=3D 2) { - binfo.write_secondary_boot =3D write_smpboot; + s->binfo.write_secondary_boot =3D write_smpboot; } else { - binfo.write_secondary_boot =3D write_smpboot64; + s->binfo.write_secondary_boot =3D write_smpboot64; } - binfo.secondary_cpu_reset_hook =3D reset_secondary; + s->binfo.secondary_cpu_reset_hook =3D reset_secondary; } =20 /* If the user specified a "firmware" image (e.g. UEFI), we bypass @@ -250,11 +250,11 @@ static void setup_boot(MachineState *machine, int ver= sion, size_t ram_size) exit(1); } =20 - binfo.entry =3D firmware_addr; - binfo.firmware_loaded =3D true; + s->binfo.entry =3D firmware_addr; + s->binfo.firmware_loaded =3D true; } =20 - arm_load_kernel(&s->soc.cpu[0].core, machine, &binfo); + arm_load_kernel(&s->soc.cpu[0].core, machine, &s->binfo); } =20 static void raspi_machine_init(MachineState *machine) --=20 2.26.2