Skip to content

Commit

Permalink
fix misaligned read
Browse files Browse the repository at this point in the history
  • Loading branch information
rdementi committed Nov 26, 2024
1 parent 53a2471 commit b0428a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b0428a3

Please sign in to comment.