mirror of https://github.com/PCSX2/pcsx2.git
Linux: Fix the SysPageFaultExceptionFilter so that it aligns to the pagesize.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@640 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6f10835725
commit
cecc7cbe73
|
@ -48,17 +48,17 @@ void ReleaseLinuxExceptionHandler()
|
|||
// Code this later.
|
||||
}
|
||||
|
||||
static const uint m_pagemask = getpagesize()-1;
|
||||
|
||||
// Linux implementation of SIGSEGV handler. Bind it using sigaction().
|
||||
// This is my shot in the dark. Probably needs some work. Good luck! (air)
|
||||
void SysPageFaultExceptionFilter( int signal, siginfo_t *info, void * )
|
||||
{
|
||||
int err;
|
||||
|
||||
//DevCon::Error("SysPageFaultExceptionFilter!");
|
||||
// get bad virtual address
|
||||
u32 offset = (u8*)info->si_addr - psM;
|
||||
|
||||
uptr offset = (u8*)info->si_addr - psM;
|
||||
|
||||
DevCon::Status( "Protected memory cleanup. Offset 0x%x", params offset );
|
||||
|
||||
if (offset>=Ps2MemSize::Base)
|
||||
|
@ -67,11 +67,10 @@ void SysPageFaultExceptionFilter( int signal, siginfo_t *info, void * )
|
|||
// Instigate a crash or abort emulation or something.
|
||||
assert( false );
|
||||
}
|
||||
|
||||
mmap_ClearCpuBlock( offset );
|
||||
|
||||
mmap_ClearCpuBlock( offset & m_pagemask );
|
||||
}
|
||||
|
||||
|
||||
// For issuing notices to both the status bar and the console at the same time.
|
||||
// Single-line text only please! Mutli-line msgs should be directed to the
|
||||
// console directly, thanks.
|
||||
|
@ -961,8 +960,6 @@ void SysMunmap(uptr base, u32 size)
|
|||
munmap((uptr*)base, size);
|
||||
}
|
||||
|
||||
static const int m_pagemask = getpagesize()-1;
|
||||
|
||||
void SysMemProtect( void* baseaddr, size_t size, PageProtectionMode mode, bool allowExecution )
|
||||
{
|
||||
int lnxmode = 0;
|
||||
|
|
Loading…
Reference in New Issue