summaryrefslogtreecommitdiff
path: root/chip/mec1322
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-10-29 07:42:37 -0400
committerchrome-bot <chrome-bot@chromium.org>2017-11-07 15:25:17 -0800
commit887e3962ca19cc7e8c3c474f8c82b4240eb63416 (patch)
tree10d3c0fd7b8d948ce080b66e735d4ac1fb597255 /chip/mec1322
parentfee1bde58def62ff7cbd40e060844c0cc496a032 (diff)
downloadchrome-ec-887e3962ca19cc7e8c3c474f8c82b4240eb63416.tar.gz
Mark reset and panic functions as noreturn
gcc 6.3 (as provided by coreboot-sdk) needs that to know which code paths end early. Also add a loop after the command that is "supposed" to reset the machine so that the compiler believes it (and in case that assumption fails). BRANCH=none BUG=b:65441143 TEST=none Change-Id: Idb87253ec7880d66ffec30d75f4d007f02f63aab Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/742916 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'chip/mec1322')
-rw-r--r--chip/mec1322/system.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/chip/mec1322/system.c b/chip/mec1322/system.c
index 4b2738e969..57e1f8816a 100644
--- a/chip/mec1322/system.c
+++ b/chip/mec1322/system.c
@@ -98,6 +98,7 @@ void chip_save_reset_flags(int flags)
MEC1322_VBAT_RAM(HIBDATA_INDEX_SAVED_RESET_FLAGS) = flags;
}
+__attribute__((noreturn))
void _system_reset(int flags, int wake_from_hibernate)
{
uint32_t save_flags = 0;