x86: code cleanup
This commit is contained in:
parent
084bdd18a2
commit
869a68af63
|
@ -26,11 +26,11 @@ __arch_setgdt:
|
|||
/* load the GDT */
|
||||
lgdt (%rcx)
|
||||
|
||||
/* apply the GDT */
|
||||
push $0x8
|
||||
lea gdt_flush, %rax
|
||||
push %rax
|
||||
retf
|
||||
|
||||
gdt_flush:
|
||||
mov $0x10, %ax
|
||||
mov %ax, %ds
|
||||
|
|
|
@ -9,9 +9,4 @@
|
|||
|
||||
# include "../i386/gdt.h"
|
||||
|
||||
|
||||
/* public */
|
||||
/* prototypes */
|
||||
int _arch_setgdt64(GDT const * gdt, size_t count);
|
||||
|
||||
#endif /* !UKERNEL_ARCH_I386_GDT_H */
|
||||
#endif /* !UKERNEL_ARCH_AMD64_GDT_H */
|
||||
|
|
|
@ -24,6 +24,7 @@ __arch_setgdt:
|
|||
shl $0x3, %eax
|
||||
dec %eax
|
||||
mov %ax, (%ecx)
|
||||
|
||||
/* load the GDT */
|
||||
lgdt (gdt_descriptor)
|
||||
|
||||
|
@ -34,7 +35,7 @@ __arch_setgdt:
|
|||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
mov %ax, %ss
|
||||
ljmp $0x08, $gdt_flush
|
||||
ljmp $0x8, $gdt_flush
|
||||
gdt_flush:
|
||||
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue
Block a user