From e499d74b6f0b57f9a11486c346dbc335e4f8433d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 9 Mar 2015 22:06:59 +0100 Subject: Update README --- src/kernel/dev/v86.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/kernel/dev/v86.c') diff --git a/src/kernel/dev/v86.c b/src/kernel/dev/v86.c index 68bc375..183b791 100644 --- a/src/kernel/dev/v86.c +++ b/src/kernel/dev/v86.c @@ -207,17 +207,12 @@ void v86_ex_handler(registers_t *regs) { } void v86_pf_handler(void* zero, registers_t *regs, void* addr) { - if (addr < (void*)V86_STACK_TOP) { - pd_map_page(addr, (uint32_t)addr / PAGE_SIZE, true); - } else { - dbg_printf("Unexpected V86 PF at 0x%p\n", addr); + dbg_printf("Unexpected V86 PF at 0x%p\n", addr); - if (current_thread->user_ex_handler == v86_ex_handler) { - // we are in V86 thread - v86_exit_thread(false); - } else { - PANIC("V86 memory access exception."); - } + if (current_thread == v86_thread) { + v86_exit_thread(false); + } else { + PANIC("V86 memory access exception."); } } -- cgit v1.2.3