mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Adjust RISC-V's implementation for recent changes
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b097060c5e
commit
14b8c48859
@ -54,6 +54,14 @@ pub fn read_tsc() -> u64 {
|
||||
riscv::register::time::read64()
|
||||
}
|
||||
|
||||
/// Reads a hardware generated 64-bit random value.
|
||||
///
|
||||
/// Returns None if no random value was generated.
|
||||
pub fn read_random() -> Option<u64> {
|
||||
// FIXME: Implement a hardware random number generator on RISC-V platforms.
|
||||
None
|
||||
}
|
||||
|
||||
pub(crate) fn enable_cpu_features() {
|
||||
unsafe {
|
||||
riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Clean);
|
||||
|
Reference in New Issue
Block a user