feature: virtio console support (#1113)

feat(virtio): add virtio console driver support

- Implement virtio console driver with TTY interface
- Add HVC device support for console output
- Update devfs to handle HVC devices
- Fix virtio driver registration and initialization
- Improve virtio net driver interrupt handling
- Clean up block device naming implementation
- Add clippy lint checks to multiple crates
- Fix slab allocator alignment issues
- Update QEMU run script for virtio consoleagonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
LoGin
2025-03-27 20:48:40 +08:00
committed by GitHub
parent 3d663af8a2
commit b6db20c072
31 changed files with 974 additions and 141 deletions

View File

@ -35,6 +35,10 @@ impl SlabAllocator {
Ok(nptr) => nptr.as_ptr(),
Err(AllocationError::OutOfMemory) => {
let boxed_page = ObjectPage::new();
assert_eq!(
(boxed_page.as_ref() as *const ObjectPage as usize) & (MMArch::PAGE_SIZE - 1),
0
);
let leaked_page = Box::leak(boxed_page);
self.zone
.refill(layout, leaked_page)