mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-02-04 02:51:18 +01:00
immediately terminate in OO, use 2MB swap handler
This commit is contained in:
@@ -114,7 +114,7 @@ static void SwapHandler(int sig, void* raw_context) {
|
||||
if (auto const it = std::ranges::find_if(swap_regions, [addr = mctx.mc_addr](auto const& e) {
|
||||
return uintptr_t(addr) >= uintptr_t(e.first) && uintptr_t(addr) < uintptr_t(e.first) + e.second;
|
||||
}); it != swap_regions.end()) {
|
||||
size_t const page_size = 4096 * 8; //16K
|
||||
size_t const page_size = 0x200000; //2M
|
||||
size_t const page_mask = ~(page_size - 1);
|
||||
// should replace the existing mapping... ugh
|
||||
void* aligned_addr = reinterpret_cast<void*>(uintptr_t(mctx.mc_addr) & page_mask);
|
||||
@@ -149,7 +149,6 @@ void* AllocateMemoryPages(std::size_t size) noexcept {
|
||||
off_t offset = 0;
|
||||
ASSERT(sceKernelAllocateDirectMemory(0, ORBIS_KERNEL_MAIN_DMEM_SIZE, len, align, ORBIS_KERNEL_WB_ONION, &offset) == 0);
|
||||
ASSERT(sceKernelMapDirectMemory(&addr, len, ORBIS_KERNEL_PROT_CPU_RW, 0, offset, len) == 0);
|
||||
ASSERT(sceKernelMprotect(addr, len, VM_PROT_ALL) == 0);
|
||||
LOG_WARNING(HW_Memory, "Using DMem for {} bytes area @ {}", len, addr);
|
||||
ASSERT(addr != nullptr);
|
||||
} else {
|
||||
|
||||
@@ -87,6 +87,9 @@ void DynarmicCallbacks32::InterpreterFallback(u32 pc, std::size_t num_instructio
|
||||
LOG_ERROR(Core_ARM,
|
||||
"Unimplemented instruction @ {:#X} for {} instructions (instr = {:08X})", pc,
|
||||
num_instructions, m_memory.Read32(pc));
|
||||
#ifdef __OPENORBIS__
|
||||
std::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
void DynarmicCallbacks32::ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) {
|
||||
@@ -307,10 +310,6 @@ void ArmDynarmic32::MakeJit(Common::PageTable* page_table) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#ifdef __OPENORBIS__
|
||||
config.unsafe_optimizations = false;
|
||||
config.optimizations = Dynarmic::no_optimizations;
|
||||
#endif
|
||||
m_jit.emplace(config);
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,11 @@ void DynarmicCallbacks64::InterpreterFallback(u64 pc, std::size_t num_instructio
|
||||
m_parent.LogBacktrace(m_process);
|
||||
LOG_ERROR(Core_ARM, "Unimplemented instruction @ {:#X} for {} instructions (instr = {:08X})", pc,
|
||||
num_instructions, m_memory.Read32(pc));
|
||||
#ifdef __OPENORBIS__
|
||||
std::abort();
|
||||
#else
|
||||
ReturnException(pc, PrefetchAbort);
|
||||
#endif
|
||||
}
|
||||
|
||||
void DynarmicCallbacks64::InstructionCacheOperationRaised(Dynarmic::A64::InstructionCacheOperation op, u64 value) {
|
||||
@@ -357,10 +361,6 @@ void ArmDynarmic64::MakeJit(Common::PageTable* page_table, std::size_t address_s
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#ifdef __OPENORBIS__
|
||||
config.unsafe_optimizations = false;
|
||||
config.optimizations = Dynarmic::no_optimizations;
|
||||
#endif
|
||||
m_jit.emplace(config);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user