On Sat, Jan 25, 2025 at 1:32 PM Zhao Liu wrote:
fn read(&mut self, addr: hwaddr, _size: u32) -> u64 {
This can be &self.
let shift: u64 = (addr & 4) * 8;
+match addr {
+HPET_TN_CFG_REG => self.config >> shift, // including interrupt
capabilities
This
Implement QOM & QAPI support for HPET device.
Signed-off-by: Zhao Liu
---
Changes since RFC:
* Merge qdev.rs to hpet.rs.
* Apply memory and Resettable bindings.
* Consolidate inmutable &self and QOM casting.
* Prefer timer iterator over loop.
* Move init_mmio() and init_irq() to post_init().