Check for SIGSEGVs from DR Cache code too.

This commit is contained in:
gbeauche 2004-05-31 10:08:31 +00:00
parent a533a9c455
commit 389dd61d0d

View File

@ -902,7 +902,7 @@ static sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv
const uint32 pc = cpu->pc();
// Fault in Mac ROM or RAM?
bool mac_fault = (pc >= ROM_BASE) && (pc < (ROM_BASE + ROM_AREA_SIZE)) || (pc >= RAMBase) && (pc < (RAMBase + RAMSize));
bool mac_fault = (pc >= ROM_BASE) && (pc < (ROM_BASE + ROM_AREA_SIZE)) || (pc >= RAMBase) && (pc < (RAMBase + RAMSize)) || (pc >= DR_CACHE_BASE && pc < (DR_CACHE_BASE + DR_CACHE_SIZE));
if (mac_fault) {
// "VM settings" during MacOS 8 installation
@ -922,6 +922,12 @@ static sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
else if (pc == ROM_BASE + 0x4a10a0 && (cpu->gpr(20) == 0xf3012002 || cpu->gpr(20) == 0xf3012000))
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
// MacOS 8.6 serial drivers on startup (with DR Cache and OldWorld ROM)
else if ((pc - DR_CACHE_BASE) < DR_CACHE_SIZE && (cpu->gpr(16) == 0xf3012002 || cpu->gpr(16) == 0xf3012000))
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
else if ((pc - DR_CACHE_BASE) < DR_CACHE_SIZE && (cpu->gpr(20) == 0xf3012002 || cpu->gpr(20) == 0xf3012000))
return SIGSEGV_RETURN_SKIP_INSTRUCTION;
// Ignore writes to the zero page
else if ((uint32)(addr - SheepMem::ZeroPage()) < (uint32)SheepMem::PageSize())