Commit graph

62,395 commits

Author SHA1 Message Date
Raymond Sun
edaa67d0c9 mb/google/skywalker: Add thermal init flow in romstage
BUG=b:379008996
BRANCH=none
TEST=build pass, thermal init log:
[INFO ]  ===== lvts_thermal_init begin ======
[INFO ]  thermal_init: thermal initialized

Signed-off-by: Raymond Sun <raymond.sun@mediatek.corp-partner.google.com>
Change-Id: Id57f73206135f814f44b34290c5f2624ea56e1df
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88442
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-19 10:57:53 +00:00
Vince Liu
6aec09875b soc/mediatek/mt8189: Add thermal driver
Add MT8189 thermal driver for LVTS (low voltage thermal sensor)
initialization.

BUG=b:379008996
BRANCH=none
TEST=temperature log should between 30~50 degrees:
[INFO ]  thermal_init: thermal initialized
[INFO ]  [LVTS_MSR] ts0 msr_all=13c50, valid=1, msr_temp=15440, temp=44430
[INFO ]  [LVTS_MSR] ts1 msr_all=13c41, valid=1, msr_temp=15425, temp=44660
[INFO ]  [LVTS_MSR] ts2 msr_all=13c3f, valid=1, msr_temp=15423, temp=44690
[INFO ]  [LVTS_MSR] ts3 msr_all=13c4e, valid=1, msr_temp=15438, temp=44461
[INFO ]  [LVTS_MSR] ts4 msr_all=13bc6, valid=1, msr_temp=15302, temp=46540
[INFO ]  [LVTS_MSR] ts5 msr_all=13bd2, valid=1, msr_temp=15314, temp=46356
[INFO ]  [LVTS_MSR] ts6 msr_all=13bd1, valid=1, msr_temp=15313, temp=46372
[INFO ]  [LVTS_MSR] ts7 msr_all=13bc9, valid=1, msr_temp=15305, temp=46494
[INFO ]  [LVTS_MSR] ts8 msr_all=13bed, valid=1, msr_temp=15341, temp=45944
[INFO ]  [LVTS_MSR] ts9 msr_all=13be3, valid=1, msr_temp=15331, temp=46097
[INFO ]  [LVTS_MSR] ts10 msr_all=13c01, valid=1, msr_temp=15361, temp=45638
[INFO ]  [LVTS_MSR] ts11 msr_all=13bc6, valid=1, msr_temp=15302, temp=46540
[INFO ]  [LVTS_MSR] ts12 msr_all=13c06, valid=1, msr_temp=15366, temp=45562
[INFO ]  [LVTS_MSR] ts13 msr_all=13c03, valid=1, msr_temp=15363, temp=45607
[INFO ]  [LVTS_MSR] ts14 msr_all=13bf3, valid=1, msr_temp=15347, temp=45852
[INFO ]  [LVTS_MSR] ts15 msr_all=13c1a, valid=1, msr_temp=15386, temp=45256
[INFO ]  [LVTS_MSR] ts16 msr_all=13c8b, valid=1, msr_temp=15499, temp=43528
[INFO ]  [LVTS_MSR] ts17 msr_all=13c8b, valid=1, msr_temp=15499, temp=43528

Signed-off-by: Raymond Sun <raymond.sun@mediatek.corp-partner.google.com>
Signed-off-by: Kai-chun Huang <kai-chun.huang@mediatek.corp-partner.google..com>
Change-Id: I37dd9da6592146ade556660fa07d2fa374646da5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88441
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-19 10:57:35 +00:00
Maximilian Brune
5cc4b9e6ce soc/amd/common/cpu/noncar: Add bootblock overlap detection
Currently overlaps with bootblock are not detected by our linker script.
So increasing the PSP_SHAREDMEM_BASE + size to an extent that would
overlap with bootblock would be just ignored.

Add another region for the sole purpose of detecting these overlaps.
This may not be the ideal solution, but should sufficient for now.

Also check that the actual loadable segment of bootblock does not use up
more space then that.

