Yu-Ping Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
security/vboot: Convert reboot-related errors to vboot2-style
Error codes are renamed as follows:
VBERROR_SHUTDOWN_REQUESTED --> VB2_REQUEST_SHUTDOWN
VBERROR_REBOOT_REQUIRED --> VB2_REQUEST_REBOOT
VBERROR_EC_REBOOT_TO_SWITCH_RW --> VB2_REQUEST_REBOOT_EC_SWITCH_RW
VBERROR_EC_REBOOT_TO_RO_REQUIRED --> VB2_REQUEST_REBOOT_EC_TO_RO
BRANCH=none BUG=b:124141368, chromium:988410 TEST=emerge-nami coreboot
Change-Id: Id82cf85f49dfb63a9c3d41aacd3969786bffcac7 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/security/vboot/ec_sync.c 1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/40749/1
diff --git a/src/security/vboot/ec_sync.c b/src/security/vboot/ec_sync.c index 580e6c6..39950a8 100644 --- a/src/security/vboot/ec_sync.c +++ b/src/security/vboot/ec_sync.c @@ -56,7 +56,7 @@ case VB2_SUCCESS: break;
- case VBERROR_EC_REBOOT_TO_RO_REQUIRED: + case VB2_REQUEST_REBOOT_EC_TO_RO: printk(BIOS_INFO, "EC Reboot requested. Doing cold reboot\n"); if (google_chromeec_reboot(0, EC_REBOOT_COLD, 0)) printk(BIOS_EMERG, "Failed to get EC to cold reboot\n"); @@ -65,7 +65,7 @@ break;
/* Only for EC-EFS */ - case VBERROR_EC_REBOOT_TO_SWITCH_RW: + case VB2_REQUEST_REBOOT_EC_SWITCH_RW: printk(BIOS_INFO, "Switch EC slot requested. Doing cold reboot\n"); if (google_chromeec_reboot(0, EC_REBOOT_COLD, EC_REBOOT_FLAG_SWITCH_RW_SLOT)) @@ -74,7 +74,7 @@ halt(); break;
- case VBERROR_REBOOT_REQUIRED: + case VB2_REQUEST_REBOOT: printk(BIOS_INFO, "Reboot requested. Doing warm reboot\n"); vboot_reboot(); break; @@ -203,7 +203,7 @@ if (!enable) { /* If protection is still enabled, need reboot */ if (resp.flags & protected_region) - return VBERROR_EC_REBOOT_TO_RO_REQUIRED; + return VB2_REQUEST_REBOOT_EC_TO_RO;
return VB2_SUCCESS; } @@ -222,7 +222,7 @@
/* If RW will be protected at boot but not now, need a reboot */ if (resp.flags & EC_FLASH_PROTECT_ALL_AT_BOOT) - return VBERROR_EC_REBOOT_TO_RO_REQUIRED; + return VB2_REQUEST_REBOOT_EC_TO_RO;
/* Otherwise, it's an error */ return VB2_ERROR_UNKNOWN; @@ -479,7 +479,7 @@ if (limit_power) { printk(BIOS_INFO, "EC requests limited power usage. Request shutdown.\n"); - return VBERROR_SHUTDOWN_REQUESTED; + return VB2_REQUEST_SHUTDOWN; } else { printk(BIOS_INFO, "Waited %luus to clear limit power flag.\n", stopwatch_duration_usecs(&sw));