rust/timer/hpet: add basic HPET timer and HPETState
authorZhao Liu <zhao1.liu@intel.com>
Mon, 10 Feb 2025 03:00:49 +0000 (11:00 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 13 Feb 2025 11:51:34 +0000 (12:51 +0100)
commit269a8f155c7265488945e60ef0cae77556017ddd
tree11d3dba08934c1835cf5043b05d8ef0581edfa1c
parent0534248a6b515cb4dea29a6fd6c256dc77f2a953
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>
rust/hw/timer/hpet/src/hpet.rs [new file with mode: 0644]
rust/hw/timer/hpet/src/lib.rs
rust/wrapper.h