code clean-up & tracing in mmu

This commit is contained in:
Folkert van Heusden 2025-04-15 21:12:44 +02:00
parent 631c251c08
commit 5c3ddfcf3a
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

12
mmu.cpp
View file

@ -150,6 +150,7 @@ bool mmu::get_use_data_space(const int run_mode) const
void mmu::clearMMR1() void mmu::clearMMR1()
{ {
TRACE("clear MMR1");
MMR1 = 0; MMR1 = 0;
} }
@ -376,20 +377,9 @@ void mmu::verify_page_access(const uint16_t virt_addr, const int run_mode, const
TRACE("MMR0: %06o", temp); TRACE("MMR0: %06o", temp);
} }
if (trap_action == T_TRAP_250) {
TRACE("Page access %d (for virtual address %06o): trap 0250", access_control, virt_addr); TRACE("Page access %d (for virtual address %06o): trap 0250", access_control, virt_addr);
c->trap(0250); // trap
throw 5;
}
else { // T_ABORT_4
TRACE("Page access %d (for virtual address %06o): trap 004", access_control, virt_addr);
c->trap(0250); // abort c->trap(0250); // abort
throw 5; throw 5;
}
} }
void mmu::verify_access_valid(const uint32_t m_offset, const int run_mode, const bool d, const int apf, const bool is_io, const bool is_write) void mmu::verify_access_valid(const uint32_t m_offset, const int run_mode, const bool d, const int apf, const bool is_io, const bool is_write)