device: Add AArch64 RTC PL031 implementation

This commit adds the implementation for the AArch64 PL031
Real Time Clock (RTC) that provides a long time base counter. This
is achieved by generating an interrupt signal after counting a
programmed number of cycles of a real-time clock input. The AArch64
guest VM of the cloud-hypervisor will use this RTC to sync the time
in itself.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Henry Wang
2020-04-20 10:10:21 +08:00
committed by Rob Bradford
parent 625bab69bd
commit 5f9e079a03
2 changed files with 631 additions and 0 deletions
+5
View File
@@ -10,6 +10,8 @@ mod cmos;
#[cfg(feature = "fwdebug")]
mod fwdebug;
mod i8042;
#[cfg(target_arch = "aarch64")]
mod rtc_pl031;
mod serial;
#[cfg(feature = "cmos")]
@@ -18,3 +20,6 @@ pub use self::cmos::Cmos;
pub use self::fwdebug::FwDebugDevice;
pub use self::i8042::I8042Device;
pub use self::serial::Serial;
#[cfg(target_arch = "aarch64")]
pub use self::rtc_pl031::RTC;