mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 12:56:48 +00:00
Change IoMem directory
This commit is contained in:
parent
5f5be25e4a
commit
1f03955f51
@ -16,7 +16,7 @@ use component::{init_component, ComponentInitError};
|
||||
use font8x8::UnicodeFonts;
|
||||
use ostd::{
|
||||
boot::{boot_info, memory_region::MemoryRegionType},
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{VmIo, PAGE_SIZE},
|
||||
sync::SpinLock,
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ use aster_util::{field_ptr, safe_ptr::SafePtr};
|
||||
use bitflags::bitflags;
|
||||
use log::{debug, info};
|
||||
use ostd::{
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{DmaDirection, DmaStream, FrameAllocOptions, HasDaddr, VmIo, PAGE_SIZE},
|
||||
offset_of,
|
||||
sync::{LocalIrqDisabled, RwLock, SpinLock},
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
pub mod device;
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::{io_mem::IoMem, Pod};
|
||||
use ostd::{io::IoMem, Pod};
|
||||
|
||||
use crate::transport::VirtioTransport;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use bitflags::bitflags;
|
||||
use ostd::{io_mem::IoMem, mm::PodOnce, Pod};
|
||||
use ostd::{io::IoMem, mm::PodOnce, Pod};
|
||||
|
||||
use crate::transport::VirtioTransport;
|
||||
|
||||
|
@ -14,7 +14,7 @@ use ostd::{
|
||||
},
|
||||
pci::cfg_space::Bar,
|
||||
},
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{DmaCoherent, PAGE_SIZE},
|
||||
offset_of,
|
||||
sync::RwLock,
|
||||
|
@ -6,7 +6,7 @@ use core::fmt::Debug;
|
||||
use aster_rights::{ReadOp, TRightSet, WriteOp};
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::{
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
sync::RwLock,
|
||||
trap::{IrqCallbackFunction, IrqLine, TrapFrame},
|
||||
};
|
||||
|
@ -7,7 +7,7 @@ use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::{
|
||||
arch::device::io_port::{PortRead, PortWrite},
|
||||
bus::pci::cfg_space::Bar,
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{DmaCoherent, PodOnce},
|
||||
trap::IrqCallbackFunction,
|
||||
Pod,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::{io_mem::IoMem, Pod};
|
||||
use ostd::{io::IoMem, Pod};
|
||||
|
||||
use super::capability::VirtioPciCapabilityData;
|
||||
use crate::transport::pci::capability::VirtioPciCpabilityType;
|
||||
|
@ -13,7 +13,7 @@ use ostd::{
|
||||
},
|
||||
BusProbeError,
|
||||
},
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::DmaCoherent,
|
||||
offset_of,
|
||||
trap::IrqCallbackFunction,
|
||||
|
@ -10,7 +10,7 @@ use ostd::{
|
||||
pci::{capability::CapabilityData, cfg_space::Bar, common_device::PciCommonDevice},
|
||||
BusProbeError,
|
||||
},
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{DmaCoherent, HasDaddr, PAGE_SIZE},
|
||||
trap::IrqCallbackFunction,
|
||||
};
|
||||
|
@ -6,7 +6,7 @@ use core::sync::atomic::{AtomicU64, Ordering};
|
||||
|
||||
use spin::Once;
|
||||
|
||||
use crate::{arch::boot::DEVICE_TREE, io_mem::IoMem};
|
||||
use crate::{arch::boot::DEVICE_TREE, io::IoMem};
|
||||
|
||||
/// The timer frequency (Hz). Here we choose 1000Hz since 1000Hz is easier for unit conversion and
|
||||
/// convenient for timer. What's more, the frequency cannot be set too high or too low, 1000Hz is
|
||||
|
@ -7,7 +7,7 @@ use log::info;
|
||||
|
||||
use super::VIRTIO_MMIO_MAGIC;
|
||||
use crate::{
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{
|
||||
paddr_to_vaddr,
|
||||
page_prop::{CachePolicy, PageFlags},
|
||||
|
@ -7,7 +7,7 @@ use log::info;
|
||||
|
||||
use super::VIRTIO_MMIO_MAGIC;
|
||||
use crate::{
|
||||
io_mem::IoMem,
|
||||
device::io_mem::IoMem,
|
||||
mm::{paddr_to_vaddr, Paddr, VmIo},
|
||||
trap::IrqLine,
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ use bitflags::bitflags;
|
||||
use super::PciDeviceLocation;
|
||||
use crate::{
|
||||
arch::device::io_port::{PortRead, PortWrite},
|
||||
io_mem::IoMem,
|
||||
io::IoMem,
|
||||
mm::{
|
||||
page_prop::{CachePolicy, PageFlags},
|
||||
PodOnce, VmIoOnce,
|
||||
|
12
ostd/src/io/mod.rs
Normal file
12
ostd/src/io/mod.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! Device I/O access and corresponding allocator.
|
||||
//!
|
||||
//! This module allows device drivers to access the device I/O they need
|
||||
//! through _allocators_. There are two types of device I/O:
|
||||
//! - `IoMem` for memory I/O (MMIO).
|
||||
//! - `IoPort` for port I/O (PIO).
|
||||
|
||||
mod io_mem;
|
||||
|
||||
pub use self::io_mem::IoMem;
|
@ -31,8 +31,8 @@ pub mod bus;
|
||||
pub mod collections;
|
||||
pub mod console;
|
||||
pub mod cpu;
|
||||
pub mod io;
|
||||
mod error;
|
||||
pub mod io_mem;
|
||||
pub mod logger;
|
||||
pub mod mm;
|
||||
pub mod panic;
|
||||
|
Loading…
x
Reference in New Issue
Block a user