From 9dc62178c97b94e5c308f1c36fd0858c316959e5 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 28 Aug 2012 15:00:51 -0700 Subject: Add VB_INIT_FLAG_SW_WP_ENABLED to VbInit() input flags. We need to know not only whether the HW WP pin is asserted, but whether the flash chip has configured its software protection registers to actually protect anything. This flag can be used to indicate that. BUG=chrome-os-partner:13265 BRANCH=link TEST=none This just adds the flag. Nothing actually sets the flag yet, so there's nothing to test. Change-Id: Icba9945fb56eb3a4681486c630cbbdc9232485ef Signed-off-by: Bill Richardson Reviewed-on: https://gerrit.chromium.org/gerrit/31642 Reviewed-by: Randall Spangler --- tests/vboot_api_init_tests.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/vboot_api_init_tests.c b/tests/vboot_api_init_tests.c index 3816e075..c10e7d08 100644 --- a/tests/vboot_api_init_tests.c +++ b/tests/vboot_api_init_tests.c @@ -143,6 +143,12 @@ static void VbInitTest(void) { TestVbInit(0, 0, "Flags test WP"); TEST_EQ(shared->flags, VBSD_BOOT_FIRMWARE_WP_ENABLED, " shared flags WP"); + ResetMocks(); + iparams.flags = VB_INIT_FLAG_SW_WP_ENABLED; + TestVbInit(0, 0, "Flags test SW WP"); + TEST_EQ(shared->flags, VBSD_BOOT_FIRMWARE_SW_WP_ENABLED, + " shared flags SW WP"); + ResetMocks(); iparams.flags = VB_INIT_FLAG_RO_NORMAL_SUPPORT; TestVbInit(0, 0, " flags test RO normal"); -- cgit v1.2.1