Revert "[efi] Honor ABR one-shot bootloader flag on EFI reset"

This reverts commit 8e7ac1835c7d1d9a54fca2fa5b4a3a139b887fd6.

Once the VIM3 GBL U-Boot rollout is complete, GBL handles the ABR
one-shot bootloader flag on boot (zircon_check_enter_fastboot()), so
checking it on the way down in efi_reset_system_boottime() for legacy
U-Boot rollback compatibility is no longer needed.

Test: Built VIM3 U-Boot with ./fuchsia_build.py; verified on VIM3
      (ffx target flash pass 1 + pass 2, ffx target fastboot reboot
      bootloader, dm reboot-bootloader, and normal dm reboot).
TAG=agy
CONV=b821c1df-3ef9-44e9-9223-94d83eba602b
BUG: 573411501

Change-Id: Iba6a50199a3ff25d63e4fa7871ceca8d8b86b54d
Reviewed-on: https://turquoise-internal-review.googlesource.com/c/third_party/u-boot/+/1700634
Lint: android-build-ayeaye@system.gserviceaccount.com <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Yecheng Zhao <zyecheng@google.com>
Presubmit-Verified: fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Sergii Parubochyi <sergiip@google.com>
GitOrigin-RevId: 348f57507b9da9e38f426978e800624b0182dc06
diff --git a/board/khadas/kvim3/zircon_boot.c b/board/khadas/kvim3/zircon_boot.c
index fcd9020..7f01c04 100644
--- a/board/khadas/kvim3/zircon_boot.c
+++ b/board/khadas/kvim3/zircon_boot.c
@@ -279,18 +279,6 @@
 	return zircon_preboot(buffer, capacity, true) == 0 ? 0 : -1;
 }
 
-bool GetAndClearOneShotBootloaderFlag(void)
-{
-	AbrOps abr_ops = GetAbrOpsFromZirconBootOps(&zb_ops);
-	AbrDataOneShotFlags one_shot_flags = kAbrDataOneShotFlagNone;
-	if (AbrGetAndClearOneShotFlags(&abr_ops, &one_shot_flags) ==
-	    kAbrResultOk &&
-	    AbrIsOneShotRecoveryBootSet(one_shot_flags)) {
-		AbrSetOneShotRecovery(&abr_ops, true);
-	}
-	return AbrIsOneShotBootloaderBootSet(one_shot_flags);
-}
-
 int do_zbi_boot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
 	long unsigned int loadaddr;
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 6b86e8e..f296d01 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -586,7 +586,6 @@
 efi_status_t efi_gbl_debug_register(void);
 efi_status_t efi_gbl_boot_control_register(void);
 efi_status_t efi_gbl_avb_register(void);
-bool GetAndClearOneShotBootloaderFlag(void);
 /* Called by efi_init_obj_list() to do initial measurement */
 efi_status_t efi_tcg2_do_initial_measurement(void);
 /* measure the pe-coff image, extend PCR and add Event Log */
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 0a9305e..7fa507a 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -210,17 +210,8 @@
 	case EFI_RESET_COLD:
 	case EFI_RESET_WARM:
 	case EFI_RESET_PLATFORM_SPECIFIC:
-		// TODO(https://fxbug.dev/573411501): Remove once GBL U-Boot rollout is
-		// complete. GBL already checks the ABR one-shot flag on boot, so this
-		// is only needed when flashing back to legacy U-Boot, which only checks
-		// the hardware reboot register (set by "reboot fastboot").
-		if (GetAndClearOneShotBootloaderFlag()) {
-			run_command("reboot fastboot", 0);
-		} else {
-			run_command("reboot", 0);
-		}
+		run_command("reboot", 0);
 		// Fallback if 'reboot' is unavailable or returns
-		printf("Warning: 'reboot' command failed, falling back to do_reset()\n");
 		do_reset(NULL, 0, 0, NULL);
 		break;
 	case EFI_RESET_SHUTDOWN: