Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
mb/lenovo/{x200,t400}: Add VBOOT support
Tested on thinkpad X200 with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW selected, the RW_A slot is properly selected unless the FN button is pressed. 600+ms are spend waiting for the EC to be ready.
Change-Id: I689fe310e5b828f2e68fcbe9afd582f35738ed1d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/t400/Kconfig M src/mainboard/lenovo/t400/cmos.layout A src/mainboard/lenovo/t400/vboot-rwa.fmd M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/cmos.layout A src/mainboard/lenovo/x200/vboot-rwa.fmd 6 files changed, 93 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/35998/1
diff --git a/src/mainboard/lenovo/t400/Kconfig b/src/mainboard/lenovo/t400/Kconfig index 2caf1d3..8d286c4 100644 --- a/src/mainboard/lenovo/t400/Kconfig +++ b/src/mainboard/lenovo/t400/Kconfig @@ -28,6 +28,24 @@ select MAINBOARD_USES_IFD_GBE_REGION if !BOARD_LENOVO_R500 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 0x82 + +config FMDFILE + string + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa.fmd" if VBOOT + config MAINBOARD_DIR string default lenovo/t400 diff --git a/src/mainboard/lenovo/t400/cmos.layout b/src/mainboard/lenovo/t400/cmos.layout index 62072dc..9ab29b4 100644 --- a/src/mainboard/lenovo/t400/cmos.layout +++ b/src/mainboard/lenovo/t400/cmos.layout @@ -88,6 +88,9 @@ # RAM initialization internal data 1024 128 r 0 read_training_results
+# VBOOT +1152 128 r 0 vbnv + # -----------------------------------------------------------------
enumerations diff --git a/src/mainboard/lenovo/t400/vboot-rwa.fmd b/src/mainboard/lenovo/t400/vboot-rwa.fmd new file mode 100644 index 0000000..b6714a6 --- /dev/null +++ b/src/mainboard/lenovo/t400/vboot-rwa.fmd @@ -0,0 +1,25 @@ +FLASH@0xff800000 0x800000 { + SI_ALL@0x0 0x500000 { + SI_DESC@0x0 0x1000 + SI_GBE@0x1000 0x2000 + SI_ME@0x3000 0x4ed000 + } + SI_BIOS@0x600000 0x200000 { + RW_SECTION_A 0x100000 { + VBLOCK_A 0x10000 + FW_MAIN_A(CBFS) + RW_FWID_A 0x40 + } + RW_VPD(PRESERVE) 0x1000 + CONSOLE 0x10000 + SMMSTORE(PRESERVE) 0x40000 + WP_RO { + FMAP 0x800 + RO_FRID 0x40 + RO_PADDING 0x7c0 + RO_VPD(PRESERVE) 0x1000 + GBB 0x1e000 + COREBOOT(CBFS) + } + } +} diff --git a/src/mainboard/lenovo/x200/Kconfig b/src/mainboard/lenovo/x200/Kconfig index 7b905bc..406faae 100644 --- a/src/mainboard/lenovo/x200/Kconfig +++ b/src/mainboard/lenovo/x200/Kconfig @@ -24,6 +24,24 @@ select MAINBOARD_HAS_LIBGFXINIT select MAINBOARD_USES_IFD_GBE_REGION
+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 0x82 + +config FMDFILE + string + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa.fmd" if VBOOT + config MAINBOARD_DIR string default lenovo/x200 diff --git a/src/mainboard/lenovo/x200/cmos.layout b/src/mainboard/lenovo/x200/cmos.layout index 4a38146..ebae12d 100644 --- a/src/mainboard/lenovo/x200/cmos.layout +++ b/src/mainboard/lenovo/x200/cmos.layout @@ -86,6 +86,10 @@ # RAM initialization internal data 1024 128 r 0 read_training_results
+# VBOOT +1152 128 r 0 vbnv + + # -----------------------------------------------------------------
enumerations diff --git a/src/mainboard/lenovo/x200/vboot-rwa.fmd b/src/mainboard/lenovo/x200/vboot-rwa.fmd new file mode 100644 index 0000000..b6714a6 --- /dev/null +++ b/src/mainboard/lenovo/x200/vboot-rwa.fmd @@ -0,0 +1,25 @@ +FLASH@0xff800000 0x800000 { + SI_ALL@0x0 0x500000 { + SI_DESC@0x0 0x1000 + SI_GBE@0x1000 0x2000 + SI_ME@0x3000 0x4ed000 + } + SI_BIOS@0x600000 0x200000 { + RW_SECTION_A 0x100000 { + VBLOCK_A 0x10000 + FW_MAIN_A(CBFS) + RW_FWID_A 0x40 + } + RW_VPD(PRESERVE) 0x1000 + CONSOLE 0x10000 + SMMSTORE(PRESERVE) 0x40000 + WP_RO { + FMAP 0x800 + RO_FRID 0x40 + RO_PADDING 0x7c0 + RO_VPD(PRESERVE) 0x1000 + GBB 0x1e000 + COREBOOT(CBFS) + } + } +}
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35998/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35998/1//COMMIT_MSG@11 PS1, Line 11: spend Seems worth to be added to documentation
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35998/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35998/1//COMMIT_MSG@11 PS1, Line 11: spend
Seems worth to be added to documentation
yes I intend to add x200 and x201 documentation and thinkpad vboot documentation in general (with fn to recovery). RW_A only + vboot + c_env_bb is quite useful for developers
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 12:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... File src/mainboard/lenovo/x200/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 5: SI_ME@0x3000 0x4ed000 /me stumbled and fell into a 64KiB gap
intended?
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 6: } 1MiB gap, intended?
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 26: empty line?
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... File src/mainboard/lenovo/x200/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 6: }
1MiB gap, intended?
Pure copying error, since I always used --ifd -i bios.
Hello Alexander Couzens, Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35998
to look at the new patch set (#14).
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
mb/lenovo/{x200,t400}: Add VBOOT support
Tested on thinkpad X200 with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW selected, the RW_A slot is properly selected unless the FN button is pressed. 600+ms are spend waiting for the EC to be ready.
Change-Id: I689fe310e5b828f2e68fcbe9afd582f35738ed1d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/t400/Kconfig M src/mainboard/lenovo/t400/cmos.layout A src/mainboard/lenovo/t400/vboot-rwa.fmd M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/cmos.layout A src/mainboard/lenovo/x200/vboot-rwa.fmd 6 files changed, 94 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/35998/14
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 14:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35998/14/src/mainboard/lenovo/t400/... File src/mainboard/lenovo/t400/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/35998/14/src/mainboard/lenovo/t400/... PS14, Line 6: } Same gaps here, intentional?
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... File src/mainboard/lenovo/x200/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 5: SI_ME@0x3000 0x4ed000
/me stumbled and fell into a 64KiB gap […]
Done
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 6: }
1MiB gap, intended? […]
Done
Hello Alexander Couzens, Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35998
to look at the new patch set (#15).
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
mb/lenovo/{x200,t400}: Add VBOOT support
Tested on thinkpad X200 with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW selected, the RW_A slot is properly selected unless the FN button is pressed. 600+ms are spend waiting for the EC to be ready.
Change-Id: I689fe310e5b828f2e68fcbe9afd582f35738ed1d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/t400/Kconfig M src/mainboard/lenovo/t400/cmos.layout A src/mainboard/lenovo/t400/vboot-rwa.fmd M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/cmos.layout A src/mainboard/lenovo/x200/vboot-rwa.fmd 6 files changed, 95 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/35998/15
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 15:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35998/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35998/1//COMMIT_MSG@11 PS1, Line 11: spend
Seems worth to be added to documentation […]
Ack
https://review.coreboot.org/c/coreboot/+/35998/14/src/mainboard/lenovo/t400/... File src/mainboard/lenovo/t400/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/35998/14/src/mainboard/lenovo/t400/... PS14, Line 6: }
Same gaps here, intentional?
Done
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... File src/mainboard/lenovo/x200/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/35998/12/src/mainboard/lenovo/x200/... PS12, Line 26:
empty line?
just noise, why does Gerrit show these?
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
Patch Set 15: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35998 )
Change subject: mb/lenovo/{x200,t400}: Add VBOOT support ......................................................................
mb/lenovo/{x200,t400}: Add VBOOT support
Tested on thinkpad X200 with CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW selected, the RW_A slot is properly selected unless the FN button is pressed. 600+ms are spend waiting for the EC to be ready.
Change-Id: I689fe310e5b828f2e68fcbe9afd582f35738ed1d Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/35998 Reviewed-by: Nico Huber nico.h@gmx.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/lenovo/t400/Kconfig M src/mainboard/lenovo/t400/cmos.layout A src/mainboard/lenovo/t400/vboot-rwa.fmd M src/mainboard/lenovo/x200/Kconfig M src/mainboard/lenovo/x200/cmos.layout A src/mainboard/lenovo/x200/vboot-rwa.fmd 6 files changed, 95 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/mainboard/lenovo/t400/Kconfig b/src/mainboard/lenovo/t400/Kconfig index 2caf1d3..8d286c4 100644 --- a/src/mainboard/lenovo/t400/Kconfig +++ b/src/mainboard/lenovo/t400/Kconfig @@ -28,6 +28,24 @@ select MAINBOARD_USES_IFD_GBE_REGION if !BOARD_LENOVO_R500 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 0x82 + +config FMDFILE + string + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa.fmd" if VBOOT + config MAINBOARD_DIR string default lenovo/t400 diff --git a/src/mainboard/lenovo/t400/cmos.layout b/src/mainboard/lenovo/t400/cmos.layout index 62072dc..9ab29b4 100644 --- a/src/mainboard/lenovo/t400/cmos.layout +++ b/src/mainboard/lenovo/t400/cmos.layout @@ -88,6 +88,9 @@ # RAM initialization internal data 1024 128 r 0 read_training_results
+# VBOOT +1152 128 r 0 vbnv + # -----------------------------------------------------------------
enumerations diff --git a/src/mainboard/lenovo/t400/vboot-rwa.fmd b/src/mainboard/lenovo/t400/vboot-rwa.fmd new file mode 100644 index 0000000..4af3fcd --- /dev/null +++ b/src/mainboard/lenovo/t400/vboot-rwa.fmd @@ -0,0 +1,26 @@ +FLASH@0xff800000 0x800000 { + SI_ALL@0x0 0x600000 { + SI_DESC@0x0 0x1000 + SI_ME@0x1000 0x5f5000 + SI_GBE@0x5f6000 0x2000 + SI_PD@0x5f8000 0x8000 + } + SI_BIOS@0x600000 0x200000 { + RW_SECTION_A 0x100000 { + VBLOCK_A 0x10000 + FW_MAIN_A(CBFS) + RW_FWID_A 0x40 + } + RW_VPD(PRESERVE) 0x1000 + CONSOLE 0x10000 + SMMSTORE(PRESERVE) 0x40000 + WP_RO { + FMAP 0x800 + RO_FRID 0x40 + RO_PADDING 0x7c0 + RO_VPD(PRESERVE) 0x1000 + GBB 0x1e000 + COREBOOT(CBFS) + } + } +} diff --git a/src/mainboard/lenovo/x200/Kconfig b/src/mainboard/lenovo/x200/Kconfig index fab8a88..5e88c21 100644 --- a/src/mainboard/lenovo/x200/Kconfig +++ b/src/mainboard/lenovo/x200/Kconfig @@ -24,6 +24,24 @@ select MAINBOARD_HAS_LIBGFXINIT select MAINBOARD_USES_IFD_GBE_REGION
+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 0x82 + +config FMDFILE + string + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa.fmd" if VBOOT + config MAINBOARD_DIR string default lenovo/x200 diff --git a/src/mainboard/lenovo/x200/cmos.layout b/src/mainboard/lenovo/x200/cmos.layout index 4a38146..ebae12d 100644 --- a/src/mainboard/lenovo/x200/cmos.layout +++ b/src/mainboard/lenovo/x200/cmos.layout @@ -86,6 +86,10 @@ # RAM initialization internal data 1024 128 r 0 read_training_results
+# VBOOT +1152 128 r 0 vbnv + + # -----------------------------------------------------------------
enumerations diff --git a/src/mainboard/lenovo/x200/vboot-rwa.fmd b/src/mainboard/lenovo/x200/vboot-rwa.fmd new file mode 100644 index 0000000..4af3fcd --- /dev/null +++ b/src/mainboard/lenovo/x200/vboot-rwa.fmd @@ -0,0 +1,26 @@ +FLASH@0xff800000 0x800000 { + SI_ALL@0x0 0x600000 { + SI_DESC@0x0 0x1000 + SI_ME@0x1000 0x5f5000 + SI_GBE@0x5f6000 0x2000 + SI_PD@0x5f8000 0x8000 + } + SI_BIOS@0x600000 0x200000 { + RW_SECTION_A 0x100000 { + VBLOCK_A 0x10000 + FW_MAIN_A(CBFS) + RW_FWID_A 0x40 + } + RW_VPD(PRESERVE) 0x1000 + CONSOLE 0x10000 + SMMSTORE(PRESERVE) 0x40000 + WP_RO { + FMAP 0x800 + RO_FRID 0x40 + RO_PADDING 0x7c0 + RO_VPD(PRESERVE) 0x1000 + GBB 0x1e000 + COREBOOT(CBFS) + } + } +}