Repository navigation
NAI 68INT6: board devices in the DSDT, Linux or Multiboot2 payload per image, and faster cold boot - #959
Open
dgarske wants to merge 3 commits into
Open
NAI 68INT6: board devices in the DSDT, Linux or Multiboot2 payload per image, and faster cold boot#959dgarske wants to merge 3 commits into
dgarske wants to merge 3 commits into
Conversation
dgarske
force-pushed
the
nai_lpss_acpi
branch
from
October 30, 2026 01:38
d970d59 to
82a2eec
Compare
dgarske
force-pushed
the
nai_lpss_acpi
branch
2 times, most recently
from
October 31, 2026 17:47
2b369ac to
e7f091a
Compare
dgarske
force-pushed
the
nai_lpss_acpi
branch
from
November 2, 2026 19:39
e7f091a to
540fdae
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Pre-FSP-S flash writes and persistent memory-training reuse require platform/FSP-owner review of flash ownership and reset or interrupted-write recovery guarantees not established by host models or reported board testing.
No open issues 🎉
What changed in this PR
Extends wolfBoot’s NAI 68INT6 support with Linux-visible board devices, per-image Linux or Multiboot2 payload selection, and faster cold boots through cached memory training data.
Changes:
- Declares board I2C/SPI devices in ACPI and configures their native GPIO pads and controllers.
- Selects the ELF or Linux boot path from the image format when both are enabled.
- Adds FSP memory-training caching, Tiger Lake SPI erase/write support, and unit tests; adjusts NAI CNVi configuration to avoid recurring cold-boot global resets.
| File | Description |
|---|---|
tools/unit-tests/unit-tgl-spi-hwseq.c |
Tests SPI address mapping, erase/write cycles, and failure handling. |
tools/unit-tests/unit-fsp-nvs.c |
Tests cache validation and stage 1 handoff. |
tools/unit-tests/unit-fsp-nvs-save.c |
Tests cache persistence using synthetic HOBs and flash. |
tools/unit-tests/Makefile |
Registers and builds the three new test suites. |
src/x86/tgl_fsp.c |
Enables NAI I2C0 and selects CNVi Auto mode. |
src/x86/fsp.c |
Saves training data after TempRamExit, before FSP-S. |
src/x86/fsp_nvs.c |
Implements cache validation, reuse, and persistence. |
src/x86/acpi_dsdt.asl |
Declares EEPROMs, RTC/watchdog, and PRC devices. |
src/boot_x86_fsp.c |
Applies cached training data before memory initialization. |
src/boot_x86_fsp_payload.c |
Extracts ELF boot logic and adds per-image dispatch. |
options.mk |
Validates cache configuration and supplies compiler defines. |
include/x86/tgl_fsp.h |
Declares SPI flash erase/write interfaces. |
include/x86/gpio_config.h |
Adds native-mode GSPI0 and I2C0 pad configuration. |
include/x86/fsp_nvs.h |
Defines the cache record and public interfaces. |
include/x86/acpi_dsdt.h |
Updates embedded AML for the board devices. |
include/stage2_params.h |
Carries the cache key between boot stages. |
hal/x86_fsp_tgl.c |
Implements BIOS-region SPI hardware-sequenced erase/write. |
docs/Targets.md |
Documents board devices, caching, and payload handoff differences. |
config/examples/nai_68int6.config |
Enables a 128 KB training-data cache below wolfBoot. |
arch.mk |
Includes cache implementation in both boot stages. |
.gitignore |
Excludes new test binaries and the generated extraction header. |
Review effort: Balanced
…ltiboot2 payload per image
…he NAI 68INT6 per-boot global reset
…ch strap and PCIE_RDY sequence
dgarske
force-pushed
the
nai_lpss_acpi
branch
from
November 2, 2026 21:39
540fdae to
bd72541
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Exposes the 68INT6 board devices on the LPSS I2C0 and GSPI0 controllers to Linux, the same way NAI's stock BIOS declares them, so NAI's Linux drivers (
naigspi, plusat24for the EEPROMs) bind under wolfBoot. It also lets one build boot either a LinuxbzImageor a Multiboot2 ELF (an RTOS), chosen per image, cuts cold boot time by caching FSP-M's memory training data and removing a global reset on every cold boot, and brings up the PCIe switch the way the stock BIOS does.What it adds
src/x86/acpi_dsdt.asl,include/x86/acpi_dsdt.h-I2C0(00:15.0) andSPI0(00:1e.2) under the PCI root, with:15AC0001)15AC0002, 0x56) and serial-number EEPROM (15AC0003, 0x5E)15AC0004, 0x68)include/x86/gpio_config.h- GSPI0 (GPP_B15-B18) and I2C0 (GPP_C16/C17) pads in native mode, with the stock pad values; C15, E12, F9 and the USB power enables H7-H9 driven high, D2 held low for the OSinclude/x86/gpio_config.h,include/x86/fsp_config.h,options.mk- the stock BIOS PCIe sequence: switch lane straps, NT mode and backplane clock before memory init (NAI_68INT6_PCIE_LANES,NAI_68INT6_PCIE_NT,NAI_68INT6_BACKPLANE_CLK), then the PCIE_RDY (GPP_C23) wait and GPP_B12 release before PCI enumeration, with the BIOS delays as options timed from the TSC rate in CPUIDsrc/x86/tgl_fsp.c- onnai_68int6,SerialIoI2cMode[0]set to PCI mode (it was disabled), andCnviModeleft on Auto: no CNVi module is fitted, and forcing Disable made FSP-S request a global reset on every cold bootdocs/Targets.md- notes the board devices in the DSDT, documents Multiboot2 ELF payloads and how their handoff differs from Linux, and the training data cachesrc/x86/fsp_nvs.c,include/x86/fsp_nvs.h- training data cache (FSP_NVS_CACHE=1, Tiger Lake only, enabled fornai_68int6in a 128 KB area below the wolfBoot window). Stage 1 hands a valid saved record to FspMemInit; the record is keyed on a CRC of the FSP-M image and its UPDs, so a change to either falls back to full training. Stage 2 saves the FSP non-volatile storage HOB, only when it changed, after TempRamExit and before FSP-S and the BIOS region lock; the header is written last.hal/x86_fsp_tgl.c- 4 KB erase and write through SPI hardware sequencing, BIOS region onlytools/unit-tests/unit-fsp-nvs.c,unit-fsp-nvs-save.c,unit-tgl-spi-hwseq.c- the cache record check, the save path, and the SPI cycles against a modeled controllerThe serial-number EEPROM's
read-onlyproperty is written as a name/value pair, as ACPI device properties require.Touches shared code
src/boot_x86_fsp_payload.c- with bothLINUX_PAYLOADandELFbuilt in,do_boot()sends an image that starts with the ELF magic down the ELF/Multiboot2 path and boots anything else as Linux. The ELF path moves unchanged intoboot_elf(). Builds with only one payload type behave as before.src/boot_x86_fsp.c,src/x86/fsp.c,include/stage2_params.h- cache call sites and the record key passed from stage 1 to stage 2, all underFSP_NVS_CACHEsrc/x86/tgl_fsp.c,src/x86/fsp.c- the Tiger Lake pad writer can set a pad's output level (GPIO_SET_TX), and afsp_pre_pci_enum_cb()hook runs before PCI enumeration (a no-op on Kontron and QEMU)Testing
Builds for
nai_68int6(both payloads, ELF only, Linux only) andkontron_vx3060_s2. Tested on a 68INT6 Rev D5: one image boots a Multiboot2 RTOS test ELF and Ubuntu 22.04 (5.15). Under Linux the EEPROMs bind toat24, NAI'snaigspibinds to the PRC, andrtc-ds1374binds the RTC. The first boot after flashing saves the training data, later cold boots use it, a changed UPD set falls back to full training, and the per-boot global reset is gone. The PCIe switch enumerates as under the stock BIOS, the lane straps change its port layout, and the delays match wall-clock time. The warm reset FspMemInit requests on each power-on is not caused by any wolfBoot UPD and is left for follow-up with the FSP vendor.