mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 10:14:55 +00:00
cgpt: Add a callback to allow override of GPT entry priority
This can be used by implementations that want to request vboot to favor a particular kernel entry for booting without affecting the checks for rollback protection and image verification. CQ-DEPEND=CL:274716, CL:274932, CL:275171 BUG=None BRANCH=None TEST=Compiles successfully. make -j runtests successful. Change-Id: I6a4600020354f5d4118c17f083c353c2585c4181 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/274558 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
04e2338857
commit
7a1c0d1ec8
@@ -24,6 +24,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gpt.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Error codes */
|
||||
|
||||
@@ -1057,4 +1059,16 @@ VbError_t VbUnlockDevice(void);
|
||||
*/
|
||||
VbError_t VbLockDevice(void);
|
||||
|
||||
/**
|
||||
* Check if the firmware wants to override GPT entry priority.
|
||||
*
|
||||
* In case of kernel entry, check if there is an override of priority
|
||||
* available. This is used to select a particular partition to boot in the
|
||||
* current boot cycle. Rollback protection, image verification and all other
|
||||
* checks in LoadKernel still remain the same.
|
||||
*
|
||||
* @param e Gpt Entry to check for priority override.
|
||||
* @return 0 if no override, 1-15 for override priority.
|
||||
*/
|
||||
uint8_t VbExOverrideGptEntryPriority(const GptEntry *e);
|
||||
#endif /* VBOOT_REFERENCE_VBOOT_API_H_ */
|
||||
|
||||
Reference in New Issue
Block a user