Tested: Check that GCC and Clang can still compile it and that the
loadable segment (and therefore what PSP loads into memory) does not
change.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I0f82f9b8655908676dc2d6545e72cb40fe9110e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86862
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-18 21:32:21 +00:00
Matt DeVillier
67cd138df9 soc/intel/apollolake: Add missing header in measured_boot.h
tss_structures.h is needed for SHA256_DIGEST_SIZE.

Change-Id: I0f19b09b770d1e7de6483beb55e901e5f7d3a456
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88473
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2025-07-18 21:30:19 +00:00
David Wu
a428481574 mb/google/nissa/var/dirks: Update power limits
Update PsysPL2 and PsysPmax values on dirks.

BUG=b:399236160
TEST=emerge-nissa coreboot and
     check PsysPL2 and PsysPmax values on dirks

Change-Id: I45f11cccc0c77fcdb73629065f71e1284c36857b
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2025-07-18 16:51:25 +00:00
David Wu
55ae0d8a37 mb/google/nissa/var/baseboard/nissa: Add power limits functions
Support variant specific power limits

BUG=b:399236160
TEST=emerge-nissa coreboot and check correct value on dirks.

Change-Id: If09a8f4d157c6fd01aabae1e455e289d3908b39b
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88245
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-18 16:51:21 +00:00
Patrick Rudolph
82163aedc6 soc/amd/common/block/cpu/noncar: Move BSS and DATA out of PT_LOAD
Currently .bss and .data are within the PT_LOAD area of the
bootblock.elf and thus are placed and initialized at the correct spot
when PSP loads the BIOS Reset Image into DRAM.

On S3 resume PSP verifies that the "BIOS Reset Image" is unmodified
before it hands over control to such. Due to the use of BSS and DATA
within the BIOS Reset Image and the modifications of such at previous
boot the verification always fails.

This change moves '.bss' and '.data' out of the *first* PT_LOAD area
and moves it into a separate data_segment also marked PT_LOAD. Since
the second PT_LOAD is ignored by AMDCOMPRESS it doesn't end in the area
being verified at S3 resume. Since '.data' is now part of a separate
PT_LOAD a new region is inserted called '.datacopy' which is filled
by using objcopy. In turn the assembly code in bootblock will memcpy
'.datacopy' to '.data'.

TEST: Can still boot on amd/birman+ and on up/squared.

Change-Id: Id159ade3029060ce2ca6abcb723d5bdfe8841c3a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-07-18 16:50:07 +00:00
Pranava Y N
6405641647 mb/google/fatcat: Use same mainboard part number for all fatcat variants
This patch unifies all the fatcat variants based on
`BOARD_GOOGLE_MODEL_FATCAT` to use the same mainboard part number
`Fatcat`.

BUG=b:430205874
TEST=Able to build/boot fatcat

Change-Id: I13a45e4763abaa9dfe26c53b4e5051d50640291d
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88353
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-07-18 14:09:43 +00:00
Benjamin Doron
c5613469ae device: Make a note that SeaBIOS doesn't support above 4G MMIO
This is fairly intuitive upon thinking about it, SeaBIOS has neither
long mode nor PAE page tables, but make it obvious to developers,
and let users know this.

Change-Id: I769c1bdb9d7ea78d56455d125adf3d9bf07a1211
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88453
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-18 03:39:24 +00:00
Jincheng Li
ced4c09359 soc/intel/xeon_sp/gnr: Implement get_mmio_high_base_size
Report above 4G MMIO base and size to coreboot so that coreboot
could correctly set MTRR coverage for the whole region instead
of only covering PCI driver used parts, where much fragmentation
was introduced.

TESTED=Build and boot on intel/avenuecity CRB, check MTRR usage:
[DEBUG]  0x0000000080000000: PHYBASE0: Address = 0x0000000080000000, UC
[DEBUG]  0x000fffff80000800: PHYMASK0: Length  = 0x0000000080000000, Valid
[DEBUG]  0x00001e0000000000: PHYBASE1: Address = 0x00001e0000000000, UC
[DEBUG]  0x000fff0000000800: PHYMASK1: Length  = 0x0000010000000000, Valid
[DEBUG]  0x00001f0000000000: PHYBASE2: Address = 0x00001f0000000000, UC
[DEBUG]  0x000fffc000000800: PHYMASK2: Length  = 0x0000004000000000, Valid
[DEBUG]  0x0000000000000000: PHYBASE3
[DEBUG]  0x0000000000000000: PHYMASK3: Disabled

