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));
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
Patch Set 1: Code-Review-1
Will update vboot submodule after https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_referen... is merged.
Yu-Ping Wu has removed Aaron Durbin from this change. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
Removed reviewer Aaron Durbin.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
Patch Set 1: Code-Review+2
Hello build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40749
to look at the new patch set (#2).
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
Cq-Depend: chromium:2143030 Change-Id: Id82cf85f49dfb63a9c3d41aacd3969786bffcac7 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M 3rdparty/vboot M src/security/vboot/ec_sync.c 2 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/40749/2
Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
Patch Set 2:
Can we split the 3rdparty/vboot uprev to a separate commit?
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
Patch Set 3:
Can we split the 3rdparty/vboot uprev to a separate commit?
Done.
Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40749 )
Change subject: security/vboot: Convert reboot-related errors to vboot2-style ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has submitted this change. ( 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
Cq-Depend: chromium:2143030 Change-Id: Id82cf85f49dfb63a9c3d41aacd3969786bffcac7 Signed-off-by: Yu-Ping Wu yupingso@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/40749 Reviewed-by: Joel Kitching kitching@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/security/vboot/ec_sync.c 1 file changed, 6 insertions(+), 6 deletions(-)
Approvals: build bot (Jenkins): Verified Joel Kitching: Looks good to me, approved
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));