diff options
author | Yuval Peress <peress@chromium.org> | 2021-07-08 11:22:38 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-08 19:29:55 +0000 |
commit | 5f05f752509df4762ce99aab9ed46d1a37e1b76a (patch) | |
tree | f810ec01003e8a361dee372bb74df001028d1b8f /zephyr/shim/core | |
parent | 4b972a220fc1db416c25bd9507e03f66156ab29f (diff) | |
download | chrome-ec-5f05f752509df4762ce99aab9ed46d1a37e1b76a.tar.gz |
zephyr: remove unnecessary software_panic()
This function is no longer needed. It was never called since
shim/include/builtin/assert.h was added to use Zephyr's asserts.
BRANCH=none
BUG=b:180422087
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I2a112fac808adad05440dc85332bb14b0b2ed347
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3015238
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Diffstat (limited to 'zephyr/shim/core')
-rw-r--r-- | zephyr/shim/core/cortex-m/CMakeLists.txt | 1 | ||||
-rw-r--r-- | zephyr/shim/core/cortex-m/software_panic.c | 23 |
2 files changed, 0 insertions, 24 deletions
diff --git a/zephyr/shim/core/cortex-m/CMakeLists.txt b/zephyr/shim/core/cortex-m/CMakeLists.txt index ca5fd0f04c..01e5673f9e 100644 --- a/zephyr/shim/core/cortex-m/CMakeLists.txt +++ b/zephyr/shim/core/cortex-m/CMakeLists.txt @@ -2,5 +2,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_SOFTWARE_PANIC software_panic.c) zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_MPU mpu.c) diff --git a/zephyr/shim/core/cortex-m/software_panic.c b/zephyr/shim/core/cortex-m/software_panic.c deleted file mode 100644 index 2e34445a06..0000000000 --- a/zephyr/shim/core/cortex-m/software_panic.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2021 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* - * Content of this file are taken directly from - * platform/ec/core/cortex-m/panic.c. The code is replicated deliberately to - * allow future refactors into Zephyr specific APIs. - */ - -#include "common.h" -#include "panic.h" - -void software_panic(uint32_t reason, uint32_t info) -{ - /* TODO(b:180422087) Zephyrize this. */ - __asm__("mov " STRINGIFY(SOFTWARE_PANIC_INFO_REG) ", %0\n" - "mov " STRINGIFY(SOFTWARE_PANIC_REASON_REG) ", %1\n" - "bl exception_panic\n" - : : "r"(info), "r"(reason)); - __builtin_unreachable(); -} |