diff --git a/CHANGELOG b/CHANGELOG index 035892328..c28be831f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,9 +21,10 @@ POSIX networking calls, and the build system aligned on Infrabase. a paused one stays off the scheduler when an event arrives; a scheduler's lock has one holder which the other CPUs wait for, taken and released with its holder mark under masked interrupts (an interrupt in between - froze the CPU at boot, about one boot in 4200). A Raspberry - Pi 5 (BCM2712) platform skeleton is added; it builds but has not been - validated on a board yet. + froze the CPU at boot, about one boot in 4200); the i.MX UART's + interrupt is left to the agency, whose console lost its input on Verdin + when AVZ took it. A Raspberry Pi 5 (BCM2712) platform skeleton is + added; it builds but has not been validated on a board yet. • Kernel: the ARM timer reload is computed from the counter frequency (the Raspberry Pi 4 tick was 2.9 % too long); a futex is freed by its waker, diff --git a/so3/so3/devices/serial/imx_uart.c b/so3/so3/devices/serial/imx_uart.c index 22b022c51..5a93e276c 100644 --- a/so3/so3/devices/serial/imx_uart.c +++ b/so3/so3/devices/serial/imx_uart.c @@ -97,6 +97,7 @@ static char imx_uart_get_byte(bool polling) return 0; } +#ifndef CONFIG_AVZ static irq_return_t imx_uart_int(int irq, void *dummy) { u32 val; @@ -123,6 +124,7 @@ static irq_return_t imx_uart_int(int irq, void *dummy) return IRQ_COMPLETED; } +#endif /* !CONFIG_AVZ */ static void imx_uart_enable_irq(void) { @@ -158,7 +160,15 @@ static int imx_uart_init(dev_t *dev, int fdt_offset) fdt_interrupt_node(fdt_offset, &imx_uart.irq_def); +#ifndef CONFIG_AVZ + /* As in pl011.c: when AVZ runs as hypervisor, the UART's interrupt + * belongs to the agency guest, its console driver attaches its own + * handler. Bound here, gic_handle's irq_desc->action != NULL branch + * would run imx_uart_int and EOI the interrupt before it ever reaches + * the guest, and imx_uart_int's read of URXD would take the byte from + * it as well. AVZ prints on the UART and reads nothing from it. */ irq_bind(imx_uart.irq_def.irqnr, imx_uart_int, NULL, NULL); +#endif serial_ops.enable_irq();