From b0428a3db230dbcefb811e27c900c348dd0c9b8f Mon Sep 17 00:00:00 2001 From: Roman Dementiev Date: Tue, 26 Nov 2024 12:38:25 +0100 Subject: [PATCH] fix misaligned read --- src/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pci.h b/src/pci.h index ec44e99f..d7c03264 100644 --- a/src/pci.h +++ b/src/pci.h @@ -261,8 +261,8 @@ void processDVSEC(MatchFunc matchFunc, ProcessFunc processFunc) // std::cerr << "Intel device scan. found " << std::hex << group << ":" << bus << ":" << device << ":" << function << " " << device_id << std::dec; uint32 status{0}; PciHandleType h(group, bus, device, function); - h.read32(6, &status); // read status - if (status & 0x10) // has capability list + h.read32(4, &status); // read status + if (status & 0x100000) // has capability list { // std::cerr << "Intel device scan. found "<< std::hex << group << ":" << bus << ":" << device << ":" << function << " " << device_id << " with capability list\n" << std::dec; VSEC header;