check that no interrupts are pending before entering the wfi wait
This commit is contained in:
parent
a92b84bef4
commit
5f6d462973
|
@ -175,9 +175,9 @@ public:
|
|||
|
||||
void wait_until(uint64_t flags) override {
|
||||
SCCDEBUG(owner->name()) << "Sleeping until interrupt";
|
||||
do {
|
||||
while(this->reg.pending_trap == 0 && (this->csr[arch::mip] & this->csr[arch::mie]) == 0) {
|
||||
sc_core::wait(wfi_evt);
|
||||
} while (this->reg.pending_trap == 0);
|
||||
}
|
||||
PLAT::wait_until(flags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue