feat: devices via caps (BootInfo, init assigns devices, drivers map MMIO/DMA themselves, IRQ-driven input); drop boot device wiring and info pages; headless display fallback

This commit is contained in:
2026-10-27 12:28:39 +01:00
parent 8bc5402a29
commit 694c675a40
39 changed files with 731 additions and 387 deletions

View File

@@ -25,16 +25,23 @@ fn shared_buf() -> &'static mut [u8] {
pub fn run() -> ! {
libkos::println!("storage: started");
let device = driver_block_virtio::VirtioBlockDevice::new();
let ep = types::bounded::CapSlot::new(0).unwrap();
// Init hands over the disk before asking for anything.
let Some(device) = libkos::device::receive_device(ep)
.mmio
.and_then(driver_block_virtio::VirtioBlockDevice::new)
else {
libkos::println!("storage: no block device, exiting");
syscall::exit();
};
let fat16 = fs::fat16::Fat16::mount(device);
if fat16.is_none() {
libkos::println!("storage: FAT16 mount failed");
loop { syscall::yield_now(); }
libkos::println!("storage: FAT16 mount failed, exiting");
syscall::exit();
}
let mut fat16 = fat16.unwrap();
libkos::println!("storage: FAT16 mounted");
let ep = types::bounded::CapSlot::new(0).unwrap();
let mut next = syscall::receive_msg(ep);
loop {