From nobody Mon Feb 9 18:46:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1606898128; cv=none; d=zohomail.com; s=zohoarc; b=IFdqZH8PuLvwJ8rZDj7MqlAyzdJeRgpxHq5CtIk4+C2xTkkevLyO1tDp37ViSQqeNchnB1zh9Iz/hXZCBzo4yJsXbPywuJ4/mYjlIeYTkSeHdYXbaB2suhBGV08HHEjolytOvj8XT9HVrjHC6KCeD+pt+/hE+8UeOkDZ0jImoDc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606898128; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kQI7I0gG34Imiu7c+rei9Y5Qe+vOFaa9RX5lIPuz5dI=; b=T66ole1pLtY9R5eXCyZmT2gy+Frr/sKNsCPRUCIIVBoyAKENtidhankdMZqMs2Jy+65afJIRUpr6Rbuu57QcRWhyDA5L+EJbxHALZS5nM+Ih5DM8fv7JCfxOcZ9K0GzaU5GfHRIedDCu0nwRJIGy3c50wI26dX4SWqJMgsUtvjM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1606898128487222.11866553951506; Wed, 2 Dec 2020 00:35:28 -0800 (PST) Received: from localhost ([::1]:53012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkNbi-00085J-FQ for importer@patchew.org; Wed, 02 Dec 2020 03:35:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkNCJ-0002sW-VX for qemu-devel@nongnu.org; Wed, 02 Dec 2020 03:09:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kkNCC-0003eg-6w for qemu-devel@nongnu.org; Wed, 02 Dec 2020 03:09:11 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-512-crFlWO-cMnaRRChFucTegQ-1; Wed, 02 Dec 2020 03:09:01 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7ACA803650 for ; Wed, 2 Dec 2020 08:09:00 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id B680F5C1B4 for ; Wed, 2 Dec 2020 08:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606896543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kQI7I0gG34Imiu7c+rei9Y5Qe+vOFaa9RX5lIPuz5dI=; b=Wd8e7CP0gS3htkrLk4MoL8N6dnNh2g/0+TZUizBlKxEvBpCK7h6DFaWWtdnaWsv9JyihBj gTSevwcwwgTSbTzn7FzhL3HVyXCmg0cMBLSrDLbGzHRhDX9myLt0bguP8K5MbZzShoNOUv TCxKFjo9WIamaESuOMWuwTPPCtHIaOk= X-MC-Unique: crFlWO-cMnaRRChFucTegQ-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 029/113] ppc: remove bios_name Date: Wed, 2 Dec 2020 03:07:25 -0500 Message-Id: <20201202080849.4125477-30-pbonzini@redhat.com> In-Reply-To: <20201202080849.4125477-1-pbonzini@redhat.com> References: <20201202080849.4125477-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.497, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Cc: David Gibson Signed-off-by: Paolo Bonzini Acked-by: David Gibson Reviewed-by: Alex Benn=C3=A9e Message-Id: <20201026143028.3034018-11-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- hw/ppc/e500.c | 4 ++-- hw/ppc/mac_newworld.c | 4 +--- hw/ppc/mac_oldworld.c | 4 +--- hw/ppc/pnv.c | 5 +---- hw/ppc/ppc405_boards.c | 6 ++---- hw/ppc/prep.c | 4 +--- hw/ppc/spapr.c | 4 +--- 7 files changed, 9 insertions(+), 22 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ae39b9358e..153a74c98c 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1035,7 +1035,7 @@ void ppce500_init(MachineState *machine) * -kernel to users but allows them to run through u-boot as well. */ kernel_as_payload =3D false; - if (bios_name =3D=3D NULL) { + if (machine->firmware =3D=3D NULL) { if (machine->kernel_filename) { payload_name =3D machine->kernel_filename; kernel_as_payload =3D true; @@ -1043,7 +1043,7 @@ void ppce500_init(MachineState *machine) payload_name =3D "u-boot.e500"; } } else { - payload_name =3D bios_name; + payload_name =3D machine->firmware; } =20 filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, payload_name); diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index f9a1cc8944..61c63819df 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -109,6 +109,7 @@ static void ppc_core99_reset(void *opaque) static void ppc_core99_init(MachineState *machine) { ram_addr_t ram_size =3D machine->ram_size; + const char *bios_name =3D machine->firmware ?: PROM_FILENAME; const char *kernel_filename =3D machine->kernel_filename; const char *kernel_cmdline =3D machine->kernel_cmdline; const char *initrd_filename =3D machine->initrd_filename; @@ -161,9 +162,6 @@ static void ppc_core99_init(MachineState *machine) &error_fatal); memory_region_add_subregion(get_system_memory(), PROM_BASE, bios); =20 - if (!bios_name) { - bios_name =3D PROM_FILENAME; - } filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { /* Load OpenBIOS (ELF) */ diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 6c59aa5601..11623e8e67 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -83,6 +83,7 @@ static void ppc_heathrow_reset(void *opaque) static void ppc_heathrow_init(MachineState *machine) { ram_addr_t ram_size =3D machine->ram_size; + const char *bios_name =3D machine->firmware ?: PROM_FILENAME; const char *boot_device =3D machine->boot_order; PowerPCCPU *cpu =3D NULL; CPUPPCState *env =3D NULL; @@ -130,9 +131,6 @@ static void ppc_heathrow_init(MachineState *machine) &error_fatal); memory_region_add_subregion(get_system_memory(), PROM_BASE, bios); =20 - if (!bios_name) { - bios_name =3D PROM_FILENAME; - } filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { /* Load OpenBIOS (ELF) */ diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 50ebd4a484..53a5121cab 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -713,6 +713,7 @@ static void pnv_chip_power10_pic_print_info(PnvChip *ch= ip, Monitor *mon) =20 static void pnv_init(MachineState *machine) { + const char *bios_name =3D machine->firmware ?: FW_FILE_NAME; PnvMachineState *pnv =3D PNV_MACHINE(machine); MachineClass *mc =3D MACHINE_GET_CLASS(machine); char *fw_filename; @@ -739,10 +740,6 @@ static void pnv_init(MachineState *machine) pnv->pnor =3D PNV_PNOR(dev); =20 /* load skiboot firmware */ - if (bios_name =3D=3D NULL) { - bios_name =3D FW_FILE_NAME; - } - fw_filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (!fw_filename) { error_report("Could not find OPAL firmware '%s'", bios_name); diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 4687715b15..c867e46330 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -141,6 +141,7 @@ static void ref405ep_fpga_init(MemoryRegion *sysmem, ui= nt32_t base) static void ref405ep_init(MachineState *machine) { MachineClass *mc =3D MACHINE_GET_CLASS(machine); + const char *bios_name =3D machine->firmware ?: BIOS_FILENAME; const char *kernel_filename =3D machine->kernel_filename; const char *kernel_cmdline =3D machine->kernel_cmdline; const char *initrd_filename =3D machine->initrd_filename; @@ -206,8 +207,6 @@ static void ref405ep_init(MachineState *machine) memory_region_init_rom(bios, NULL, "ef405ep.bios", BIOS_SIZE, &error_fatal); =20 - if (bios_name =3D=3D NULL) - bios_name =3D BIOS_FILENAME; filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { bios_size =3D load_image_size(filename, @@ -425,6 +424,7 @@ static void taihu_cpld_init(MemoryRegion *sysmem, uint3= 2_t base) static void taihu_405ep_init(MachineState *machine) { MachineClass *mc =3D MACHINE_GET_CLASS(machine); + const char *bios_name =3D machine->firmware ?: BIOS_FILENAME; const char *kernel_filename =3D machine->kernel_filename; const char *initrd_filename =3D machine->initrd_filename; char *filename; @@ -475,8 +475,6 @@ static void taihu_405ep_init(MachineState *machine) } else #endif { - if (bios_name =3D=3D NULL) - bios_name =3D BIOS_FILENAME; bios =3D g_new(MemoryRegion, 1); memory_region_init_rom(bios, NULL, "taihu_405ep.bios", BIOS_SIZE, &error_fatal); diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 4a0cb434a6..c6b9d1ddcb 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -237,6 +237,7 @@ static int prep_set_cmos_checksum(DeviceState *dev, voi= d *opaque) =20 static void ibm_40p_init(MachineState *machine) { + const char *bios_name =3D machine->firmware ?: "openbios-ppc"; CPUPPCState *env =3D NULL; uint16_t cmos_checksum; PowerPCCPU *cpu; @@ -271,9 +272,6 @@ static void ibm_40p_init(MachineState *machine) =20 /* PCI host */ dev =3D qdev_new("raven-pcihost"); - if (!bios_name) { - bios_name =3D "openbios-ppc"; - } qdev_prop_set_string(dev, "bios-name", bios_name); qdev_prop_set_uint32(dev, "elf-machine", PPC_ELF_MACHINE); pcihost =3D SYS_BUS_DEVICE(dev); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 12a012d9dd..cd8be98caf 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2657,6 +2657,7 @@ static void spapr_machine_init(MachineState *machine) SpaprMachineState *spapr =3D SPAPR_MACHINE(machine); SpaprMachineClass *smc =3D SPAPR_MACHINE_GET_CLASS(machine); MachineClass *mc =3D MACHINE_GET_CLASS(machine); + const char *bios_name =3D machine->firmware ?: FW_FILE_NAME; const char *kernel_filename =3D machine->kernel_filename; const char *initrd_filename =3D machine->initrd_filename; PCIHostState *phb; @@ -2980,9 +2981,6 @@ static void spapr_machine_init(MachineState *machine) } } =20 - if (bios_name =3D=3D NULL) { - bios_name =3D FW_FILE_NAME; - } filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (!filename) { error_report("Could not find LPAR firmware '%s'", bios_name); --=20 2.26.2