License rust and c source files

This commit is contained in:
Jianfeng Jiang
2024-01-03 03:22:36 +00:00
committed by Tate, Hongliang Tian
parent 5fb8a9f7e5
commit faaa4438d6
559 changed files with 1192 additions and 89 deletions

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::{
fmt::Debug,
hint::spin_loop,

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
pub mod device;
use aster_frame::io_mem::IoMem;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use aster_frame::io_mem::IoMem;
use aster_util::safe_ptr::SafePtr;
use pod::Pod;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::hint::spin_loop;
use alloc::{boxed::Box, fmt::Debug, string::ToString, sync::Arc, vec::Vec};

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
pub mod config;
pub mod device;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::fmt::Debug;
use crate::{device::VirtioDeviceError, queue::VirtQueue, transport::VirtioTransport};

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
// Modified from input.rs in virtio-drivers project
//
// MIT License

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use crate::queue::QueueError;
use int_to_c_enum::TryFromInt;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use aster_frame::io_mem::IoMem;
use aster_network::EthernetAddr;
use aster_util::safe_ptr::SafePtr;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::{fmt::Debug, hint::spin_loop, mem::size_of};
use alloc::{boxed::Box, string::ToString, sync::Arc, vec::Vec};

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use bitflags::bitflags;
use int_to_c_enum::TryFromInt;
use pod::Pod;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
pub mod config;
pub mod device;
pub mod header;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! The virtio of Asterinas.
#![no_std]
#![forbid(unsafe_code)]

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! Virtqueue
use crate::transport::VirtioTransport;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use alloc::{boxed::Box, sync::Arc};
use aster_frame::{
bus::mmio::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use alloc::{sync::Arc, vec::Vec};
use aster_frame::{
bus::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::fmt::Debug;
use pod::Pod;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use alloc::sync::Arc;
use aster_frame::bus::mmio::MMIO_BUS;
use spin::Once;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::fmt::Debug;
use alloc::{boxed::Box, sync::Arc, vec::Vec};

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::fmt::Debug;
use alloc::boxed::Box;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use alloc::sync::Arc;
use aster_frame::bus::pci::{
capability::vendor::CapabilityVndrData,

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use aster_frame::io_mem::IoMem;
use aster_util::safe_ptr::SafePtr;
use pod::Pod;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use aster_frame::{
bus::{
pci::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use alloc::{sync::Arc, vec::Vec};
use aster_frame::{
bus::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
pub mod capability;
pub mod common_cfg;
pub mod device;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use alloc::vec::Vec;
use aster_frame::{bus::pci::capability::msix::CapabilityMsixData, trap::IrqLine};