Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: firmware/stub/load_firmware_stub.c

Issue 6597018: Add LoadFirmware() support for NvStorage API (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firmware/lib/vboot_firmware.c ('k') | utility/load_firmware_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/stub/load_firmware_stub.c
diff --git a/firmware/stub/load_firmware_stub.c b/firmware/stub/load_firmware_stub.c
index 99ed657f86da8caac142422fca4b0f65df5d236e..94d0bfa8d26f7dfb0f17f323e1f05e4adfadf589 100644
--- a/firmware/stub/load_firmware_stub.c
+++ b/firmware/stub/load_firmware_stub.c
@@ -73,6 +73,11 @@ int VerifyFirmwareDriver_stub(uint8_t* root_key_blob,
CallerInternal ci;
LoadFirmwareParams p;
+ VbNvContext vnc;
+
+ /* TODO: YOU SHOULD CALL LoadFirmwareSetup() AS SOON AS THE TPM
+ * INTERFACE IS AVAILABLE */
+ LoadFirmwareSetup();
/* Copy the firmware volume pointers to our global variables. */
ci.firmwareA = firmwareA;
@@ -82,11 +87,14 @@ int VerifyFirmwareDriver_stub(uint8_t* root_key_blob,
ci.firmwareA_size = 0;
ci.firmwareB_size = 0;
+ /* TODO: YOU NEED TO LOAD vnc.raw[] FROM NON-VOLATILE STORAGE */
+
/* Set up the params for LoadFirmware() */
p.caller_internal = &ci;
p.firmware_root_key_blob = root_key_blob;
p.verification_block_0 = verification_headerA;
p.verification_block_1 = verification_headerB;
+ p.nv_context = &vnc;
/* Allocate a key blob buffer */
p.kernel_sign_key_blob = Malloc(LOAD_FIRMWARE_KEY_BLOB_REC_SIZE);
@@ -97,6 +105,11 @@ int VerifyFirmwareDriver_stub(uint8_t* root_key_blob,
/* Call LoadFirmware() */
rv = LoadFirmware(&p);
+
+ if (vnc.raw_changed) {
+ /* TODO: YOU NEED TO SAVE vnc.raw TO NON-VOLATILE STORAGE */
+ }
+
if (LOAD_FIRMWARE_SUCCESS == rv) {
/* TODO: YOU NEED TO KEEP TRACK OF p.kernel_sign_key_blob AND
* p.kernel_sign_key_size SO YOU CAN PASS THEM TO LoadKernel(). */
« no previous file with comments | « firmware/lib/vboot_firmware.c ('k') | utility/load_firmware_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698