From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 5/5] Switch to efi-enabled nic roms by default
Date: Mon, 4 Mar 2013 11:07:33 +0100 [thread overview]
Message-ID: <1362391653-22287-6-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1362391653-22287-1-git-send-email-kraxel@redhat.com>
All PCI nics are switched to EFI-enabled roms by default. They are
composed from three images (legacy, efi ia32 & efi x86), so classic
pxe booting will continue to work.
Exception: eepro100 is not switched, it uses a single rom for all
emulated eepro100 variants, then goes patch the rom header on the
fly with the correct PCI IDs. I doubt that will work as-is with
the efi roms.
Keep old roms for 1.4+older machine types via compat properties,
needed because the efi-enabled roms are larger so the pci rom bar
size would change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/e1000.c | 2 +-
hw/ne2000.c | 2 +-
hw/pc.h | 24 ++++++++++++++++++++++--
hw/pcnet-pci.c | 2 +-
hw/rtl8139.c | 2 +-
hw/virtio-pci.c | 2 +-
6 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index d6fe815..c95304f 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1353,7 +1353,7 @@ static void e1000_class_init(ObjectClass *klass, void *data)
k->init = pci_e1000_init;
k->exit = pci_e1000_uninit;
- k->romfile = "pxe-e1000.rom";
+ k->romfile = "efi-e1000.rom";
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = E1000_DEVID;
k->revision = 0x03;
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 3dd1c84..ba86701 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -766,7 +766,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)
k->init = pci_ne2000_init;
k->exit = pci_ne2000_exit;
- k->romfile = "pxe-ne2k_pci.rom",
+ k->romfile = "efi-ne2k_pci.rom",
k->vendor_id = PCI_VENDOR_ID_REALTEK;
k->device_id = PCI_DEVICE_ID_REALTEK_8029;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
diff --git a/hw/pc.h b/hw/pc.h
index da1b102..30b0cf5 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -212,10 +212,30 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
.driver = "ide-drive",\
.property = "discard_granularity",\
.value = stringify(0),\
- },{\
+ },{\
.driver = "virtio-blk-pci",\
.property = "discard_granularity",\
.value = stringify(0),\
- }
+ },{\
+ .driver = "e1000",\
+ .property = "romfile",\
+ .value = "pxe-e1000.rom",\
+ },{\
+ .driver = "ne2k_pci",\
+ .property = "romfile",\
+ .value = "pxe-ne2k_pci.rom",\
+ },{\
+ .driver = "pcnet",\
+ .property = "romfile",\
+ .value = "pxe-pcnet.rom",\
+ },{\
+ .driver = "rtl8139",\
+ .property = "romfile",\
+ .value = "pxe-rtl8139.rom",\
+ },{\
+ .driver = "virtio-net-pci",\
+ .property = "romfile",\
+ .value = "pxe-virtio.rom",\
+ }
#endif
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index df63b22..e89e5fa 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -351,7 +351,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data)
k->init = pci_pcnet_init;
k->exit = pci_pcnet_uninit;
- k->romfile = "pxe-pcnet.rom",
+ k->romfile = "efi-pcnet.rom",
k->vendor_id = PCI_VENDOR_ID_AMD;
k->device_id = PCI_DEVICE_ID_AMD_LANCE;
k->revision = 0x10;
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index d7716be..fc2c7f1 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3530,7 +3530,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data)
k->init = pci_rtl8139_init;
k->exit = pci_rtl8139_uninit;
- k->romfile = "pxe-rtl8139.rom";
+ k->romfile = "efi-rtl8139.rom";
k->vendor_id = PCI_VENDOR_ID_REALTEK;
k->device_id = PCI_DEVICE_ID_REALTEK_8139;
k->revision = RTL8139_PCI_REVID; /* >=0x20 is for 8139C+ */
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index a869f53..e24b20f 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -1137,7 +1137,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
k->init = virtio_net_init_pci;
k->exit = virtio_net_exit_pci;
- k->romfile = "pxe-virtio.rom";
+ k->romfile = "efi-virtio.rom";
k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
k->revision = VIRTIO_PCI_ABI_VERSION;
--
1.7.9.7
next prev parent reply other threads:[~2013-03-04 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 10:07 [Qemu-devel] [PATCH 0/5] ipxe: add efi support Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 1/5] Add Makefile rules to build nic rom binaries Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 2/5] Update ipxe submodule to latest master Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 3/5] Add Makefile rules to build nic rom binaries with efi support Gerd Hoffmann
2013-03-04 10:07 ` [Qemu-devel] [PATCH 4/5] Add efi rom binaries Gerd Hoffmann
2013-03-04 10:07 ` Gerd Hoffmann [this message]
2013-03-04 13:33 ` [Qemu-devel] [PATCH 0/5] ipxe: add efi support Anthony Liguori
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=1362391653-22287-6-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@us.ibm.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).