mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
arch/x86: fixed errors in gdt_flush and idt_flush
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:
parent
8dbc3e3122
commit
cb2a3ed83e
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue