mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 02:13:24 +00:00
License rust and c source files
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5fb8a9f7e5
commit
faaa4438d6
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use super::{id::Sid, BlockDevice};
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::{
|
||||
iter::Step,
|
||||
ops::{Add, Sub},
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use super::{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The block devices of Asterinas.
|
||||
//!
|
||||
//!This crate provides a number of base components for block devices, including
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub(crate) use alloc::collections::{BTreeMap, VecDeque};
|
||||
pub(crate) use alloc::string::String;
|
||||
pub(crate) use alloc::sync::Arc;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use super::{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The console device of Asterinas.
|
||||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The framebuffer of Asterinas.
|
||||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The input devices of Asterinas.
|
||||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::mem::size_of;
|
||||
|
||||
use align_ext::AlignExt;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::vec;
|
||||
use smoltcp::{phy, time::Instant};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
#![feature(trait_alias)]
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! This module provides abstractions for hardware-assisted timing mechanisms, encapsulated by the `ClockSource` struct.
|
||||
//! A `ClockSource` can be constructed from any counter with a stable frequency, enabling precise time measurements to be taken
|
||||
//! by retrieving instances of `Instant`.
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The system time of Asterinas.
|
||||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aster_frame::arch::x86::device::cmos::{get_century_register, CMOS_ADDRESS, CMOS_DATA};
|
||||
use core::sync::atomic::AtomicU8;
|
||||
use core::sync::atomic::Ordering::Relaxed;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! This module provide a instance of `ClockSource` based on TSC.
|
||||
//!
|
||||
//! Use `init` to initialize this module.
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::{
|
||||
fmt::Debug,
|
||||
hint::spin_loop,
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub mod device;
|
||||
|
||||
use aster_frame::io_mem::IoMem;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub mod config;
|
||||
pub mod device;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::fmt::Debug;
|
||||
|
||||
use crate::{device::VirtioDeviceError, queue::VirtQueue, transport::VirtioTransport};
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
// Modified from input.rs in virtio-drivers project
|
||||
//
|
||||
// MIT License
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use crate::queue::QueueError;
|
||||
use int_to_c_enum::TryFromInt;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use bitflags::bitflags;
|
||||
use int_to_c_enum::TryFromInt;
|
||||
use pod::Pod;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub mod config;
|
||||
pub mod device;
|
||||
pub mod header;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! The virtio of Asterinas.
|
||||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
//! Virtqueue
|
||||
|
||||
use crate::transport::VirtioTransport;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::{boxed::Box, sync::Arc};
|
||||
use aster_frame::{
|
||||
bus::mmio::{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
use aster_frame::{
|
||||
bus::{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::fmt::Debug;
|
||||
|
||||
use pod::Pod;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::sync::Arc;
|
||||
use aster_frame::bus::mmio::MMIO_BUS;
|
||||
use spin::Once;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::fmt::Debug;
|
||||
|
||||
use alloc::{boxed::Box, sync::Arc, vec::Vec};
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use core::fmt::Debug;
|
||||
|
||||
use alloc::boxed::Box;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::sync::Arc;
|
||||
use aster_frame::bus::pci::{
|
||||
capability::vendor::CapabilityVndrData,
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aster_frame::{
|
||||
bus::{
|
||||
pci::{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
use aster_frame::{
|
||||
bus::{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub mod capability;
|
||||
pub mod common_cfg;
|
||||
pub mod device;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use aster_frame::{bus::pci::capability::msix::CapabilityMsixData, trap::IrqLine};
|
||||
|
||||
|
Reference in New Issue
Block a user