coreboot/src/commonlib/bsd
Kapil Porwal 27fcb8617d commonlib: Add CBMEM ID to store boot mode
Introduce a new CBMEM ID, CBMEM_ID_BOOT_MODE (0x444D5442, "BTMD"),
to provide a dedicated storage location for the system's detected
boot mode (e.g., normal boot, low-battery, off-mode boot etc).

Storing the boot mode in CBMEM ensures that the initial detection
performed early in the boot process (e.g., in romstage by reading
PMIC logs) is securely passed to subsequent stages like ramstage,
where different boot modes require distinct logic paths.

Key changes:
- Define CBMEM_ID_BOOT_MODE in cbmem_id.h.
- Add "BOOT MODE" entry to the CBMEM_ID_TO_NAME_TABLE.

BUG=b:439819922
TEST=Verify boot mode stored in CBMEM.

Change-Id: I7ebf29385a99ac1be491bfefe1c74c8c9e58b55d
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90175
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:56:39 +00:00
..
include/commonlib/bsd commonlib: Add CBMEM ID to store boot mode 2025-11-26 18:56:39 +00:00
cbfs_mcache.c commonlib/bsd, libpayload: Do not include helpers.h in stddef.h 2023-02-16 17:55:37 +00:00
cbfs_private.c commonlib/bsd, libpayload: Do not include helpers.h in stddef.h 2023-02-16 17:55:37 +00:00
elog.c
gcd.c commonlib: Change GCD function to always use 64 bits 2024-02-08 13:13:58 +00:00
ipchksum.c commonlib: Add generic word-at-a-time optimization to ipchksum() 2024-12-11 01:00:06 +00:00
lz4.c.inc
lz4_wrapper.c commonlib/bsd/lz4_wrapper.c: Fix misaligned access 2024-07-01 13:44:19 +00:00
string.c commonlib/bsd: Optimize strnlen() 2024-08-19 13:25:05 +00:00