diff options
author | dzwdz | 2021-07-10 16:17:07 +0200 |
---|---|---|
committer | dzwdz | 2021-07-10 16:17:07 +0200 |
commit | 1cc98d32bf344691c73fcc7b64e2ed2755f17ede (patch) | |
tree | e79afa2f1b6d24e9fe9be6280276a6134ea099f6 /platform | |
parent | 3fe1cfd4518ab8ace87d08796fe2f38d66598a1d (diff) |
update all segment registers when setting the GDT
not doing that caused interrupts to break on Bochs
Diffstat (limited to 'platform')
-rw-r--r-- | platform/boot.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/boot.s b/platform/boot.s index c2a06c3..d5bfda5 100644 --- a/platform/boot.s +++ b/platform/boot.s @@ -34,4 +34,14 @@ halt_cpu: 1: hlt jmp 1b +// temporary, will be moved to another file soon +.global change_cs +.type change_cs, @function +change_cs: + /* retf pops off the return address and code segment off the stack. + * it turns out that in the i386 cdecl calling convention they're in + * the correct place already. + */ + retf + .size _start, . - _start |