Change-Id: I61a7e96b3e7566d6a2c14951e7eb4f0be98c13e5
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88279
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-18 03:38:34 +00:00
alokagar
7100f226ca vc/intel/fsp/fsp2_0/wcl: Add FSP headers for WCL FSP
Details:
- First set files to compile google/ocelot mainboard w.r.t. WCL FSP
  3266_02.
- Change file path for the FSP_HEADER_PATH for WildacatLake.

BUG=b:431683053
TEST=Build Ocelot without any errors.

Change-Id: Iec31b0055bc145d795adef6723511ac07f83406b
Signed-off-by: alokagar <alok.agarwal@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88433
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-18 01:15:12 +00:00
Alper Nebi Yasak
5171098814 drivers/qemu/bochs: Allow building for non-x86 architectures
The Bochs display driver uses port I/O functions to initialize the VGA
device, so it could only have been built on x86 architectures so far,
but its supported devices can be used just fine on others on the QEMU
side as long as the emulated platform supports PCI. A previous commit
adds port I/O functions for more including ARM* and RISC-V, which should
enable this driver to be successfully built and used on these as well.

Allow the Bochs display driver to be built for non-x86 QEMU boards by
changing the Kconfig dependencies. Make VGA text framebuffer support
depend on x86, because it isn't usable at the standard 0xB8000 address
on other architectures. Add a dependency on PCI since this is a PCI
device and vexpress-a9 (qemu-armv7) doesn't have the (emulated) hardware
for PCI.

Change-Id: I7f72d7ea13e54ecf89d067394c02b572c5f92d24
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 20:39:48 +00:00
Maximilian Brune
d233b6c903 payloads/external/LinuxBoot/Makefile: Fix build prerequisite
Sometimes during build you could get this error:
mkdir: cannot create directory 'build': File exists
make[1]: *** [Makefile:48: build] Error 1
make: *** [payloads/external/Makefile.mk:408: payloads/external/LinuxBoot/build/initramfs] Erro
make: *** Waiting for unfinished jobs....
    Test 6.3
    WWW        https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.3.tar.xz

Usually this should not happen, because the 'build' target is an
order-only prerequisite, but I assume its still happening, because the
makefile is called twice during a Linuxboot build. Once for the Linux
kernel and once again for the initramfs.

A quick and dirty fix is to add a '-p' to the mkdir command.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I5663d1cb592bec6a8576347dd22223b382cd617f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87821
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 20:39:15 +00:00
Maximilian Brune
502d19be89 payloads/external/LinuxBoot/targets/u-root.mk: Add missing prerequisite
the build directory prerequisite was missing. As far as I know, it
didn't cause any issues, but it should still be there for correctness.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ieba578871af2fe886def059ab1568b85cd641e6e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87820
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 20:39:10 +00:00
Maximilian Brune
cba0f0b8b9 payloads/external/LinuxBoot: Rename build target
To avoid confusion and make it more obvious that the 'build' target
creates the build directory, append a slash at the end.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I49b4fef859f642cc03c0223cb1773597718e56cb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87819
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 20:39:05 +00:00
Maximilian Brune
43a54e3b1b util/amdfwtool: Add binary parsing
This adds parsing for some more possible firmware blobs on AMD.
These binaries are used on a mainboard based on glinda SOC.

Tested: Boot birman_plus mainboard

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I78d7a9dba71de557e0a9a885d8561eea1f4191ef
Original-signed-off-by: Anand Vaikar <a.vaikar2021@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84373
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 20:38:52 +00:00
Martin Roth
85da3954d0 .gitmodules: Ignore changes make by what-jenkins-does
When running `make what-jenkins-does`, the intel-sec-tools and gowsid
submodules are left with some new files, marking them as dirty.
This changes fixes that.

