From: Paul Cercueil Date: Sun, 12 Jun 2022 15:05:02 +0000 (+0100) Subject: lightrec: Fix unmap size of BIOS X-Git-Tag: r24l~452^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14a530af588848d3606e1f6ac3d18e3eb1b5ca3c;p=pcsx_rearmed.git lightrec: Fix unmap size of BIOS The BIOS was mapped as 2 MiB, since we want to use a huge page if possible. Therefore it should also be unmapped as 2 MiB, otherwise the upper 1.5 MiB will still be mapped after de-init, which will make it impossible to map the BIOS once again. Signed-off-by: Paul Cercueil --- diff --git a/libpcsxcore/lightrec/mem.c b/libpcsxcore/lightrec/mem.c index ff67e3d0..c0186da1 100644 --- a/libpcsxcore/lightrec/mem.c +++ b/libpcsxcore/lightrec/mem.c @@ -190,7 +190,7 @@ int lightrec_init_mmap(void) err_unmap_scratch: munmap(psxH, 0x10000); err_unmap_bios: - munmap(psxR, 0x80000); + munmap(psxR, 0x200000); err_unmap_parallel: munmap(psxP, 0x10000); err_unmap: @@ -205,7 +205,7 @@ void lightrec_free_mmap(void) munmap(code_buffer, CODE_BUFFER_SIZE); munmap(psxH, 0x10000); - munmap(psxR, 0x80000); + munmap(psxR, 0x200000); munmap(psxP, 0x10000); for (i = 0; i < 4; i++) munmap((void *)((uintptr_t)psxM + i * 0x200000), 0x200000);