diff options
author | AlmuHS <almuhs@github.com> | 2019-05-21 00:07:46 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-05-21 00:07:46 +0200 |
commit | a3abd9442168f15322a1b64ce75b60ce1ca81c15 (patch) | |
tree | 12a466739e4710575c3b1f03992249922648aa43 | |
parent | 182f0c9e89b623dd8f93ea5de60d1c93c7987090 (diff) |
improve: moved flush sentences before stack loading
-rw-r--r-- | i386/i386/cpuboot.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S index e5b7d543..95d40e61 100644 --- a/i386/i386/cpuboot.S +++ b/i386/i386/cpuboot.S @@ -103,6 +103,7 @@ _apboot: jz nopae setpae: + //set_cr4(get_cr4() | CR4_PAE); movl %cr4, %eax orl $CR4_PAE, %eax movl %eax, %cr4 @@ -148,6 +149,13 @@ nopae: #endif /* MACH_HYP */ +//flush_instr_queue(); + jmp 0f +0: + //flush_tlb(); + mov %cr3, %eax + mov %eax, %cr3 + movl stack_ptr, %esp addl $STACK_SIZE, %esp @@ -158,13 +166,6 @@ nopae: pushl stack_ptr - //flush_instr_queue - jmp 0f -0: - //flush_tlb(); - mov %cr3, %eax - mov %eax, %cr3 - call cpu_ap_main cli |