//! Delayed avail publication, late completion and reset based DMA return. use super::*; pub fn run(boot: &BootData, allocator: &mut memory::FrameAllocator) -> Result<(), &'static str> { let before = allocator.remaining_pages(); let mut disk = virtio_ro_turkfs::RoDisk::open( boot, allocator, "TURKOS/OS/K1515-GET")?; if disk.capacity() != 2048 { return Err("k1515-disk-capacity"); } disk.unanswered_then_late()?; disk.close_after_timeout(allocator)?; if allocator.remaining_pages() != before { return Err("k1515-timeout-frame-leak"); } let mut healthy = virtio_ro_turkfs::RoDisk::open( boot, allocator, "TURKOS/OS/K1515-GET")?; let mut data = [0xa5u8; 512]; healthy.read(1, &mut data)?; if data.iter().any(|&byte| byte != 0) { return Err("k1515-healthy-read-data"); } healthy.close(allocator)?; if allocator.remaining_pages() != before { return Err("k1515-healthy-frame-leak"); } write_line("TURKOS/OS/K1515-TIMEOUT: NO_AVAIL=TIMEOUT CANCEL=LIVE LATE=REJECTED RESET=ACK FRAMES=RETURNED FRESH=OK"); Ok(()) }