more userspace stuff

This commit is contained in:
2026-07-01 20:00:22 -05:00
parent af6c1c94cf
commit b6ee4fc3de
21 changed files with 161 additions and 121 deletions

View File

@@ -20,8 +20,8 @@ io_wait:
liftoff:
cli
mov 4(%esp), %ecx
mov 8(%esp), %ebx
mov 4(%esp), %ecx
mov 8(%esp), %ebx
mov $0x23, %ax
mov %ax, %ds
@@ -29,15 +29,20 @@ liftoff:
mov %ax, %fs
mov %ax, %gs
push $0x23
push %ebx
push $0x202
push $0x1B
push %ecx
pushl $0x23 # User Data Segment (SS)
pushl %ebx # User Stack Pointer (ESP)
pushl $0x202 # EFLAGS (Interrupts enabled, bit 1 standard)
pushl $0x1B # User Code Segment (CS)
pushl %ecx # User Entry Point (EIP)
xor %eax, %eax
xor %ebx, %ebx
xor %ecx, %ecx
xor %edx, %edx
xor %esi, %esi
xor %edi, %edi
xor %ebp, %ebp
iret
.global outb
@@ -121,5 +126,3 @@ outsw:
fetch_cr3:
mov %cr3, %eax
ret
.global set_cr3