Skip to content

Commit

Permalink
kernel: clear direction flag on entry to kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
mosmeh committed Nov 1, 2024
1 parent 44d842a commit 7770803
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/boot.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.globl _start
_start:
cli
cld

# fill page table
movl $(PTE_PRESENT | PTE_WRITE | PTE_GLOBAL), %esi
Expand Down Expand Up @@ -97,6 +98,7 @@ read_eip:
.globl ap_trampoline_start, ap_trampoline_end
ap_trampoline_start:
cli
cld

xorw %ax, %ax
movw %ax, %ds
Expand Down
2 changes: 2 additions & 0 deletions kernel/interrupts/asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ isr_entry:
movw %ax, %fs
movw %ax, %gs

cld

movl %esp, %eax
pushl %eax

Expand Down

0 comments on commit 7770803

Please sign in to comment.