From c77d256886b5b2c5a62bc2aca2af65761a0dec73 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 30 Nov 2025 10:30:16 +0530 Subject: [PATCH] {mb, security}: Use EC_REBOOT_FLAG_IMMEDIATE for cold reboots The value 0 passed as the reboot_flags argument to google_chromeec_reboot is now explicitly defined as EC_REBOOT_FLAG_IMMEDIATE in ec_commands.h. Update calls to google_chromeec_reboot with EC_REBOOT_COLD to use the new flag for clarity and to ensure the intended EC-based reboot is performed. This change doesn't introduce anything new, so there's no change in behavior. Change-Id: I6701c94101c5085cfcc7fbf2e614c4f23d843225 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/90278 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/mainboard/google/bluey/reset.c | 2 +- src/mainboard/google/herobrine/reset.c | 2 +- src/mainboard/google/trogdor/reset.c | 2 +- src/security/vboot/ec_sync.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mainboard/google/bluey/reset.c b/src/mainboard/google/bluey/reset.c index b10e4d481a..deb0ba8096 100644 --- a/src/mainboard/google/bluey/reset.c +++ b/src/mainboard/google/bluey/reset.c @@ -8,5 +8,5 @@ void do_board_reset(void) { if (CONFIG(EC_GOOGLE_CHROMEEC)) - google_chromeec_reboot(EC_REBOOT_COLD, 0); + google_chromeec_reboot(EC_REBOOT_COLD, EC_REBOOT_FLAG_IMMEDIATE); } diff --git a/src/mainboard/google/herobrine/reset.c b/src/mainboard/google/herobrine/reset.c index d64c650b99..32dd8b3cf4 100644 --- a/src/mainboard/google/herobrine/reset.c +++ b/src/mainboard/google/herobrine/reset.c @@ -7,5 +7,5 @@ but this works well enough for our purposes. */ void do_board_reset(void) { - google_chromeec_reboot(EC_REBOOT_COLD, 0); + google_chromeec_reboot(EC_REBOOT_COLD, EC_REBOOT_FLAG_IMMEDIATE); } diff --git a/src/mainboard/google/trogdor/reset.c b/src/mainboard/google/trogdor/reset.c index d64c650b99..32dd8b3cf4 100644 --- a/src/mainboard/google/trogdor/reset.c +++ b/src/mainboard/google/trogdor/reset.c @@ -7,5 +7,5 @@ but this works well enough for our purposes. */ void do_board_reset(void) { - google_chromeec_reboot(EC_REBOOT_COLD, 0); + google_chromeec_reboot(EC_REBOOT_COLD, EC_REBOOT_FLAG_IMMEDIATE); } diff --git a/src/security/vboot/ec_sync.c b/src/security/vboot/ec_sync.c index e1d435e7cf..030c391ba0 100644 --- a/src/security/vboot/ec_sync.c +++ b/src/security/vboot/ec_sync.c @@ -56,7 +56,7 @@ void vboot_sync_ec(void) case VB2_REQUEST_REBOOT_EC_TO_RO: printk(BIOS_INFO, "EC Reboot requested. Doing cold reboot\n"); - if (google_chromeec_reboot(EC_REBOOT_COLD, 0)) + if (google_chromeec_reboot(EC_REBOOT_COLD, EC_REBOOT_FLAG_IMMEDIATE)) printk(BIOS_EMERG, "Failed to get EC to cold reboot\n"); halt();