diff options
author | Thomas Huth <thuth@redhat.com> | 2023-05-12 14:40:20 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-05-22 09:44:22 +0200 |
commit | 053b7086274487c31a136940c75a665211bc2b4a (patch) | |
tree | 8b14ae9f728a6abef32905d419bbdb6d3e195c45 /hw/ppc/ppc440_bamboo.c | |
parent | 26a0802d1ccbf3c3c659f3d2641cf7deef0e70ac (diff) | |
download | qemu-053b7086274487c31a136940c75a665211bc2b4a.zip qemu-053b7086274487c31a136940c75a665211bc2b4a.tar.gz qemu-053b7086274487c31a136940c75a665211bc2b4a.tar.bz2 |
hw/ppc: Use MachineClass->default_nic in the ppc machines
Mark the default NIC via the new MachineClass->default_nic setting
so that the machine-defaults code in vl.c can decide whether the
default NIC is usable or not (for example when compiling with the
"--without-default-devices" configure switch).
Message-Id: <20230512124033.502654-6-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/ppc/ppc440_bamboo.c')
-rw-r--r-- | hw/ppc/ppc440_bamboo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 2880c81..f969fa3 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -161,6 +161,7 @@ static void bamboo_init(MachineState *machine) { const char *kernel_filename = machine->kernel_filename; const char *initrd_filename = machine->initrd_filename; + MachineClass *mc = MACHINE_GET_CLASS(machine); unsigned int pci_irq_nrs[4] = { 28, 27, 26, 25 }; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *isa = g_new(MemoryRegion, 1); @@ -246,7 +247,7 @@ static void bamboo_init(MachineState *machine) * There are no PCI NICs on the Bamboo board, but there are * PCI slots, so we can pick whatever default model we want. */ - pci_nic_init_nofail(&nd_table[i], pcibus, "e1000", NULL); + pci_nic_init_nofail(&nd_table[i], pcibus, mc->default_nic, NULL); } } @@ -296,6 +297,7 @@ static void bamboo_machine_init(MachineClass *mc) mc->init = bamboo_init; mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("440epb"); mc->default_ram_id = "ppc4xx.sdram"; + mc->default_nic = "e1000"; } DEFINE_MACHINE("bamboo", bamboo_machine_init) |