mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
Add structs for TPM NV simplification. Now uses only 2 NV spaces, one for firmware and one for kernel.
Changed TlclRead / TlclWrite to take void* / const void* to reduce typecasts. Much restructuring of rollback_index.c. Fixed a version-packing bug in rollback_index.c (& --> |) BUG:chrome-os-partner:304 TEST:manual testing of all code flows on CRB Review URL: http://codereview.chromium.org/3084030
This commit is contained in:
@@ -61,15 +61,10 @@ int LoadFirmware(LoadFirmwareParams* params) {
|
||||
}
|
||||
|
||||
/* Initialize the TPM and read rollback indices. */
|
||||
status = RollbackFirmwareSetup(params->boot_flags & BOOT_FLAG_DEVELOPER);
|
||||
status = RollbackFirmwareSetup(params->boot_flags & BOOT_FLAG_DEVELOPER,
|
||||
&tpm_key_version, &tpm_fw_version);
|
||||
if (0 != status) {
|
||||
VBDEBUG(("Unable to setup TPM.\n"));
|
||||
return (status == TPM_E_MUST_REBOOT ?
|
||||
LOAD_FIRMWARE_REBOOT : LOAD_FIRMWARE_RECOVERY);
|
||||
}
|
||||
status = RollbackFirmwareRead(&tpm_key_version, &tpm_fw_version);
|
||||
if (0 != status) {
|
||||
VBDEBUG(("Unable to read stored versions.\n"));
|
||||
VBDEBUG(("Unable to setup TPM and read stored versions.\n"));
|
||||
return (status == TPM_E_MUST_REBOOT ?
|
||||
LOAD_FIRMWARE_REBOOT : LOAD_FIRMWARE_RECOVERY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user