From ec40992498997848492a6c2e9025df23c1327cd1 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 19 Feb 2014 19:55:50 +0800 Subject: [PATCH] Kernel/x86 - Reference issues --- KernelLand/Kernel/arch/x86/vm8086.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/KernelLand/Kernel/arch/x86/vm8086.c b/KernelLand/Kernel/arch/x86/vm8086.c index c1c48ce3..93ea63ae 100644 --- a/KernelLand/Kernel/arch/x86/vm8086.c +++ b/KernelLand/Kernel/arch/x86/vm8086.c @@ -96,13 +96,16 @@ int VM8086_Install(char **Arguments) // Map ROM Area for(i=0xA0;i<0x100;i++) { + MM_RefPhys(i * 0x1000); MM_Map( (void*)(i * 0x1000), i * 0x1000 ); } + MM_RefPhys(0); MM_Map( (void*)0, 0 ); // IVT / BDA if( MM_GetRefCount(0x00000) > 2 ) { Log_Notice("VM8086", "Ok, who's touched the IVT? (%i)", MM_GetRefCount(0x00000)); } + MM_RefPhys(0x9F000); MM_Map( (void*)0x9F000, 0x9F000 ); // Stack / EBDA if( MM_GetRefCount(0x9F000) > 2 ) { Log_Notice("VM8086", "And who's been playing with my EBDA? (%i)", @@ -222,6 +225,7 @@ void VM8086_GPF(tRegs *Regs) { if( !gpVM8086_State->Internal->AllocatedPages[i].VirtBase ) continue ; + MM_RefPhys( gpVM8086_State->Internal->AllocatedPages[i].PhysAddr ); MM_Map( (tPage*)VM8086_USER_BASE + i, gpVM8086_State->Internal->AllocatedPages[i].PhysAddr ); } -- 2.20.1