summaryrefslogtreecommitdiff
path: root/i386/i386/cpuboot.S
diff options
context:
space:
mode:
authorAlmuHS <almuhs@github.com>2019-04-21 18:21:24 +0200
committerAlmuHS <almuhs@github.com>2019-04-21 18:21:24 +0200
commitea4dd0d167d680ba65c74ae14b966701d56110d6 (patch)
tree2babbd3d5883e0726349724e9d7c137ac2289c8c /i386/i386/cpuboot.S
parent5940f892c7ccdadf0707f8758eae299ea343b09e (diff)
recovered interrupt stack
Diffstat (limited to 'i386/i386/cpuboot.S')
-rw-r--r--i386/i386/cpuboot.S20
1 files changed, 5 insertions, 15 deletions
diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S
index a39e59b2..18f19ed2 100644
--- a/i386/i386/cpuboot.S
+++ b/i386/i386/cpuboot.S
@@ -32,7 +32,7 @@ boot_gdt:
/* boot DS = 8 . Data segment*/
.word 0xffff /*Segment limit */
.word (-KERNELBASE) & 0xffff /*Base first 0-15 bits*/
- .byte ((-KERNELBASE) >> 16) & 0xff
+ .byte ((-KERNELBASE) >> 16) & 0xff
.byte 0x92 /*Access byte*/
.byte 0xcf /* High 4 bits */
.byte ((-KERNELBASE) >> 24) & 0xff /*Base 24-31 bits */
@@ -92,29 +92,17 @@ _apboot:
movw %ax,%es
movw %ax,%ss
-
movl stack_ptr, %esp
addl $STACK_SIZE, %esp
- /* Switch to our own interrupt stack. */
+ /* Switch to our own interrupt stack. */
movl $_intstack+INTSTACK_SIZE,%esp
+
/* Reset EFLAGS to a known state. */
pushl $0
popf
- /* Clear uninitialized data. */
- lea _edata,%edi
- lea _end,%ecx
- subl %edi,%ecx
- xorl %eax,%eax
- rep
- stosb
-
- /* Fix ifunc entries */
- movl $__rel_iplt_start,%esi
- movl $__rel_iplt_end,%edi
-
iplt_cont:
cmpl %edi,%esi
jae iplt_done
@@ -127,10 +115,12 @@ iplt_cont:
iplt_next:
addl $8,%esi
jmp iplt_cont
+
iplt_done:
pushl stack_ptr
call cpu_ap_main
+ .comm _intstack,INTSTACK_SIZE
cli