vboot_reference: Rename Cr50 to GSC when applicable

Recent ChromeOS devices use Ti50 instead of Cr50. Therefore, some
strings or comments are not accurate anymore. When applicable, rename
Cr50 to GSC (Google security chip). The only functional change in this
patch is the recovery reason string for 0x63, which is changed from

 Failed to get boot mode from Cr50

to

 Failed to get boot mode from GSC

Also deprecate the old enum VB2_RECOVERY_CR50_BOOT_MODE. It will be
removed once coreboot switches to the new name.

BUG=b:275544927
TEST=make runtests -j
BRANCH=none

Change-Id: I1a5b25b832b35fa52f50d8c858468527a28d0105
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4756700
Reviewed-by: Yidi Lin <yidilin@chromium.org>
diff --git a/firmware/2lib/2ec_sync.c b/firmware/2lib/2ec_sync.c
index f337372..d04bc9c 100644
--- a/firmware/2lib/2ec_sync.c
+++ b/firmware/2lib/2ec_sync.c
@@ -161,7 +161,7 @@
 	int in_rw = 0;
 	/*
 	 * We don't use VB2_CONTEXT_EC_TRUSTED, which checks if not EC_IN_RW.
-	 * It is controlled by cr50 but on some platforms, cr50 can't know when
+	 * It is controlled by GSC but on some platforms, GSC can't know when
 	 * a EC resets. So, we trust what EC-RW says. If it lies it's in RO,
 	 * we'll flash RW while it's in RW.
 	 */
diff --git a/firmware/2lib/2recovery_reasons.c b/firmware/2lib/2recovery_reasons.c
index 1fdecde..d6cb6a8 100644
--- a/firmware/2lib/2recovery_reasons.c
+++ b/firmware/2lib/2recovery_reasons.c
@@ -158,8 +158,8 @@
 		return "Verification of alternate bootloader payload failed";
 	/* 0x62 */ case VB2_RECOVERY_SECDATA_FWMP_INIT:
 		return "FWMP secure NVRAM (TPM) initialization error";
-	/* 0x63 */ case VB2_RECOVERY_CR50_BOOT_MODE:
-		return "Failed to get boot mode from Cr50";
+	/* 0x63 */ case VB2_RECOVERY_GSC_BOOT_MODE:
+		return "Failed to get boot mode from GSC";
 	/* 0x64 */ case VB2_RECOVERY_ESCAPE_NO_BOOT:
 		return "Attempt to escape from NO_BOOT mode was detected";
 	/* 0x7f */ case VB2_RECOVERY_RW_UNSPECIFIED:
diff --git a/firmware/2lib/include/2recovery_reasons.h b/firmware/2lib/include/2recovery_reasons.h
index bd5fe87..04d5363 100644
--- a/firmware/2lib/include/2recovery_reasons.h
+++ b/firmware/2lib/include/2recovery_reasons.h
@@ -274,7 +274,9 @@
 	/* FWMP secure data initialization error */
 	VB2_RECOVERY_SECDATA_FWMP_INIT = 0x62,
 
-	/* Failed to get boot mode from TPM/Cr50 */
+	/* Failed to get boot mode from TPM/GSC */
+	VB2_RECOVERY_GSC_BOOT_MODE = 0x63,
+	/* TODO: Remove the deprecated alias */
 	VB2_RECOVERY_CR50_BOOT_MODE = 0x63,
 
 	/* Attempt to escape from NO_BOOT mode was detected */
diff --git a/firmware/2lib/include/2secdata.h b/firmware/2lib/include/2secdata.h
index 5faa70a..b027708 100644
--- a/firmware/2lib/include/2secdata.h
+++ b/firmware/2lib/include/2secdata.h
@@ -184,7 +184,7 @@
 	VB2_SECDATA_FWMP_DEV_ENABLE_ALTFW = (1 << 3),
 	VB2_SECDATA_FWMP_DEV_ENABLE_OFFICIAL_ONLY = (1 << 4),
 	VB2_SECDATA_FWMP_DEV_USE_KEY_HASH = (1 << 5),
-	/* CCD = case-closed debugging on cr50; flag implemented on cr50 */
+	/* CCD = case-closed debugging on GSC; flag implemented on GSC */
 	VB2_SECDATA_FWMP_DEV_DISABLE_CCD_UNLOCK = (1 << 6),
 	VB2_SECDATA_FWMP_DEV_FIPS_MODE = (1 << 7),
 };
diff --git a/futility/cmd_gscvd.c b/futility/cmd_gscvd.c
index e9f4967..4129b08 100644
--- a/futility/cmd_gscvd.c
+++ b/futility/cmd_gscvd.c
@@ -133,8 +133,9 @@
 
 /*
  * Max number of RO ranges to cover. 32 is more than enough, this must be kept
- * in sync with APRO_MAX_NUM_RANGES declaration in
- * common/ap_ro_integrity_check.c in the Cr50 tree.
+ * in sync with
+ * - AP_RO_MAX_NUM_RANGES in cr50/common/ap_ro_integrity_check.c
+ * - MAX_RO_RANGES in ti50/common/capsules/src/ap_ro_verification/gscvd.rs
  */
 #define MAX_RANGES 32
 
diff --git a/scripts/image_signing/sign_gsc_firmware.sh b/scripts/image_signing/sign_gsc_firmware.sh
index 5ef2508..caa0222 100755
--- a/scripts/image_signing/sign_gsc_firmware.sh
+++ b/scripts/image_signing/sign_gsc_firmware.sh
@@ -25,7 +25,6 @@
 
 PRE_PVT_BID_FLAG=0x10
 MP_BID_FLAG=0x10000
-CR50_NODE_LOCKED_VERSION="0.5.12"
 
 # Convert unsigned 32 bit value into a signed one.
 to_int32() {