mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
arch/x86: fixed errors in gdt_flush and idt_flush
Build Documentation / build-html (push) Has been cancelled
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user