mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
Cleanup and preparation for inside-wrapper TPM refactoring.
Add recovery reason for already in recovery and need to reboot to recovery to let the TPM init. Add vboot_struct fields. Fix type for keyblock flags param to SetTPMBootModeState(). BUG=none TEST=make && make runtests Change-Id: I4035bdb377aaebaca03a43799be57977166da739 Reviewed-on: http://gerrit.chromium.org/gerrit/4599 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -20,6 +20,6 @@
|
||||
*/
|
||||
|
||||
uint32_t SetTPMBootModeState(int developer_mode, int recovery_mode,
|
||||
int fw_keyblock_flags);
|
||||
uint64_t fw_keyblock_flags);
|
||||
|
||||
#endif /* VBOOT_REFERENCE_TPM_BOOTMODE_H_ */
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
|
||||
|
||||
uint32_t SetTPMBootModeState(int developer_mode, int recovery_mode,
|
||||
int fw_keyblock_flags) {
|
||||
uint64_t fw_keyblock_flags) {
|
||||
return TPM_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ const uint8_t kBootInvalidSHA1Digest[] = {
|
||||
|
||||
/* Given the boot state, return the correct SHA1 digest index for TPMExtend
|
||||
* in kBootStateSHA1Digests[]. */
|
||||
int GetBootStateIndex(int dev_mode, int rec_mode, int keyblock_flags) {
|
||||
int GetBootStateIndex(int dev_mode, int rec_mode, uint64_t keyblock_flags) {
|
||||
int index = 0;
|
||||
|
||||
/* Convert keyblock flags into keyblock mode which we use to index into
|
||||
@@ -117,7 +117,7 @@ int GetBootStateIndex(int dev_mode, int rec_mode, int keyblock_flags) {
|
||||
}
|
||||
|
||||
uint32_t SetTPMBootModeState(int developer_mode, int recovery_mode,
|
||||
int fw_keyblock_flags) {
|
||||
uint64_t fw_keyblock_flags) {
|
||||
uint32_t result;
|
||||
const uint8_t* in_digest = NULL;
|
||||
uint8_t out_digest[20]; /* For PCR extend output. */
|
||||
|
||||
@@ -317,7 +317,7 @@ int LoadFirmware(LoadFirmwareParams* params) {
|
||||
/* At this point, we have a good idea of how we are going to boot. Update the
|
||||
* TPM with this state information.
|
||||
*/
|
||||
status = SetTPMBootModeState(is_dev, 0, (int)boot_fw_keyblock_flags);
|
||||
status = SetTPMBootModeState(is_dev, 0, boot_fw_keyblock_flags);
|
||||
if (0 != status) {
|
||||
VBDEBUG(("Unable to update the TPM with boot mode information.\n"));
|
||||
if (status == TPM_E_MUST_REBOOT)
|
||||
|
||||
Reference in New Issue
Block a user