mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 23:22:12 -06:00
rust/timer/hpet: define hpet_fw_cfg
Define HPETFwEntry structure with the same memory layout as hpet_fw_entry in C. Further, define the global hpet_cfg variable in Rust which is the same as the C version. This hpet_cfg variable in Rust will replace the C version one and allows both Rust code and C code to access it. The Rust version of hpet_cfg is self-contained, avoiding unsafe access to C code. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250210030051.2562726-8-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
eadb83f9a3
commit
0534248a6b
9 changed files with 132 additions and 2 deletions
10
rust/hw/timer/hpet/src/lib.rs
Normal file
10
rust/hw/timer/hpet/src/lib.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2024 Intel Corporation.
|
||||
// Author(s): Zhao Liu <zhai1.liu@intel.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
//! # HPET QEMU Device Model
|
||||
//!
|
||||
//! This library implements a device model for the IA-PC HPET (High
|
||||
//! Precision Event Timers) device in QEMU.
|
||||
|
||||
pub mod fw_cfg;
|
Loading…
Add table
Add a link
Reference in a new issue