Change-Id: Ice98c1a61201cbf63580835966b78f053d7853a2
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87380
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 20:38:35 +00:00
Matt DeVillier
397c5fe420 Documentation: Add a mainboard entry for the Lenovo T480/T480s
Add a heading for Skylake/Kabylake Lenovo mainboards in anticipation
of additional boards being added in the future. Add a new page for the
T480/T480s, loosely based on the page for the T440p.

Thanks to Askareth on Matrix for the initial draft and copious testing.

Change-Id: I3c7a9ca28be5524b42177b92387f35c6d25b48da
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88439
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 18:15:40 +00:00
Mate Kukri
6768586353 Documentation: Add information about the deguard utility
Change-Id: Idba0f461d31db31cbc9c35ee3da70c116d5493ce
Signed-off-by: Mate Kukri <km@mkukri.xyz>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84825
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 18:15:32 +00:00
Matt DeVillier
ad8b738af0 mb/lenovo: Add ThinkPad T480 and ThinkPad T480s
These machine have BootGuard fused and requires deguard to
boot coreboot.

Known issues:
- Alpine Ridge Thunderbolt 3 controller does not work
- Some Fn+F{1-12} keys aren't handled correctly
- Nvidia dGPU is finicky
  - Needs option ROM
  - Power enable code is buggy
  - Nouveau only works on linux 6.8-6.9
- Headphone jack isn't detected as plugged in despite correct verbs

Thanks to Leah Rowe for helping with the T480s.

Change-Id: I19d421412c771c1f242f6ff39453f824fa866163
Signed-off-by: Mate Kukri <km@mkukri.xyz>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83274
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-07-17 18:15:23 +00:00
Matt DeVillier
96e381766e ec/lenovo: Add support for MEC1653 EC
Add support for the MEC1653 EC as used by the Thinkpad T480/480s.

Change-Id: If82a7d27eb3163f51565c0c6e60cab60753611a7
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Reviewed-by: Máté Kukri <km@mkukri.xyz>
2025-07-17 18:15:03 +00:00
Benjamin Doron
2181b02765 util/smmstoretool: Properly initialise the authenticated variable header
MonotonicCount is required, or UEFITool fails to parse the store.
TimeStamp is required for variables with authenticated attributes.

Change-Id: Iea933c9943ec18ea773700cdf1e3bede0e8ef292
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88424
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 18:14:17 +00:00
Benjamin Doron
3058464263 util/smmstoretool: Add support for creating variable from file contents
This helps with initialising UEFI secure boot variables for the first
boot, for example, by setting PKDefault, KEKDefault, dbDefault and
dbxDefault to the desired certificates.

Tested, and the get subcommand returns the same data that the set
command added. However, EDK2's variable driver (from approximately
edk2-stable202505) asserts that the variable store isn't the expected
size, and UEFITool can't decode it correctly. This is also the case for
other types supported before this patch, suggesting that the bug is in
general variable-handling code in this utility. Will be debugged and
addressed in a follow-up.

Change-Id: If36394bb56388a35882702c93e26e63124fe0a63
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88377
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 18:14:08 +00:00
Benjamin Doron
b49f567e45 util/smmstoretool: Ensure that the FVB header isn't too large
If the header size is equal to fv.length, then `fv_parse()` will go
out-of-bounds when obtaining the variable store data, and obviously,
there is no data if the header takes up all available space.

