diff options
author | Bernhard Beschow <shentey@gmail.com> | 2025-06-15 13:20:36 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-20 13:25:59 +0200 |
commit | b783601d1a3b3fd468035baf0ce2ead166e0abdc (patch) | |
tree | 6c5c100dcf6b3c9df2d136b133706506eeda5faa /rust/hw | |
parent | 1563f287dc9c4bc6a50d380095e966ac039ac24a (diff) | |
download | qemu-b783601d1a3b3fd468035baf0ce2ead166e0abdc.zip qemu-b783601d1a3b3fd468035baf0ce2ead166e0abdc.tar.gz qemu-b783601d1a3b3fd468035baf0ce2ead166e0abdc.tar.bz2 |
rust: pl011: Add missing logging to match C version
Co-developed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Link: https://lore.kernel.org/r/20250615112037.11992-4-shentey@gmail.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw')
-rw-r--r-- | rust/hw/char/pl011/src/device.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 92dc295..5b53f26 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -305,6 +305,12 @@ impl PL011Registers { } fn write_data_register(&mut self, value: u32) -> bool { + if !self.control.enable_uart() { + log_mask_ln!(Log::GuestError, "PL011 data written to disabled UART"); + } + if !self.control.enable_transmit() { + log_mask_ln!(Log::GuestError, "PL011 data written to disabled TX UART"); + } // interrupts always checked let _ = self.loopback_tx(value.into()); self.int_level |= Interrupt::TX; |