mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix readHostBar throwing errors when BAR is correct
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
66569cf9c4
commit
ad2619cba5
1 changed files with 3 additions and 2 deletions
|
@ -367,11 +367,12 @@ uint32_t Device::readHostBar(unsigned barNum) const {
|
|||
if (std::sscanf(line.c_str(), "%llx %llx %llx", &start, &end, &flags) != 3)
|
||||
throw SystemError("Failed to parse BAR line");
|
||||
|
||||
if (end > start)
|
||||
if (end <= start) {
|
||||
throw SystemError("Invalid BAR: start={}, end={}", start, end);
|
||||
}
|
||||
|
||||
log->debug("Host BAR: start={:#x}, end={:#x}, size={:#x}, flags={:#x}", start,
|
||||
end, end - start, flags);
|
||||
end, end - start + 1, flags);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue