Expand description
Minimal Ring 3 test task for Strat9-OS.
Creates a user address space with a tiny machine code blob that:
- Calls SYS_DEBUG_LOG to print βHello Ring 3!β to serial
- Calls SYS_PROC_EXIT to cleanly exit
This tests the full SYSCALL/SYSRET pipeline without needing an ELF loader.
ConstantsΒ§
- USER_
CODE_ πADDR - User code virtual address (must be in lower half, page-aligned).
- USER_
STACK_ πADDR - User stack virtual address (page-aligned).
- USER_
STACK_ πTOP - User stack top (stack grows down, so this is base + 4096).
StaticsΒ§
- USER_
TASK_ πAS - Static storage for the user address space (accessed by the trampoline).
FunctionsΒ§
- create_
user_ test_ task - Create and schedule a minimal Ring 3 test task.
- ring3_
trampoline π - Trampoline that switches to user address space and does IRETQ to Ring 3.
- write_
user_ πcode - Write the user-mode test program into the code page.