From ba0d5aa993df4bad28b2a6a36c10b43c7e5c33f2 Mon Sep 17 00:00:00 2001 From: Petr Borsodi Date: Tue, 15 Jan 2019 13:06:19 +0000 Subject: [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 --- src/util/Option/ROM.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util/Option') diff --git a/src/util/Option/ROM.pm b/src/util/Option/ROM.pm index 232cf16b8..48d92dda0 100644 --- a/src/util/Option/ROM.pm +++ b/src/util/Option/ROM.pm @@ -508,9 +508,9 @@ sub new { device_list => { offset => 0x08, length => 0x02, pack => "S" }, struct_length => { offset => 0x0a, length => 0x02, pack => "S" }, struct_revision =>{ offset => 0x0c, length => 0x01, pack => "C" }, - base_class => { offset => 0x0d, length => 0x01, pack => "C" }, + prog_intf => { offset => 0x0d, length => 0x01, pack => "C" }, sub_class => { offset => 0x0e, length => 0x01, pack => "C" }, - prog_intf => { offset => 0x0f, length => 0x01, pack => "C" }, + base_class => { offset => 0x0f, length => 0x01, pack => "C" }, image_length => { offset => 0x10, length => 0x02, pack => "S" }, revision => { offset => 0x12, length => 0x02, pack => "S" }, code_type => { offset => 0x14, length => 0x01, pack => "C" }, -- cgit v1.2.3-55-g7522