From 7d2cb5a7c07a1e255dc17732101defe5367e973f Mon Sep 17 00:00:00 2001 From: Stefanos Kornilios Mitsis Poiitidis Date: Mon, 10 Aug 2015 05:01:57 +0200 Subject: [PATCH] vmem: Correctly map buffers > 16M The previous implementation would generate pointers with the offset doubly-added, pointing to +16M after the correct address --- core/hw/mem/_vmem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hw/mem/_vmem.cpp b/core/hw/mem/_vmem.cpp index a90db602a..bf2f8d347 100644 --- a/core/hw/mem/_vmem.cpp +++ b/core/hw/mem/_vmem.cpp @@ -336,7 +336,7 @@ void _vmem_map_block(void* base,u32 start,u32 end,u32 mask) u32 j=0; for (u32 i=start;i<=end;i++) { - _vmem_MemInfo_ptr[i]=&(((u8*)base)[j]) + FindMask(mask); + _vmem_MemInfo_ptr[i]=&(((u8*)base)[j&mask]) + FindMask(mask) - (j & mask); j+=0x1000000; } }