diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-19 08:01:07 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-19 08:01:07 -0500 |
commit | f7d42093a5e54d48cab62695a374806d4303bd6b (patch) | |
tree | be377aeae12583eb265dadb8e437f9f9fa5cc7d8 | |
parent | c8a6ae8bb95477d5ac11d9b491b603b2d190a96e (diff) | |
parent | c45e5b5b30ac1f5505725a7b36e68cedfce4f01f (diff) |
Merge remote-tracking branch 'kraxel/ipxe.2' into staging
# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/ipxe.2:
Switch to efi-enabled nic roms by default
Add efi rom binaries
Add Makefile rules to build nic rom binaries with efi support
Update ipxe submodule to latest master
Add Makefile rules to build nic rom binaries
-rw-r--r-- | hw/e1000.c | 2 | ||||
-rw-r--r-- | hw/ne2000.c | 2 | ||||
-rw-r--r-- | hw/pc.h | 24 | ||||
-rw-r--r-- | hw/pcnet-pci.c | 2 | ||||
-rw-r--r-- | hw/rtl8139.c | 2 | ||||
-rw-r--r-- | hw/virtio-pci.c | 2 | ||||
-rw-r--r-- | pc-bios/efi-e1000.rom | bin | 0 -> 174080 bytes | |||
-rw-r--r-- | pc-bios/efi-eepro100.rom | bin | 0 -> 175104 bytes | |||
-rw-r--r-- | pc-bios/efi-ne2k_pci.rom | bin | 0 -> 173568 bytes | |||
-rw-r--r-- | pc-bios/efi-pcnet.rom | bin | 0 -> 173568 bytes | |||
-rw-r--r-- | pc-bios/efi-rtl8139.rom | bin | 0 -> 177152 bytes | |||
-rw-r--r-- | pc-bios/efi-virtio.rom | bin | 0 -> 171008 bytes | |||
-rw-r--r-- | roms/Makefile | 46 | ||||
m--------- | roms/ipxe | 0 |
14 files changed, 73 insertions, 7 deletions
diff --git a/hw/e1000.c b/hw/e1000.c index 80b6ee3c1a..3f18041b47 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1378,7 +1378,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 7dadc1cea7..7f458311c6 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; @@ -212,7 +212,7 @@ 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),\ @@ -221,6 +221,26 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t); .property = "vectors",\ /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string */\ .value = stringify(0xFFFFFFFF),\ - } + },{\ + .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 55f80ca671..61af57ed51 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 786b875c58..9369507422 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 d65f0851a6..f3ece78954 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -1071,7 +1071,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; diff --git a/pc-bios/efi-e1000.rom b/pc-bios/efi-e1000.rom Binary files differnew file mode 100644 index 0000000000..7dfcea364a --- /dev/null +++ b/pc-bios/efi-e1000.rom diff --git a/pc-bios/efi-eepro100.rom b/pc-bios/efi-eepro100.rom Binary files differnew file mode 100644 index 0000000000..e5134a2fe5 --- /dev/null +++ b/pc-bios/efi-eepro100.rom diff --git a/pc-bios/efi-ne2k_pci.rom b/pc-bios/efi-ne2k_pci.rom Binary files differnew file mode 100644 index 0000000000..8aa11c370d --- /dev/null +++ b/pc-bios/efi-ne2k_pci.rom diff --git a/pc-bios/efi-pcnet.rom b/pc-bios/efi-pcnet.rom Binary files differnew file mode 100644 index 0000000000..200b5d298e --- /dev/null +++ b/pc-bios/efi-pcnet.rom diff --git a/pc-bios/efi-rtl8139.rom b/pc-bios/efi-rtl8139.rom Binary files differnew file mode 100644 index 0000000000..8bcd3c79c6 --- /dev/null +++ b/pc-bios/efi-rtl8139.rom diff --git a/pc-bios/efi-virtio.rom b/pc-bios/efi-virtio.rom Binary files differnew file mode 100644 index 0000000000..25c5c6998d --- /dev/null +++ b/pc-bios/efi-virtio.rom diff --git a/roms/Makefile b/roms/Makefile index 5e645bc7d1..3dc560921d 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -1,5 +1,30 @@ vgabios_variants := stdvga cirrus vmware qxl +pxerom_variants := e1000 eepro100 ne2k_pci pcnet rtl8139 virtio + +pxe-rom-e1000 efi-rom-e1000 : VID := 8086 +pxe-rom-e1000 efi-rom-e1000 : DID := 100e +pxe-rom-eepro100 efi-rom-eepro100 : VID := 8086 +pxe-rom-eepro100 efi-rom-eepro100 : DID := 1209 +pxe-rom-ne2k_pci efi-rom-ne2k_pci : VID := 1050 +pxe-rom-ne2k_pci efi-rom-ne2k_pci : DID := 0940 +pxe-rom-pcnet efi-rom-pcnet : VID := 1022 +pxe-rom-pcnet efi-rom-pcnet : DID := 2000 +pxe-rom-rtl8139 efi-rom-rtl8139 : VID := 10ec +pxe-rom-rtl8139 efi-rom-rtl8139 : DID := 8139 +pxe-rom-virtio efi-rom-virtio : VID := 1af4 +pxe-rom-virtio efi-rom-virtio : DID := 1000 + +# +# EfiRom utility is shipped with edk2 / tianocore, in BaseTools/ +# +# We need that to combine multiple images (legacy bios, +# efi ia32, efi x64) into a single rom binary. +# +# We try to find it in the path. You can also pass the location on +# the command line, i.e. "make EFIROM=/path/to/EfiRom efirom" +# +EFIROM ?= $(shell which EfiRom 2>/dev/null) default: @echo "nothing is build by default" @@ -7,6 +32,9 @@ default: @echo " bios -- update bios.bin (seabios)" @echo " seavgabios -- update vgabios binaries (seabios)" @echo " lgplvgabios -- update vgabios binaries (lgpl)" + @echo " pxerom -- update nic roms (bios only)" + @echo " efirom -- update nic roms (bios+efi, this needs" + @echo " the EfiRom utility from edk2 / tianocore)" bios: config.seabios sh configure-seabios.sh $< @@ -26,3 +54,21 @@ lgplvgabios: $(patsubst %,lgplvgabios-%,$(vgabios_variants)) lgplvgabios-%: make -C vgabios vgabios-$*.bin cp vgabios/VGABIOS-lgpl-latest.$*.bin ../pc-bios/vgabios-$*.bin + +pxerom: $(patsubst %,pxe-rom-%,$(pxerom_variants)) + +pxe-rom-%: + make -C ipxe/src bin/$(VID)$(DID).rom + cp ipxe/src/bin/$(VID)$(DID).rom ../pc-bios/pxe-$*.rom + +efirom: $(patsubst %,efi-rom-%,$(pxerom_variants)) + +efi-rom-%: + make -C ipxe/src bin/$(VID)$(DID).rom + make -C ipxe/src bin-i386-efi/$(VID)$(DID).efidrv + make -C ipxe/src bin-x86_64-efi/$(VID)$(DID).efidrv + $(EFIROM) -f "0x$(VID)" -i "0x$(DID)" -l 0x02 \ + -b ipxe/src/bin/$(VID)$(DID).rom \ + -ec ipxe/src/bin-i386-efi/$(VID)$(DID).efidrv \ + -ec ipxe/src/bin-x86_64-efi/$(VID)$(DID).efidrv \ + -o ../pc-bios/efi-$*.rom diff --git a/roms/ipxe b/roms/ipxe -Subproject 7aee315f61aaf1be6d2fff26339f28a1137231a +Subproject 09c5109b8585178172c7608de8d52e9d9af0b68 |