rust/timer/hpet: add basic HPET timer and HPETState

Add the HPETTimer and HPETState (HPET timer block), along with their
basic methods and register definitions.

This is in preparation for supporting the QAPI interfaces.

Note, wrap all items in HPETState that may be changed in the callback
called by C code into the BqlCell/BqlRefCell.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250210030051.2562726-9-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Zhao Liu
2025-02-13 12:51:34 +01:00
committed by Paolo Bonzini
parent 0534248a6b
commit 269a8f155c
3 changed files with 631 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+1
View File
@@ -8,3 +8,4 @@
//! Precision Event Timers) device in QEMU.
pub mod fw_cfg;
pub mod hpet;
+1
View File
@@ -64,3 +64,4 @@ typedef enum memory_order {
#include "chardev/char-serial.h"
#include "exec/memattrs.h"
#include "qemu/timer.h"
#include "exec/address-spaces.h"