feat: userspace linker script at 0x10000, proper ELF segment loading, full disk boot pipeline working

- Userspace linker script: apps/servers link at 0x10000 (user VA)
- Adapter linker script: kernel links at 0x80200000 (S-mode)
- Each uses build.rs to emit its own -T flag, global config only sets panic=abort
- ELF loader: page-aligns segment mappings, handles non-aligned vaddrs
- Stack: 4 pages (16K) mapped below program
- SP set to top of stack (0x10000), not bottom
- FAT16 disk image forced (mformat was creating FAT32)
- End-to-end verified: VirtIO → FAT16 → ELF → userspace → ecall → exit
This commit is contained in:
2026-10-18 04:51:07 +02:00
parent 924baede9e
commit 29cd0e7dfe
7 changed files with 122 additions and 33 deletions

View File

@@ -7,10 +7,6 @@ pub mod shutdown;
pub mod supervisor;
pub fn run() -> ! {
let create_cap = types::bounded::CapSlot::new(0)
.unwrap_or_else(|| unreachable!());
let result = boot::boot(&manifest::SNAKE_MANIFEST, create_cap);
let mut sup = boot::create_supervisor(&manifest::SNAKE_MANIFEST, &result);
sup.run(create_cap);
// Phase 1: just prove we can run from disk and exit cleanly
userspace::syscall::exit();
}