summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-22 21:21:55 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-22 21:21:55 +0100
commitb395eb639cbf800a24c0631835069eb8629d58f8 (patch)
tree05ff915686c1debf5510796087a4f03c606ee5a1 /i386/i386at
parenta04ce77f750f1655c17394adcdb7919e8f50f5cb (diff)
Fix early interrupt crash
* i386/i386at/model_dep.c (i386at_init): Move int_stack_high assignation to before setting up interrupts.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/model_dep.c10
1 files changed, 5 insertions, 5 deletions
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);
}
/*