summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-05-20 18:55:42 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-23 00:37:05 +0000
commitfe54f2928b6f8071591c75a51ff914c0773065c1 (patch)
tree4884d455b585dc6b49355e88245444e6c93f7404 /common/main.c
parentd2b33ef5fd9aef1da3d17bc0134dba0a4592108b (diff)
downloadchrome-ec-fe54f2928b6f8071591c75a51ff914c0773065c1.tar.gz
system: Print reset flags also on RW start
Currently, only RO prints reset flags. Reset flags are passed from RO to RW and affect how RW behaves. This patch makes RW also print reset flags. BUG=none BRANCH=none TEST=Verify reset cause is printed after sysjump. TEST=Verify test_that suite:faft_bios passes. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I5b286d8d29603bbff7ad43f90798a2d6d911a572 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2211602 Reviewed-by: Sam Hurst <shurst@google.com>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/main.c b/common/main.c
index 9b505c756c..ccb12b947e 100644
--- a/common/main.c
+++ b/common/main.c
@@ -141,17 +141,17 @@ test_mockable __keep int main(void)
/* be less verbose if we boot for USB resume to meet spec timings */
if (!(system_get_reset_flags() & EC_RESET_FLAG_USB_RESUME)) {
- if (system_jumped_to_this_image()) {
+ CPUTS("\n");
+ if (system_jumped_to_this_image())
CPRINTS("UART initialized after sysjump");
- } else {
- CPUTS("\n\n--- UART initialized after reboot ---\n");
- CPUTS("[Reset cause: ");
- system_print_reset_flags();
- CPUTS("]\n");
- }
+ else
+ CPUTS("\n--- UART initialized after reboot ---\n");
CPRINTF("[Image: %s, %s]\n",
system_get_image_copy_string(),
system_get_build_info());
+ CPUTS("[Reset cause: ");
+ system_print_reset_flags();
+ CPUTS("]\n");
}
#ifdef CONFIG_BRINGUP