Skip to content

Use Native Ram Init (NRI) on haswell boards (not chromebox's preppy borrowed MRC blob) #1923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3f4052c
add patches for haswell nRI
gaspar-ilom Mar 9, 2025
f448e58
use native raminit with haswell boards
gaspar-ilom Mar 9, 2025
544869c
haswell boards: ./docker_repro.sh make BOARD=UNTESTED_XYZ-maximized c…
tlaurion Mar 9, 2025
5fceacb
update README files for haswell boards in blobs/
gaspar-ilom Mar 9, 2025
0801a80
t440p/w541 : move back to tested
tlaurion Mar 10, 2025
38c4580
BOARD_TESTERS.md: t440p, add @MattClifton76 as board tester
tlaurion Mar 10, 2025
fdf5281
tweak cbmem params to get debug output
gaspar-ilom Mar 12, 2025
0e8e787
Revert "tweak cbmem params to get debug output"
gaspar-ilom Mar 17, 2025
170bf57
t440p/w541: revert CBFS pre-ram console + console to defaults; have c…
tlaurion Mar 13, 2025
95322c6
t440p/w541 use broadwell mrc blob
gaspar-ilom Mar 14, 2025
9227476
Revert "t440p/w541 use broadwell mrc blob"
gaspar-ilom Mar 14, 2025
361a706
use truncated ME without relocating FTPR and keep modules to try NRI …
gaspar-ilom Mar 14, 2025
90acce5
Revert "use truncated ME without relocating FTPR and keep modules to …
gaspar-ilom Mar 17, 2025
cae6d9f
T440p/W541: enable SPI flash console debugging
gaspar-ilom Mar 20, 2025
ab04f70
T440p/W541: increase flash debug to almost maximum 0x410000
gaspar-ilom Mar 20, 2025
eeae2c6
Revert "T440p/W541: increase flash debug to almost maximum 0x410000"
gaspar-ilom Mar 21, 2025
e420681
Revert "T440p/W541: enable SPI flash console debugging"
gaspar-ilom Mar 21, 2025
3c0dc40
T440p/W541: enable USB_DEBUG with FT2232H
gaspar-ilom Mar 27, 2025
6dfe541
t440p/w541p nri coreboot config: add console timestamps, put console …
tlaurion Apr 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,29 +414,29 @@ workflows:
- t480-hotp-maximized

- build:
name: UNTESTED_t440p-maximized
target: UNTESTED_t440p-maximized
name: t440p-maximized
target: t440p-maximized
subcommand: ""
requires:
- t480-hotp-maximized

- build:
name: UNTESTED_t440p-hotp-maximized
target: UNTESTED_t440p-hotp-maximized
name: t440p-hotp-maximized
target: t440p-hotp-maximized
subcommand: ""
requires:
- t480-hotp-maximized

- build:
name: UNTESTED_w541-maximized
target: UNTESTED_w541-maximized
name: w541-maximized
target: w541-maximized
subcommand: ""
requires:
- t480-hotp-maximized

- build:
name: UNTESTED_w541-hotp-maximized
target: UNTESTED_w541-hotp-maximized
name: w541-hotp-maximized
target: w541-hotp-maximized
subcommand: ""
requires:
- t480-hotp-maximized
Expand Down
2 changes: 1 addition & 1 deletion BOARD_TESTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ xx30 (Ivy):

xx4x(Haswell):
===
- [ ] t440p: @fhvyhjriur @ThePlexus @srgrint @akunterkontrolle @rbreslow
- [ ] t440p: @MattClifton76 @fhvyhjriur @ThePlexus @srgrint @akunterkontrolle @rbreslow
- [ ] w541 (similar to t440p): @ResendeGHF @gaspar-ilom (Always tested late: Needs more responsive board testers or risk to become unmaintained.)

xx8x(Kaby Lake Refresh):
Expand Down
1 change: 0 additions & 1 deletion blobs/haswell/.gitignore

This file was deleted.

45 changes: 0 additions & 45 deletions blobs/haswell/obtain-mrc

This file was deleted.

7 changes: 5 additions & 2 deletions blobs/t440p/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@

Coreboot on the T440p requires the following binary blobs:

- `mrc.bin` - Consists of Intel’s Memory Reference Code (MRC) and [is used to initialize the DRAM](https://doc.coreboot.org/northbridge/intel/haswell/mrc.bin.html).
- `me.bin` - Consists of Intel’s Management Engine (ME), which we modify using [me_cleaner](https://github.com/corna/me_cleaner) to remove all but the modules which are necessary for the CPU to function.
- `gbe.bin` - Consists of hardware/software configuration data for the Gigabit Ethernet (GbE) controller. Intel publishes the data structure [here](https://web.archive.org/web/20230122164346/https://www.intel.com/content/dam/www/public/us/en/documents/design-guides/i-o-controller-hub-8-9-nvm-map-guide.pdf), and an [ImHex](https://github.com/WerWolv/ImHex) hex editor pattern is available [here](https://github.com/rbreslow/ImHex-Patterns/blob/rb/intel-ich8/patterns/intel/ich8_lan_nvm.hexpat).
- `ifd.bin` - Consists of the Intel Flash Descriptor (IFD). Intel publishes the data structure [here](https://web.archive.org/web/20221208011432/https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/io-controller-hub-8-datasheet.pdf), and an ImHex hex editor pattern is available [here](https://github.com/rbreslow/ImHex-Patterns/blob/rb/intel-ich8/patterns/intel/ich8_flash_descriptor.hexpat).

Heads supplies an IFD and GbE blob, which we extracted from a donor board. We changed the MAC address of the GbE blob to `00:de:ad:c0:ff:ee` using [nvmutil](https://libreboot.org/docs/install/nvmutil.html), to support anonymity and build reproducibility.

When building any T440p board variant with `make`, the build system will download a copy of the MRC and Intel ME. We extract `mrc.bin` from a Chromebook firmware image and `me.bin` from a Lenovo firmware update.
When building any T440p board variant with `make`, the build system will download a copy of the Intel ME. We extract the `me.bin` from a Lenovo firmware update.

### Native Ram Initialization

Note that due to native ram initialization for haswell boards in coreboot it is no longer necessary to use a third party blob (`mrc.bin`) for that.

## Using Your Own Blobs

Expand Down
7 changes: 5 additions & 2 deletions blobs/w541/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@

Coreboot on the W541 requires the following binary blobs:

- `mrc.bin` - Consists of Intel’s Memory Reference Code (MRC) and [is used to initialize the DRAM](https://doc.coreboot.org/northbridge/intel/haswell/mrc.bin.html).
- `me.bin` - Consists of Intel’s Management Engine (ME), which we modify using [me_cleaner](https://github.com/corna/me_cleaner) to remove all but the modules which are necessary for the CPU to function.
- `gbe.bin` - Consists of hardware/software configuration data for the Gigabit Ethernet (GbE) controller. Intel publishes the data structure [here](https://web.archive.org/web/20230122164346/https://www.intel.com/content/dam/www/public/us/en/documents/design-guides/i-o-controller-hub-8-9-nvm-map-guide.pdf), and an [ImHex](https://github.com/WerWolv/ImHex) hex editor pattern is available [here](https://github.com/rbreslow/ImHex-Patterns/blob/rb/intel-ich8/patterns/intel/ich8_lan_nvm.hexpat).
- `ifd.bin` - Consists of the Intel Flash Descriptor (IFD). Intel publishes the data structure [here](https://web.archive.org/web/20221208011432/https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/io-controller-hub-8-datasheet.pdf), and an ImHex hex editor pattern is available [here](https://github.com/rbreslow/ImHex-Patterns/blob/rb/intel-ich8/patterns/intel/ich8_flash_descriptor.hexpat).

Heads supplies an IFD and GbE blob, which we extracted from a donor board. We changed the MAC address of the GbE blob to `00:de:ad:c0:ff:ee` using [nvmutil](https://libreboot.org/docs/install/nvmutil.html), to support anonymity and build reproducibility.

When building any W541 board variant with `make`, the build system will download a copy of the MRC and Intel ME. We extract `mrc.bin` from a Chromebook firmware image and `me.bin` from a Lenovo firmware update.
When building any W541 board variant with `make`, the build system will download a copy of the Intel ME. We extract the `me.bin` from a Lenovo firmware update.

### Native Ram Initialization

Note that due to native ram initialization for haswell boards in coreboot it is no longer necessary to use a third party blob (`mrc.bin`)

## Using Your Own Blobs

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Inherit the rest from the base T440p config.
include $(pwd)/boards/UNTESTED_t440p-maximized/UNTESTED_t440p-maximized.config
include $(pwd)/boards/t440p-maximized/t440p-maximized.config

CONFIG_HOTPKEY=y
export CONFIG_AUTO_BOOT_TIMEOUT=5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ export CONFIG_FLASH_OPTIONS="flashprog --progress --programmer internal"

# Make the Coreboot build depend on the following 3rd party blobs:
$(build)/coreboot-$(CONFIG_COREBOOT_VERSION)/$(BOARD)/.build: \
$(pwd)/blobs/haswell/mrc.bin $(pwd)/blobs/t440p/me.bin

$(pwd)/blobs/haswell/mrc.bin:
COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \
$(pwd)/blobs/haswell/obtain-mrc $(pwd)/blobs/haswell
$(pwd)/blobs/t440p/me.bin

$(pwd)/blobs/t440p/me.bin:
COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Inherit the rest from the base W541 config.
include $(pwd)/boards/UNTESTED_w541-maximized/UNTESTED_w541-maximized.config
include $(pwd)/boards/w541-maximized/w541-maximized.config

CONFIG_HOTPKEY=y
export CONFIG_AUTO_BOOT_TIMEOUT=5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ export CONFIG_FLASH_OPTIONS="flashprog --progress --programmer internal"

# Make the Coreboot build depend on the following 3rd party blobs:
$(build)/coreboot-$(CONFIG_COREBOOT_VERSION)/$(BOARD)/.build: \
$(pwd)/blobs/haswell/mrc.bin $(pwd)/blobs/w541/me.bin

$(pwd)/blobs/haswell/mrc.bin:
COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \
$(pwd)/blobs/haswell/obtain-mrc $(pwd)/blobs/haswell
$(pwd)/blobs/w541/me.bin

$(pwd)/blobs/w541/me.bin:
COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \
Expand Down
28 changes: 17 additions & 11 deletions config/coreboot-t440p.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONFIG_COMPRESS_RAMSTAGE_LZMA=y
CONFIG_SEPARATE_ROMSTAGE=y
CONFIG_INCLUDE_CONFIG_FILE=y
CONFIG_COLLECT_TIMESTAMPS=y
# CONFIG_TIMESTAMPS_ON_CONSOLE is not set
CONFIG_TIMESTAMPS_ON_CONSOLE=y
# CONFIG_USE_BLOBS is not set
# CONFIG_COVERAGE is not set
# CONFIG_UBSAN is not set
Expand Down Expand Up @@ -153,9 +153,9 @@ CONFIG_MAX_SOCKET=1
CONFIG_BOOT_DEVICE_SPI_FLASH_BUS=0
CONFIG_TPM_PIRQ=0x0
CONFIG_DCACHE_RAM_BASE=0xff7c0000
CONFIG_DCACHE_RAM_SIZE=0x10000
CONFIG_DCACHE_RAM_SIZE=0x40000
CONFIG_C_ENV_BOOTBLOCK_SIZE=0x40000
CONFIG_DCACHE_BSP_STACK_SIZE=0x2000
CONFIG_DCACHE_BSP_STACK_SIZE=0x20000
CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
CONFIG_HAVE_INTEL_FIRMWARE=y
CONFIG_MRC_SETTINGS_CACHE_SIZE=0x10000
Expand Down Expand Up @@ -220,7 +220,6 @@ CONFIG_PS2K_EISAID="LEN0071"
CONFIG_PS2M_EISAID="LEN0036"
CONFIG_THINKPADEC_HKEY_EISAID="LEN0068"
CONFIG_GFX_GMA_PANEL_1_PORT="eDP"
CONFIG_LENOVO_TBFW_BIN=""
CONFIG_D3COLD_SUPPORT=y
CONFIG_GFX_GMA_PANEL_1_ON_EDP=y
# CONFIG_DRIVERS_UART_8250IO is not set
Expand Down Expand Up @@ -285,9 +284,7 @@ CONFIG_INTEL_GMA_BCLV_WIDTH=16
CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
CONFIG_INTEL_GMA_BCLM_WIDTH=16
CONFIG_BOOTBLOCK_IN_CBFS=y
CONFIG_HAVE_MRC=y
CONFIG_MRC_FILE="@BLOB_DIR@/haswell/mrc.bin"
CONFIG_DCACHE_RAM_MRC_VAR_SIZE=0x30000
CONFIG_DCACHE_RAM_MRC_VAR_SIZE=0x0
CONFIG_HPET_MIN_TICKS=0x80
CONFIG_FIXED_MCHBAR_MMIO_BASE=0xfed10000
CONFIG_FIXED_DMIBAR_MMIO_BASE=0xfed18000
Expand Down Expand Up @@ -338,9 +335,7 @@ CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS=y
# Northbridge
#
CONFIG_NORTHBRIDGE_INTEL_HASWELL=y
# CONFIG_USE_NATIVE_RAMINIT is not set
# CONFIG_USE_BROADWELL_MRC is not set
CONFIG_HASWELL_HIDE_PEG_FROM_MRC=y
CONFIG_USE_NATIVE_RAMINIT=y

#
# Southbridge
Expand Down Expand Up @@ -501,7 +496,15 @@ CONFIG_NO_UART_ON_SUPERIO=y
# CONFIG_DRIVERS_UART_OXPCIE is not set
CONFIG_HAVE_USBDEBUG=y
CONFIG_HAVE_USBDEBUG_OPTIONS=y
# CONFIG_USBDEBUG is not set
CONFIG_USBDEBUG=y
CONFIG_USBDEBUG_IN_PRE_RAM=y
CONFIG_USBDEBUG_DEFAULT_PORT=0
# CONFIG_USBDEBUG_DONGLE_STD is not set
# CONFIG_USBDEBUG_DONGLE_BEAGLEBONE is not set
CONFIG_USBDEBUG_DONGLE_FTDI_FT232H=y
# CONFIG_USBDEBUG_DONGLE_WCH_CH347 is not set
CONFIG_USBDEBUG_DONGLE_FTDI_FT232H_BAUD=115200
CONFIG_USBDEBUG_OPTIONAL_HUB_PORT=0
# CONFIG_VPD is not set
# CONFIG_DRIVERS_GENERIC_CBFS_SERIAL is not set
# CONFIG_DRIVERS_GENERIC_CBFS_UUID is not set
Expand Down Expand Up @@ -606,6 +609,7 @@ CONFIG_BOOTBLOCK_CONSOLE=y
CONFIG_POSTCAR_CONSOLE=y
CONFIG_SQUELCH_EARLY_SMP=y
# CONFIG_SPKMODEM is not set
CONFIG_CONSOLE_USB=y
# CONFIG_CONSOLE_NE2K is not set
CONFIG_CONSOLE_CBMEM=y
# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set
Expand Down Expand Up @@ -696,6 +700,8 @@ CONFIG_COMPRESS_SECONDARY_PAYLOAD=y
# General Debug Settings
#
# CONFIG_DEBUG_CBFS is not set
CONFIG_HAVE_DEBUG_RAM_SETUP=y
CONFIG_DEBUG_RAM_SETUP=y
CONFIG_HAVE_DEBUG_SMBUS=y
# CONFIG_DEBUG_SMBUS is not set
# CONFIG_DEBUG_MALLOC is not set
Expand Down
28 changes: 17 additions & 11 deletions config/coreboot-w541.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONFIG_COMPRESS_RAMSTAGE_LZMA=y
CONFIG_SEPARATE_ROMSTAGE=y
CONFIG_INCLUDE_CONFIG_FILE=y
CONFIG_COLLECT_TIMESTAMPS=y
# CONFIG_TIMESTAMPS_ON_CONSOLE is not set
CONFIG_TIMESTAMPS_ON_CONSOLE=y
# CONFIG_USE_BLOBS is not set
# CONFIG_COVERAGE is not set
# CONFIG_UBSAN is not set
Expand Down Expand Up @@ -153,9 +153,9 @@ CONFIG_MAX_SOCKET=1
CONFIG_BOOT_DEVICE_SPI_FLASH_BUS=0
CONFIG_TPM_PIRQ=0x0
CONFIG_DCACHE_RAM_BASE=0xff7c0000
CONFIG_DCACHE_RAM_SIZE=0x10000
CONFIG_DCACHE_RAM_SIZE=0x40000
CONFIG_C_ENV_BOOTBLOCK_SIZE=0x40000
CONFIG_DCACHE_BSP_STACK_SIZE=0x2000
CONFIG_DCACHE_BSP_STACK_SIZE=0x20000
CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
CONFIG_HAVE_INTEL_FIRMWARE=y
CONFIG_MRC_SETTINGS_CACHE_SIZE=0x10000
Expand Down Expand Up @@ -220,7 +220,6 @@ CONFIG_PS2K_EISAID="LEN0071"
CONFIG_PS2M_EISAID="LEN004A"
CONFIG_THINKPADEC_HKEY_EISAID="LEN0068"
CONFIG_GFX_GMA_PANEL_1_PORT="DP3"
CONFIG_LENOVO_TBFW_BIN=""
CONFIG_D3COLD_SUPPORT=y
CONFIG_GFX_GMA_PANEL_1_ON_EDP=y
# CONFIG_DRIVERS_UART_8250IO is not set
Expand Down Expand Up @@ -285,9 +284,7 @@ CONFIG_INTEL_GMA_BCLV_WIDTH=16
CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
CONFIG_INTEL_GMA_BCLM_WIDTH=16
CONFIG_BOOTBLOCK_IN_CBFS=y
CONFIG_HAVE_MRC=y
CONFIG_MRC_FILE="@BLOB_DIR@/haswell/mrc.bin"
CONFIG_DCACHE_RAM_MRC_VAR_SIZE=0x30000
CONFIG_DCACHE_RAM_MRC_VAR_SIZE=0x0
CONFIG_HPET_MIN_TICKS=0x80
CONFIG_FIXED_MCHBAR_MMIO_BASE=0xfed10000
CONFIG_FIXED_DMIBAR_MMIO_BASE=0xfed18000
Expand Down Expand Up @@ -338,9 +335,7 @@ CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS=y
# Northbridge
#
CONFIG_NORTHBRIDGE_INTEL_HASWELL=y
# CONFIG_USE_NATIVE_RAMINIT is not set
# CONFIG_USE_BROADWELL_MRC is not set
CONFIG_HASWELL_HIDE_PEG_FROM_MRC=y
CONFIG_USE_NATIVE_RAMINIT=y

#
# Southbridge
Expand Down Expand Up @@ -501,7 +496,15 @@ CONFIG_NO_UART_ON_SUPERIO=y
# CONFIG_DRIVERS_UART_OXPCIE is not set
CONFIG_HAVE_USBDEBUG=y
CONFIG_HAVE_USBDEBUG_OPTIONS=y
# CONFIG_USBDEBUG is not set
CONFIG_USBDEBUG=y
CONFIG_USBDEBUG_IN_PRE_RAM=y
CONFIG_USBDEBUG_DEFAULT_PORT=1
# CONFIG_USBDEBUG_DONGLE_STD is not set
# CONFIG_USBDEBUG_DONGLE_BEAGLEBONE is not set
CONFIG_USBDEBUG_DONGLE_FTDI_FT232H=y
# CONFIG_USBDEBUG_DONGLE_WCH_CH347 is not set
CONFIG_USBDEBUG_DONGLE_FTDI_FT232H_BAUD=115200
CONFIG_USBDEBUG_OPTIONAL_HUB_PORT=0
# CONFIG_VPD is not set
# CONFIG_DRIVERS_GENERIC_CBFS_SERIAL is not set
# CONFIG_DRIVERS_GENERIC_CBFS_UUID is not set
Expand Down Expand Up @@ -605,6 +608,7 @@ CONFIG_BOOTBLOCK_CONSOLE=y
CONFIG_POSTCAR_CONSOLE=y
CONFIG_SQUELCH_EARLY_SMP=y
# CONFIG_SPKMODEM is not set
CONFIG_CONSOLE_USB=y
# CONFIG_CONSOLE_NE2K is not set
CONFIG_CONSOLE_CBMEM=y
# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set
Expand Down Expand Up @@ -695,6 +699,8 @@ CONFIG_COMPRESS_SECONDARY_PAYLOAD=y
# General Debug Settings
#
# CONFIG_DEBUG_CBFS is not set
CONFIG_HAVE_DEBUG_RAM_SETUP=y
CONFIG_DEBUG_RAM_SETUP=y
CONFIG_HAVE_DEBUG_SMBUS=y
# CONFIG_DEBUG_SMBUS is not set
# CONFIG_DEBUG_MALLOC is not set
Expand Down
Loading