From: Bernhard Beschow Date: Sun, 15 Jun 2025 11:20:36 +0000 (+0200) Subject: rust: pl011: Add missing logging to match C version X-Git-Tag: v10.1.0-rc0~48^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b783601d1a3b3fd468035baf0ce2ead166e0abdc;p=thirdparty%2Fqemu.git rust: pl011: Add missing logging to match C version Co-developed-by: Paolo Bonzini Signed-off-by: Bernhard Beschow Link: https://lore.kernel.org/r/20250615112037.11992-4-shentey@gmail.com Signed-off-by: Paolo Bonzini --- diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 92dc295540e..5b53f2649f1 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;