diff options
author | Leah Rowe <leah@libreboot.org> | 2023-03-18 22:44:34 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-03-18 23:21:15 +0000 |
commit | cffa5679295bffaeec76c7f72cbd7756495b3865 (patch) | |
tree | 4a015d65b6cc24633d67081ecfec2a6d65b3fd8e /resources | |
parent | be3d7b7e69189055fbf8b7904336593a03a17ecd (diff) |
haswell (lenovo t440p/w541): fix S3 suspend/resume
MRC caches in a certain way, that Heads was able to work
around in their build system, for this board.
I've adapted the relevant config differences, from their project
as of heads revision 96440b928acb06de5b925ea12014c9c280b23165
The downside is that CBFS now has to be 8MB in size. The upside
is that the machine also boots much faster
See:
https://github.com/osresearch/heads/pull/1282/commits/f0792117efa177ded19878f652c5a28e8cc62a71
https://github.com/osresearch/heads/pull/1282#issuecomment-1400634600
I have not adapted their IFD changes, versus Libreboot, because theirs
simply has a different version string, and uses different read/write
permission bits for regions as defined in the IFD.
This affects:
t440p_12mb_mrc
w541_12mb_mrc
S3 suspend/resume still broken on these targets which use the libre
MRC init (replacement code by Angel Pons, recently merged in lbmk):
t440p_12mb
w541_12mb
With clever use of FMAP, the rest of the BIOS region might still be
used. However, for our purposes, 8MB CBFS will do just fine.
Heads's changes configure MRC so that caching is handled properly,
for when the machine returns from sleep. Setting CBFS to be any
higher will result in slower boot times, and broken S3 resume, due
to MRC cache misalignment (this is based on my understanding, reading
through the Heads project looking at their research on this).
At some point in the future, Angel's libre MRC code will probably
be finished, and merged, with more fine tuning possible to allow
bigger CBFS sizes.
Diffstat (limited to 'resources')
4 files changed, 22 insertions, 37 deletions
diff --git a/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_corebootfb b/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_corebootfb index d2ca4f6e..dc9df542 100644 --- a/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_corebootfb +++ b/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_corebootfb @@ -109,15 +109,13 @@ CONFIG_VGA_BIOS_ID="8086,0416" CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=256 CONFIG_FMDFILE="" -# CONFIG_NO_POST is not set +CONFIG_NO_POST=y CONFIG_MAINBOARD_VENDOR="LENOVO" -CONFIG_CBFS_SIZE=0xBE0000 +CONFIG_CBFS_SIZE=0x800000 CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=1600 CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=2560 CONFIG_MAX_CPUS=8 # CONFIG_ONBOARD_VGA_IS_PRIMARY is not set -CONFIG_POST_DEVICE=y -CONFIG_POST_IO=y CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb" # CONFIG_VBOOT is not set CONFIG_VBOOT_VBNV_OFFSET=0x2a @@ -131,7 +129,6 @@ CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default" CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout" CONFIG_USBDEBUG_HCD_INDEX=2 CONFIG_BOOT_DEVICE_SPI_FLASH_BUS=0 -# CONFIG_CONSOLE_POST is not set CONFIG_TPM_PIRQ=0x0 CONFIG_MEMLAYOUT_LD_FILE="src/arch/x86/memlayout.ld" CONFIG_DCACHE_RAM_BASE=0xff7c0000 @@ -154,9 +151,6 @@ CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000 CONFIG_PCIEXP_AER=y CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad T440p" CONFIG_HAVE_IFD_BIN=y -CONFIG_PCIEXP_HOTPLUG_BUSES=8 -CONFIG_PCIEXP_HOTPLUG_MEM=0x800000 -CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM=0x10000000 CONFIG_BOARD_LENOVO_THINKPAD_T440P=y # CONFIG_BOARD_LENOVO_THINKPAD_W541 is not set # CONFIG_BOARD_LENOVO_L520 is not set @@ -200,8 +194,8 @@ CONFIG_PS2M_EISAID="LEN0036" CONFIG_THINKPADEC_HKEY_EISAID="LEN0068" CONFIG_GFX_GMA_PANEL_1_PORT="eDP" # CONFIG_DEBUG_SMI is not set -# CONFIG_PCIEXP_L1_SUB_STATE is not set -# CONFIG_PCIEXP_CLK_PM is not set +CONFIG_PCIEXP_L1_SUB_STATE=y +CONFIG_PCIEXP_CLK_PM=y # CONFIG_DRIVERS_UART_8250IO is not set CONFIG_HEAP_SIZE=0x4000 CONFIG_EC_GPE_SCI=0x50 @@ -319,7 +313,7 @@ CONFIG_HASWELL_HIDE_PEG_FROM_MRC=y # Southbridge # CONFIG_SOUTH_BRIDGE_OPTIONS=y -CONFIG_PCIEXP_HOTPLUG=y +# CONFIG_PCIEXP_HOTPLUG is not set CONFIG_INTEL_DESCRIPTOR_MODE_REQUIRED=y CONFIG_SOUTHBRIDGE_INTEL_LYNXPOINT=y CONFIG_FINALIZE_USB_ROUTE_XHCI=y @@ -355,8 +349,8 @@ CONFIG_RCBA_LENGTH=0x4000 # CONFIG_EC_ACPI=y CONFIG_EC_LENOVO_H8=y -# CONFIG_H8_BEEP_ON_DEATH is not set -# CONFIG_H8_FLASH_LEDS_ON_DEATH is not set +CONFIG_H8_BEEP_ON_DEATH=y +CONFIG_H8_FLASH_LEDS_ON_DEATH=y # CONFIG_H8_SUPPORT_BT_ON_WIFI is not set # CONFIG_H8_FN_CTRL_SWAP is not set CONFIG_H8_HAS_BAT_THRESHOLDS_IMPL=y @@ -497,7 +491,7 @@ CONFIG_GFX_GMA_ANALOG_I2C_PORT="PCH_DAC" # CONFIG_DRIVERS_NXP_UWB_SR1XX is not set # CONFIG_DRIVERS_PS2_KEYBOARD is not set CONFIG_DRIVERS_MC146818=y -# CONFIG_USE_PC_CMOS_ALTCENTURY is not set +CONFIG_USE_PC_CMOS_ALTCENTURY=y CONFIG_MEMORY_MAPPED_TPM=y CONFIG_TPM_TIS_BASE_ADDRESS=0xfed40000 # CONFIG_DRIVERS_SIL_3114 is not set diff --git a/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_txtmode b/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_txtmode index f30f4596..3148ca53 100644 --- a/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_txtmode +++ b/resources/coreboot/t440p_12mb_mrc/config/libgfxinit_txtmode @@ -109,13 +109,11 @@ CONFIG_VGA_BIOS_ID="8086,0416" CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=256 CONFIG_FMDFILE="" -# CONFIG_NO_POST is not set +CONFIG_NO_POST=y CONFIG_MAINBOARD_VENDOR="LENOVO" -CONFIG_CBFS_SIZE=0xBE0000 +CONFIG_CBFS_SIZE=0x800000 CONFIG_MAX_CPUS=8 # CONFIG_ONBOARD_VGA_IS_PRIMARY is not set -CONFIG_POST_DEVICE=y -CONFIG_POST_IO=y CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb" # CONFIG_VBOOT is not set CONFIG_VBOOT_VBNV_OFFSET=0x2a @@ -152,9 +150,6 @@ CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000 CONFIG_PCIEXP_AER=y CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad T440p" CONFIG_HAVE_IFD_BIN=y -CONFIG_PCIEXP_HOTPLUG_BUSES=8 -CONFIG_PCIEXP_HOTPLUG_MEM=0x800000 -CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM=0x10000000 CONFIG_BOARD_LENOVO_THINKPAD_T440P=y # CONFIG_BOARD_LENOVO_THINKPAD_W541 is not set # CONFIG_BOARD_LENOVO_L520 is not set @@ -198,8 +193,8 @@ CONFIG_PS2M_EISAID="LEN0036" CONFIG_THINKPADEC_HKEY_EISAID="LEN0068" CONFIG_GFX_GMA_PANEL_1_PORT="eDP" # CONFIG_DEBUG_SMI is not set -# CONFIG_PCIEXP_L1_SUB_STATE is not set -# CONFIG_PCIEXP_CLK_PM is not set +CONFIG_PCIEXP_L1_SUB_STATE=y +CONFIG_PCIEXP_CLK_PM=y # CONFIG_DRIVERS_UART_8250IO is not set CONFIG_HEAP_SIZE=0x4000 CONFIG_EC_GPE_SCI=0x50 @@ -317,7 +312,7 @@ CONFIG_HASWELL_HIDE_PEG_FROM_MRC=y # Southbridge # CONFIG_SOUTH_BRIDGE_OPTIONS=y -CONFIG_PCIEXP_HOTPLUG=y +# CONFIG_PCIEXP_HOTPLUG is not set CONFIG_INTEL_DESCRIPTOR_MODE_REQUIRED=y CONFIG_SOUTHBRIDGE_INTEL_LYNXPOINT=y CONFIG_FINALIZE_USB_ROUTE_XHCI=y @@ -353,8 +348,8 @@ CONFIG_RCBA_LENGTH=0x4000 # CONFIG_EC_ACPI=y CONFIG_EC_LENOVO_H8=y -# CONFIG_H8_BEEP_ON_DEATH is not set -# CONFIG_H8_FLASH_LEDS_ON_DEATH is not set +CONFIG_H8_BEEP_ON_DEATH=y +CONFIG_H8_FLASH_LEDS_ON_DEATH=y # CONFIG_H8_SUPPORT_BT_ON_WIFI is not set # CONFIG_H8_FN_CTRL_SWAP is not set CONFIG_H8_HAS_BAT_THRESHOLDS_IMPL=y @@ -493,7 +488,7 @@ CONFIG_GFX_GMA_ANALOG_I2C_PORT="PCH_DAC" # CONFIG_DRIVERS_NXP_UWB_SR1XX is not set # CONFIG_DRIVERS_PS2_KEYBOARD is not set CONFIG_DRIVERS_MC146818=y -# CONFIG_USE_PC_CMOS_ALTCENTURY is not set +CONFIG_USE_PC_CMOS_ALTCENTURY=y CONFIG_MEMORY_MAPPED_TPM=y CONFIG_TPM_TIS_BASE_ADDRESS=0xfed40000 CONFIG_VGA=y diff --git a/resources/coreboot/w541_12mb_mrc/config/libgfxinit_corebootfb b/resources/coreboot/w541_12mb_mrc/config/libgfxinit_corebootfb index ecee80ba..efd47f24 100644 --- a/resources/coreboot/w541_12mb_mrc/config/libgfxinit_corebootfb +++ b/resources/coreboot/w541_12mb_mrc/config/libgfxinit_corebootfb @@ -109,15 +109,13 @@ CONFIG_VGA_BIOS_ID="8086,0166" CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=256 CONFIG_FMDFILE="" -# CONFIG_NO_POST is not set +CONFIG_NO_POST=y CONFIG_MAINBOARD_VENDOR="LENOVO" -CONFIG_CBFS_SIZE=0xBE0000 +CONFIG_CBFS_SIZE=0x800000 CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=1600 CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=2560 CONFIG_MAX_CPUS=8 # CONFIG_ONBOARD_VGA_IS_PRIMARY is not set -CONFIG_POST_DEVICE=y -CONFIG_POST_IO=y CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb" # CONFIG_VBOOT is not set CONFIG_VBOOT_VBNV_OFFSET=0x2a @@ -490,7 +488,7 @@ CONFIG_GFX_GMA_ANALOG_I2C_PORT="PCH_DAC" # CONFIG_DRIVERS_NXP_UWB_SR1XX is not set # CONFIG_DRIVERS_PS2_KEYBOARD is not set CONFIG_DRIVERS_MC146818=y -# CONFIG_USE_PC_CMOS_ALTCENTURY is not set +CONFIG_USE_PC_CMOS_ALTCENTURY=y CONFIG_MEMORY_MAPPED_TPM=y CONFIG_TPM_TIS_BASE_ADDRESS=0xfed40000 # CONFIG_DRIVERS_SIL_3114 is not set diff --git a/resources/coreboot/w541_12mb_mrc/config/libgfxinit_txtmode b/resources/coreboot/w541_12mb_mrc/config/libgfxinit_txtmode index 360ca16c..dbfb5d26 100644 --- a/resources/coreboot/w541_12mb_mrc/config/libgfxinit_txtmode +++ b/resources/coreboot/w541_12mb_mrc/config/libgfxinit_txtmode @@ -109,13 +109,11 @@ CONFIG_VGA_BIOS_ID="8086,0166" CONFIG_DIMM_MAX=4 CONFIG_DIMM_SPD_SIZE=256 CONFIG_FMDFILE="" -# CONFIG_NO_POST is not set +CONFIG_NO_POST=y CONFIG_MAINBOARD_VENDOR="LENOVO" -CONFIG_CBFS_SIZE=0xBE0000 +CONFIG_CBFS_SIZE=0x800000 CONFIG_MAX_CPUS=8 # CONFIG_ONBOARD_VGA_IS_PRIMARY is not set -CONFIG_POST_DEVICE=y -CONFIG_POST_IO=y CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb" # CONFIG_VBOOT is not set CONFIG_VBOOT_VBNV_OFFSET=0x2a @@ -486,7 +484,7 @@ CONFIG_GFX_GMA_ANALOG_I2C_PORT="PCH_DAC" # CONFIG_DRIVERS_NXP_UWB_SR1XX is not set # CONFIG_DRIVERS_PS2_KEYBOARD is not set CONFIG_DRIVERS_MC146818=y -# CONFIG_USE_PC_CMOS_ALTCENTURY is not set +CONFIG_USE_PC_CMOS_ALTCENTURY=y CONFIG_MEMORY_MAPPED_TPM=y CONFIG_TPM_TIS_BASE_ADDRESS=0xfed40000 CONFIG_VGA=y |