Changed jump label in gdt_load
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
.global gdt_load
|
.global gdt_load
|
||||||
.type gdt_load, @function
|
.type gdt_load, @function
|
||||||
|
|
||||||
|
# gdt_load(struct gdt_ptr *gdtp)
|
||||||
|
# Loads GDTR with the specified GDT pointer.
|
||||||
|
# Expects entries 1 and 2 (offsets 0x08 and 0x10) to be kernel
|
||||||
|
# code and kernel data respectively.
|
||||||
gdt_load:
|
gdt_load:
|
||||||
pushq %rbp
|
pushq %rbp
|
||||||
movq %rsp, %rbp
|
movq %rsp, %rbp
|
||||||
@@ -16,13 +20,13 @@ gdt_load:
|
|||||||
mov %ax, %fs
|
mov %ax, %fs
|
||||||
mov %ax, %gs
|
mov %ax, %gs
|
||||||
|
|
||||||
movabsq $(gdt_load2), %rax
|
movabsq $(1f), %rax
|
||||||
|
|
||||||
push $0x08
|
push $0x08
|
||||||
push %rax
|
push %rax
|
||||||
|
|
||||||
lretq
|
lretq
|
||||||
|
|
||||||
gdt_load2:
|
1:
|
||||||
popq %rbp
|
popq %rbp
|
||||||
ret
|
ret
|
||||||
|
|||||||
Reference in New Issue
Block a user