From 232ac543514b7c84d3f2651b6528ba5ece4ea2f7 Mon Sep 17 00:00:00 2001 From: Josie Nordrum Date: Thu, 18 Feb 2021 15:11:21 -0700 Subject: panic.c: force sync before reenabling bus faults Force a sync between data and instruction pipelines before allowing bus faults. Remove sync from flash-stm32h7.c BRANCH=None BUG=b:157692395 TEST=tested with crrev.com/c/2576799 Signed-off-by: Josie Nordrum Change-Id: Id67324191b4447d9be10c0b5aecc87620aa69d1d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706039 Tested-by: Josie Nordrum Reviewed-by: Tom Hughes Reviewed-by: Craig Hesling Commit-Queue: Josie Nordrum Auto-Submit: Josie Nordrum --- core/cortex-m/panic.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c index 8fabaf4b21..2052656410 100644 --- a/core/cortex-m/panic.c +++ b/core/cortex-m/panic.c @@ -418,6 +418,11 @@ void bus_fault_handler(void) void ignore_bus_fault(int ignored) { + if (IS_ENABLED(CHIP_FAMILY_STM32H7)) { + if (ignored == 0) + asm volatile("dsb; isb"); + } + /* * Flash code might call this before cpu_init(), * ensure that the bus faults really go through our handler. -- cgit v1.2.1