summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authoredisonhello <edisonhello@google.com>2021-09-06 18:17:32 +0800
committerCommit Bot <commit-bot@chromium.org>2021-11-07 00:01:15 +0000
commitf5deada0fcabe07115fe6797bffe7c2e3b1217b1 (patch)
tree90b072c2cbc64c65577eed6c7436f619ea8f01f3 /firmware
parent63e662d66a1dc8031a57c6d8b53955e5acc5c3b1 (diff)
downloadvboot-f5deada0fcabe07115fe6797bffe7c2e3b1217b1.tar.gz
vboot: Remove VbExIsShutdownRequested
Remove function VbExIsShutdownRequested, since this function is not used in vboot anymore after UI code is centralized. Remove VB_SHUTDOWN_* macros since they are not used in vboot now. These macros will be added in depthcharge in the dependent CL. BUG=b:172339016 TEST=DEBUG=1 make -j test_setup && make -j runtests BRANCH=none Cq-Depend: chromium:3142698 Signed-off-by: edisonhello <edisonhello@google.com> Change-Id: I024b34212a5c9e42b880d51d21c7a90a6170b3c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3143814 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/include/2return_codes.h2
-rw-r--r--firmware/include/vboot_api.h27
-rw-r--r--firmware/stub/vboot_api_stub.c6
3 files changed, 1 insertions, 34 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index 0dc7c441..176c2c6b 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -29,7 +29,7 @@ enum vb2_return_code {
*/
VB2_REQUEST = 0x1000,
- /* Calling firmware requested shutdown via VbExIsShutdownRequested() */
+ /* Calling firmware requested shutdown */
VB2_REQUEST_SHUTDOWN = 0x1001,
/* Calling firmware needs to perform a reboot */
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 1fee766d..ce3ac2d6 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -288,33 +288,6 @@ vb2_error_t VbExStreamRead(VbExStream_t stream, uint32_t bytes, void *buffer);
*/
void VbExStreamClose(VbExStream_t stream);
-/*****************************************************************************/
-/* Misc */
-
-/**
- * Check if the firmware needs to shut down the system.
- *
- * Returns a non-zero VB_SHUTDOWN_REQUEST mask indicating the reason(s) for
- * shutdown if a shutdown is being requested (see VB_SHUTDOWN_REQUEST_*), or 0
- * if a shutdown is not being requested.
- *
- * NOTE: When we're displaying a screen, pressing the power button should shut
- * down the computer. We need a way to break out of our control loop so this
- * can occur cleanly.
- */
-uint32_t VbExIsShutdownRequested(void);
-
-/*
- * Shutdown requested for a reason which is not defined among other
- * VB_SHUTDOWN_REQUEST_* values. This must be defined as 1 for backward
- * compatibility with old versions of the API.
- */
-#define VB_SHUTDOWN_REQUEST_OTHER 0x00000001
-/* Shutdown requested due to a lid switch being closed. */
-#define VB_SHUTDOWN_REQUEST_LID_CLOSED 0x00000002
-/* Shutdown requested due to a power button being pressed. */
-#define VB_SHUTDOWN_REQUEST_POWER_BUTTON 0x00000004
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c
index 5e085566..9335c8b3 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -19,12 +19,6 @@
#include "vboot_test.h"
__attribute__((weak))
-uint32_t VbExIsShutdownRequested(void)
-{
- return 0;
-}
-
-__attribute__((weak))
vb2_error_t vb2ex_run_altfw(uint32_t altfw_id)
{
return VB2_SUCCESS;