From f0792117efa177ded19878f652c5a28e8cc62a71 Mon Sep 17 00:00:00 2001 From: Rocky Breslow <1774125+rbreslow@users.noreply.github.com> Date: Tue, 10 Jan 2023 21:29:55 -0500 Subject: [PATCH] Adjust T440p default Coreboot defconfig options Remove options that haven't deviated from defaults in the Coreboot Kconfig, despite being saved by `make savedefconfig`. Also, add `CONFIG_BOARD_LENOVO_THINKPAD_T440P`, which was missing from the `make savedefconfig` output, causing Heads builds to fail. And finally, bump `CONFIG_CBFS_SIZE` to `0x800000` (8 MiB to bytes to hexadecimal). This value for the CBFS size is arbitrary. Originally, I had totaled the size of all binary blobs, subtracted that from the T440p's ROM size (12 MiB), and used the remaining space as the CBFS size (~11.68 MiB). However, this caused very long RAM initialization times (courtesy of `cbmem -t`). And, an anecdote in https://groups.google.com/a/chromium.org/g/chromium-os-reviews/c/lUqRrGUoEBY/m/ka7L1f2BS8gJ suggested that this value needs to be a power of 2. So, I picked a size I expected our Linux payload to fit into that was a power of 2 that I also expected would leave enough space in the ROM for the IFD, ME, GbE, and Coreboot. Now, it takes less than a second for RAM initialization after flashing/first boot (anecdotally, it seems the MRC needs to be "trained?"). --- config/coreboot-t440p.config | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config/coreboot-t440p.config b/config/coreboot-t440p.config index d0991a82..cecad015 100644 --- a/config/coreboot-t440p.config +++ b/config/coreboot-t440p.config @@ -1,20 +1,17 @@ # CONFIG_USE_BLOBS is not set CONFIG_VENDOR_LENOVO=y CONFIG_NO_POST=y -CONFIG_CBFS_SIZE=0x100000 +CONFIG_CBFS_SIZE=0x800000 CONFIG_IFD_BIN_PATH="@BLOB_DIR@/t440p/ifd.bin" CONFIG_ME_BIN_PATH="@BLOB_DIR@/t440p/me.bin" CONFIG_GBE_BIN_PATH="@BLOB_DIR@/t440p/gbe.bin" -CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000 CONFIG_HAVE_IFD_BIN=y +CONFIG_BOARD_LENOVO_THINKPAD_T440P=y CONFIG_TPM_MEASURED_BOOT=y CONFIG_HAVE_MRC=y CONFIG_MRC_FILE="@BLOB_DIR@/haswell/mrc.bin" CONFIG_HAVE_ME_BIN=y CONFIG_HAVE_GBE_BIN=y -CONFIG_SUBSYSTEM_VENDOR_ID=0x0000 -CONFIG_SUBSYSTEM_DEVICE_ID=0x0000 -CONFIG_I2C_TRANSFER_TIMEOUT_US=500000 CONFIG_PAYLOAD_LINUX=y CONFIG_PAYLOAD_FILE="@BOARD_BUILD_DIR@/bzImage" CONFIG_LINUX_INITRD="@BOARD_BUILD_DIR@/initrd.cpio.xz"