Change-Id: I0ac46e098a14b51f936cb99f5e6bf83411570bc5
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88452
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2025-07-17 18:14:01 +00:00
Benjamin Doron
a6fbaa47ea util/smmstoretool: Clarify the auth_vars field
We want to distinguish between a variable store that's marked as capable
of storing authenticated variables (basically, checking their signatures
and promising that there's no TOCTOU possible), and a variable with the
authentication-checking enabled.

Change-Id: Ibf6ffbe279961ff54b0988d98a912a8421598e3b
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88423
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2025-07-17 18:13:56 +00:00
Patrick Rudolph
3698517d82 mb/amd: Use mec152x tool
Instead of providing an EC_SIG binary blob, generate it at build time
using the mec152x tool. Allows to move the EC_BODY in the fmap without
the need to generate a new EC_SIG.

TEST=Booted on amd/birman_plus without EC_SIG blob.
Change-Id: I2d7a791820d905b088194b290853509f10689fc6
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87429
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 18:13:33 +00:00
Patrick Rudolph
5a0953614b util/amdtools: Add ec_usb_pd_fw
ec_usb_pd_fw is a board specific utility to generate pointers to
firmware images found in the SPI flash. On some AMD boards the
x86 SPI flash is shared with the EC. The EC can also update the
USB Power Delivery controllers firmware, but it needs to know where
to load the firmware from. It uses pointers stored in the first
128 bytes of the x86 SPI flash.

Add a small utility to generate pointers to the USB PD firmware,
located somewhere in the ROM identified by the FMAP region.

There can be up to 12 USB PD firmwares, depending on the used
vendor or model.

Change-Id: I98717e849592f83eb7bacbfed33a8d4b811a5e18
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87430
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 18:13:16 +00:00
Patrick Rudolph
e63620012c util: Add Microchip EC FW tool
The Microchip EC can share the SPI flash with the x86 host. Since
it boots first and does power sequencing, there's no problem with
concurrent access happening. Due to various vendor specific flash
layouts used on x86, the EC needs a pointer to it's own firmware.

The pointer resides at flash offset 0 and is read by MEC152x and
MEC1701 and MEC172x ECs, probably others as well.

The introduced tool generates the EC FW PTR at flash offset 0.

Allows to get rid of hand-crafted binary files (EC_SIG) being used
on AMD mainboards that hardcode the offset and must manually being
checked if those match the FMAP.

When there'll be additional firmware regions added it becomes
unconvienient to maintain those by hand.

Usage output:

Usage: ./util/mec152x/mec152xtool <rom-file> <command>
        -h|--help
        -f|--fmap_region_name

Command:
 GEN_ECFW_PTR - Writes the ECFW PTR

Based on https://chromium.googlesource.com/chromiumos/platform/ec/+/08f5a1e6fc2c9467230444ac9b582dcf4d9f0068/chip/mchp/util/pack_ec_mec172x.py

Change-Id: I3b74c9f65643ad4437de29d4aed307b1a2b33286
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87428
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 18:13:10 +00:00
Sean Rhodes
0b5ce9d9f0 soc/intel/apollolake: Add support for IFWI Measured Boot
Add Measured Boot that is specific to Apollolake, and is used
for measuring the IBBL, IBB and TXE. The IBB is measured only if it
exists, and only after it has been loaded into the CSE.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I61ce4a34875d6d3357d4088167cdd887bafdff23
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65272
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-07-17 17:44:57 +00:00
Sean Rhodes
289cff3423 soc/intel/apollolake: Load the IBB into CAR
Copy the IBB into CAR via the CSEs RBP to ensure it has not been
modified.

Test on the StarLite Mk III and Mk IV:
Without VBOOT:
    [DEBUG]  CSE: IBB Verification Result: PASS
    [DEBUG]  CSE: IBB Verification Done  : YES
    [DEBUG]  CSE: IBB Size               : 88

With VBOOT:
    [DEBUG]  CSE: IBB Verification Result: PASS
    [DEBUG]  CSE: IBB Verification Done  : YES
    [DEBUG]  CSE: IBB Size               : 102

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I0d4e26834cef4c876e37e414b424a031c11111ff
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65577
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 17:44:48 +00:00
Sean Rhodes
2408695dd3 soc/intel/apollolake: Add a loader for the IBB
Add a loader that will load the IBB into the CSE via the Ring Protocol
Buffer.

All registers were taken from Intel document number #336561.

Change-Id: Ia41e3909f8099d2ea864166e9ea03e10e40a1b68
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65270
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 17:44:41 +00:00
Sean Rhodes
61b66e9a81 soc/intel/apollolake: Add function to clear MCA in Bank 4
Change-Id: Ic3b88e336a1cb3be5a9281ce266c7d9fb2465799
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65576
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 17:44:27 +00:00
Sean Rhodes
138402e7ff soc/intel/apollolake: Create IBB, IBBL and OBB
coreboot's method of creating IFWI is to modify an existing IFWI
images by deleting the IBB, replacing the IBBL with the bootblock
and everything else is put in the OBB.

This poses a problem when using Intel's FIT or technologies such
as Boot Guard. The main problem is that the IBB is never verified by
the CSE or copied from SRAM to CAR, so the CSE cannot complete BUP
and stays in recovery mode. The vast majority of the stages in
Apollolake's Secure Boot flow is not met using this method (Intel
document number 597827 summarizes these steps).

