Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot: Fix build error ......................................................................
security/vboot: Fix build error
There has been some overlap between changes: CB:40389 introduced a new use of write_secdata while CB:40359 removed that function in favor of safe_write.
Follow the refactor of the latter in the code introduced by the former.
Change-Id: Ib8dfcd61bb79e0a487eaa60e719bd93561f2d97a Signed-off-by: Patrick Georgi pgeorgi@google.com --- M src/security/vboot/secdata_tpm.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/40518/1
diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c index 672578a..d666ae8 100644 --- a/src/security/vboot/secdata_tpm.c +++ b/src/security/vboot/secdata_tpm.c @@ -415,7 +415,7 @@ uint8_t size = VB2_SECDATA_KERNEL_MIN_SIZE; vb2api_secdata_kernel_check(ctx, &size);
- return write_secdata(KERNEL_NV_INDEX, ctx->secdata_kernel, size); + return safe_write(KERNEL_NV_INDEX, ctx->secdata_kernel, size); }
uint32_t antirollback_read_space_rec_hash(uint8_t *data, uint32_t size)
Hello build bot (Jenkins), Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40518
to look at the new patch set (#2).
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
security/vboot, mb/google: Fix build errors
There have been two cases of incompatibilities between overlapping changes, and they need to be resolved in a single commit to unbreak the tree:
1. CB:40389 introduced a new use of write_secdata while CB:40359 removed that function in favor of safe_write.
Follow the refactor of the latter in the code introduced by the former.
2. CB:39849 changed google_chromeec_get_usb_pd_power_info()'s interface and adapted all its users. Except for duffy and kaisa which were only added in CB:40223 and CB:40393 respectively, so reapply the patch to puff's mainboard.c to their mainboard.c files.
Change-Id: Ib8dfcd61bb79e0a487eaa60e719bd93561f2d97a Signed-off-by: Patrick Georgi pgeorgi@google.com --- M src/mainboard/google/hatch/variants/duffy/mainboard.c M src/mainboard/google/hatch/variants/kaisa/mainboard.c M src/security/vboot/secdata_tpm.c 3 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/40518/2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/40518/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40518/2//COMMIT_MSG@22 PS2, Line 22: Add two Fixes: tags?
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 2: Code-Review+1
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40518/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40518/2//COMMIT_MSG@22 PS2, Line 22:
Add two Fixes: tags?
There are now issues around these, so no? Makes me wonder if we should autogenerate issues on the issue tracker when master breaks, but that'd be more of a long-term infrastructure feature.
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 2: Code-Review+2
I can confirm that the build error currently present on master is fixed with this patch. Let's bring it in.
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 2: Code-Review+1
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
security/vboot, mb/google: Fix build errors
There have been two cases of incompatibilities between overlapping changes, and they need to be resolved in a single commit to unbreak the tree:
1. CB:40389 introduced a new use of write_secdata while CB:40359 removed that function in favor of safe_write.
Follow the refactor of the latter in the code introduced by the former.
2. CB:39849 changed google_chromeec_get_usb_pd_power_info()'s interface and adapted all its users. Except for duffy and kaisa which were only added in CB:40223 and CB:40393 respectively, so reapply the patch to puff's mainboard.c to their mainboard.c files.
Change-Id: Ib8dfcd61bb79e0a487eaa60e719bd93561f2d97a Signed-off-by: Patrick Georgi pgeorgi@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/40518 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Christian Walter christian.walter@9elements.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Werner Zeh werner.zeh@siemens.com Reviewed-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/mainboard/google/hatch/variants/duffy/mainboard.c M src/mainboard/google/hatch/variants/kaisa/mainboard.c M src/security/vboot/secdata_tpm.c 3 files changed, 7 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, but someone else must approve Paul Menzel: Looks good to me, approved Werner Zeh: Looks good to me, approved Christian Walter: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/hatch/variants/duffy/mainboard.c b/src/mainboard/google/hatch/variants/duffy/mainboard.c index e8098b9..3f74c96 100644 --- a/src/mainboard/google/hatch/variants/duffy/mainboard.c +++ b/src/mainboard/google/hatch/variants/duffy/mainboard.c @@ -90,8 +90,9 @@ { enum usb_chg_type type; u32 watts; + u16 volts_mv, current_ma; u32 psyspl2 = PUFF_PSYSPL2; // default barrel jack value for U22 - int rv = google_chromeec_get_usb_pd_power_info(&type, &watts); + int rv = google_chromeec_get_usb_pd_power_info(&type, ¤t_ma, &volts_mv);
/* use SoC default value for PsysPL3 and PL4 unless we're on USB-PD*/ conf->tdp_psyspl3 = 0; @@ -99,6 +100,7 @@
if (rv == 0 && type == USB_CHG_TYPE_PD) { /* Detected USB-PD. Base on max value of adapter */ + watts = ((u32)current_ma * volts_mv) / 1000000; psyspl2 = watts; conf->tdp_psyspl3 = SET_PSYSPL2(psyspl2); /* set max possible time window */ diff --git a/src/mainboard/google/hatch/variants/kaisa/mainboard.c b/src/mainboard/google/hatch/variants/kaisa/mainboard.c index e8098b9..3f74c96 100644 --- a/src/mainboard/google/hatch/variants/kaisa/mainboard.c +++ b/src/mainboard/google/hatch/variants/kaisa/mainboard.c @@ -90,8 +90,9 @@ { enum usb_chg_type type; u32 watts; + u16 volts_mv, current_ma; u32 psyspl2 = PUFF_PSYSPL2; // default barrel jack value for U22 - int rv = google_chromeec_get_usb_pd_power_info(&type, &watts); + int rv = google_chromeec_get_usb_pd_power_info(&type, ¤t_ma, &volts_mv);
/* use SoC default value for PsysPL3 and PL4 unless we're on USB-PD*/ conf->tdp_psyspl3 = 0; @@ -99,6 +100,7 @@
if (rv == 0 && type == USB_CHG_TYPE_PD) { /* Detected USB-PD. Base on max value of adapter */ + watts = ((u32)current_ma * volts_mv) / 1000000; psyspl2 = watts; conf->tdp_psyspl3 = SET_PSYSPL2(psyspl2); /* set max possible time window */ diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c index 672578a..d666ae8 100644 --- a/src/security/vboot/secdata_tpm.c +++ b/src/security/vboot/secdata_tpm.c @@ -415,7 +415,7 @@ uint8_t size = VB2_SECDATA_KERNEL_MIN_SIZE; vb2api_secdata_kernel_check(ctx, &size);
- return write_secdata(KERNEL_NV_INDEX, ctx->secdata_kernel, size); + return safe_write(KERNEL_NV_INDEX, ctx->secdata_kernel, size); }
uint32_t antirollback_read_space_rec_hash(uint8_t *data, uint32_t size)
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2482 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2481 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2480 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/2479
Please note: This test is under development and might not be accurate at all!
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40518 )
Change subject: security/vboot, mb/google: Fix build errors ......................................................................
Patch Set 3: Code-Review+2