Skip to content

Commit d33e7cd

Browse files
committed
Fix: Set stack segment to zero again
A non-zero stack segment yields to exceptions iretq.
1 parent 3a6a6ed commit d33e7cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stage_4.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# This stage calls into Rust code, passing various values as arguments.
66

77
stage_4:
8+
mov bx, 0x0
9+
mov ss, bx # set stack segment
10+
call_load_elf:
811
# call load_elf with kernel start address, size, and memory map as arguments
912
movabs rdi, 0x400000 # move absolute 64-bit to register
1013
mov rsi, _kib_kernel_size

0 commit comments

Comments
 (0)