aboutsummaryrefslogtreecommitdiff
path: root/mubios/arch
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-08 05:56:48 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-08 05:56:48 +0800
commit85ce9edd4ab33c9694ee5d4486a2a50a6442240b (patch)
treeea11457cd09a45b58948d8e1ff1270d768a1e9f2 /mubios/arch
parent33e4bf49511154ac126e36f0490a574d0e01275f (diff)
downloadrcc-project-85ce9edd4ab33c9694ee5d4486a2a50a6442240b.tar.gz
rcc-project-85ce9edd4ab33c9694ee5d4486a2a50a6442240b.tar.xz
[mubios] Enable IRQ0
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'mubios/arch')
-rw-r--r--mubios/arch/mode_switch.S6
-rw-r--r--mubios/arch/reset.S5
2 files changed, 8 insertions, 3 deletions
diff --git a/mubios/arch/mode_switch.S b/mubios/arch/mode_switch.S
index 575c78d..9b2643a 100644
--- a/mubios/arch/mode_switch.S
+++ b/mubios/arch/mode_switch.S
@@ -109,7 +109,7 @@ protected_mode_entry:
mov fs, ax
mov gs, ax
- mov esp, 0x00008000
+ mov esp, 0x00007000
call post_main
@@ -165,7 +165,7 @@ protected16_return:
# Leave protected mode while already using a 16-bit code segment.
mov eax, cr0
- and eax 0xFFFFFFFE
+ and eax, 0xFFFFFFFE
mov cr0, eax
# Jump to the prepared real-mode CS:IP pointer.
@@ -179,6 +179,8 @@ real_mode_return:
mov ds, ax
mov es, ax
mov ss, ax
+ mov fs, ax
+ mov gs, ax
mov sp, 0x7FFE
ret
diff --git a/mubios/arch/reset.S b/mubios/arch/reset.S
index 92dad17..0be8a05 100644
--- a/mubios/arch/reset.S
+++ b/mubios/arch/reset.S
@@ -40,8 +40,11 @@ reset_entry:
call enter_protected_mode
reset_halt:
+ sti
+
+reset_halt_loop:
hlt
- jmp reset_halt
+ jmp reset_halt_loop
.section .reset, "ax"