Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
mb/lenovo/x60: Add VBOOT support
This also adds vboot support for the i945 platform in general.
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd M src/northbridge/intel/i945/Kconfig 4 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37148/1
diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig index a1a5fec..3b5fa85 100644 --- a/src/mainboard/lenovo/x60/Kconfig +++ b/src/mainboard/lenovo/x60/Kconfig @@ -26,6 +26,20 @@ select I945_LVDS select INTEL_GMA_HAVE_VBT
+config VBOOT + select VBOOT_VBNV_CMOS + select GBB_FLAG_DISABLE_LID_SHUTDOWN + select GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC + select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC + select GBB_FLAG_DISABLE_FWMP + +config VBOOT_SLOTS_RW_A + default y + +config VBOOT_VBNV_OFFSET + hex + default 0x78 + config MAINBOARD_DIR string default lenovo/x60 diff --git a/src/mainboard/lenovo/x60/cmos.layout b/src/mainboard/lenovo/x60/cmos.layout index bfc78bc..4de7c06 100644 --- a/src/mainboard/lenovo/x60/cmos.layout +++ b/src/mainboard/lenovo/x60/cmos.layout @@ -94,6 +94,8 @@ 1040 8 r 0 RCVENMT 1048 4 r 0 C0DRT1 1052 4 r 0 C1DRT1 + +1056 128 r 0 vbnv # -----------------------------------------------------------------
enumerations diff --git a/src/mainboard/lenovo/x60/vboot-rwa.fmd b/src/mainboard/lenovo/x60/vboot-rwa.fmd new file mode 100644 index 0000000..b21cff3 --- /dev/null +++ b/src/mainboard/lenovo/x60/vboot-rwa.fmd @@ -0,0 +1,19 @@ +FLASH@0xffe00000 0x200000 { + BIOS { + RW_SECTION_A 0x100000 { + VBLOCK_A 0x10000 + FW_MAIN_A(CBFS) + RW_FWID_A 0x40 + } + RW_VPD(PRESERVE) 0x1000 + CONSOLE 0x10000 + WP_RO { + FMAP 0x800 + RO_FRID 0x40 + RO_PADDING 0x7c0 + RO_VPD(PRESERVE) 0x1000 + GBB 0x1e000 + COREBOOT(CBFS) + } + } +} diff --git a/src/northbridge/intel/i945/Kconfig b/src/northbridge/intel/i945/Kconfig index a0550ec..a624bf4 100644 --- a/src/northbridge/intel/i945/Kconfig +++ b/src/northbridge/intel/i945/Kconfig @@ -29,6 +29,10 @@ select PARALLEL_MP select C_ENVIRONMENT_BOOTBLOCK
+config VBOOT + select VBOOT_STARTS_IN_BOOTBLOCK + select VBOOT_SEPARATE_VERSTAGE + config NORTHBRIDGE_INTEL_SUBTYPE_I945GC def_bool n config NORTHBRIDGE_INTEL_SUBTYPE_I945GM
Peter Lemenkov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 1: Code-Review+2
Peter Lemenkov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 1: Code-Review+1
Looks good to me. I think we should merge it since it was tested to work.
Peter Lemenkov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 1: Code-Review+2
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/1/src/mainboard/lenovo/x60/Kc... File src/mainboard/lenovo/x60/Kconfig:
https://review.coreboot.org/c/coreboot/+/37148/1/src/mainboard/lenovo/x60/Kc... PS1, Line 41: 0x78 Not synced with cmos.layout, should be 0x76...
Hello Alexander Couzens, Patrick Rudolph, Peter Lemenkov, Paul Menzel, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37148
to look at the new patch set (#2).
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
mb/lenovo/x60: Add VBOOT support
This also adds vboot support for the i945 platform in general.
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd M src/northbridge/intel/i945/Kconfig 4 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37148/2
Peter Lemenkov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/1/src/mainboard/lenovo/x60/Kc... File src/mainboard/lenovo/x60/Kconfig:
https://review.coreboot.org/c/coreboot/+/37148/1/src/mainboard/lenovo/x60/Kc... PS1, Line 41: 0x78
Not synced with cmos.layout, should be 0x76...
Done
Peter Lemenkov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 2: Code-Review+1
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 2: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... File src/mainboard/lenovo/x60/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... PS2, Line 1: FLASH@0xffe00000 0x200000 Isn't there some "FLASH 2M" or similar thing?
Hello build bot (Jenkins), Peter Lemenkov, Paul Menzel, Angel Pons, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37148
to look at the new patch set (#3).
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
mb/lenovo/x60: Add VBOOT support
This also adds vboot support for the i945 platform in general.
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd M src/northbridge/intel/i945/Kconfig 4 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37148/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/3//COMMIT_MSG@7 PS3, Line 7: VBOOT lowercase: vboot
Hello build bot (Jenkins), Peter Lemenkov, Paul Menzel, Angel Pons, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37148
to look at the new patch set (#4).
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
mb/lenovo/x60: Add vboot support
This also adds vboot support for the i945 platform in general.
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd M src/northbridge/intel/i945/Kconfig 4 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37148/4
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37148/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/3//COMMIT_MSG@7 PS3, Line 7: VBOOT
lowercase: vboot
Done
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... File src/mainboard/lenovo/x60/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... PS2, Line 1: FLASH@0xffe00000 0x200000
Isn't there some "FLASH 2M" or similar thing?
Ping
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... File src/mainboard/lenovo/x60/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... PS2, Line 1: FLASH@0xffe00000 0x200000
Ping
With this the The FLASH base would be 0 but it is never used in at least coreboot. Any idea on that?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... File src/mainboard/lenovo/x60/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... PS2, Line 1: FLASH@0xffe00000 0x200000
Ping […]
I don't think it matters much on x86, other fmaps do it that way and it works
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/4//COMMIT_MSG@9 PS4, Line 9: This also adds vboot support for the i945 platform in general. Can you please split this into a separate commit, and describe there what has to be done on a platform to add support? Add CMOS section and add FMAP?
Hello build bot (Jenkins), Peter Lemenkov, Paul Menzel, Angel Pons, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37148
to look at the new patch set (#5).
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
mb/lenovo/x60: Add VBOOT support
This also adds vboot support for the i945 platform in general.
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd 3 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37148/5
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37148/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/4//COMMIT_MSG@9 PS4, Line 9: This also adds vboot support for the i945 platform in general.
Can you please split this into a separate commit, and describe there what has to be done on a platfo […]
But adding vboot support to i945 is just adding four lines! (╯°□°)╯︵ ┻━┻
/s
Bleh, not a big deal
https://review.coreboot.org/c/coreboot/+/37148/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/5//COMMIT_MSG@7 PS5, Line 7: VBOOT lowercase? vboot
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add VBOOT support ......................................................................
Patch Set 5: Code-Review+2
Hello build bot (Jenkins), Peter Lemenkov, Paul Menzel, Angel Pons, Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37148
to look at the new patch set (#6).
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
mb/lenovo/x60: Add vboot support
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd 3 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37148/6
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/5//COMMIT_MSG@7 PS5, Line 7: VBOOT
lowercase? vboot
Done
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37148/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37148/4//COMMIT_MSG@9 PS4, Line 9: This also adds vboot support for the i945 platform in general.
But adding vboot support to i945 is just adding four lines! (╯°□°)╯︵ ┻━┻ […]
Done
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... File src/mainboard/lenovo/x60/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... PS2, Line 1: FLASH@0xffe00000 0x200000
I don't think it matters much on x86, other fmaps do it that way and it works
"`base`: 64 bit integer for the address of the firmware binary."
No idea if that is mapped or if that is the flash base... A lot of X86 seem to use the memory mapped address.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... File src/mainboard/lenovo/x60/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/37148/2/src/mainboard/lenovo/x60/vb... PS2, Line 1: FLASH@0xffe00000 0x200000
"`base`: 64 bit integer for the address of the firmware binary." […]
Bleh, it doesn't matter.
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
mb/lenovo/x60: Add vboot support
It's relatively slow to boot. It takes 1.5s to get to the payload. In timestamps there are entries related to TPM, which are somewhat weird given that the TPM is not enabled on this device (buggy).
TESTED: boot X60, with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW=y you can force the recovery bootpath.
Change-Id: Ia9666194e98b7d23b97eaff08e6177684e35eca7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/37148 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/lenovo/x60/Kconfig M src/mainboard/lenovo/x60/cmos.layout A src/mainboard/lenovo/x60/vboot-rwa.fmd 3 files changed, 39 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig index 994a071..5083fd5 100644 --- a/src/mainboard/lenovo/x60/Kconfig +++ b/src/mainboard/lenovo/x60/Kconfig @@ -26,6 +26,24 @@ select I945_LVDS select INTEL_GMA_HAVE_VBT
+config VBOOT + select VBOOT_VBNV_CMOS + select GBB_FLAG_DISABLE_LID_SHUTDOWN + select GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC + select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC + select GBB_FLAG_DISABLE_FWMP + +config VBOOT_SLOTS_RW_A + default y + +config VBOOT_VBNV_OFFSET + hex + default 0x76 + +config FMDFILE + string + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa.fmd" if VBOOT + config MAINBOARD_DIR string default "lenovo/x60" diff --git a/src/mainboard/lenovo/x60/cmos.layout b/src/mainboard/lenovo/x60/cmos.layout index 58fbef5..a402f05 100644 --- a/src/mainboard/lenovo/x60/cmos.layout +++ b/src/mainboard/lenovo/x60/cmos.layout @@ -93,6 +93,8 @@ 1040 8 r 0 RCVENMT 1048 4 r 0 C0DRT1 1052 4 r 0 C1DRT1 + +1056 128 r 0 vbnv # -----------------------------------------------------------------
enumerations diff --git a/src/mainboard/lenovo/x60/vboot-rwa.fmd b/src/mainboard/lenovo/x60/vboot-rwa.fmd new file mode 100644 index 0000000..b21cff3 --- /dev/null +++ b/src/mainboard/lenovo/x60/vboot-rwa.fmd @@ -0,0 +1,19 @@ +FLASH@0xffe00000 0x200000 { + BIOS { + RW_SECTION_A 0x100000 { + VBLOCK_A 0x10000 + FW_MAIN_A(CBFS) + RW_FWID_A 0x40 + } + RW_VPD(PRESERVE) 0x1000 + CONSOLE 0x10000 + WP_RO { + FMAP 0x800 + RO_FRID 0x40 + RO_PADDING 0x7c0 + RO_VPD(PRESERVE) 0x1000 + GBB 0x1e000 + COREBOOT(CBFS) + } + } +}
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37148 )
Change subject: mb/lenovo/x60: Add vboot support ......................................................................
Patch Set 7:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2326 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2325 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2324
Please note: This test is under development and might not be accurate at all!