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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user