diff options
author | Patrick Georgi <pgeorgi@google.com> | 2017-10-29 07:42:37 -0400 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-07 15:25:17 -0800 |
commit | 887e3962ca19cc7e8c3c474f8c82b4240eb63416 (patch) | |
tree | 10d3c0fd7b8d948ce080b66e735d4ac1fb597255 /include/system.h | |
parent | fee1bde58def62ff7cbd40e060844c0cc496a032 (diff) | |
download | chrome-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 'include/system.h')
-rw-r--r-- | include/system.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/system.h b/include/system.h index 0d94fc0fe0..5587446ff9 100644 --- a/include/system.h +++ b/include/system.h @@ -267,7 +267,7 @@ const char *system_get_build_info(void); * * @param flags Reset flags; see SYSTEM_RESET_* above. */ -void system_reset(int flags); +void system_reset(int flags) __attribute__((noreturn)); /** * Set a scratchpad register to the specified value. |