arch/x86: fixed errors in gdt_flush and idt_flush
Build Documentation / build-html (push) Has been cancelled

This commit fixes logic errors in both GDT and IDT flushing mechanisms for the x86 platform.

Signed-off-by: cqb <cqb@sideways.engineering>.
This commit is contained in:
cqb
2026-02-01 23:11:25 +01:00
committed by Xiang Xiao
parent 8dbc3e3122
commit cb2a3ed83e
+2 -2
View File
@@ -57,7 +57,7 @@
.type gdt_flush, @function
gdt_flush:
movl %eax, 4(%esp) /* Get the pointer to the GDT, passed as a parameter */
movl 4(%esp), %eax /* Get the pointer to the GDT, passed as a parameter */
lgdt (%eax) /* Load the new GDT pointer */
mov $KSEG, %ax /* KSEG is the offset in the GDT to our data segment */
@@ -77,7 +77,7 @@ gdt_flush:
.type idt_flush, @function
idt_flush:
movl %eax, 4(%esp) /* Get the pointer to the IDT, passed as a parameter */
movl 4(%esp), %eax /* Get the pointer to the IDT, passed as a parameter */
lidt (%eax) /* Load the IDT pointer */
ret
.size idt_flush, . - idt_flush