From fb1bdf7c3eafb97a47922692e9bb640fbf5a4dab Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 25 Aug 2022 20:10:35 -0600 Subject: [PATCH] Ignore null bytes from pl011 uart --- src/arch/aarch64/device/uart_pl011.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arch/aarch64/device/uart_pl011.rs b/src/arch/aarch64/device/uart_pl011.rs index 38f74e8..e5982ca 100644 --- a/src/arch/aarch64/device/uart_pl011.rs +++ b/src/arch/aarch64/device/uart_pl011.rs @@ -136,7 +136,10 @@ impl SerialPort { pub fn receive(&mut self) { while self.line_sts().contains(UartFrFlags::RXFF) { - debug_input(self.read_reg(self.data_reg) as u8); + let c = self.read_reg(self.data_reg) as u8; + if c != 0 { + debug_input(c); + } } debug_notify(); }