Tyler Wang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82718?usp=email )
Change subject: security/vboot: Add VB2_GBB_FLAG_DISABLE_LID_SHUTDOWN checking ......................................................................
security/vboot: Add VB2_GBB_FLAG_DISABLE_LID_SHUTDOWN checking
Add function to check "VB2_GBB_FLAG_DISABLE_LID_SHUTDOWN" in GBB flag.
BUG=b:333982806 TEST=none
Change-Id: Ie3a9502f93f9b550230ae38566e59dc75834502a Signed-off-by: Tyler Wang tyler.wang@quanta.corp-partner.google.com --- M src/security/vboot/vboot_common.c M src/security/vboot/vboot_common.h 2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/82718/1
diff --git a/src/security/vboot/vboot_common.c b/src/security/vboot/vboot_common.c index 68df140..48f4fea 100644 --- a/src/security/vboot/vboot_common.c +++ b/src/security/vboot/vboot_common.c @@ -65,6 +65,13 @@ return 0; }
+int vboot_is_disable_lid_close_shutdown(void) +{ + if (vboot_is_gbb_flag_set(VB2_GBB_FLAG_DISABLE_LID_SHUTDOWN)) + return 1; + return 0; +} + /* ============================ VBOOT REBOOT ============================== */ void __weak vboot_platform_prepare_reboot(void) { diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h index 2399bf3..73ca218 100644 --- a/src/security/vboot/vboot_common.h +++ b/src/security/vboot/vboot_common.h @@ -81,5 +81,6 @@ * "slow" updates or Auxiliary FW sync. */ void vboot_sync_ec(void); +int vboot_is_disable_lid_close_shutdown(void);
#endif /* __VBOOT_VBOOT_COMMON_H__ */