simplify the end of entry.S
This commit is contained in:
parent
5e08357827
commit
5c292b3d71
1 changed files with 8 additions and 9 deletions
17
entry.S
17
entry.S
|
@ -51,15 +51,14 @@ entry:
|
||||||
orl $(CR0_PG|CR0_WP), %eax
|
orl $(CR0_PG|CR0_WP), %eax
|
||||||
movl %eax, %cr0
|
movl %eax, %cr0
|
||||||
|
|
||||||
# now switch to using addresses above KERNBASE
|
# Set up the stack pointer.
|
||||||
# call addresses are pc-relative so we jump though this hoop:
|
|
||||||
mov $relocated, %eax
|
|
||||||
jmp *%eax
|
|
||||||
relocated:
|
|
||||||
# Set up the stack pointer and call into C.
|
|
||||||
movl $(stack + STACK), %esp
|
movl $(stack + STACK), %esp
|
||||||
call main
|
|
||||||
spin:
|
# Call main(), which switches to executing at
|
||||||
jmp spin
|
# high addresses. The indirect call is needed because
|
||||||
|
# the assembler produces a PC-relative instruction
|
||||||
|
# for a direct call.
|
||||||
|
mov $main, %eax
|
||||||
|
jmp *%eax
|
||||||
|
|
||||||
.comm stack, STACK
|
.comm stack, STACK
|
||||||
|
|
Loading…
Reference in a new issue