add error log when opening dev/mem
Build on RHEL8 docker image / build (push) Failing after 14s
Build on RHEL9 docker image / build (push) Successful in 3m53s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m18s
Run Simulator Tests on local RHEL8 / build (push) Successful in 21m50s

This commit is contained in:
2026-05-29 17:46:12 +02:00
parent 2a3ac07aa7
commit b4ddb3b9b6
2 changed files with 7 additions and 1 deletions
@@ -18,6 +18,7 @@ void HardwareMemoryModel::mapToMemory() {
int fd = open("/dev/mem", O_RDWR | O_SYNC, 0);
if (fd == -1) {
LOG(logERROR) << "Can't open /dev/mem: " << strerror(errno);
throw std::runtime_error("Can't find /dev/mem");
}
@@ -52,6 +53,9 @@ void HardwareMemoryModel::unmapMemory() {
}
}
HardwareMemoryModel::~HardwareMemoryModel() { unmapMemory(); }
HardwareMemoryModel::~HardwareMemoryModel() {
LOG(logDEBUG1) << "HardwareMemoryModel destructor called, unmapping memory";
unmapMemory();
}
} // namespace sls