aboutsummaryrefslogtreecommitdiff
path: root/rust/hw/char/pl011/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/hw/char/pl011/src/lib.rs')
-rw-r--r--rust/hw/char/pl011/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs
index 0a89d39..f30f985 100644
--- a/rust/hw/char/pl011/src/lib.rs
+++ b/rust/hw/char/pl011/src/lib.rs
@@ -106,6 +106,7 @@ pub mod registers {
//! Device registers exposed as typed structs which are backed by arbitrary
//! integer bitmaps. [`Data`], [`Control`], [`LineControl`], etc.
use bilge::prelude::*;
+ use qemu_api::impl_vmstate_bitsized;
/// Receive Status Register / Data Register common error bits
///
@@ -172,6 +173,7 @@ pub mod registers {
pub errors: Errors,
_reserved: u16,
}
+ impl_vmstate_bitsized!(Data);
impl Data {
// bilge is not very const-friendly, unfortunately
@@ -208,6 +210,7 @@ pub mod registers {
pub errors: Errors,
_reserved_unpredictable: u24,
}
+ impl_vmstate_bitsized!(ReceiveStatusErrorClear);
impl ReceiveStatusErrorClear {
pub fn set_from_data(&mut self, data: Data) {
@@ -280,6 +283,7 @@ pub mod registers {
pub ring_indicator: bool,
_reserved_zero_no_modify: u23,
}
+ impl_vmstate_bitsized!(Flags);
impl Flags {
pub fn reset(&mut self) {
@@ -354,6 +358,7 @@ pub mod registers {
/// 31:8 - Reserved, do not modify, read as zero.
_reserved_zero_no_modify: u24,
}
+ impl_vmstate_bitsized!(LineControl);
impl LineControl {
pub fn reset(&mut self) {
@@ -498,6 +503,7 @@ pub mod registers {
/// 31:16 - Reserved, do not modify, read as zero.
_reserved_zero_no_modify2: u16,
}
+ impl_vmstate_bitsized!(Control);
impl Control {
pub fn reset(&mut self) {