From 8f4737628e96b7547b4166c700b218dafb0c5349 Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Thu, 20 Feb 2020 16:43:11 +0800 Subject: vboot: stop using wpsw_boot and remove it from crossystem wpsw_boot is being deprecated, so just use wpsw_cur. BUG=b:124141368, chromium:950273 TEST=make clean && make runtests BRANCH=none Change-Id: Iae63b2a76b19629a9ecd9b87e5dd6367767860b3 Cq-Depend: chromium:2066154, chromium:2068241, chromium:2068209 Cq-Depend: chromium:2068297, chromium:2067229, chromium:2067231 Cq-Depend: chromium:2068242 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2066192 Tested-by: Joel Kitching Reviewed-by: Julius Werner Reviewed-by: Hung-Te Lin Commit-Queue: Joel Kitching --- host/arch/mips/lib/crossystem_arch.c | 2 -- host/arch/x86/lib/crossystem_arch.c | 9 +-------- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'host/arch') diff --git a/host/arch/mips/lib/crossystem_arch.c b/host/arch/mips/lib/crossystem_arch.c index ab7d0a49..cb0ea92f 100644 --- a/host/arch/mips/lib/crossystem_arch.c +++ b/host/arch/mips/lib/crossystem_arch.c @@ -42,8 +42,6 @@ int VbGetArchPropertyInt(const char* name) return 0; } else if (!strcasecmp(name,"recoverysw_ec_boot")) { return 0; - } else if (!strcasecmp(name,"wpsw_boot")) { - return 1; } return -1; } diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c index 1e51cb0b..9213ccea 100644 --- a/host/arch/x86/lib/crossystem_arch.c +++ b/host/arch/x86/lib/crossystem_arch.c @@ -804,10 +804,8 @@ int VbGetArchPropertyInt(const char* name) } else if (!strcasecmp(name,"wpsw_cur")) { value = ReadGpio(GPIO_SIGNAL_TYPE_WP); /* Use "write-protect at boot" as a fallback value. */ - if (-1 == value) + if (value == -1) value = ReadFileBit(ACPI_CHSW_PATH, CHSW_WP_BOOT); - if (-1 != value && FwidStartsWith("Mario.")) - value = 1 - value; /* Mario reports this backwards */ } else if (!strcasecmp(name,"recoverysw_ec_boot")) { value = ReadFileBit(ACPI_CHSW_PATH, CHSW_RECOVERY_EC_BOOT); } else if (!strcasecmp(name,"phase_enforcement")) { @@ -822,11 +820,6 @@ int VbGetArchPropertyInt(const char* name) value = ReadFileBit(ACPI_CHSW_PATH, CHSW_DEV_BOOT); } else if (!strcasecmp(name,"recoverysw_boot")) { value = ReadFileBit(ACPI_CHSW_PATH, CHSW_RECOVERY_BOOT); - } else if (!strcasecmp(name,"wpsw_boot")) { - value = ReadFileBit(ACPI_CHSW_PATH, CHSW_WP_BOOT); - if (-1 != value && FwidStartsWith("Mario.")) - value = 1 - value; /* Mario reports this - * backwards */ } } -- cgit v1.2.1