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
This commit is contained in:
Anthony Liguori 2013-03-19 08:01:07 -05:00
commit f7d42093a5
14 changed files with 74 additions and 8 deletions

View File

@ -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;

View File

@ -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;

24
hw/pc.h
View File

@ -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

View File

@ -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;

View File

@ -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+ */

View File

@ -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;

BIN
pc-bios/efi-e1000.rom Normal file

Binary file not shown.

BIN
pc-bios/efi-eepro100.rom Normal file

Binary file not shown.

BIN
pc-bios/efi-ne2k_pci.rom Normal file

Binary file not shown.

BIN
pc-bios/efi-pcnet.rom Normal file

Binary file not shown.

BIN
pc-bios/efi-rtl8139.rom Normal file

Binary file not shown.

BIN
pc-bios/efi-virtio.rom Normal file

Binary file not shown.

View File

@ -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

@ -1 +1 @@
Subproject commit 7aee315f61aaf1be6d2fff26339f28a1137231a5
Subproject commit 09c5109b8585178172c7608de8d52e9d9af0b680