From 941597e52feb498bb57d9327ccf546f862742b06 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 19 Mar 2026 19:04:00 +0000 Subject: [PATCH] {commonlib, libpayload}: Add RTC_WAKE to boot_mode_t Define CB_BOOT_MODE_RTC_WAKE and LB_BOOT_MODE_RTC_WAKE in the coreboot table headers. This allows the firmware to communicate to the payload (such as depthcharge) that the device started up due to a Real-Time Clock alarm. Synchronize the change across: - payloads/libpayload/include/coreboot_tables.h - src/commonlib/include/commonlib/coreboot_tables.h BUG=b:493760057 BRANCH=none TEST=Build coreboot and libpayload. Verify that the new boot mode is accessible in the payload. Change-Id: I8f5e118e6965f29498ab5bb46e153bc6d24bc116 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/91764 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- payloads/libpayload/include/coreboot_tables.h | 2 ++ src/commonlib/include/commonlib/coreboot_tables.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 9864c2b5d4..12998de9db 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -464,6 +464,8 @@ enum boot_mode_t { CB_BOOT_MODE_LOW_BATTERY_CHARGING, /* Device is booting in due to charger insertion */ CB_BOOT_MODE_OFFMODE_CHARGING, + /* Device is booting in due to RTC alarm */ + CB_BOOT_MODE_RTC_WAKE, }; /* diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index cb16e65c5c..87da127ef9 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -647,6 +647,8 @@ enum boot_mode_t { LB_BOOT_MODE_LOW_BATTERY_CHARGING, /* Device is booting in due to charger insertion */ LB_BOOT_MODE_OFFMODE_CHARGING, + /* Device is booting in due to RTC alarm */ + LB_BOOT_MODE_RTC_WAKE, }; /*