-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathlib.rs
More file actions
34 lines (28 loc) · 938 Bytes
/
lib.rs
File metadata and controls
34 lines (28 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#![no_std]
#![feature(naked_functions)]
#![feature(doc_cfg)]
#![feature(asm_const)]
#![feature(exclusive_range_pattern)]
#![doc = include_str!("../README.md")]
#[macro_use]
extern crate log;
mod context_frame;
#[macro_use]
mod exception_utils;
mod exception;
mod pcpu;
mod smc;
mod vcpu;
pub use self::pcpu::Aarch64PerCpu;
pub use self::vcpu::{Aarch64VCpu, Aarch64VCpuCreateConfig};
/// context frame for aarch64
pub type TrapFrame = context_frame::Aarch64ContextFrame;
/// Return if current platform support virtualization extension.
pub fn has_hardware_support() -> bool {
// Hint:
// In Cortex-A78, we can use
// [ID_AA64MMFR1_EL1](https://developer.arm.com/documentation/101430/0102/Register-descriptions/AArch64-system-registers/ID-AA64MMFR1-EL1--AArch64-Memory-Model-Feature-Register-1--EL1)
// to get whether Virtualization Host Extensions is supported.
// Current just return true by default.
true
}