On Sat, Jan 25, 2025 at 1:32 PM Zhao Liu <zhao1....@intel.com> wrote:
@@ -5,6 +5,7 @@ edition = "2021" authors = ["Zhao Liu <zhao1....@intel.com>"] license = "GPL-2.0-or-later" description = "IA-PC High Precision Event Timer emulation in Rust"
Please add rust-version = "1.63.0" here.
+ // SAFETY: all accesses go through these methods, which guarantee + // that the accesses are protected by the BQL. + let fw_cfg = unsafe { &mut hpet_fw_cfg };
Clippy complains about references to static mut; use let mut fw_cfg = unsafe { *addr_of_mut!(hpet_fw_cfg) }; to make it happy; same below in update_hpet_cfg(). Paolo