summaryrefslogtreecommitdiffstats
path: root/src/util/efirom.c
diff options
context:
space:
mode:
authorPetr Borsodi2019-01-15 14:06:19 +0100
committerMichael Brown2019-01-15 14:08:44 +0100
commitba0d5aa993df4bad28b2a6a36c10b43c7e5c33f2 (patch)
tree8900aba5da38bfbcbd2aa1c31acb426cf580fa47 /src/util/efirom.c
parent[build] Handle R_X86_64_PLT32 from binutils 2.31 (diff)
downloadipxe-ba0d5aa993df4bad28b2a6a36c10b43c7e5c33f2.tar.gz
ipxe-ba0d5aa993df4bad28b2a6a36c10b43c7e5c33f2.tar.xz
ipxe-ba0d5aa993df4bad28b2a6a36c10b43c7e5c33f2.zip
[pci] Correct invalid base-class/sub-class/prog-if order in PCIR
PCI Configuration Space contains fields prog-if at the offset 0x09, sub-class at the offset 0x0a and base-class at the offset 0x0b (it respects little endian). PCIR structure uses these fields in the same order. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util/efirom.c')
-rw-r--r--src/util/efirom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/efirom.c b/src/util/efirom.c
index 943a6691..93cd79fe 100644
--- a/src/util/efirom.c
+++ b/src/util/efirom.c
@@ -149,7 +149,7 @@ static void make_efi_rom ( FILE *pe, FILE *rom, struct options *opts ) {
headers->pci.VendorId = opts->vendor;
headers->pci.DeviceId = opts->device;
headers->pci.Length = sizeof ( headers->pci );
- headers->pci.ClassCode[0] = PCI_CLASS_NETWORK;
+ headers->pci.ClassCode[2] = PCI_CLASS_NETWORK;
headers->pci.ImageLength = ( rom_size / 512 );
headers->pci.CodeType = 0x03; /* No constant in EFI headers? */
headers->pci.Indicator = 0x80; /* No constant in EFI headers? */