mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-24 16:57:21 +00:00
fastboot: Add fastboot related flags to nvstorage
Use unused offset 8 for fastboot related flags. BUG=chrome-os-partner:40196 BRANCH=None TEST=Compiles successfully. Change-Id: I6df0985924ba80cdcb68bb6b7658bf962f01287f Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/273180 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Trybot-Ready: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
ebf886b5fd
commit
c180460feb
@@ -556,6 +556,7 @@ static void VbInitTestBackup(void)
|
||||
VbNvSet(&vnc, VBNV_DEV_BOOT_LEGACY, 1);
|
||||
VbNvSet(&vnc, VBNV_DEV_BOOT_SIGNED_ONLY, 1);
|
||||
VbNvSet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, 1);
|
||||
VbNvSet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, 1);
|
||||
/* and some that don't */
|
||||
VbNvSet(&vnc, VBNV_OPROM_NEEDED, 1);
|
||||
VbNvSet(&vnc, VBNV_TRY_B_COUNT, 3);
|
||||
@@ -585,6 +586,8 @@ static void VbInitTestBackup(void)
|
||||
TEST_EQ(u, 0, " NV dev_boot_signed_only");
|
||||
VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
|
||||
TEST_EQ(u, 0, " NV dev_boot_fastboot_full_cap");
|
||||
VbNvGet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
|
||||
TEST_EQ(u, 0, " NV_fastboot_unlock_in_fw ");
|
||||
/* So we should have written the backup */
|
||||
TEST_EQ(backup_write_called, 1, " Backup written once");
|
||||
/* And the backup should reflect the persisent flags. */
|
||||
@@ -602,6 +605,8 @@ static void VbInitTestBackup(void)
|
||||
TEST_EQ(u, 0, " BU dev_boot_signed_only");
|
||||
VbNvGet(&tmp_vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
|
||||
TEST_EQ(u, 0, " BU dev_boot_fastboot_full_cap");
|
||||
VbNvGet(&tmp_vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
|
||||
TEST_EQ(u, 0, " BU fastboot_unlock_in_fw");
|
||||
/* but not the others */
|
||||
VbNvGet(&tmp_vnc, VBNV_OPROM_NEEDED, &u);
|
||||
TEST_EQ(u, 0, " BU oprom_needed");
|
||||
@@ -642,6 +647,7 @@ static void VbInitTestBackup(void)
|
||||
VbNvSet(&vnc, VBNV_DEV_BOOT_LEGACY, 1);
|
||||
VbNvSet(&vnc, VBNV_DEV_BOOT_SIGNED_ONLY, 1);
|
||||
VbNvSet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, 1);
|
||||
VbNvSet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, 1);
|
||||
/* and some that don't */
|
||||
VbNvSet(&vnc, VBNV_OPROM_NEEDED, 1);
|
||||
VbNvSet(&vnc, VBNV_TRY_B_COUNT, 4);
|
||||
@@ -691,6 +697,8 @@ static void VbInitTestBackup(void)
|
||||
TEST_EQ(u, 1, " BU dev_boot_signed_only");
|
||||
VbNvGet(&tmp_vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
|
||||
TEST_EQ(u, 1, " BU dev_boot_fastboot_full_cap");
|
||||
VbNvGet(&tmp_vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
|
||||
TEST_EQ(u, 1, " BU fastboot_unlock_in_fw");
|
||||
/* but not the others */
|
||||
VbNvGet(&tmp_vnc, VBNV_OPROM_NEEDED, &u);
|
||||
TEST_EQ(u, 0, " BU oprom_needed");
|
||||
@@ -730,6 +738,8 @@ static void VbInitTestBackup(void)
|
||||
TEST_EQ(u, 1, " BU dev_boot_signed_only");
|
||||
VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
|
||||
TEST_EQ(u, 1, " BU dev_boot_fastboot_full_cap");
|
||||
VbNvGet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
|
||||
TEST_EQ(u, 1, " BU fastboot_unlock_in_fw");
|
||||
|
||||
/*
|
||||
* But if we lose the NV storage and go back to normal mode at the same
|
||||
@@ -766,6 +776,8 @@ static void VbInitTestBackup(void)
|
||||
TEST_EQ(u, 0, " BU dev_boot_signed_only");
|
||||
VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &u);
|
||||
TEST_EQ(u, 0, " BU dev_boot_fastboot_full_cap");
|
||||
VbNvGet(&vnc, VBNV_FASTBOOT_UNLOCK_IN_FW, &u);
|
||||
TEST_EQ(u, 0, " BU fastboot_unlock_in_fw");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user