Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86578?usp=email )
Change subject: soc/intel/common/reset: Mark do_low_battery_poweroff with __noreturn ......................................................................
soc/intel/common/reset: Mark do_low_battery_poweroff with __noreturn
In the low battery poweroff scenario, the platform should halt after issuing the poweroff command. This ensures that no further code execution occurs, preventing potential issues.
Additionally, the do_low_battery_poweroff() function is marked with __noreturn to indicate that it does not return. This is appropriate because the platform will either power off or halt.
TEST=Able to compile google/fatcat.
Change-Id: Ieb77645283360b5731ca48b94551712b99109a1c Signed-off-by: Subrata Banik subratabanik@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/86578 Reviewed-by: Jérémy Compostella jeremy.compostella@intel.com Reviewed-by: Kapil Porwal kapilporwal@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jayvik Desai jayvik@google.com --- M src/soc/intel/common/reset.c M src/soc/intel/common/reset.h 2 files changed, 2 insertions(+), 1 deletion(-)
Approvals: Jayvik Desai: Looks good to me, approved build bot (Jenkins): Verified Jérémy Compostella: Looks good to me, approved Kapil Porwal: Looks good to me, approved
diff --git a/src/soc/intel/common/reset.c b/src/soc/intel/common/reset.c index 3fefa57..307be57 100644 --- a/src/soc/intel/common/reset.c +++ b/src/soc/intel/common/reset.c @@ -32,4 +32,5 @@ }
poweroff(); + halt(); } diff --git a/src/soc/intel/common/reset.h b/src/soc/intel/common/reset.h index 8331853..71fe05d 100644 --- a/src/soc/intel/common/reset.h +++ b/src/soc/intel/common/reset.h @@ -30,6 +30,6 @@ * * Call this function to power off the platform if the battery level is critically low. */ -void do_low_battery_poweroff(void); +__noreturn void do_low_battery_poweroff(void);
#endif /* _INTEL_COMMON_RESET_H_ */