diff options
-rw-r--r-- | firmware/2lib/include/2return_codes.h | 2 | ||||
-rw-r--r-- | firmware/include/vboot_api.h | 27 | ||||
-rw-r--r-- | firmware/stub/vboot_api_stub.c | 6 | ||||
-rw-r--r-- | tests/vb2_ec_sync_tests.c | 10 |
4 files changed, 1 insertions, 44 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; diff --git a/tests/vb2_ec_sync_tests.c b/tests/vb2_ec_sync_tests.c index 16496e44..1f484ef9 100644 --- a/tests/vb2_ec_sync_tests.c +++ b/tests/vb2_ec_sync_tests.c @@ -111,16 +111,6 @@ struct vb2_gbb_header *vb2_get_gbb(struct vb2_context *c) return &gbb; } -uint32_t VbExIsShutdownRequested(void) -{ - if (shutdown_request_calls_left == 0) - return 1; - else if (shutdown_request_calls_left > 0) - shutdown_request_calls_left--; - - return 0; -} - int vb2ex_ec_trusted(void) { return !ec_run_image; |