mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 19:33:23 +00:00
Rename aster-frame to ostd
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
fb59fa7a55
commit
59350a8578
@ -3,7 +3,10 @@
|
||||
use alloc::{boxed::Box, sync::Arc};
|
||||
use core::mem::size_of;
|
||||
|
||||
use aster_frame::{
|
||||
use aster_rights::{ReadOp, WriteOp};
|
||||
use aster_util::{field_ptr, safe_ptr::SafePtr};
|
||||
use log::warn;
|
||||
use ostd::{
|
||||
bus::mmio::{
|
||||
bus::MmioDevice,
|
||||
device::{MmioCommonDevice, VirtioMmioVersion},
|
||||
@ -14,9 +17,6 @@ use aster_frame::{
|
||||
sync::RwLock,
|
||||
trap::IrqCallbackFunction,
|
||||
};
|
||||
use aster_rights::{ReadOp, WriteOp};
|
||||
use aster_util::{field_ptr, safe_ptr::SafePtr};
|
||||
use log::warn;
|
||||
|
||||
use super::{layout::VirtioMmioLayout, multiplex::MultiplexIrq};
|
||||
use crate::{
|
||||
@ -34,7 +34,7 @@ pub struct VirtioMmioDevice {
|
||||
pub struct VirtioMmioTransport {
|
||||
layout: SafePtr<VirtioMmioLayout, IoMem>,
|
||||
device: Arc<VirtioMmioDevice>,
|
||||
common_device: aster_frame::bus::mmio::device::MmioCommonDevice,
|
||||
common_device: ostd::bus::mmio::device::MmioCommonDevice,
|
||||
multiplex: Arc<RwLock<MultiplexIrq>>,
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
|
||||
use aster_frame::{
|
||||
use ostd::{
|
||||
bus::{
|
||||
mmio::{
|
||||
bus::{MmioDevice, MmioDriver},
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use alloc::sync::Arc;
|
||||
|
||||
use aster_frame::bus::mmio::MMIO_BUS;
|
||||
use ostd::bus::mmio::MMIO_BUS;
|
||||
use spin::Once;
|
||||
|
||||
use self::driver::VirtioMmioDriver;
|
||||
|
@ -3,13 +3,13 @@
|
||||
use alloc::{boxed::Box, sync::Arc, vec::Vec};
|
||||
use core::fmt::Debug;
|
||||
|
||||
use aster_frame::{
|
||||
use aster_rights::{ReadOp, TRightSet, WriteOp};
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::{
|
||||
io_mem::IoMem,
|
||||
sync::RwLock,
|
||||
trap::{IrqCallbackFunction, IrqLine, TrapFrame},
|
||||
};
|
||||
use aster_rights::{ReadOp, TRightSet, WriteOp};
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
|
||||
/// Multiplexing Irqs. The two interrupt types (configuration space change and queue interrupt)
|
||||
/// of the virtio-mmio device share the same IRQ, so `MultiplexIrq` are used to distinguish them.
|
||||
|
@ -3,8 +3,8 @@
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt::Debug;
|
||||
|
||||
use aster_frame::{io_mem::IoMem, mm::DmaCoherent, trap::IrqCallbackFunction};
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::{io_mem::IoMem, mm::DmaCoherent, trap::IrqCallbackFunction};
|
||||
|
||||
use self::{mmio::virtio_mmio_init, pci::virtio_pci_init};
|
||||
use crate::{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use alloc::sync::Arc;
|
||||
|
||||
use aster_frame::bus::pci::{
|
||||
use ostd::bus::pci::{
|
||||
capability::vendor::CapabilityVndrData,
|
||||
cfg_space::{Bar, IoBar, MemoryBar},
|
||||
common_device::BarManager,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aster_frame::io_mem::IoMem;
|
||||
use aster_util::safe_ptr::SafePtr;
|
||||
use ostd::io_mem::IoMem;
|
||||
use pod::Pod;
|
||||
|
||||
use super::capability::VirtioPciCapabilityData;
|
||||
|
@ -3,7 +3,9 @@
|
||||
use alloc::{boxed::Box, sync::Arc};
|
||||
use core::fmt::Debug;
|
||||
|
||||
use aster_frame::{
|
||||
use aster_util::{field_ptr, safe_ptr::SafePtr};
|
||||
use log::{info, warn};
|
||||
use ostd::{
|
||||
bus::{
|
||||
pci::{
|
||||
bus::PciDevice, capability::CapabilityData, common_device::PciCommonDevice, PciDeviceId,
|
||||
@ -15,8 +17,6 @@ use aster_frame::{
|
||||
offset_of,
|
||||
trap::IrqCallbackFunction,
|
||||
};
|
||||
use aster_util::{field_ptr, safe_ptr::SafePtr};
|
||||
use log::{info, warn};
|
||||
|
||||
use super::{common_cfg::VirtioPciCommonCfg, msix::VirtioMsixManager};
|
||||
use crate::{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
|
||||
use aster_frame::{
|
||||
use ostd::{
|
||||
bus::{
|
||||
pci::{
|
||||
bus::{PciDevice, PciDriver},
|
||||
|
@ -8,7 +8,7 @@ pub(super) mod msix;
|
||||
|
||||
use alloc::sync::Arc;
|
||||
|
||||
use aster_frame::bus::pci::PCI_BUS;
|
||||
use ostd::bus::pci::PCI_BUS;
|
||||
use spin::Once;
|
||||
|
||||
use self::driver::VirtioPciDriver;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use aster_frame::{bus::pci::capability::msix::CapabilityMsixData, trap::IrqLine};
|
||||
use ostd::{bus::pci::capability::msix::CapabilityMsixData, trap::IrqLine};
|
||||
|
||||
pub struct VirtioMsixManager {
|
||||
config_msix_vector: u16,
|
||||
@ -20,7 +20,7 @@ impl VirtioMsixManager {
|
||||
pub fn new(mut msix: CapabilityMsixData) -> Self {
|
||||
let mut msix_vector_list: Vec<u16> = (0..msix.table_size()).collect();
|
||||
for i in msix_vector_list.iter() {
|
||||
let irq = aster_frame::trap::IrqLine::alloc().unwrap();
|
||||
let irq = ostd::trap::IrqLine::alloc().unwrap();
|
||||
msix.set_interrupt_vector(irq, *i);
|
||||
}
|
||||
let config_msix_vector = msix_vector_list.pop().unwrap();
|
||||
|
Reference in New Issue
Block a user