From: David Gibson <david@gibson.dropbear.id.au>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: philmd@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH 10/15] ppc: remove bios_name
Date: Tue, 27 Oct 2020 13:04:01 +1100 [thread overview]
Message-ID: <20201027020401.GF4671@yekko.fritz.box> (raw)
In-Reply-To: <20201026143028.3034018-11-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 8055 bytes --]
On Mon, Oct 26, 2020 at 10:30:23AM -0400, Paolo Bonzini wrote:
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 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 = false;
> - if (bios_name == NULL) {
> + if (machine->firmware == NULL) {
> if (machine->kernel_filename) {
> payload_name = machine->kernel_filename;
> kernel_as_payload = true;
> @@ -1043,7 +1043,7 @@ void ppce500_init(MachineState *machine)
> payload_name = "u-boot.e500";
> }
> } else {
> - payload_name = bios_name;
> + payload_name = machine->firmware;
> }
>
> filename = 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 = machine->ram_size;
> + const char *bios_name = machine->firmware ?: PROM_FILENAME;
> const char *kernel_filename = machine->kernel_filename;
> const char *kernel_cmdline = machine->kernel_cmdline;
> const char *initrd_filename = 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);
>
> - if (!bios_name) {
> - bios_name = PROM_FILENAME;
> - }
> filename = 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 = machine->ram_size;
> + const char *bios_name = machine->firmware ?: PROM_FILENAME;
> const char *boot_device = machine->boot_order;
> PowerPCCPU *cpu = NULL;
> CPUPPCState *env = NULL;
> @@ -130,9 +131,6 @@ static void ppc_heathrow_init(MachineState *machine)
> &error_fatal);
> memory_region_add_subregion(get_system_memory(), PROM_BASE, bios);
>
> - if (!bios_name) {
> - bios_name = PROM_FILENAME;
> - }
> filename = 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 d9e52873ea..f2b1ee83d3 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -713,6 +713,7 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon)
>
> static void pnv_init(MachineState *machine)
> {
> + const char *bios_name = machine->firmware ?: FW_FILE_NAME;
> PnvMachineState *pnv = PNV_MACHINE(machine);
> MachineClass *mc = MACHINE_GET_CLASS(machine);
> char *fw_filename;
> @@ -739,10 +740,6 @@ static void pnv_init(MachineState *machine)
> pnv->pnor = PNV_PNOR(dev);
>
> /* load skiboot firmware */
> - if (bios_name == NULL) {
> - bios_name = FW_FILE_NAME;
> - }
> -
> fw_filename = 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, uint32_t base)
> static void ref405ep_init(MachineState *machine)
> {
> MachineClass *mc = MACHINE_GET_CLASS(machine);
> + const char *bios_name = machine->firmware ?: BIOS_FILENAME;
> const char *kernel_filename = machine->kernel_filename;
> const char *kernel_cmdline = machine->kernel_cmdline;
> const char *initrd_filename = 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);
>
> - if (bios_name == NULL)
> - bios_name = BIOS_FILENAME;
> filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> if (filename) {
> bios_size = load_image_size(filename,
> @@ -425,6 +424,7 @@ static void taihu_cpld_init(MemoryRegion *sysmem, uint32_t base)
> static void taihu_405ep_init(MachineState *machine)
> {
> MachineClass *mc = MACHINE_GET_CLASS(machine);
> + const char *bios_name = machine->firmware ?: BIOS_FILENAME;
> const char *kernel_filename = machine->kernel_filename;
> const char *initrd_filename = machine->initrd_filename;
> char *filename;
> @@ -475,8 +475,6 @@ static void taihu_405ep_init(MachineState *machine)
> } else
> #endif
> {
> - if (bios_name == NULL)
> - bios_name = BIOS_FILENAME;
> bios = 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, void *opaque)
>
> static void ibm_40p_init(MachineState *machine)
> {
> + const char *bios_name = machine->firmware ?: "openbios-ppc";
> CPUPPCState *env = NULL;
> uint16_t cmos_checksum;
> PowerPCCPU *cpu;
> @@ -271,9 +272,6 @@ static void ibm_40p_init(MachineState *machine)
>
> /* PCI host */
> dev = qdev_new("raven-pcihost");
> - if (!bios_name) {
> - bios_name = "openbios-ppc";
> - }
> qdev_prop_set_string(dev, "bios-name", bios_name);
> qdev_prop_set_uint32(dev, "elf-machine", PPC_ELF_MACHINE);
> pcihost = SYS_BUS_DEVICE(dev);
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 63315f2d0f..667d59e5ad 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2647,6 +2647,7 @@ static void spapr_machine_init(MachineState *machine)
> SpaprMachineState *spapr = SPAPR_MACHINE(machine);
> SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
> MachineClass *mc = MACHINE_GET_CLASS(machine);
> + const char *bios_name = machine->firmware ?: FW_FILE_NAME;
> const char *kernel_filename = machine->kernel_filename;
> const char *initrd_filename = machine->initrd_filename;
> PCIHostState *phb;
> @@ -2970,9 +2971,6 @@ static void spapr_machine_init(MachineState *machine)
> }
> }
>
> - if (bios_name == NULL) {
> - bios_name = FW_FILE_NAME;
> - }
> filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> if (!filename) {
> error_report("Could not find LPAR firmware '%s'", bios_name);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-10-27 2:09 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 14:30 [PATCH 00/15] remove bios_name variable Paolo Bonzini
2020-10-26 14:30 ` [PATCH 01/15] alpha: remove bios_name Paolo Bonzini
2020-10-26 17:09 ` Alex Bennée
2020-10-26 18:11 ` Philippe Mathieu-Daudé
2020-10-26 14:30 ` [PATCH 02/15] digic: stash firmware into DigicState Paolo Bonzini
2020-10-26 14:44 ` Peter Maydell
2020-10-26 15:05 ` Paolo Bonzini
2020-10-26 14:30 ` [PATCH 03/15] arm: remove bios_name Paolo Bonzini
2020-10-26 17:11 ` Alex Bennée
2020-10-26 14:30 ` [PATCH 04/15] hppa: " Paolo Bonzini
2020-10-26 17:12 ` Alex Bennée
2020-10-26 18:11 ` Philippe Mathieu-Daudé
2020-10-26 14:30 ` [PATCH 05/15] i386: " Paolo Bonzini
2020-10-26 17:15 ` Alex Bennée
2020-10-26 14:30 ` [PATCH 06/15] lm32: " Paolo Bonzini
2020-10-26 17:15 ` Alex Bennée
2020-10-26 18:12 ` Philippe Mathieu-Daudé
2020-10-26 14:30 ` [PATCH 07/15] m68k: " Paolo Bonzini
2020-10-26 17:17 ` Alex Bennée
2020-10-26 18:13 ` Philippe Mathieu-Daudé
2020-10-26 18:54 ` Thomas Huth
2020-10-26 19:11 ` Laurent Vivier
2020-10-27 13:26 ` Paolo Bonzini
2020-10-26 14:30 ` [PATCH 08/15] mips: " Paolo Bonzini
2020-10-26 17:20 ` Alex Bennée
2020-10-27 14:40 ` Philippe Mathieu-Daudé
2020-10-26 14:30 ` [PATCH 09/15] moxie: " Paolo Bonzini
2020-10-26 17:20 ` Alex Bennée
2020-10-26 14:30 ` [PATCH 10/15] ppc: " Paolo Bonzini
2020-10-26 17:21 ` Alex Bennée
2020-10-27 2:04 ` David Gibson [this message]
2020-10-26 14:30 ` [PATCH 11/15] rx: move BIOS load from MCU to board Paolo Bonzini
2020-10-26 17:24 ` Alex Bennée
2020-10-26 17:34 ` Paolo Bonzini
2020-10-26 19:00 ` Philippe Mathieu-Daudé
2020-10-26 14:30 ` [PATCH 12/15] s390: remove bios_name Paolo Bonzini
2020-10-26 17:29 ` Alex Bennée
2020-10-26 18:58 ` Thomas Huth
2020-10-27 8:37 ` Cornelia Huck
2020-10-27 8:38 ` Christian Borntraeger
2020-10-27 13:26 ` Paolo Bonzini
2020-10-26 14:30 ` [PATCH 13/15] sh4: " Paolo Bonzini
2020-10-26 17:29 ` Alex Bennée
2020-10-26 18:56 ` Philippe Mathieu-Daudé
2020-10-26 14:30 ` [PATCH 14/15] sparc: " Paolo Bonzini
2020-10-26 17:30 ` Alex Bennée
2020-10-26 18:57 ` Philippe Mathieu-Daudé
2020-10-27 16:21 ` Mark Cave-Ayland
2020-10-26 14:30 ` [PATCH 15/15] vl: " Paolo Bonzini
2020-10-26 17:30 ` Alex Bennée
2020-10-27 14:22 ` Thomas Huth
2020-10-26 14:51 ` [PATCH 00/15] remove bios_name variable no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027020401.GF4671@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).