This patch series is based on the principles of a patch from Brenton
Dong (CB:17064) creates an IBBL, IBB and OBB binaries with the
correct functions to complete the Secure Boot flow. This is to copy
the IBB from SRAM using the CSE's Ring Buffer Protocol.

These binaries can then be used by FIT or coreboot's existing
method of hacking IFWI together (IFWI_STITCH) via IFWITOOL. If it is
the latter and Boot Guard is enabled, the hashes for IFWI and "ibb+obb"
must be recreated.

Whilst this option doesn't form a complete image, the components it
builds will work as Intel intended them to once stitched correctly into
an IFWI image.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I0deebf04f22f3017ee0c13bf1ca7f6dcc0d458b5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65680
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 17:44:11 +00:00
Jamie Ryu
61b4e1983c mb/google/fatcat: Update PCH reset power cycle duration to 1 second
This updates FSP UPDs for PCH PM SLP minimum assertion width and reset
power cycle duration to reduce the delays during a global reset and S5
suspend and resume flow.

Reference:
 Panther Lake External Design Specification (EDS) Volume 2 (#813032)

BUG=None
TEST=Build a fatcat coreboot and issue a global reset to check the reset
delay is reduced to 1 second. Issue a lid close to suspend to S5 and
wake up by lid open to check the delay is reduced to 1 second.

Change-Id: If94917879125b1a523de131936047b497cce8ba7
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88444
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-07-17 17:43:14 +00:00
Jamie Ryu
e9af95d5ab soc/intel/pantherlake: Configure FSP UPDs for minimum assertion widths
This configures FSP UPDs for PCH PM minimum assertion widths and
reset power cycle duration per mainboard variants configuration.
This also checks the reset power cycle duration is not be smaller
than SLP_S3, SLP_S4 and SLP_A Minimum Assertion Width.

 PchPmSlpS3MinAssert: SLP_S3 Minimum Assertion Width Policy
 PchPmSlpS4MinAssert: SLP_S4 Minimum Assertion Width Policy
 PchPmSlpSusMinAssert: SLP_SUS Minimum Assertion Width Policy
 PchPmSlpAMinAssert: SLP_A Minimum Assertion Width Policy
 PchPmPwrCycDur: PCH PM Reset Power Cycle Duration
  The Reset Power Cycle Duration starts at 20ms and increases by 20ms
  for each step, beginning from 0x0 to 0xFF. Each subsequent increment
  corresponds to an additional 20 milliseconds in duration.

Reference:
 Panther Lake External Design Specification (EDS) Volume 2 (#813032)

BUG=None
TEST=Build a fatcat coreboot and boot to OS without an issue.

Change-Id: I7234c7539c1e7eb5e2b8c04ccff6c62c853d6807
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88443
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-07-17 17:43:09 +00:00
Victor Shih
79bd154b49 drivers/genesyslogic/gl9763e: Mask replay timer timeout of AER
Due to a flaw in the hardware design, the GL9763e replay timer
frequently times out when ASPM is enabled. As a result, the warning
messages will often appear in the system log when the system accesses
the GL9763e PCI config. Therefore, the replay timer timeout must be
masked.

BUG=b:428025481

Sample output on screen:
PCIe Bus Error: severity=Corrected, type=Data Link Layer
device [17a0:e763] error status/mask=00001000/00002000
 [12] Timeout

Change-Id: I6f921f40f169d7811b7bd51145023b549e8aee1c
Signed-off-by: Victor Shih <victorshihgli@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88291
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 17:42:41 +00:00
Gavin Liu
a775bfc2b2 soc/mediatek/mt8189: Specify MTKLIB_PATH for building BL31
Add BL31 static library path to BL31 build argument.

BUG=b:379008996
BRANCH=none
TEST=build passed

Signed-off-by: Gavin Liu <gavin.liu@mediatek.corp-partner.google.com>
Change-Id: I718be15e1a9b6942558ce929baedec18bdcd3309
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88448
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2025-07-17 13:36:17 +00:00
kai-chun.huang
e583b2ffb7 soc/meidatek/mt8196: Extract common thermal code for reuse
To promote code reuse and maintainability, move partial thermal driver
to common.

BUG=b:379008996
BRANCH=none
TEST=build passed.

Signed-off-by: Kai-chun Huang <kai-chun.huang@mediatek.corp-partner.google.com>
Change-Id: I6a52d1cb02d04308f1e833df0f318f93a8231fe1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88440
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 13:35:08 +00:00
Nicholas Chin
f62734976c mb/dell: Convert E6400 into a variant
In preparation for adding additional GM45/ICH9 based Dell Latitude
laptops, rework the E6400 port to use a variant scheme so that code can
be shared.

Change-Id: I8094fce56eaaadb20aef173644cd3b2c0b008e95
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84565
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 13:15:10 +00:00
Jamie Ryu
8d60bf9975 mb/google/fatcat: select MIPI pre-prod if PTL pre-prod SoC is set
This adds changes to conditionally enable the config
`DRIVERS_INTEL_MIPI_SUPPORTS_PRE_PRODUCTION_SOC` when
`SOC_INTEL_PANTHERLAKE_PRE_PRODUCTION_SILICON` is enabled.
This ensures that MIPI firmware and drivers are compatible with
Panther Lake pre-production silicon.

BUG=b:424355826
TEST=Ensures `DRIVERS_INTEL_MIPI_SUPPORTS_PRE_PRODUCTION_SOC` is
enabled for google/fatcat4es and all variants with ES silicon.

Change-Id: I9687618cfceac32425fa19b4f1f30040b88a2d15
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88220
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2025-07-17 13:14:58 +00:00
Jamie Ryu
2f978ecab3 mb/google/fatcat: Choose platforms with pre-prod Panther Lake SoC
This updates the Kconfig for Google Fatcat mainboards to include
`SOC_INTEL_PANTHERLAKE_PRE_PRODUCTION_SILICON` option to ensure
compatibility with Panther Lake pre-production silicon. This selection
aligns these boards with the necessary pre-production silicon settings

BUG=b:424355826
TEST=Ensure mainboards like fatcat4es and fatcatnuvo4es have
`SOC_INTEL_PANTHERLAKE_PRE_PRODUCTION_SILICON` config enabled.

Change-Id: Icde96976e0e3ccfc543bc948d2923e0f84e7da68
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88219
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 13:14:52 +00:00
irving-ch-lin
eb1483ba17 soc/mediatek/mt8189: Increase SCP clock frequency from 26MHz to 416MHz
Increase the default SCP clock from 26MHz (value 0) to 416MHz (value 4).
With this change, decoder performance improves from 4K@39FPS to 4K@87FPS
during testing.

BUG=b:413506208
BRANCH=none
TEST=tast run root@${dut_ip_addr} video.Seek.stress_h264

Signed-off-by: Irving-CH.lin <irving-ch.lin@mediatek.corp-partner.google.com>
Change-Id: I30b3162b50c44ed23acc9e77eb5528b59e6ff569
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88445
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-07-17 13:14:24 +00:00
Martin Roth
9c5557f982 util/abuild: Add --sequential-boards option
By default, when building all boards, we use a single thread for each
board and build a number of boards in parallel. The --sequential-boards
flag will change that to use all specified cores to build each board
in sequence.

This can give better performance in some cases where multiple builds
are conflicting for a given resource.

Change-Id: I35ae7a5df5de48b8ce3373b6659be0df5104ed39
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88239
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-16 21:49:43 +00:00
Benjamin Doron
9e5234feee payloads/external/edk2: Drop our toolchain override
It's no longer maintained here other than to address specific issues,
and it prevents us from benefiting from upstream changes. Already,
switching to the GCC toolchain saves 5-10 KiB.

Use the GCC toolchain over the backwards-compatible GCC5 one, since the
latter is being deprecated, and the former landed a few years ago,
in edk2-stable202305.

Change-Id: I47e47592ea29f5a09790b284378f28385faf29f9
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88429
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-16 18:03:03 +00:00
Benjamin Doron
8d9e18a122 payloads/edk2: Indicate whether edk2-platforms is available
This allows EDK2 build files to decide whether these modules should be
built.

Change-Id: I12dc346d17ab0f963dedd5560b66b96210a4ec48
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88428
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2025-07-16 18:02:58 +00:00
Bob Moragues
626fd50a94 mb/google/fatcat/var/kinmen: Enable ISH
BUG=b:415605634
TEST=test build
BRANCH=none

Change-Id: I6110b2f2b0af20740f4ada61bbc1691a8bcc8bc9
Signed-off-by: Bob Moragues <moragues@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88371
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-07-16 18:01:27 +00:00
LiLiang Chen
e7cefe4f41 soc/mediatek/mt8196: Move srclken_rc related code to common
To promote code reuse and maintainability, move srclken_rc related code
to common folder.

BUG=b:379008996
BRANCH=none
TEST=build passed.

Signed-off-by: LiLiang Chen <liliang.chen@mediatek.corp-partner.google.com>
Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com>
Change-Id: Ic8401f910bf37c3f413147e293d1d9274c62d8ee
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88378
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-07-16 06:58:23 +00:00
Jamie Ryu
e9731f8925 soc/intel/pantherlake: Add configs for pre-production silicon
This patch introduces a new configuration option
`SOC_INTEL_PANTHERLAKE_PRE_PRODUCTION_SILICON` that allows users to
specify if their mainboard is using Panther Lake pre-production silicon
aka Engineering Silicon (ES) with pre-production signed ME Firmwares.
The default value is set to 'n', ensuring it is disabled unless
explicitly chosen.

BUG=b:424355826
TEST=No change in the functionality, just added new configs.

Change-Id: I8ad83b07f057a227b62e33b6c6c0f46c3952be6b
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88218
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-16 02:14:25 +00:00
erin liang
8687b3d108 mb/google/trulo/var/pujjolo: Add ISH firmware config
Due to Pujjoquince does not have ISH, thus define bit 29 in
firmware_config to indicate ISH presence per platform.

BUG=b:417599885
BRANCH=none
TEST= Use the command ls /dev/cros_ and no cros_ish option
will appear

Change-Id: I286300eadf7991d3a30936f5904ff3eef4480039
Signed-off-by: erin liang <erin.liang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88364
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-15 21:01:27 +00:00
Hualin Wei
722c9314c7 mb/google/dedede/var/awasuki: Add 2 HYNIX modules to RAM id table
Add HYNIX H54G46CYRBX267 as id 0, and add HYNIX H54G56CYRBX247
as id 1, resulting in the list below:

DRAM Part Name                 ID to assign
K4U6E3S4AB-MGCL                0 (0000)
K4UBE3D4AB-MGCL                1 (0001)
MT53E1G32D2NP-046 WT:B         1 (0001)
NT6AP512T32BL-J1               2 (0010)
NT6AP1024F32BL-J1              3 (0011)
CXDB4CBAM-ML-A                 2 (0010)
H54G56CYRBX247                 1 (0001)
H54G46CYRBX267                 0 (0000)

BUG=430792154
TEST=Use part_id_gen to generate related settings

Change-Id: I6ea840862b4b7b728a351425da9fc4052c201e3c
Signed-off-by: Hualin Wei <weihualin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88419
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-15 21:01:06 +00:00