Module Name: src Committed By: skrll Date: Tue Dec 31 08:01:19 UTC 2019
Modified Files: src/sys/arch/arm/broadcom: bcm283x_platform.c Log Message: Add another cache invalidation before reading memory for firmware query results. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/broadcom/bcm283x_platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/broadcom/bcm283x_platform.c diff -u src/sys/arch/arm/broadcom/bcm283x_platform.c:1.31 src/sys/arch/arm/broadcom/bcm283x_platform.c:1.32 --- src/sys/arch/arm/broadcom/bcm283x_platform.c:1.31 Mon Dec 30 16:19:27 2019 +++ src/sys/arch/arm/broadcom/bcm283x_platform.c Tue Dec 31 08:01:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm283x_platform.c,v 1.31 2019/12/30 16:19:27 skrll Exp $ */ +/* $NetBSD: bcm283x_platform.c,v 1.32 2019/12/31 08:01:19 skrll Exp $ */ /*- * Copyright (c) 2017 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.31 2019/12/30 16:19:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.32 2019/12/31 08:01:19 skrll Exp $"); #include "opt_arm_debug.h" #include "opt_bcm283x.h" @@ -671,6 +671,13 @@ bcm283x_uartinit(bus_space_tag_t iot, bu bcm2835_mbox_read(iot, ioh, BCMMBOX_CHANARM2VC, &res); + /* + * RPI4 has Cortex A72 processors which do speculation, so + * we need to invalidate the cache for an updates done by + * the firmware + */ + cpu_dcache_inv_range((vaddr_t)&vb_uart, sizeof(vb_uart)); + if (vcprop_tag_success_p(&vb_uart.vbt_uartclockrate.tag)) uart_clk = vb_uart.vbt_uartclockrate.rate; if (vcprop_tag_success_p(&vb_uart.vbt_vpuclockrate.tag))