From 588c05f6b4fb9d3ae7eff8ea592b6a381437f7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 18 Dec 2019 11:48:00 +0100 Subject: [PATCH] [ion] Reset: Add memory barriers before/after calling for a core reset: --- ion/src/device/shared/drivers/reset.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ion/src/device/shared/drivers/reset.cpp b/ion/src/device/shared/drivers/reset.cpp index 21f93eed1..ef6053570 100644 --- a/ion/src/device/shared/drivers/reset.cpp +++ b/ion/src/device/shared/drivers/reset.cpp @@ -12,7 +12,13 @@ using namespace Regs; void core() { // Perform a full core reset + Ion::Device::Cache::dsb(); // Complete all memory accesses CORTEX.AIRCR()->requestReset(); + Ion::Device::Cache::dsb(); + // Wait until reset + while (true) { + asm("nop"); + } } /* We isolate the jump code that needs to be executed from the internal