From b395eb639cbf800a24c0631835069eb8629d58f8 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 22 Nov 2009 21:21:55 +0100 Subject: Fix early interrupt crash * i386/i386at/model_dep.c (i386at_init): Move int_stack_high assignation to before setting up interrupts. --- i386/i386at/model_dep.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'i386/i386at') diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 37f43f4..4ba617c 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -335,6 +335,11 @@ i386at_init(void) set_cr0(get_cr0() | CR0_PG | CR0_WP); flush_instr_queue(); + /* Interrupt stacks are allocated in physical memory, + while kernel stacks are allocated in kernel virtual memory, + so phys_last_addr serves as a convenient dividing point. */ + int_stack_high = phystokv(phys_last_addr); + /* * Initialize and activate the real i386 protected-mode structures. */ @@ -357,11 +362,6 @@ i386at_init(void) as the interrupt stack for now. Later this will have to change, because the init stack will get freed after bootup. */ asm("movl %%esp,%0" : "=m" (int_stack_top)); - - /* Interrupt stacks are allocated in physical memory, - while kernel stacks are allocated in kernel virtual memory, - so phys_last_addr serves as a convenient dividing point. */ - int_stack_high = phystokv(phys_last_addr); } /* -- cgit v1.2.3