Compare commits

...

788 Commits

Author SHA1 Message Date
Tim Crawford
d0cab058c6 mb/system76/mtl: Enable NPU
Change-Id: If2383f983435c861f59d7090e2a66f5ffa693faf
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-10-22 10:44:39 -06:00
Tim Crawford
7c024f864c
mb/system76: Enable EC lockdown on TGL+
Change-Id: I4b07846c404eb93ab4baf0a78a4bbffcc5d8afca
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 12:38:29 -06:00
Tim Crawford
743e5a7023
mb/system76: Enable dGPUs
Change-Id: I4ca91ff631dd4badbfba72e69651f03753323a54
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 12:29:10 -06:00
Tim Crawford
048a255bff
mb/system76/rpl: Enable discrete TBT device
The HX boards, using PCH-S, use a discrete Thunderbolt device (Intel
Maple Ridge), as opposed to a built-in one like the boards using PCH-P.

Fixes Thunderbolt on RPL-HX boards using Maple Ridge and Barlow Ridge
controllers.

Change-Id: I53d18f3ec5a084431e1113782c791bcb42728350
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 12:20:22 -06:00
Tim Crawford
9fdb2550b9
mb/system76/rpl: Add bonw15-b variant
The Bonobo has been updated with a Thunderbolt 5 controller (Barlow
Ridge).

Identified chip changes from the schematics:

- JHL8540_MP -> JHL9580_QS
- TPS65994BF -> TPS65994BH
- IT5570E-128 -> IT5570E-256

Change-Id: I784e489cdd034febeaaac0182ab5b4fe672381ec
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 12:03:52 -06:00
Tim Crawford
5f21837245
mb/system76/rpl: bonw15: Update GPIOs
Go through the schematics and update GPIOs for the unit. In particular,
explicitly mark unconnected pins and pins without placed components as
not connected.

Change-Id: I5a81115850d7bf3ecabeae29058e86cea51ac390
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 12:03:51 -06:00
Tim Crawford
a1160eccda
mb/system76: Add custom CMOS default for darp8,darp9
Since these boards will use S0ix they need to leave CSME enabled for the
CPU to reach C10.

Change-Id: I70c908402c9964508bb9c439d48d24773f5a35ab
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:53:06 -06:00
Tim Crawford
028b384807
mb/system76: Enable S0ix for darp8/darp9
The newer batch of these boards do not de-assert VW PLTRST# on S3
resume, causes the units to not power on in the EC code. Switch them to
S0ix by default, but leave S3 available.

Change-Id: I95337c1391102db9e020e82bdd938659c1a4f905
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:53:06 -06:00
Jeremy Soller
783b4bfc52
soc/intel/common/block/cse: Prevent HECI commands when flash descriptor override is set
Sending the disable and EOP commands will not work if flash descriptor
override is set on Meteor Lake.

Change-Id: I3b5a56229434c9cc326141d48359faa7759541ee
Signed-off-by: Jeremy Soller <Jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:53:06 -06:00
Tim Crawford
27ca018b94
ec/system76/ec: Add config for 2nd fan without dGPU
The darp10 has a second fan but no dGPU. The NFAN Method must exist, so
use the default hwmon names of "fan1" and "fan2" for labels.

Change-Id: Icde5dec82262d9262b046c1557167801af8e5cb2
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:53:06 -06:00
Tim Crawford
1967a764e0
ec/system76: Support lockdown based on EC security state
Change-Id: I202c0607c2cdac1df59f42fb41735704dd5bd95c
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:53:06 -06:00
Tim Crawford
beb8d7b318
mb/system76/mtl: Enable EnableTcssCovTypeA configs
Change-Id: Ide0d313257e6778664a9d5dc2efb38264e5cac69
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:37:33 -06:00
Tim Crawford
df4d2004e7
mb/system76/mtl: Enable gfx register for GMA ACPI
Change-Id: I4293fa2ed86a73b5a8ef0b708a49705ba3b76771
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:37:29 -06:00
Tim Crawford
197fbc8a4e
mb/system76/mtl: darp10: Add TCSS configs
Fixes using USB3 devices at USB3 speeds in all ports.

This fix requires `EnableTcssCovTypeA`, which is not available in the
coreboot FSP headers and not available upstream as Intel still has not
made a Client FSP release.

Change-Id: I9bc6c5fc4c13bfa2e31ee1ce334b91e151373b6e
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:36:08 -06:00
Jeremy Soller
fcb9a0ff05
mb/system76/mtl: Add Lemur Pro 13
The Lemur Pro 13 (lemp13) is an Intel Meteor Lake-U based board.

There are 2 variants to differentiate which keyboard design the unit
uses, as they require different EC firmware.

Change-Id: Icac8c7dafd6371881622d797f399f8ddbe13cbce
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:33:21 -06:00
Tim Crawford
c4a2c09655
mb/system76/bonw14: Enable TAS5825M smart amp
The Bonobo has 2 AMPs: one for the speakers and one for the subwoofer.

Smart AMP data was collected using a logic analyzer connected to the IC
during system start on proprietary firmware. This data is then used to
generate a C file [1].

[1]: https://github.com/system76/smart-amp

Change-Id: I5389a9890563ebd3adb20096b6225f474bc006f9
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:33:21 -06:00
Jeremy Soller
388c34605a
intel/block/pcie/rtd3: Also implement _PR3
Change-Id: Id7f4373989dffe8c3bc68a034f59a94d2160dd15
Signed-off-by: Jeremy Soller <jeremy@system76.com>
2024-08-30 11:33:21 -06:00
Jeremy Soller
62886ac1a9
soc/intel/meteorlake: increase cbfs and preram cbmem console sizes
These values were taken from alderlake.

Change-Id: Ib790c7d52748156b25bad423ed082c1b51a33550
Signed-off-by: Jeremy Soller <jackpot51@gmail.com>
2024-08-30 11:29:53 -06:00
Jeremy Soller
19fcfac325
soc/intel/adl,mtl: Use channel 0 only for memory down in mixed topo
Change-Id: Ic30bec272e82535f6f606033c3ba512662cb2c8b
Signed-off-by: Jeremy Soller <jackpot51@gmail.com>
2024-08-30 11:29:53 -06:00
Jeremy Soller
430f9bdabb
soc/intel/mtl: Hook up GMA ACPI brightness controls
Add function needed to generate ACPI backlight control SSDT, along with
Kconfig values for accessing the registers.

Change-Id: Ied08e5e9fe4913bd60474ed7dcf88b945172558d
Signed-off-by: Jeremy Soller <jeremy@sysetm76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:20:00 -06:00
Tim Crawford
24afbc661b
soc/intel/mtl: Set HDA subsystem ID during FSP-M
Intel introduced a new UPD specifically for setting the HDA subsystem ID
in FSP-M. Using SiSsidTablePtr in FSP-S no longer works as it will be
locked with a default value of 0 by that point.

Tested on Clevo V560TU with MTL FSP 4122.12 (0D.00.A8.20).

TEST=PCI config space for HDA device has subsystem ID set.

Change-Id: I5e668747d99b955b0a3946524c5918d328b8e1d3
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:19:22 -06:00
Sean Rhodes
6bbf6b1ff9
soc/intel/meteorlake: Correctly set Usb4CmMode
The ACPI is adjusted based on SOFTWARE_CONNECTION_MANAGER, so set
the UPD to match this to avoid the connection type being
mismatched.

If it's mismatched, the TBT port will timeout.

TEST=Boot starbook/rpl and check TBT 4 dock is correctly identified.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I3ab68c01f682723dab39870f0676e59ae3d89add
2024-08-30 11:16:29 -06:00
Jeremy Soller
90ea844278
drivers/intel/dtbt: Add discrete Thunderbolt driver
Add a new driver for discrete Thunderbolt controllers. This allows using
e.g. Maple Ridge devices on Raptor Point PCH.

Ref: Titan Ridge BIOS Implementation Guide v1.4
Ref: Maple Ridge BIOS Implementation Guide v1.6 (#632472)
Change-Id: Ib78ce43740956fa2c93b9ebddb0eeb319dcc0364
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:14:54 -06:00
Jeremy Soller
b49744539a
drivers/gfx/nvidia: Add driver for NVIDIA GPU
Add a driver for laptops with NVIDIA Optimus (hybrid) graphics. The
driver provides ACPI support for dynamically powering on and off the
GPU, NVIDIA Dynamic Boost support, and a function for enabling the GPU
power in romstage.

References:
- DG-09845-001: NVIDIA GN20/QN20 Hardware Design Guide
- DG-09954-001: NVIDIA GN20/QN20 Software Design Guide

Change-Id: I2dec7aa2c8db7994f78a7cc1220502676e248465
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:14:06 -06:00
Jeremy Soller
0eb16967a3
soc/intel/mtl: Fill in SPD data on both channels of DDR5 memory
Apply CB:75284 to Meteor Lake.

CB:52731 introduced support for reading SPD from the EEPROM via SMBus.
Replace the now unneeded workaround for DDR5 with filling in the correct
channels for DDR5.

Change-Id: I600d8fd480cb84d5dcb679e4f0bdeeaaebfab386
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:12:32 -06:00
Jeremy Soller
0ceaaf55d1
soc/intel/adl: Fill in SPD data on both channels of DDR5 memory
CB:52731 introduced support for reading SPD from the EEPROM via SMBus.
Replace the now unneeded workaround for DDR5 with filling in the correct
channels for DDR5.

Change-Id: I5a92199a7cd2718e9396f0dac8257df40e4f834c
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:12:26 -06:00
Jeremy Soller
4380e241cb
soc/common/smbus: Support reading SPD5 hubs for DDR5
DDR5 uses a Serial Presence Detect (SPD) with hub function
(SPD5 hub device) to store the SPD data. The SPD5 hub has 1024 bytes of
EEPROM (`CONFIG_DIMM_SPD_SIZE=1024`).

Change-Id: Ic5e6c58f255bef86b68ce90a4f853bf4e7c7ccfe
Co-authored-by: Meera Ravindranath <meera.ravindranath@intel.com>
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:12:20 -06:00
Tim Crawford
277c9abeb7
security/tpm/tspi: Do TPM Restart if TPM Resume fails
The Infineon SLB 9672 on newer Clevo machines regularly fails TPM Resume
on S3 with the error `TPM_RC_VALUE`.

Per TPM2 spec, handle the failure by performing a TPM Restart.

> The startup behavior defined by this specification is different than
> TPM 1.2 with respect to Startup(STATE). A TPM 1.2 device will enter
> Failure Mode if no state is available when the TPM receives
> Startup(STATE). This is not the case in this specification. It is up
> to the CRTM to take corrective action if it the TPM returns
> TPM_RC_VALUE in response to Startup(STATE).

Fixes the following error from being repeatedly logged in Linux:

> kernel: tpm tpm0: A TPM error (256) occurred attempting get random

Ref: Trusted Platform Module Library, Part 1: Architecture, rev 1.59
Change-Id: I3388007d4448c93bd0dda591c8ca7d1a8dc5306b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-08-30 11:12:13 -06:00
Felix Singer
403030c9e3
soc/intel/raptorlake: Use updated microcode from blobs repo
This updated microcode fixes the recent voltage issues on the Raptor
Lake S platform. Intel provided this specific microcode just as an
attachment [1]. Thus, we've uploaded it to our own blobs repository,
which is why the path is changed.

Microcode signature:

  sig 0x000b0671, pf_mask 0x32, 2024-07-18, rev 0x0129

[1] https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/81

Change-Id: I6d01e38476b0d3dc5281ea1d85bac87043d122dd
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84132
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-30 10:29:22 -06:00
Felix Singer
dfc5b30ae9
3rdparty/blobs: Update submodule to upstream main
Updating from commit id a8db7df:
2023-07-24 16:05:01 +0000 - (mb/google: amd projects: Add signed verstage files)

to commit id 45f1b75:
2024-08-29 11:51:27 +0200 - (soc/intel/raptorlake: Add microcode for 06-b7-01)

This brings in 7 new commits:
45f1b75 soc/intel/raptorlake: Add microcode for 06-b7-01
a0fdf22 soc/mediatek/mt8186: Update DRAM binary from 0.1.0 to 0.1.1
c641a81 mb/erying/tgl: Add blobs necessary for platform bring-up
30e541a soc/mediatek/mt8192: Update dram.elf from 1.6.3 to 1.8.3
ba6e8a4 soc/intel: Remove Quark blobs
1f31acc soc/mediatek/mt8188: Update DRAM blob to 0.1.2
542c27d mb/starlabs/starbook: Consolidate version history

Change-Id: I7553ea2112cb336866bdff3c24c02f8a7fd15811
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84129
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-30 10:29:17 -06:00
Sean Rhodes
3cf619e521
Update intel-microcode submodule to upstream main
Updating from commit id 5278dfc:
2024-05-31 18:42:47 -0600 - (microcode-20240531 Release)

to commit id 2f56505:
2024-08-14 19:59:27 -0600 - (microcode-20240813 Release)

This brings in 1 new commits:
2f56505 microcode-20240813 Release

Change-Id: I5cf5d78bcda07f742a8282b84a1c8336e6a23594
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84110
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-30 10:28:09 -06:00
Subrata Banik
b2914756d5
soc/intel/adl: Prevent unconditional legacy COM ports initialization
This patch eliminates the LPC_IOE_COMA_EN and LPC_IOE_COMB_EN IO enables
from the io_enables variable in the pch_early_iorange_init() function
because lpc_io_setup_comm_a_b() is intended to activate legacy COM
ports like COM-A (0x3F8 - 0x3FF) and COM_B (0x2F8 - 0x2FF).

These COM ports are being activated unconditionally, which is
undesirable for the Intel Alder Lake platform and causes traffic over
the IO bus.

As a result, this code is being removed and platforms that select
DRIVERS_UART_8250IO can activate legacy COM ports.

BUG=b:354066052
TEST=Able to boot google/redrix to the operating system and confirm
that there was no traffic over legacy COMs while being monitored
using the eSPI analyzer.

Change-Id: I7a6e38bd151f823d37c07ee89a800489122cc209
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84080
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-30 10:27:10 -06:00
Matt DeVillier
04bb74a726 documentation/release: Update release checklist
Sync checklist with release template; add new heading for paragraph
on pushing the signed tag to make it stand out.

Change-Id: Id49b3f38d3501382b7fb7ac791190c0cacd58a11
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84034
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23 19:49:39 +00:00
Martin Roth
8f83a8d5db Docs/releases: Update 24.08 release notes
These are the final release notes before the release is tagged. They
will be updated after the tag is in place with any differences,
including changing the "upcoming release"  notice with the notice that
it has been released.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I449e8490d72976c8f723dc3b5ab3b77d7b16e3a0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84046
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23 19:36:09 +00:00
Jason Glenesk
22d486dbf2 Documentation/releases: Add 24.11 release notes template
In preparation for the upcoming release, add the template for the
24.11 release and update index.md.

Change-Id: I1e524f1db0090bf8815b08315f9cbc9894965af7
Signed-off-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84036
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23 19:35:16 +00:00
Jason Glenesk
66f1246c0f Documentation/vboot: Update vboot supported boards list
Auto-generated by util/vboot_list/vboot_list.sh.

Change-Id: Ie2d3378e8995b09372291294f9ffb0d2d8eccc8b
Signed-off-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84035
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-23 19:33:50 +00:00
Wei Hualin
1d41e3d1e0 mb/google/dedede/var/awasuki: Modify DPTF parameters
Modify DPTF parameters from thermal team.

1. Add TCHG.
2. Modify the charging limit.

BUG=b:360066326
TEST=Modify Thermal according to design requirements

Change-Id: Ia7050b552656a70da0c992e4f54b02ccb6a7c114
Signed-off-by: Wei Hualin <weihualin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83929
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar
2024-08-23 17:51:59 +00:00
Jarried Lin
62d69eb59b soc/mediatek/mt8196: Add GPIO driver
Add GPIO driver for other modules to control GPIO pins.

TEST=build pass
BUG=b:317009620

Change-Id: I6d1e6ef17660308c8de908697ffba6b5f17ff9ae
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83922
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23 14:34:54 +00:00
Jarried Lin
2bb1388d68 soc/mediatek/common: Move GPIO definition to the common directory
To reduce duplicate gpio_base.h in each SoC folder, move gpio_base.h to
mediatek/common folder.

TEST=Build pass
BUG=b:317009620

Change-Id: I815df8a3083cf04b821165ec834ca98ee71a0c78
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83988
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-08-23 14:33:39 +00:00
Jarried Lin
d2328698ac soc/mediatek/common: Print error if GPIO raw_id is not in the range
TEST=build pass
BUG=317009620

Change-Id: I5dffdb9f3e4e7e0d49209e6012893cd246948ee8
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83987
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-08-23 14:33:23 +00:00
David Wu
2f3d534eea mb/google/nissa/var/riven: Set VccIn Aux Imon IccMax to 25A
Iccmax of VccIn_Aux is 25A with MBVR design.

BUG=b:348258637
TEST=Local build successfully and boot to OS normally.

Change-Id: I59c420c03a8f01d185f616a2212798266b4251e0
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83986
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
2024-08-23 14:32:45 +00:00
Roger Wang
df96dd5075 mb/google/nissa/var/sundance: Adjust GPIO GPP_C1 to no_pull-up
EE change GPP_C1 from pull-up to OD&no pull-up in PCH GPIO Table.

BUG=b:358472598
TEST=Build and verified test result by EE team

Change-Id: I84d1b42a39bebbcd610cebc46f979018fc79238f
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83904
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23 14:32:24 +00:00
Arthur Heymans
183037de6a arch/arm: Add a few ARM targets as supported by CLANG
Some targets cannot be supported by clang as clang generates slightly
larger binaries which the hardware won't accept. This is usually the
case with CONFIG_CHROMEOS.

Change-Id: I88cf8ce16fb6c61c19d615e396f5871179b06fc8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69747
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23 10:40:01 +00:00
David Wu
e0be23c733 mb/google/nissa/var/nivviks: Correct USB port for PCIE WLAN bluetooth
PCIE WLAN Bluetooth is on port8, need to correct USB port for PCIE WLAN
bluetooth companion device.

BUG=b:345596420
TEST=Build and test on nivviks, check BRDS is shown in SSDT.

Change-Id: I0908ff500434401bf89a5313427cf304f32cf929
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2024-08-23 08:46:22 +00:00
David Wu
cbeeefae18 mb/google/nissa/var/riven: Correct USB port for PCIE WLAN bluetooth
PCIE WLAN Bluetooth is on port8, need to correct USB port for PCIE WLAN
bluetooth companion device.

BUG=b:345596420
TEST=Build and test on revin, check BRDS is shown in SSDT.

Change-Id: Ie8174567b863e1afe8b0a27e644e24e9d3de6d19
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84020
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-23 08:46:11 +00:00
Nico Huber
41feb32559 region: Turn region_end() into an inclusive region_last()
The current region_end() implementation is susceptible to overflow
if the region is at the end of the addressable space. A common case
with the memory-mapped flash of x86 directly below the 32-bit limit.

Note: This patch also changes console output to inclusive limits.
IMO, to the better.

Change-Id: Ic4bd6eced638745b7e845504da74542e4220554a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-23 01:08:16 +00:00
Arthur Heymans
7bb8de1843 Makefile.mk: Add a common link_stage function and use it
A few differences with the original link targets:
- 'libs' is now supported on all arch even though only x86 uses it
- compiler_rt is included on arch that previously did not (arm). This
  however has no impact as there compiler_rt is not defined for those
  arch in xcompile
- LIBGCC_FILE_NAME_bootblock is not included, but this was not defined
  anywhere so this is a noop

Change-Id: I64f7686894c99732d06972e7ba327061db6d7c44
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83574
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-22 13:57:47 +00:00
Arthur Heymans
cb26ed489c arch/x86: Move oformat definition into the linker file
This removes the boilerplate --oformat out of the makefile.mk

Change-Id: Ib78934fff4a31c4375da2038efca5027b813b07b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83999
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-22 13:56:52 +00:00
Ren Kuo
89869144bf mb/google/brox/var/jubilant: Enable devices on unprovisioned fw_config
Add the condition of unprovisioned fw_config to enable all storages
and devices. It's for first boot on all storags and preliminary test
in factory when fw_config is unprovisioned.

BUG=None
TEST=Build jubilant firmware and boot to OS on storages when fw_config
     is unprovisioned and ensure all devices are enable.

Change-Id: Ia14632744c34548e2c201dfc58d82515cdd02df0
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84002
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-22 13:54:38 +00:00
Karthikeyan Ramasubramanian
60d9121073 mb/google/brox: Enable storage devices on unprovisioned fw_config
Storage devices are very critical to boot to OS. When probe list is
defined for storage devices, all of them get disabled when fw_config is
unprovisioned - a typical situation in the factory. Fix this by
configuring the storage devices in device/override tree to probe and
enable them when fw_config is unprovisioned.

BUG=None
TEST=Build Brox firmware and boot to OS when fw_config is unprovisioned.

Change-Id: I0537f7d1d83293b9b3408f0aadf11fa2e7908163
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83984
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Reviewed-by: Bob Moragues <moragues@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-22 13:54:06 +00:00
Karthikeyan Ramasubramanian
6bdc3becfd util/sconfig: Probe device when fw_config is unprovisioned
When fw_config is unprovisioned (eg. in the factory), devices that do
not have any probe list are enabled by default and those that have probe
list are disabled. On mainboards that support multiple types of boot
critical devices (eg. storage) through probing fw_config, all of
them are disabled when fw_config is unprovisioned. Hence the devices do
not boot to OS. Add sconfig fw_config rule `probe unprovisioned` to
enable such devices when fw_config is unprovisioned.

BUG=None
TEST=Build Brox firmware and boot to OS when fw_config is unprovisioned.

Change-Id: I178f821e077912776d654971924d67203a7c43df
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83983
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2024-08-22 13:53:18 +00:00
zengqinghong
f5b9e9aed1 mb/google/nissa/var/teliks: Adjust usb2 pin of wlan
Since the voltage value measured by the USB2 pin of the wlan is 500mv,
it does not meet the design requirements. Adjusting the port length
can reduce the voltage to 450mv, which meets the expected settings.

BUG=b:361037189
TEST=1. The voltage measurements are as expected.
     2. The Bluetooth and WiFi functions of the wlan module are
        verified to be normal.

Change-Id: Icd1ec3b561ee5b3f55e5f97a56fd9cb7df893508
Signed-off-by: zengqinghong <zengqinghong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84001
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
2024-08-22 13:26:28 +00:00
Matt DeVillier
7909b88789 mb/google/volteer/var/drobit: Set UART GPIOs in bootblock
Enables early serial console for debugging.

TEST=build/boot drobit, verify console output available starting in
bootblock on CPU UART (/dev/ttyUSB1) vs ramstage.

Change-Id: If94eb8caca3469143433fef06b972050f886be6a
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83995
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-22 13:25:55 +00:00
Cliff Huang
1c6548d5cc soc/intel/common/tcss: Move AUX bias ctrl reg defines to SOC hdr
These field defines are SOC-specific. The AUX bias virtual wire field
positons are shifted in PTL.

In MTL SOC and older:
7:0    GROUP_ID   Group ID in PCH GPIO
10:8   BIT_NUM    Data bit Position in PCH GPIO
23:16  VW_INDEX   VW Index in PCH GPIO

In PTL SOC:
15:0    GROUP_ID   Group ID in PCH GPIO; targeted SB_PORTID
18:16   BIT_NUM    Data bit Position in PCH GPIO
31:24   VW_INDEX   VW Index in PCH GPIO

BUG=361048817
TEST=boot to OS and use iotools to read AUX Bias Ctrl register to
verify the group ID, bit number, and vw index.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: I0f9c895590465b2f539c91834cf331fcd7efa996
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83980
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
2024-08-22 13:25:40 +00:00
Nicholas Sudsgaard
2d4afd8fd9 mb/lenovo/thinkcentre_m710s: Disable DRIVER_LENOVO_SERIALS
This mainboard does not have AT24RF08C (Asset Identification EEPROM) and
will show "*INVALID*" in the SMBIOS table.

Change-Id: If6f948bc4c63c7afdc8b31e1945d3c3beb99883f
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83994
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-22 13:24:53 +00:00
Nicholas Sudsgaard
fa2330373e mb/lenovo/thinkcentre_m710s: Add USB port descriptions
Change-Id: Icc5546a8073c03ce77480b634b367d10d1ad0111
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83992
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-22 13:20:27 +00:00
Nicholas Sudsgaard
752962e553 mb/lenovo/thinkcentre_m710s: Add SMBIOS data for PCIe slots
Change-Id: Iaa761108acbf275820ecbec9837b81bc5d64613e
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83991
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-22 13:20:11 +00:00
Jędrzej Ciupis
81b417da06 mb/google/dedede: enable Intel CrashLog
Enable Intel CrashLog diagnostic feature by default on all Google
Dedede variants.

BUG=b:354834461
TEST=Built for Google Dedede and verifed that CrashLog is enabled by
default.

Change-Id: Ib0487bd6a5bfdad2a80fd0787e009e48f4527d38
Signed-off-by: Jędrzej Ciupis <jciupis@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83885
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-08-22 13:17:49 +00:00
Jędrzej Ciupis
07dd73c921 soc/intel/jasperlake: Add CrashLog implementation for Intel JSL
Extend support for CrashLog to Intel Jasperlake based platforms.

This commit is based on 15cbc3b5996ae64aff2e4741c4c3ec3d7f5cc1a7,
originally reviewed on https://review.coreboot.org/c/coreboot/+/49943.

BUG=b:354834461
TEST=CrashLog can be enabled in Kconfig for Jasperlake based platforms
and can generate a BERT table, if enabled.

Change-Id: Ia18a79d8de849d556b4b8fd0e6b43090311eb23f
Signed-off-by: Jędrzej Ciupis <jciupis@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83884
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-08-22 13:13:47 +00:00
Shuo Liu
94a65fa2c6 arch/x86/include: Define feature check macros for MCE and MCA
Define feature check macros for MCE (machine check exception)
and MCA (machine check architecture).

Change-Id: I014c25ced1dbe21f35486f8305b1de7669e932d0
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-22 13:07:14 +00:00
Subrata Banik
bdce399a12 soc/intel/alderlake: Refactor eSOL for late CSE sync text message
This patch extends the eSOL implementation on Alder Lake to render text
messages during late CSE sync (from ramstage).

Currently, the eSOL is limited to the early boot phase (until romstage)
and only displays FSP-M memory training warnings or messages during
early CSE sync (at romstage).

Platforms like Nissa/Nirul and Trulo, which use CSE sync from ramstage,
cannot display any eSOL messages, resulting in a brief black screen
during CSE firmware updates.

This patch implements the following logic to scale eSOL for late CSE
sync (at ramstage) without recompiling eSOL code for ramstage:

1. During boot, check if the MRC cache is available. This indicates the
   need for memory/DRAM training and triggers an eSOL message.
2. For CSE lite SKUs (applicable to CrOS), leverage the
   `is_cse_fw_update_required` API to check if the current CSE RW
   firmware version differs from the CBFS metadata file version.
   If so, trigger an eSOL message indicating a CSE sync is required.
3. If either condition #1 and/or #2 is true, the AP firmware renders
   an eSOL text message using LibGfxInit for the Alder Lake platform.

BUG=b:359814797
TEST=eSOL text messages are displayed during CSE sync and FSP updates.

tirwen-rev3 ~ # elogtool list
0 | ... | Log area cleared | 4088
1 | ... | Early Sign of Life | MRC Early SOL Screen Shown
1 | ... | Early Sign of Life | CSE Sync Early SOL Screen Shown
2 | ... | System boot | 197
3 | ... | Memory Cache Update | Normal | Success
4 | ... | System boot | 198
5 | ... | Firmware Splash Screen | Enabled

Change-Id: I1c7d4475ed5cf6888df1beebab0641ee4203b497
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83975
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-08-22 09:37:07 +00:00
Subrata Banik
4d00a5facc soc/intel/alderlake: Preserve eSOL for late CSE sync
This patch prevents the eSOL screen from being wiped out on Alder Lake
platforms that use late CSE sync (from ramstage). This allows the eSOL
text message to remain visible until ramstage.

Currently, the eSOL only functions during the early boot phase (until
romstage), so platforms like Nissa/Nirul and Trulo, which use CSE sync
from ramstage, cannot display any eSOL messages to the user.

A future patch will ensure the eSOL remains relevant for CSE sync in
ramstage, but this patch is necessary to avoid tearing down the IGD text
mode when exiting romstage.

BUG=b:359814797
TEST=eSOL text mode is not torn down when exiting romstage.

Change-Id: I81548b4057ab95ce3da0dbc69703977baf0581f1
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-22 09:37:04 +00:00
Nicholas Chin
cf2bf984f0 Docs: Fix broken header references
MyST Parser automatically generates label "slugs" for headers which
should be used to reference them from links [1]. These labels are in
"slug-case", i.e. the original header text in lower case separated by
dashes, with punctuation removed. This fixes a few "cross-reference
target not found" warnings.

[1] https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#anchor-slug-structure

Change-Id: Ia6970d03b961bde6d7cd0fa3297f8d84b75d3b34
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83976
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-21 16:18:23 +00:00
Jamie Ryu
73be964100 soc/intel/ptl: Dump SoC QDF from report_cpu_info in bootblock
This enables SOC_QDF_DYNAMIC_READ_PMC and adds pmc_dump_soc_qdf_info
to report_cpu_info to dump QDF information from bootblock.

Change-Id: Iaf6f46cd9be831dde345c3b3728cd66145746d68
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83940
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Saurabh Mishra <mishra.saurabh@intel.com>
2024-08-21 16:14:47 +00:00
Jamie Ryu
d4833a6499 soc/intel/cmn/pmc: Add pmc_ipc to bootblock
This adds pmc_ipc to bootblock if SOC_INTEL_COMMON_BLOCK_PMC is enabled.
The good place to report SoC QDF can be report_cpu_info in bootblock.
QDF read is done by PMC IPC Command, so this adds pmc_ipc to bootblock
to enable calling pmc_dump_soc_qdf_info.

Change-Id: Id0391eae48fc53cd652acd09e6380ca6802eaf88
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83939
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-21 16:14:31 +00:00
Matt DeVillier
8c6f785d5e mb/google/byra/var/kinox: Add/update VBT files
Kinox has two VBT options, selected via fw_config. Add the second
option to CBFS, and update the original file.

Extracted from Google_Kinox.14505.704.0.bin.

TEST=build/boot kinix, verify firmware display init successful and
payload menu visible. Verify correct VBT selected via cbmem log.

Change-Id: I01c19222628fee3874ef592ec40b40d9bd679dce
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83996
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 16:13:43 +00:00
Riku Viitanen
e1914693ce mb/hp: Move compaq_elite_8300_usdt into snb_ivb_desktops variants
Tested to still boot, SeaBIOS -> Void Linux

Change-Id: Idc61e5d17f4c71fc50cf87c60a5063fc893c1d8c
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79544
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 16:12:40 +00:00
Jeremy Compostella
69686564ec soc/intel/common/block/cpu: Round up the number of ways
`CONFIG_DCACHE_RAM_SIZE' is not necessarily a multiple of way size. As
a result, when the `div' instruction is called to compute the needed
number of ways, there could be a remainder. When there is, one extra
way should be added to cover `CONFIG_DCACHE_RAM_SIZE'.

BUG=b:360332771
TEST=Verified on PTL Intel reference platform

Change-Id: I5cb66da0aa977eecb64a0021268a6827747c521e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83982
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 15:55:11 +00:00
Jeremy Compostella
58dc892bbe soc/intel/common/block/cpu: Fix ways count computation regression
Commit 16ab9bdcd578612bb3822373547f939eb90afd82 ("soc/intel/common:
Calculate and configure SF Mask 2") breaks the computation of the
number of ways and as result, all the derived masks. It results in MSR
such as `IA32_L3_MASK_1' to be improperly programmed yielding
unpredictable NEM issues such as hangs.

Indeed, this commit has introduced a backup of 0x1 into %edx before
comparing the requested cache-as-RAM size against the way size. When
the requested cache-as-RAM is larger, it reaches the second part of
the algorithm which computes the necessary number of ways to fit the
requested cache-as-RAM.

This algorithm uses the `div' instruction. Per specification, the div
instruction divides the 64 bits combination of %edx and %eax register.
Since 0x1 got backed up in %edx and assuming a
`CONFIG_DCACHE_RAM_SIZE' of 0x200000, we end up dividing 0x100200000
by the way size instead of 0x200000 which result in a necessary number
of ways of 4098 for a way size of 0x100000.

This commit clears the %edx register before calling the `div'
instruction.

BUG=b:360332771
TEST=Verified on PTL Intel reference platform

Change-Id: I5cb66da0aa977eecb64a0021268a6827747c521d
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83948
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 15:54:58 +00:00
Jędrzej Ciupis
1dd8991fef soc/intel/common: fix CrashLog size in legacy mode
Intel's PMC CrashLog size in legacy mode is expressed in DWORDs and
therefore needs to be explicitly recalculated to bytes.

BUG=None
TEST=Built and checked the size in logs

Change-Id: I2678d537439c24fbd10aa3ceffee63c9a849d28b
Signed-off-by: Jędrzej Ciupis <jciupis@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-08-21 14:32:02 +00:00
Nick Vaccaro
bd5356cfef mb/goog/brox: unlock gpio wake sources
The power off code in depthcharge disables all GPEs prior to power off.
The problem is that for gpio wake sources that are locked, this power
off code cannot successfully clear any pending interrupt from that
source.  This can result in the device incorrectly waking back up after
it's been powered off from the firmware dev screen.

BUG=b:360380950, b:359692570
BRANCH=None
TEST=verify brox DUT is able to power down and stay powered down when
selecting the "Power off" button in the firmware dev screen.

Change-Id: I5cd36640677996209beb8fe29f522ff8e07ebf00
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83951
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-21 14:29:33 +00:00
Nick Vaccaro
2a83686947 mb/goog/rex: unlock gpio wake sources
The power off code in depthcharge disables all GPEs prior to power off.
The problem is that for gpio wake sources that are locked, this power
off code cannot successfully clear any pending interrupt from that
source.  This can result in the device incorrectly waking back up after
it's been powered off from the firmware dev screen.

BUG=b:360380950, b:359692570
BRANCH=None
TEST=verify rex DUT is able to power down and stay powered down when
selecting the "Power off" button in the firmware dev screen.

Change-Id: I3fdc02a82d197fd2b075e0a66c578149cef3a69f
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83950
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-21 14:27:52 +00:00
Nick Vaccaro
d1ed56e81a mb/goog/brya: unlock gpio wake sources
The power off code in depthcharge disables all GPEs prior to power off.
The problem is that for gpio wake sources that are locked, this power
off code cannot successfully clear any pending interrupt from that
source.  This can result in the device incorrectly waking back up after
it's been powered off from the firmware dev screen.

BUG=b:360380950, b:359692570
BRANCH=firmware-brya-14505.B
TEST=verify brask, nissa, or brya DUT is able to power down and stay
powered down when selecting the "Power off" button in the firmware dev
screen.

Change-Id: Ic0ac73f8f29761f072d42f35e97198b56d32a9bc
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83949
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-21 14:27:38 +00:00
Subrata Banik
97df9ef25f soc/intel/pantherlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch replaces the SoC-specific config option
`SOC_INTEL_PANTHERLAKE_DEBUG_CONSENT` with the generic
`SOC_INTEL_COMMON_DEBUG_CONSENT`.

TEST=Able to build and boot google/fatcat without any functional impact
while debugging.

Change-Id: I36bbe14d02654ed9dbda21df0d9a6a6769b87754
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83962
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 13:45:01 +00:00
Subrata Banik
2142053986 soc/intel/meteorlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch replaces the SoC-specific config option
`SOC_INTEL_METEORLAKE_DEBUG_CONSENT` with the generic
`SOC_INTEL_COMMON_DEBUG_CONSENT`.

Additionally, updates the FSP configuration to use the new generic
config option.

TEST=Able to build and boot google/rex0 without any functional impact
while debugging.

Change-Id: I657d20a38e15eee333a4e45c0c600736148173d4
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83961
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 13:44:52 +00:00
Subrata Banik
e6f6d2b76c soc/intel/alderlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch replaces the SoC-specific config option
`SOC_INTEL_ALDERLAKE_DEBUG_CONSENT` with the generic
`SOC_INTEL_COMMON_DEBUG_CONSENT`.

Additionally, updates the FSP configuration to use the new generic
config option.

TEST=Able to build and boot google/redrix without any functional impact
while debugging.

Change-Id: I9a9c81b72d707f5ed2e1a53c139ee22be0e30068
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83957
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-21 13:44:46 +00:00
Subrata Banik
8165da7408 soc/intel/tigerlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch drops the SoC-specific config option
`SOC_INTEL_TIGERLAKE_DEBUG_CONSENT`.

Additionally, updates the FSP configuration to use the new generic
config option.

TEST=Able to build and boot google/volteer without any functional
impact while debugging.

Change-Id: I3e96b20e7e8b3ce3c2e4884abd315a5cc55fe71d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83963
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-21 13:44:32 +00:00
Subrata Banik
c41a21d825 soc/intel/jasperlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch drops the SoC-specific config option
`SOC_INTEL_JASPERLAKE_DEBUG_CONSENT`.

Additionally, updates the FSP configuration to use the new generic
config option.

TEST=Able to build and boot google/dedede without any functional
impact while debugging.

Change-Id: I3e7abaf5fb3a0d5528041af5ce767a15fc738870
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83960
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 13:44:25 +00:00
Subrata Banik
79a688e761 soc/intel/elkhartlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch drops the SoC-specific config option
`SOC_INTEL_ELKHARTLAKE_DEBUG_CONSENT`.

Additionally, updates the FSP configuration to use the new generic
config option.

TEST=Able to build and boot intel/elkhartlake_crb without any
functional impact while debugging.

Change-Id: Idb8db7230c432792e742218d41d891c529b2114f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83959
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 13:44:19 +00:00
Subrata Banik
d949bca67b soc/intel/cannonlake: Switch to SOC_INTEL_COMMON_DEBUG_CONSENT
This patch drops the SoC-specific config option
`SOC_INTEL_CANNONLAKE_DEBUG_CONSENT`.

Additionally, updates the FSP configuration to use the new generic
config option.

TEST=Able to build and boot google/hatch without any functional impact
while debugging.

Change-Id: Ifad11652b5fa6ff14f713f55a721cdbbfbfde471
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83958
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 13:44:12 +00:00
Felix Singer
6fc13b08f8 mb/acer/g43t-am3: Remove duplicated files
With commit 26b1a5f62b ("mb/acer/g43t-am3: Rework mainboard for variant
mechanism"), the files related to the G43T-AM3 mainboard were supposed
to be moved into its own variant directory. However, it seems it was
forgotten to delete the old ones and thus remove the duplicates.

Change-Id: I450fab074621d21e80216e4667eaf2510b0e14ad
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83985
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-21 03:07:28 +00:00
Nicholas Chin
29575ca635 Doc/mb/starlabs/lite_adl.md: Fix embedded rST syntax
MyST Parser uses {eval-rst} to denote embedded reStructuredText blocks,
instead of eval_rst as used previously by recommonmark.

Change-Id: I1f16d594af41a13762ba299b8d4f9d88e59c68ed
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83978
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-20 19:07:41 +00:00
Nicholas Chin
d47decf563 util/find_usbdebug: Add 8/9 Series PCH rate matching hub IDs
The USB IDs of the EHCI rate matching hubs found in these chipsets were
missing, preventing the utility from detecting connected USB devices.

Change-Id: I52858e2c75e8a3e1424a13bcddc2f5ec1216164b
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83458
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-20 19:07:22 +00:00
Sean Rhodes
fbed78c4f7 ec/starlabs/merlin: Remove cezanne-desktop variant
This board now uses merlin so it can be removed.

Change-Id: I6036695ccf80b0a7d6e6463d26e5b32aa6cb9d57
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83630
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-20 13:19:14 +00:00
Sean Rhodes
50b7976bb2 ec/starlabs/merlin: Remove ITE mirror functionality
Remove the ITE mirror functionality; all devices will mirror
automatically when they exit G3, and this is good enough.

Change-Id: I9b82e1b1386b4607dfe7da9b25ba432ec0303cf8
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83629
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-20 13:18:39 +00:00
Vladimir Serbinenko
32d21ff3eb superio/ite/it8728f: Support setting power state after power failure
This properly supports power_on_after_fail setting on affected
mainboards.

Tested on GA-H61M-S2PV

Change-Id: I3dcc4f032bc5f629fb916c4122beb8dc096bab20
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82737
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-20 13:10:02 +00:00
Michael Strosche
36555afb96 soc/intel/meteorlake/chip.h: Use boolean type where applicable
Change-Id: I15dfd5ed0541352930c3b70252b3e536ad1e6efd
Signed-off-by: Michael Strosche <michael.strosche@gmail.com>
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-20 12:58:06 +00:00
Maximilian Brune
db1e9ce832 arch/riscv: Remove ram probing
Previously RAM probing was necessary for our QEMU-RISCV target in order
to find the available amount of memory.
Now we get the memory from the devicetree propagated by QEMU, so there
is no reason to keep it anymore.

Tested:
Start QEMU-RISCV and cause an exception to make sure the trap handler
still works.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I9b1e0dc78fc2a66d6085fe99a71245ff46f8e63c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83873
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-20 12:54:12 +00:00
Subrata Banik
a985352350 soc/intel/cmn/basecode/debug: Add SOC_INTEL_COMMON_DEBUG_CONSENT config
This patch adds a generic config option, SOC_INTEL_COMMON_DEBUG_CONSENT,
to control the debug interface on Intel SoCs. This eliminates the need
for SoC-specific config options like SOC_INTEL_<SOC_NAME>_DEBUG_CONSENT.

Default values are provided for various debug types:
- 0: Disabled
- 1: Enabled (DCI OOB + [DbC])
- 2: Enabled (DCI OOB)
- 3: Enabled (USB3 DbC)
- 4: Enabled (XDP/MIPI60)
- 5: Enabled (USB2 DbC)
- 6: Enabled (2-wire DCI OOB)
- 7: Manual

Specific SoCs can override the SOC_INTEL_COMMON_DEBUG_CONSENT value
using SoC config override methods.

TEST=Able to build google/rex.

Change-Id: I84ad03f0ffe5da4bc53c665489c430fe9b65ede7
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83956
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-20 12:23:21 +00:00
Subrata Banik
0e83951864 soc/intel/elkhartlake: Select SOC_INTEL_COMMON_BASECODE
This patch selects the SOC_INTEL_COMMON_BASECODE option for Elkhart
Lake so that future patches can incorporate the common code debug
feature with it.

TEST=Able to build the EHL platform.

Change-Id: I71d95352fe627a7f1912f802aa971ad1ebbbead7
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83955
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-20 12:21:13 +00:00
Tony Huang
9b9d0a4665 mb/google/ovis/var/deku: Set TCC_offset to 12
Adjust settings as recommended by thermal team.

Set tcc_offset value to 12 in devicetree.

BUG=b:308704811
BRANCH=firmware-rex-15709.B
TEST=emerge-ovis coreboot chromeos-bootimage
     built bootleg and verified test result by thermal team

Change-Id: I0ae97bb0b2dbb2fe8f35221522506ec1f7da47f6
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83971
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-20 12:18:48 +00:00
Subrata Banik
eb2701c46a mb/google/nissa/var/riven: Set PCIE WLAN bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

BUG=b:345596420
TEST=Build and test on revin, check BRDS is shown in SSDT.

Change-Id: I87cfbdd0b8a97d84a96af373855219c60f39f173
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83944
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-20 12:18:28 +00:00
Subrata Banik
ac0c506c7b mb/google/nissa/var/nivviks: Set PCIE WLAN bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

BUG=b:345596420
TEST=Build and test on nivviks, check BRDS is shown in SSDT.

Change-Id: Ib654f22033c68edbc602f14537aaa2151800598d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83943
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-20 12:17:59 +00:00
Anil Kumar
6c3fed5bf4 drivers/soundwire: Support Realtek ALC722 codec
This patch adds SoundWire driver to support ALC722 audio codec.

The existing ALC711 codec driver is refactored to include support for
ALC722 device based on config flag.

The ACPI address for the codec is calculated with the information in
the codec driver combined with the devicetree.cb hierarchy where the
link and unique IDs are extracted from the device path.

For example this device is connected to master link ID 0 and has strap
settings configuring it for unique ID 1:

chip drivers/soundwire/alc711
  register "desc" = ""Headset Codec""
  device generic 0.1 on end
end

reference datasheet: Realtek ALC722-CG ver. 0.56

TEST=This driver was tested on Intel RVP with on board ALC722 codec
by booting and disassembling the runtime SSDT to ensure that the
devices have the expected address and properties. Test soundcard
binding works and devices are detected and check for audio playback
using speaker output.

Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
Change-Id: Ieb16a1c6f3a79321fdc35987468daa8be33b6e49
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81920
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-20 03:59:32 +00:00
Maximilian Brune
888166e6ea util/cbfstool/cbfs-payload-linux: Add error handling
This adds some error handling to the code that adds the input segments
(e.g. kernel, cmdline, initrd...) to the output file.

Currently the compress function can fail and coreboot will still
build "successfully" leaving whoever build coreboot puzzled.

Change-Id: Ie36ad469c73cb3ff9360acc9bbe66c245e8b4a1e
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83617
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-20 01:41:59 +00:00
Jakub Czapiga
70d0fda89d libpayload: Add missing SIZE_MAX define
commonlib/region.h requires SIZE_MAX to be defined.

Change-Id: I588d59c2637b10def046ea02293e5503c9b6bc3d
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83907
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-19 23:20:00 +00:00
Nicholas Chin
98a589cfc0 Doc/mb/starlabs: Rename starlite_adl.md to lite_adl.md
The reference in Doc/mb/index.md was to starlabs/lite_adl.md, whereas
the file was actually named starlite_adl.md. Rename the file to fix the
broken reference and match the naming scheme of the markdown files for
the other StarLite systems.

Change-Id: I1922940fd18cc806d9647cbe05ad11b2a70e0d08
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83977
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-19 14:46:53 +00:00
Sergii Dmytruk
1a8b9c20f8 drivers/efi: add optional ESRT-friendly coreboot table tag
EFI System Resource Table (ESRT) is an informational structure that
reports basic details about current system or device firmware.  This is
chiefly used to perform firmware updates.

New CONFIG_DRIVERS_EFI_FW_INFO is off by default, enabling it adds
DRIVERS_EFI_FW_{GUID,VERSION,LSV} to be used to specify firmware
version/update information.

Existing forms of versions wouldn't be sufficient because there is no
universal way of converting string versions to 32-bit unsigned integers
and there are no GUIDs or lowest supported versions.

Change-Id: Ic1b768d7bed43edf7ca8e41552087734054de033
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83421
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-19 14:30:20 +00:00
Maximilian Brune
2355aa7d3b util/cbfstool/cbfs-payload-linux: Do not compress bzImage
Compressing the already compressed bzImage does not yield any
fruit. If you are lucky it actually makes the image a little bit
smaller. If you are unlucky the image actually gets bigger and since the
compressing function is not checked for any errors, coreboot just builds
successfully even though the payload is broken through compression.

Before this patch you could possibly get this error during compilation:
```
E: LZMA: LzmaEnc_Encode failed 9.
```
and your linux payload would end up something like this in CBFS:
```
FMAP REGION: COREBOOT
Name                           Offset     Type           Size   Comp
....
fallback/payload               0x1c9c0    simple elf        511 none
....
```

That doesn't stop coreboot from finishing the build though, since we
currently don't check for errors from the compression. That is an issue
for another patch though.

Tested:
Build and run QEMU-Q35 with Linux bzImage as payload.

Change-Id: I022982667515ce721d98af534414d9e336b5f35a
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83615
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-19 14:10:21 +00:00
Morris Hsu
5d661b81ae mb/google/brox/jubilant: Update fw_config
Change STORAGE_UNPROVISIONED to STORAGE_UNKNOWN depend on depthcharge setting.

BUG=None
TEST=emerge-brox coreboot
Set STORAGE_UNKNOWN  on jubilant, check that NVMe and UFS can boot.

Change-Id: I4cfd7322c2940862dfbae46e85522715cd7534c1
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83935
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Bob Moragues <moragues@google.com>
2024-08-19 13:26:30 +00:00
Wei Hualin
d9a625e052 mb/google/dedede/var/awasuki: Adjust I2C frequency to less than 400 KHz
Before:
I2C2 - 431KHz
I2C4 - 413KHz

After:
I2C2 - 364KHz
I2C4 - 370KHz

BUG=b:351968527
TEST=Rate of the actual measured machine is pass.

Change-Id: Ieb75db1dc95ffd5ca806a194ae678c700fa0741c
Signed-off-by: Wei Hualin <weihualin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83906
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
2024-08-19 13:25:40 +00:00
Kenneth Chan
5137e1e199 mb/google/brya/var/nova: Set up soundbar-related GPIOs
Set up soundbar-related GPIOs for updating.

BUG=b:358435383
TEST=emerge-constitution coreboot chromeos-bootimage

Change-Id: I517da8de90487533e49e46649c5acf4ccfcc5160
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83936
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-19 13:25:30 +00:00
Julius Werner
f9ab107d32 commonlib/bsd: Optimize strnlen()
This patch changes the strnlen() implementation to fix a small issue
where we would dereference once more byte than intended when not finding
a NUL-byte within the specified amount of characters. It also changes
the implementation to rely on a pre-calculated end pointer rather than a
running counter, since this seems to lead to slightly better assembly
(one less instruction in the inner loop) on most architectures.

Change-Id: Ic36768fd3a26e2b64143904e78cd0b52ba66898d
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83933
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-08-19 13:25:05 +00:00
Roger Wang
82c0dd2909 mb/google/nissa/var/sundance: Adjust WWAN GPIO sequence
This patch removes WWAN configuration from the bootblock.
It appears that setting it up in the bootblock may not be necessary.
Configure in bootblock,the seq will be triggered at the same time.
The customer would like us to leave some buffer for EN to RST.

BUG=b:357764679
TEST=Build and verified test result by EE team

Change-Id: I2c0e789c0bec293f4bca711e53644d62f4f83551
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83792
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-19 13:22:28 +00:00
Nigel Tao
efad423f84 lib/jpeg: avoid calling malloc and free
Since commit 1d029b40c9de ("lib/jpeg: Replace decoder with Wuffs'
implementation"), a relatively large heap allocation is needed to decode
many JPEGs for use as work area. The prior decoder did not need this,
but also had many limitations in the JPEGs it could decode, was not as
memory-safe and quickly crashed under fuzzing.

This commit keeps using Wuffs' JPEG decoder, but it no longer requires
any heap allocation (and thus configuring the heap size depending on how
big a bootsplash image you want to support).

Change-Id: Ie4c52520cbce498539517c4898ff765365a6beba
Signed-off-by: Nigel Tao <nigeltao@golang.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83895
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-08-19 12:32:21 +00:00
Nigel Tao
b598d05d38 vc/wuffs: upgrade to Wuffs 0.4.0-alpha.8
We were previously at Wuffs 0.4.0-alpha.2. The C file was copied from
https://github.com/google/wuffs-mirror-release-c and its hash matches
90e4d81a6a/sync.txt (L9-L10)

$ sha256sum src/vendorcode/wuffs/wuffs-v0.4.c
6c22caff4af929112601379a73f72461bc4719a5215366bcc90d599cbc442bb6  src/vendorcode/wuffs/wuffs-v0.4.c

Change-Id: Ie90d989384e0db2b23d7d1b3d9a57920ac8a95a2
Signed-off-by: Nigel Tao <nigeltao@golang.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83894
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-19 12:31:50 +00:00
Julia Kittlinger
957b6982f6 mb/acer/g43t-am3: Add Acer Q45T-AM as a variant
This adds a new board as a variant of the Acer G43T-AM3 with the
following prominent changes:

* Intel Q45 northbridge (GMCH) instead of a G43
* 4 MiB of flash instead of 2 MiB
* Two serial ports (one external, one internal)
* A parallel port connector (internal)
* An FDD connector
* DVI-D instead of HDMI
* No Firewire

The port was done based on logs and info received via private email. It
was only tested on the Acer G43T-AM3 so far, which still builds and works.

Change-Id: Ic2654ca4b198bfea409992be14e89702cf67ea50
Signed-off-by: Julia Kittlinger <launchpad.vineyard395@passinbox.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83968
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-18 10:55:38 +00:00
Michael Büchler
26b1a5f62b mb/acer/g43t-am3: Rework mainboard for variant mechanism
In preparation for CB:83968, rework the configuration files and move
files specific to G43T-AM3 to its own variant directory.

Change-Id: I425852f4bdacf7cb6688a5fb845ac3001373262e
Signed-off-by: Michael Büchler <michael.buechler@posteo.net>
Signed-off-by: Julia Kittlinger <launchpad.vineyard395@passinbox.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57764
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-18 10:55:22 +00:00
Subrata Banik
86ff4d12f1 mb/google/brya: Reset XHCI controller while preparing for S5
This patch calls `xhci_host_reset()` function to perform XHCI
controller reset.

Currently, the PMC IPC times out while sending the USB-C (0xA7) command
during poweron from S5 (S5->S4->S3->S0).

On Brya variants, poweron from S5 state results in PMC error while
sending PMC IPC (0xA7) to USB-C active ports, log here:

localhost ~ # cbmem -c | grep ERROR

[ERROR]  PMC IPC timeout after 1000 ms
[ERROR]  PMC IPC command 0x200a7 failed
[ERROR]  pmc_send_ipc_cmd failed
[ERROR]  Failed to setup port:0 to initial state
[ERROR]  PMC IPC timeout after 1000 ms
[ERROR]  PMC IPC command 0x200a7 failed
[ERROR]  pmc_send_ipc_cmd failed
[ERROR]  Failed to setup port:1 to initial state
[ERROR]  PMC IPC timeout after 1000 ms
[ERROR]  PMC IPC command 0x20a0 failed

This problem is not seen while powering on from G3 (G3->S5->S4->S3->S0).

During poweron the state of USB ports are not the same between S5 and G3
and it appears that the active USB port still is in U3 (suspend) while
PMC tries to send the IPC command, which results in a timeout.

This patch utilises the S5 SMI handler to reset the XHCI controller
using `xhci_host_reset()` prior entering into the S5, it helps to
restore the port state to active hence, no PMC timeout is seen with
this code change.

Supporting Doc=Intel expected to release a TA (Technical Advisory)
document to acknowledge this observation and supported W/A for ADL
generation platforms.
Till that time, keeping this W/A as part of the google/brya specific
mainboard alone.
Note: other ADL-SoC based mainboards might need to apply the similar
W/A.

BUG=b:227289581
TEST=No PMC timeout is observed while sending USB-C PMC command (0xA7)
during resume from S5.

Total Time: 1,045,855
localhost ~ # cbmem -c | grep ERROR

No PMC timeout error is observed with this CL.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ibf06a64f055a0cee3659b410652082f31e18e149
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-08-17 19:35:37 +00:00
Nico Huber
03401d259f mb/qemu-aarch64: Fix include path for device_tree.h
Recently merged commit 8cc1d79ed0c3 (mainboard/qemu-aarch64: Get top
of memory from device-tree blob) missed a rebase and hence needs the
include path updated.

Tested `make qemu` for qemu-aarch64.

Change-Id: Id669eeaabbc1710bb7e408659f2d79f682427919
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-08-16 19:16:56 +00:00
Alper Nebi Yasak
8cc1d79ed0 mainboard/qemu-aarch64: Get top of memory from device-tree blob
Trying to probe RAM space to figure out top of memory causes an
exception on AArch64 virtual machines with recent versions of QEMU, but
we temporarily enable exception handlers for that and use it to help
detect if a RAM address is usable or not. However, QEMU docs recommend
reading device information from the device-tree blob it provides us at
the start of RAM.

A previous commit adds a library function to parse device-tree blob that
QEMU provides us. Use it to determine top of memory in AArch64 QEMU
virtual machines, but still fall back to the RAM probing approach as a
last-ditch effort.

Change-Id: I4cc888b57cf98e0797ce7f9ddfa2eb34d14cd9c1
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80364
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-16 16:17:29 +00:00
Saurabh Mishra
de1a74454f soc/intel/ptl: Do initial Panther Lake SoC commit till romstage
List of changes:
1. Add required SoC programming till romstage
2. Include only required headers into include/soc
3. Fill required FSP-M UPD to call FSP-M API
4. Ref: Processor EDS documents
	Panther Lake U/H 12Xe/H 4Xe External Design
	Specification (EDS) Rev. 0.7, vol 1 of 2 #815002 and
	Volume 2 of 2 #813030

BUG=b:348678529
TEST=Verified on Intel® Simics® Pre Silicon Simulation platform
     for PTL using google/fatcat mainboard.

Change-Id: I27e1a6c56bca01e7f5f53fbf3cb6855bac7b2848
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83635
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-16 06:21:08 +00:00
Morris Hsu
4c749d765d mb/google/brox/jubilant: Disable devcies and GPIOs by fw_config
1.Set unused device's GPIOs to NC based on fw_config.
2.Disable config for nvme, ufs and CNVi based on fw_config.
3.Add fw_config STORAGE_UNKNOWN to enable all storages
  for the first boot in factory.

  BUG=None
  TEST=emerge-brox coreboot chromeos-bootiamge
       check fw_config messages in ap log
       verify devices on/off by fw_config on jubilant

Change-Id: I8d9f4edea454e0861f91261bf13fa80572d0a181
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2024-08-15 21:56:06 +00:00
Nick Vaccaro
27c8599b63 mb/goog/brya: Don't lock GPP_F15 (FPMCU_INT_L)
Locking GPP_F15 causes DUTs with fingerprint sensor to not be able to
correctly power down and stay powered down.  This pin does not need to
be locked.

BUG=b:359692570, b:356750516
BRANCH=firmware-brya-14505.B
TEST=`FW_NAME=gimble emerge-brya coreboot chromeos-bootimage`, flash and
boot gimble into developer mode, then reboot into dev screen and select
the "Power off" button and verify gimble powers off and does not power
itself back up.

Change-Id: I1c73035b02021b0d1268cd46dcd0841621556ad5
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83932
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-15 21:52:01 +00:00
Weimin Wu
fbb11f3cdb mb/google/dedede/var/awasuki: Enable HECI 1
The AP console log contains "HECI: No CSE device" and the system cannot be entered.

BUG=b:359474142
TEST=abuild -v -a -x -c max -p none -t google/dedede -b awasuki
     The "HECI: No CSE device" message for AP log disappered

Change-Id: I488056dc8bca2174dd96c28793e3202b7aae890c
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83905
Reviewed-by: Tongtong Pan <pantongtong@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-15 21:48:30 +00:00
Sean Rhodes
f5055feb4d Revert "mb/starlabs/starbook/adl: Update the VBT"
This reverts commit 2eb5c1e83ef5206f384846d7514c3aebcaec5bb8.

Reason for revert: The latest release of FSP will not boot
without a display being connected using this VBT. The original
VBT does not have this issue, nor is the original issue that
commit 2eb5c1e83ef5206f384846d7514c3aebcaec5bb8 fixed.

Revert it to restore booting when there is no display.

Change-Id: I05f9037cd68b8b29e69156e2372a544985f4442e
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-08-15 21:47:18 +00:00
Felix Held
1c25c63c78 include/cpu/amd/mtrr: rename TOP_MEM(2) and remove workaround
Both AGESA.h and cpu/amd/mtrr.h defined TOP_MEM and TOP_MEM2, but since
it was defined as unsigned long in AGESA.h, a workaround was needed in
cpu/amd/mtrr.h to not have the build fail due to a non-identical
redefinition of TOP_MEM and TOP_MEM2. Just removing the workaround
without reaming the defines isn't trivially possible, since the
stoneyridge romstage.c still ends up including both definitions which
can't be easily worked around. Now all non-vendorcode coreboot code uses
TOP_MEM_MSR and TOP_MEM2_MSR while the vendorcode part uses TOP_MEM and
TOP_MEM2 to avoid this.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibad72dac17bd0b05734709d42c6802b7c8a87455
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74619
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-08-15 21:42:32 +00:00
Felix Held
c6889816d8 soc/intel/xeon_sp/uncore_acpi: use is_dev_on_domain0 where possible
Replace 'is_domain0(dev_get_domain(dev))' with 'is_dev_on_domain0(dev)'
which is a helper function that does exactly the same, but slightly
simplifies the call.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8b0c52a9176288039e6414a09c3fe0662db79e4b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83908
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-08-15 21:41:59 +00:00
Yu-Ping Wu
078a5a0e7c commonlib/bsd/string: Fix pointer overflow for strnlen()
When `maxlen` is large (such as SIZE_MAX), the `end` pointer will
overflow, causing strnlen() to incorrectly return 0.

To not make the implementation over-complicated, fix the problem by
using a counter.

BUG=b:359951393
TEST=make unit-tests -j
BRANCH=none

Change-Id: Ic9d983b11391f5e05c2bceb262682aced5206f94
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83914
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2024-08-15 18:16:23 +00:00
Subrata Banik
0b2f9c9582 soc/intel/alderlake: Correct ISH partition availability check
The previous implementation incorrectly assumed that the presence of a
UFS device implied the availability of the ISH partition. This is not
always true, especially on Alder Lake platforms where ISH may be
enabled by default even without UFS.

This patch fixes the issue by directly checking for the presence of the
ISH device to determine if the ISH partition is available.

BUG=b:359440547
TEST=1. Able to dump the ISH version with UFS device:

```
tirwen-rev3 ~ # cbmem -c -1 | grep ISH
[DEBUG]  ISH version: 5.4.2.7780
```

2. Able to dump the ISH version with eMMC device:

```
trulo-rev1 ~ # cbmem -c | grep ISH
[DEBUG]  ISH version: 5.4.2.7780
```

Change-Id: I411e36606c0697f91050af40e0636f7c64810e95
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-15 06:28:33 +00:00
Matt DeVillier
7de2911589 mb/google/octopus/var/phaser: Update VBT
Extracted from coreboot-Google_Phaser.11297.296.0.bin.
Fixes display init on newer LASER14 boards.

TEST=build/boot google/phaser, observe display init successful.

Change-Id: Icb48edb4e74f147e3458f845d921a15a2d1906da
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83897
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-14 16:46:35 +00:00
Felix Singer
a8b1260c7f util/liveiso/nixos/graphical: Preconfigure some Gnome settings
These settings are not a must, but nice to have. The most noteworthy
setting is `sleep-inactive-ac-type`, which is set to `nothing` so that
the target doesn't go into suspend when AC is used as power supply and
it's unused for a while.

Change-Id: I9a6e3eb88427f94f504a6b991a98b1b51e11bc19
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83853
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Jan Philipp Groß <jeangrande@mailbox.org>
2024-08-14 15:33:38 +00:00
Felix Held
9419820127 soc/intel/adl,mtl/romstage/fsp_params: fix clock request warning
If a root port doesn't use a clock request pin, we shouldn't check if
this pin number, which defaults to 0 when not set, is already used. This
fixes the following spurious warning that was previously printed for
each external PCIe port which has the 'PCIE_RP_CLK_REQ_UNUSED' flag set
and didn't set 'clk_req' to some unused clock request pin number:

  Found overlapped clkreq assignment on clk req 0

Tested on the cw-al-4l-v2.0 mainboard that uses an Alder Lake N100 SoC
which I'm currently porting coreboot to. Also changing this for Meteor
Lake, since they have the same implementation in their romstage
fsp_params.c file

Change-Id: I3ee66ca5ed5a2d06dfb68c45a50e11eb2b93daa0
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83865
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-08-14 14:03:18 +00:00
David Wu
c4b7fad847 mb/google/nissa/var/riven: Disable external fivr
In next phase, riven will remove external fivr. Use the board version
to config external fivr for backward compatibility and show message.

BUG=b:359062365
TEST=build, boot to OS, suspend/resume work normally.

Change-Id: Id5f538b2eda7820a922b8d9ee14b2bae7df3726c
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83891
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-14 14:02:46 +00:00
Karthikeyan Ramasubramanian
a4285f7366 mb/google/brox: Remove Mainboard Prepare to Sleep(MPTS) ACPI method
Brox does not have PCIe WWAN or discrete GPU. Hence no need to power
them off during suspend. Hence also remove the MPTS ACPI method.

BUG=None
TEST=Build Brox firmware and boot to OS.

Change-Id: Ia239c3f038ce31934efb0a391350fa0f786e3fcd
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83788
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-14 14:02:02 +00:00
Pablo Iranzo Gómez
bec449a14e Docs/getting-started/faq: Remove line break in URL breaking link
Change-Id: I3f950af4201486cd90e5fa61a4657ab7ae643825
Signed-off-by: Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83817
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-08-14 08:19:48 +00:00
Yu-Ping Wu
aff734bc42 commonlib/bsd: Add strcat() and strncat() functions
An upcoming vboot feature [1] will need strcat() to be defined in
string.h. Therefore, add strcat() and strncat() to commonlib/bsd. Remove
those functions from libpayload.

[1] https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/5650810

Change-Id: If02fce0eafb4f6fa01d8bab17d87a32360f4ac83
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83765
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-14 03:09:20 +00:00
Yu-Ping Wu
0dcdc0347c commonlib/bsd: Add strlen() and strnlen() functions
Add strlen() and strnlen() to commonlib/bsd by rewriting them from
scratch, and remove the same functions from coreboot and libpayload.

Note that in the existing libpayload implementation, these functions
return 0 for NULL strings. Given that POSIX doesn't require the NULL
check and that other major libc implementations (e.g. glibc [1]) don't
seem to do that, the new functions also don't perform the NULL check.

[1] https://github.com/bminor/glibc/blob/master/sysdeps/i386/strlen.c

Change-Id: I1203ec9affabe493bd14b46662d212b08240cced
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83830
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-14 03:09:03 +00:00
Felix Singer
4ea4d82cec util/liveiso/nixos/graphical: Replace PulseAudio with PipeWire
PipeWire is the successor of PulseAudio. So use that instead.

Change-Id: Ib557925e481ab72a31a64c4bf353a261dff4296d
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83851
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jan Philipp Groß <jeangrande@mailbox.org>
2024-08-14 02:50:17 +00:00
Karthikeyan Ramasubramanian
7a9528b688 mb/google/brox: Do not override GPIO PM
Brox uses Ti50 which always supports long interrupt pulse. Hence no need
to override GPIO PM.

BUG=None
TEST=Build Brox firmware and boot to OS. Perform suspend/resume for 25
cycles.

Change-Id: I6a138c1953714bc29570db587594cab8f315a4ec
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83856
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-13 20:30:00 +00:00
Jayvik Desai
dfa830e530 soc/intel/mtl: enable FSP uGOP config in MTL for eSOL
This patch updates the platform-specific Meteor Lake early
sign-of-life config (SOC_INTEL_METEORLAKE_SIGN_OF_LIFE) with a generic
ChromeOS eSOL config (CHROMEOS_ENABLE_ESOL) which uses the Intel FSP
uGOP driver as an underlying technology for rendering eSOL screen.

This patch does not change the binary or the system behaviour.

BUG=b:352651132
TEST=Able to build google/rex and checked the config in output.

Change-Id: Ib4589f52080229b1c83915b51272a042b7ac32cd
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83769
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-13 14:51:11 +00:00
Jayvik Desai
95d03996d9 soc/intel/adl: update libgfx config to a generic eSOL config
This patch updates the early libgfx init config
(MAINBOARD_HAS_EARLY_LIBGFXINIT) used for Alder Lake SoC with a
generic CrOS/ChromeOS early sign of life config (CHROMEOS_ENABLE_ESOL)

This patch does not change the binary or the system behaviour and is
only meant to bind the early GFX initialization with a generic eSOL
config.

BUG=b:352651132
TEST=Able to build google/tivviks and checked the config in output

Change-Id: Ibc1b9190ac0e4d25f3c5517d74c9b519bc3bb349
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83841
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-13 14:40:50 +00:00
Jayvik Desai
a0dbf25a22 vc/google/chromeos: Enable eSOL config with libgfx and uGOP
This patch introduces a new early sign-of-life config option when
libgfx or uGOP is enabled for early graphics initialization.

BUG=b:352651132
TEST=Able to build google/rex and google/tivviks

Change-Id: Ic8fe4ca5234de7f8e579f950f6ccbf750f4c7950
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83705
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-13 14:40:33 +00:00
Pranava Y N
e8babf03ee mb/google/brya/var/nova: Enable TCSS XHCI setting
This patch enables the TCSS XHCI in the devicetree to solve the genesys
hub enumeration issue.

BUG=b:348332200
TEST=Able to build google/nova and ensure lsusb can list genesys
hub device.

Change-Id: Ic8e25756a2975e884434c4c7e3d587f4c1f0ed0b
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83845
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-13 14:35:50 +00:00
Subrata Banik
1fac6b32ef commonlib/include: Include <stdint.h> to fix 'SIZE_MAX' undeclared error
This change includes the <stdint.h> header file to resolve the
compilation error "'SIZE_MAX' undeclared". This issue was introduced
by commit hash af0d4bce65df277b56e495892dff1c712ed76ddd (region:
Introduce region_create() functions).

TEST=Able to build google/rex.

Change-Id: I0dbd839e3573d5c74375911903c8f9d6a66bbf28
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83886
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-13 14:35:16 +00:00
Leo Chou
994b7e9090 mb/google/nissa/var/pujjoga: Modify GPP_C1 setting
Confirm with EE, the GPP_C1 don't need PU 20K.
So modify GPP_C1 setting to remove PU 20k

Schematic version: 500E_GEN4S_ADL_N_MB_0418

BUG=b:358162951
TEST=Build and boot on pujjoga.

Change-Id: I7ad16cd29ab467d3eac74dab40522c577d91c747
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83818
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-13 13:26:22 +00:00
Leo Chou
87d9511741 mb/google/nissa/var/pujjoga: Modify P sensor setting
1. The P sensor need follow WWAN FW_CONFIG to enable/disable

2. Modify GPP_H19 setting to PAD_CFG_GPI_APIC to fix PLT test fail

Schematic version: 500E_GEN4S_ADL_N_MB_0418

BUG=b:357998089
TEST=1. Boot to OS and verify the P sensor devices is set based on
fw_config.
2. Confirm that the PLT test can pass successfully.

Change-Id: Ic3610180c8cf99eba9367e26bfc3666410af19f7
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83794
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-13 13:25:57 +00:00
David Wu
e1e16e0cb9 mb/google/nissa/var/riven: Add elan touchscreen support
This change adds the necessary configuration for the elan
touchscreen (ELAN9004) device, connected to I2C bus 16.

It includes settings for:
* HID descriptor
* Device description
* IRQ configuration
* Detection
* Reset, stop and enable GPIOs with their respective delays
* Power resource handling
* HID descriptor register offset

BUG=b:348125053 b:348126380
TEST=emerge-nissa coreboot
     boot with elan TS, make sure elan TS is functional.

Change-Id: I64c5a11dfaacfcca34240375d4dca5c76a60f62e
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83876
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-13 13:25:33 +00:00
Keith Hui
f7ed007298 mb/asus/p8z77-m: Light DRAM_LED during early boot
Turn on DRAM_LED on the mainboard in early bootblock, and turn it off
in ramstage. Primarily an indication if boot fails during raminit,
modeled after vendor firmware.

This LED is controlled by GPIO07 on the super I/O.

Boot tested on hardware.

Change-Id: I549b51375d1ef056d5fc01871bfe62d60b8a01cb
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81890
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-13 13:25:23 +00:00
Jayvik Desai
0de60b2840 drivers/intel/fsp2: Add config for FSP uGOP eSOL
This patch introduces a new configuration option,
FSP_UGOP_EARLY_SIGN_OF_LIFE, to the FSP driver. This enables uGOP
support using FSP-M for the early sign-of-life feature in SOC.

BUG=NA
TEST=Able to build google/rex and checked the config in output.

Change-Id: Ic0426ff7974a141ae9188b0098677b4cc97aee36
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83770
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-12 13:13:36 +00:00
Elyes Haouas
259052f9db tree: Use boolean for pch_hda_sdi_enable[]
Change-Id: I27568d1205216f697b48ffb09ce5208505718978
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83863
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 17:36:58 +00:00
Gang Chen
1ea2a1c182 soc/intel/xeon_sp/gnr: Remove VPD from GNR Kconfig
Remove the unused config VPD from GNR Kconfig.

Change-Id: I3fc45ba05df5fc23e326081d6ce9e53b2046464c
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82975
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-08-11 17:36:26 +00:00
Saurabh Mishra
de56d38b07 soc/intel/ptl: Do initial Panther Lake SoC commit till bootblock
List of changes:

1. Add required Pather Lake SoC programming till bootblock.
2. Include only required headers into include/soc.
3. Include PTL related DID, BDF.
4. Includes additional minimal code required to compile the PTL SoC
   and google/fatcat mainbaord.
5. Ref: Processor EDS documents
	vol0.51 #815002

BUG=b:348678529
TEST=Verified on Intel® Simics® Pre Silicon Simulation platform for
     PTL using google/fatcat mainboard.

Change-Id: Ibcfe71eec27cebf04f10ec343a73dd92f1272aca
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83354
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 17:35:27 +00:00
Morris Hsu
5bc6bd4c41 mb/google/brox/jubilant: update overridetree for dptf settings
Update dptf settings for EVT.

BUG=None
TEST=emerge-brox coreboot chromeos-bootiamge

Change-Id: Iadc95c14da6f879e25dac4804907e340dc16e47f
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83842
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 17:34:31 +00:00
Morris Hsu
ffc1cbb8fc mb/google/brox/jubilant: update overridetree
Update touchpad settings.

BUG=b:342867386
TEST=ensure touchpad is working.

Change-Id: Ibf62470b7fd921065201894a63d7e2a83dad53ce
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83840
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2024-08-11 17:34:09 +00:00
zengqinghong
917f24018a mb/google/nissa/var/teliks: Configure TPM IRQ for teliks
Add TPM TIS ACPI interrupt configuration, set teliks's
`TPM_TIS_ACPI_INTERRUPT` to 13.

BUG=b:352263941
TEST=emerge-nissa coreboot

Change-Id: Iaed51e0bb8abac0ed0b35bfcf12e95fd34f92242
Signed-off-by: Qinghong Zeng <zengqinghong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83832
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-11 17:33:46 +00:00
zengqinghong
9d968c93da mb/google/nissa/var/teliks: Add DP AUX BIAS connect
Because one side is not displayed when using type-c projection, the
configuration of DP AUX BIAS to SOC direct connection is added.

BUG=b:352263941
TEST=DP function of MB and DB workable

Change-Id: Id89d02212cdad549d1c26ed51a8d5af0f4e757c6
Signed-off-by: Qinghong Zeng <zengqinghong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83829
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 17:33:33 +00:00
Yuchi Chen
933031b524 soc/intel/common/block/gpmr: Allow soc to have specific gpmr definition
This patch add a new Kconfig HAVE_SPECIFIC_GPMR and use it to include
soc/gpmr.h if necessary.

Change-Id: I94797a72af75fc96ab2cacb1d46b581605a15387
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83317
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 17:32:29 +00:00
Maximilian Brune
eb28f3da7d arch/riscv: Add PMP print function
For easier debugging it is useful to have a function that prints the PMP
regions.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I6ab1531c65b14690e37aecf57ff441bf22db1ce5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83283
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: ron minnich <rminnich@gmail.com>
2024-08-11 17:10:45 +00:00
Elyes Haouas
96719adda3 azalia: Get rid of "return {-1,0}
Use 'enum cb_err' instead of {-1,0}.

Change-Id: Icea33ea3e6a5e3c7bbfedc29045026cd722ac23e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83503
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-08-11 17:10:08 +00:00
Nico Huber
af0d4bce65 region: Introduce region_create() functions
We introduce two new functions to create region objects. They allow us
to check for integer overflows (region_create_untrusted()) or assert
their absence (region_create()).

This fixes potential overflows in region_overlap() checks in SMI
handlers, where we would wrongfully report MMIO as *not* overlapping
SMRAM.

Also, two cases of strtol() in parse_region() (cbfstool),  where the
results were implicitly converted to `size_t`, are replaced with the
unsigned strtoul().

FIT payload support is left out, as it doesn't use the region API
(only the struct).

Change-Id: I4ae3e6274c981c9ab4fb1263c2a72fa68ef1c32b
Ticket: https://ticket.coreboot.org/issues/522
Found-by: Vadim Zaliva <lord@digamma.ai>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-11 17:07:32 +00:00
Kyösti Mälkki
0e9830884c cpu/x86/lapic: Always have LAPIC enabled
LAPIC has been available since P54C released 1993.

Change-Id: Id564a3007ea7a3d9fb81005a05399a18c4cf7289
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61794
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 17:06:41 +00:00
Dinesh Gehlot
70e62188f4 mb/google/brya/variants: Enable pch_hda_sdi_enable for trulo baseboard
This patch enables pch_hda_sdi_enable for the trulo baseboard and
removes SDI lanes update from its variants.

BUG=b:350931954
TEST=Boot verified on google/craask and google/tivviks

Change-Id: I2e0f43b8fffb5e583089769d2c7446b476ce5d5d
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83859
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-11 02:40:28 +00:00
Subrata Banik
76021a9205 mb/google/rex/var/rex0: Set PCIE WLAN bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

BUG=b:345373187
TEST=Build and test on google/rex0, check BRDS is shown in SSDT.

Change-Id: I28541e7a23dd486d3e0ec38ee89e1ab13595fc72

Change-Id: I82f6290cb1934e2c0597286702f93e3789e8f345
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83844
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-08-10 14:09:24 +00:00
Tyler Wang
7c628c4aef mb/google/rex/var/karis: Set PCIE WLAN bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

BUG=b:345373187
TEST=Build and test on karis, check BRDS is shown in SSDT.

Change-Id: I28541e7a23dd486d3e0ec38ee89e1ab13595fc72
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83791
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-08-10 14:09:15 +00:00
Subrata Banik
d55ffdd7eb Revert "mb/google/rex: Set cnvi_wifi bluetooth companion device"
This reverts commit 1f1d8d2bcae64baea19d0e947ba5572a45f46eec.

Reason for revert: Intel® Wi-Fi 6E AX211 (CNVi) does not need Bluetooth
Regulator Domain Settings and therefore, the bluetooth companion
device declaration for CNVi is unnecessary.

BUG=b:345373187
TEST=Able to build and boot google/karis.

Change-Id: I296ddb93659af144e1a82a6b8219c9811c5fe545
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83843
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-10 14:09:10 +00:00
Elyes Haouas
efbeb9a394 tree: Remove duplicated <arch/mmio.h>
<device/mmio.h> is supposed to chain-include <arch/mmio.h>. See
`Documentation/contributing/coding_style.md` section `Headers and includes`

Change-Id: I08f7480650b42df1613994146a026bd1e12dbf66
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82693
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-08-10 03:35:48 +00:00
Elyes Haouas
d4bbeb8140 tree: Remove unused <smbios.h>
Change-Id: Iab7e9f3d17c87576761333c4b62c40eea5e424a5
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-08-10 03:34:42 +00:00
Elyes Haouas
920b2d05b6 device/dram/spd: Add missing <smbios.h>
Use of smbios_memory_type needs <smbios.h>.

Change-Id: Iacab6171c61abd047c09ff7e20313a455bd8414f
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-08-10 03:34:29 +00:00
Yidi Lin
db5dbdf310 soc/mediatek/common: Refactor EINT driver
Refactor EINT driver by
- Move `pos_bit_calc_for_eint` to `common/gpio_eint_v1.c` and rename to
  `gpio_calc_eint_pos_bit`.
- Implement `gpio_get_eint_reg` to obtain EINT base address.

This change is prepared for the driver change in MT8196.

BUG=b:334723688
TEST=EINT works on Geralt

Change-Id: Ie53abc23971bfa39250ebd7dd48e28d6b91c5973
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83703
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-10 01:10:20 +00:00
Yuchi Chen
b60cfb89e9 soc/intel/common/block/gpio/gpio.c: Improve GPIO debug infos
1. print host software ownership, SMI enable and NMI enable registers
after configuring
2. read and print GPIO configuration dword registers after writing
3. use %zu to print size_t values according to CI reporting.

Change-Id: I8820956f6db91c7bcc26b46a4361da3dfa8f77b5
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83316
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-10 01:06:26 +00:00
Felix Held
5eebeaf31c soc/amd/*: pass PSP RPMC NVRAM base and size to amdfwtool
Pass the PSP NVRAM base and size to amdfwtool for all SoCs except Genoa
and Stoneyridge which don't use/support this.

If a mainboard has an section named 'PSP_RPMC_NVRAM' in its FMAP file,
the start and length of it in the flash will be passed to amdfwtool
which then adds the base and length to the corresponding type 0x54 PSP
directory table entry.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id9f8a7eec68a5222be63e46173132f1c4a461b4f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83815
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-08-09 22:22:18 +00:00
PuFF1k
0bdee9ca68 mb/lenovo/t520: Add USB port config into devicetree
Devicetree for lenovo/520 is missing USB ports config, hence they
don't work. This change introduces USB port config.
Tests performed:
- Can select a boot media using a USB keyboard from any port.
- Can boot from each port except usb@1:1.1.
- Measured read speed from a thumb drive on each port 24.5-28.9 MiB/s.

Change-Id: I96dba153a563e0e290b96b837fdca39d7598ef17
Signed-off-by: PuFF1k <exopuf@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83764
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-08-09 21:24:35 +00:00
Harrie Paijmans
fda9741ff9 coreboot-sdk/Dockerfile: Add 'gettext' and 'xfonts-unifont'
Required for building grub2.

BUG=N/A
TEST=Build successfully for 'QEMU x86 i440fx/piix4' with GRUB2 payload.

Change-Id: I97860f33dd3fde2f6db2f005d65b53cd669403e9
Signed-off-by: Harrie Paijmans <hpaijmans@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83676
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09 21:08:09 +00:00
Elyes Haouas
4d90a33a31 mb/emulation/qemu-q35: Move QEMU specific macros to "q35.h"
As `qemu-q35/memmap.c` includes `qemu-q35/q35.h`, move macros into q35.h
file.

Change-Id: I0bf13def8bc4510053f6bb44e043bbcb0b958b01
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-09 20:45:23 +00:00
Maximilian Brune
a7c05f5a66 MAINTAINERS: Add Maximilian Brune to RISC-V
I also add myself as the Maintainer for the SiFive boards, since I
happen to have both of them and I also ported the HiFive Unmatched to
coreboot.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ic0b8e1053c9f5007e29e997c1ff21ff4a496aea8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83697
Reviewed-by: ron minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-09 19:12:05 +00:00
Saurabh Mishra
de8b77c384 vc/intel/fsp/fsp2_0/ptl: Add placeholder FSP headers to compile
Details:
- Skeleton files to compile google/fatcat mainboard.

BUG=b:348678529
TEST=Build verified on with using PTL SOC and google/fatcat mainboard.

Change-Id: I4c069ba64f487259ce746dc52296618d91209602
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83732
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
2024-08-09 18:00:35 +00:00
Bora Guvendik
d4253a3d56 device/pci_ids: Add new Intel PTL device IDs for Tracehub
This patch adds new North Peak PCI device IDs for Intel PTL-U and PTL-H.

Additionally, updates the tracehub driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Boot to OS using PTL Silicon, verify if above 4GB IMR region is
reserved.

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: Ifa1a0a57c504e06d686e7e0826547251b456cc8b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83786
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09 17:59:44 +00:00
Morris Hsu
b0be97b68b mb/google/brox/jubilant: Add Fn key scancode
The Fn key on jubilant emits a scancode of 94 (0x5e).

BUG=b:324079605
TEST=Flash jubilant, boot to Linux kernel, and verify that KEY_FN is
generated when pressed using `evtest`.

Change-Id: I963b0aa85598097fea69ec34d1e79ec0bbec3db3
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83821
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09 17:58:08 +00:00
Michał Żygowski
bfbc5cfcb2 superio/ite: Remove custom ITE GPIO drivers and code
Since a generic ITE GPIO driver is available and in use, the existence
of chips-specific drivers no longer make sense. Remove the dead code
in favor of generic GPIO driver.

Change-Id: I7e031d12192af4bd47923d87c1d02c64f9c851a2
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83497
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09 17:01:50 +00:00
Michał Żygowski
001f33cc03 superio/ite,mb: Switch to new ITE GPIO driver
Refactor mainboards' code to use the new GPIO driver.

TEST=Put Google Jecht to S3 sleep and check if the LED blinks.

Change-Id: I707ee090ee2551b4935847e12ade678d36ff9302
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Tested-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83469
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-09 17:01:45 +00:00
Ren Kuo
ec049cb29d mb/google/brox/var/jubilant: Add SAR sensor SX9324
Add SAR Sensor SX9324 for WWAN:
- Apply DRIVERS_I2C_SX9324
- Config GPP_H19 for IRQ
- Add SX9324 registers settings based on tuning value from SEMTECH.
  Refer to datasheet:
  https://chromeos.google.com/partner/dlm/avl/component/3624/

BUG=b:345327104
TEST=Build and verify on jubilant

Change-Id: I629117f20ca513dc0c8eaa91744ad33e162ba4bb
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83779
Reviewed-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-09 16:30:30 +00:00
Kun Liu
548cbc15ca mb/google/brox/var/lotso: Enable wifi sar
wifi.SetTXPower test fail, so enable wifi sar.

BUG=b:351698478
TEST=emerge-brox coreboot

Change-Id: Ibf5425e72eddc45e376ef4e2d077180dab502200
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83793
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-09 15:52:13 +00:00
Kulkarni, Srinivas
315dba7abb vc/intel/raptorlake: Update header files from 4435_00 to 5045_00
Update header files for FSP for Raptor Lake refresh platform to
version 5045_00, previous version being 4435_00.

FSPM:
1. Add IgdGsm2Size UPD
2. Comment added for Offset 0x0AB6

FSPS:
1. Add CepEnable UPD
2. Offset size updated for UPD ReservedCpuPostMemProduction
2. Comment added for Offset 0x104C

MemInfoHob:
1. Structure updated

BUG=b:355384183
Kit:https://www.intel.com/content/www/us/en/secure/design/confidential/
software-kits/kit-details.html?kitId=815173

Cq-Depend: chrome-internal:7554984
Change-Id: I80cccb6aaa8f3a97d860a1e7908bfac0435b1aec
Signed-off-by: Kulkarni, Srinivas <srinivas.kulkarni@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-09 15:51:27 +00:00
David Wu
9ef75eceef mb/google/nissa/var/riven: Add G2 touchscreen support
This change adds the necessary configuration for the G2 Touchscreen(GTCH7503) device, connected to I2C bus 40.

It includes settings for:
* HID descriptor
* Device description
* IRQ configuration
* Detection
* Reset and enable GPIOs with their respective delays
* Power resource handling
* HID descriptor register offset

BUG=b:350844195
TEST=emerge-nissa coreboot
     boot with G2 TS, make sure G2 TS is functional.

Change-Id: If17367cd62eb69a1237efe4aa3ca1a0c9640ba4c
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83823
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09 14:34:14 +00:00
Amanda Huang
913942b799 mb/google/trulo: Enable EC MKBP device
MKBP device is required for passing events from input sources to AP.
Input sources include buttons (power, volume); switches (lid, tablet
mode) and sysrq.

BUG=b:357521411
TEST=Build coreboot and switch tablet mode on orisa.

Change-Id: Ic712f53fb4063347c38df05167f0100afc06f979
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83819
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-09 14:34:05 +00:00
Subrata Banik
f6efa4a345 soc/intel/cmn/block/cse: Add support for explicit CSE_RW_VERSION
This change adds support for specifying the CSE_RW_VERSION directly in
Kconfig.

* If `CONFIG_SOC_INTEL_CSE_RW_VERSION` is defined, its value will be
  used directly as the CSE_RW version.
* Otherwise, the version will be extracted from the CSE_RW binary file
  as before.

Platform prior to Intel Meteor Lake still requires to override the CSE
RW version using CONFIG_SOC_INTEL_CSE_RW_VERSION config rather reading
the CSE RW version from CSE RW partition.

BUG=b:327842062
TEST=CSE RW update successful on Karis with this patch using below
recipe:

1. Overriding the CONFIG_SOC_INTEL_CSE_RW_VERSION="18.0.5.2269"
2. Without overriding the CONFIG_SOC_INTEL_CSE_RW_VERSION=""

Platform prior to Intel Meteor Lake would be using #1 and platform
starting with Meteor Lake expected to use #2 recipe.

Change-Id: I1327c813b7aef77c65766eb9c40003bb8a71d4b6
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83831
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-09 09:28:12 +00:00
Subrata Banik
ab1d04a0c4 mb/google/fatcat: Add support for soldered-down memory
This change adds support for soldered-down memory on the Fatcat board.
It introduces a new Kconfig option `MEMORY_SOLDERDOWN` and includes
the necessary Makefiles adjustments to handle SPD data in CBFS when
this option is enabled.

* A new Kconfig option `MEMORY_SOLDERDOWN` is added to control
soldered-down memory support.
* When `MEMORY_SOLDERDOWN` is enabled, it selects:
    * `CHROMEOS_DRAM_PART_NUMBER_IN_CBI` if `CHROMEOS` is enabled
    * `HAVE_SPD_IN_CBFS`
* The Makefile is updated to include the `variants/$(VARIANT_DIR)/
memory` subdirectory and conditionally include the `spd` subdirectory
based on `CONFIG_HAVE_SPD_IN_CBFS`.

BUG=b:348678071
TEST=Able to build google/fatcat with N-1 silicon.

Change-Id: I7edc1134630940812186118a29cbbd550f0e3634
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83828
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-08-09 09:24:30 +00:00
Subrata Banik
c84ff28ac5 mb/google/fatcat: Generate LP5 RAM ID for H58G56BK7BX068
Add the support LP5 RAM parts for fatcat:
DRAM Part Name                 ID to assign
H58G56BK7BX068                 0 (0000)

BUG=b:347669091
TEST=emerge-fatcat coreboot

Change-Id: Idcdbbcd42dc6b1c8b13a89b1ace5b2973dde6d2b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83824
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
2024-08-09 09:24:25 +00:00
Subrata Banik
d0d41f28d3 util/spd_tools: Add Intel Panther Lake (PTL) platform
This patch add support for PTL platform to the `spd_tools`.
This would be useful to create dynamic SPD for fatcat variants.

BUG=b:347669091
TEST=Able to generate SPD for LP5 DRAM part.

Change-Id: I55c3f49439fb1ad961c6866f03594431e54279b9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83822
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
2024-08-09 09:24:18 +00:00
Subrata Banik
c57564d38a mb/google/brya: Enable storing ISH FW version for trulo
This change enables storing the ISH firmware version on the Trulo
baseboard by selecting the `SOC_INTEL_STORE_ISH_FW_VERSION` config
option.

BUG=b:354607924
TEST=Able to dump ISH version on trulo.
> cbmem -c | grep ISH
[DEBUG]  ISH version: 5.4.2.7780

Change-Id: I69a7fa19c53f435ef1f6306b259f703c7b196137
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83820
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-09 09:23:44 +00:00
Jamie Ryu
8d19e0faa1 soc/intel/cmn/pmc: Add API to dump silicon QDF information
This adds pmc_dump_soc_qdf_info function and PMC_IPC_CMD_SOC_REG_ACC
PMC IPC Command to read and print Intel SoC QDF information using PMC
interface if SOC_QDF_DYNAMIC_READ_PMC is enabled. QDF read command is
supported from Panther Lake SoC.

QDF is a four digit code that can be used to identify enabled features
and capabilities. This information will be useful to debug issues
found during the development phase and in the field as well.

Change-Id: I927da1a97e6dad4ee54c4d2256fea5813a0ce43d
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83784
Reviewed-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09 05:33:57 +00:00
Nico Huber
6b8c40a95a Makefile: Move `--no-warn-rwx-segments' into xcompile
The parameter is not available for binutils older than 2.39. So move it
to xcompile to provide backwards compatibility for a bit.

Change-Id: I02982769ae2c356f037a747e85d155368bfcb730
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83693
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-08 20:16:25 +00:00
Sergii Dmytruk
490e7c3f92 payloads/edk2: set VARIABLE_SUPPORT=SMMSTORE on CONFIG_SMMSTORE_V2
Official EDK2 repository has VARIABLE_SUPPORT defaulting to EMU in
UefiPayloadPkg, switch it to SMMSTORE if coreboot is built with
SMMSTOREv2.

This removes custom default of EDK2_CUSTOM_BUILD_PARAMS for
EDK2_REPO_MRCHROMEBOX which is unnecessary now.

Change-Id: Ic59f89c0f708f9b144bd35cd18870d0e1c65677d
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83737
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-08 17:50:25 +00:00
Felix Held
ab7410a4d0 soc/amd/*: pass PSP NVRAM base and size to amdfwtool
Pass the PSP NVRAM base and size to amdfwtool for all SoCs except Genoa
which doesn't use/support this. This was previously only implemented for
Picasso, but not for the SoCs that support this, so add the support to
those other SoCs as well.

If a mainboard has an section named 'PSP_NVRAM' in its FMAP file, the
start and length of it in the flash will be passed to amdfwtool which
then adds the base and length to the corresponding type 0x04 PSP
directory table entry.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I785ede8eb0df2473a4390b2c305add20f38d7ede
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83814
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-08-08 17:42:05 +00:00
Felix Held
bcc9ad50f9 soc/amd/picasso/Makefile: move PSP_NVRAM_[BASE,SIZE]
Move PSP_NVRAM_BASE and PSP_NVRAM_SIZE from the BIOS directory table
items to the PSP Directory Table items, since the corresponding region
will be referenced by the PSP directory table and not the BIOS directory
table.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iff7568ea05c701ecd346cc7590cf93b091ff31a2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83813
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-08-08 17:41:18 +00:00
Felix Held
f9af266189 util/amdfwtool: add support to specify RPMC NVRAM region
Add support to specify the base and size of the replay-protected
monotonic counter (RPMC) non-volatile storage area in the SPI flash. A
later patch will use this to tell amdfwtool about the location and size
of the corresponding FMAP section.

This code is ported from
github.com/teslamotors/coreboot/tree/tesla-4.12-amd

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Idafa7d9bf64125bcabd9b47e77147bcffee739e2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83812
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-08 17:41:09 +00:00
Maximilian Brune
1ce1b58b01 commonlib/device_tree.c: Remove incorrect warning
Currently a warning is printed even if the maximum amount of nodes is
not exceeded.

Remove the warning, since in most cases the maximum amount of nodes
for a given prefix is usually well known. For example the /cpu nodes
always have a maximum of CONFIG_MAX_CPUS.
One may also just want to read the first X amount of nodes matching a
given prefix.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ic1111e8acb72ea1e9159da0d8386f40cbbdbc63f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83085
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-08 08:08:40 +00:00
Weimin Wu
c6173d1fe4 mb/google/dedede/var/awasuki: Add Fn key scancode
The Fn key on awasuki emits a scancode of 94 (0x5e).

BUG=b:355538142
TEST=Flash awasuki, boot to Linux kernel, and verify that KEY_FN is
generated when pressed using `evtest`.

Change-Id: Ic7aa183bf314fed4901133dc70d848d84fab0784
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83724
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: zhongtian wu <wuzhongtian@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-08 07:58:59 +00:00
Weimin Wu
1fdeabe507 mb/google/dedede/var/awasuki: Enable ELAN touchscreen with fw_config
1. Change driver form i2c/hid to i2c/generic.
2. Add fw_config for touchscreen.

BUG=b:351968527
TEST=ectool cbi set 6 0x0x10200a0;
     touchscreen functions normally;

Change-Id: Ifd6330be8924d4873f0efab3ce404168a62099eb
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83704
Reviewed-by: zhongtian wu <wuzhongtian@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-08 07:58:33 +00:00
Varun Upadhyay
47bc698d36 mb/google/brya/var/trulo: Update ISH GPIO's configuration
This patch configures the GPIO pins to enable ISH on the Trulo device,
in accordance with schematic_20240607.

BUG=b:354607924
TEST=Builds successfully for google/trulo.

Change-Id: I3af478762e0a0aa35a2698e0ed87a4d8c24362f0
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83781
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-08 06:23:15 +00:00
Varun Upadhyay
43df55ec8a mb/google/brya/var/orisa: Update ISH GPIO's configuration
This patch configures the GPIO pins to enable ISH on the Orisa device,
in accordance with schematic_20240607.

BUG=b:354607924
TEST=Builds successfully for google/orisa.

Change-Id: I24745ba629c59c092ce676b29915e356a4d8d8af
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83656
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2024-08-08 06:23:10 +00:00
Felix Held
e19b5e7acd soc/amd/common/psp_smi_flash: add buffer overflow checks
Before 'handle_psp_command' calls any of the functions in this file, it
make sure that the 'size' field in the command buffer's header doesn't
indicate that the command buffer is larger than the SMM memory region
reserved for it.

The read/write command buffer has a 'num_bytes' field to indicate how
many bytes should be read from the SPI flash and put into the data
buffer within the command buffer or how many bytes from this buffer
should be written to the flash. While we should be able to assume that
the PSP won't send us malformed command buffer, we should still better
check this just to be sure.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib4e8514eedc3ad154a705c8a1e85d367e452dbed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83778
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:39:45 +00:00
Felix Held
5c1a69328b soc/amd/common/psp_smi_flash: implement SPI read/write/erase command
Use coreboot's SPI flash access infrastructure to do the flash read,
write, or erase operations as requested from the PSP.

This patch is a modified version of parts of CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I4957a6d316015cc7037acf52facb6cc69188d446
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-08-07 16:39:38 +00:00
Felix Held
20b79eca82 soc/amd/common/psp_smi_flash: implement SPI info command
Detect the block size of the SPI flash and number of flash blocks
reserved for the flash region corresponding to the 'target_nv_id' field
in the command buffer. This information is then written to the
corresponding fields in the command buffer. Since detecting the flash
chip still might result in accesses to it, make sure that it's available
for use and not currently used by an OS driver. Since this code is
inside the SMI handler, we don't have to worry about this code to be
interrupted, so we don't need to set some bit to tell other code that
we're currently using the SPI controller in the SMI handler.

This patch is a modified version of parts of CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I19041a27a9e8f901d42c3f60af834df625455ea6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83776
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:39:22 +00:00
Felix Held
8cfb73c777 soc/amd/common/psp_smi_flash: add spi_controller_available
The SPI_SEMAPHORE_DRIVER_LOCKED bit in the SPI_MISC_CNTRL register
doesn't affect the hardware, but it re-used by AMD as a semaphore to
synchronize the access to the SPI controller between SMM and non-SMM
software like an OS-level driver. Since it doesn't affect the hardware,
it's marked as reserved in the PPRs. Add the 'spi_controller_available'
helper function to check this bit to see if some software or driver
outside of SMM is currently using the SPI flash controller to avoid
interfering with that operation.

This patch is a slightly reworked version of parts of CB:65523.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I49218e03a5dd555b2b2d34eaad86673e9fc908c3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83775
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:33:08 +00:00
Felix Held
febf3e26df soc/amd/common/psp_smi_flash: add find_psp_spi_flash_device_region
Add 'find_psp_spi_flash_device_region' to get a pointer to the spi_flash
struct of the SPI flash used in the system and the region_device struct
for the target FMAP region specified by the target NV ID from the PSP
to x86 mailbox command. In order to have small patches, the newly added
static 'find_psp_spi_flash_device_region' function is marked as inline;
that inline will be removed in a following patch that calls this new
function.

This patch is a slightly reworked version of parts of CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I64b8fba2392de46ecd4c786cef0d5b6acdbd865a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83774
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:32:57 +00:00
Felix Held
c12392b316 soc/amd/common/psp_smi_flash: validate target SPI region ID
Add and use functions to validate the target non-volatile storage ID in
the different command buffer structs.

This patch is a slightly reworked version of parts of CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: Idda0166c862d41d380b2ed21345eead5e0a1c135
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83758
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:32:39 +00:00
Felix Held
159430aa29 soc/amd/common/psp_smi_flash: add command-specific data structures
This patch is a slightly modified version of parts of CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I41efeecf9243ddbbd8dc3f842c5ce11058bb7999
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83757
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:32:29 +00:00
Felix Held
4ea3bfd1bc soc/amd/common/psp: add and call PSP SMI SPI access function stubs
Add stub functions for the SPI flash access from the PSP SMI handler
and call them for the corresponding P2C mailbox commands.

Parts of this patch are taken from CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: Iedbc9d41eb0d4e8d81eeba9c01281161eb839991
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83756
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:32:21 +00:00
Felix Held
2b6070bed4 soc/amd/common/psp_smi: implement P2C mailbox handling
When the PSP wants to access the SPI flash during runtime, but isn't the
owner of the SPI flash controller, it sends an SMI to the x86 side. The
corresponding SMI handler then checks the P2C (PSP to core) mailbox for
the command and data, processes the command, and if needed puts the
requested data into the P2C buffer.

The P2C mailbox is a memory region in TSEG aka SMM memory. Both location
and size are communicated to the PSP via the PSP SMM info mailbox
command which is sent right after mpinit is done.

This commit adds the code to access the P2C mailbox to the PSP SMI
handler code, but the handling of the actual mailbox commands the PSP
sends to the SMI handler is added in later patches to keep the patch
size manageable.

This patch is a heavily reworked version of parts of CB:65523.

Document #55758 Rev. 2.04 was used as a reference.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I50479bed2332addae652026c6818460eeb6403af
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83740
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-08-07 16:32:13 +00:00
Felix Held
35946f957a soc/amd/common/include/spi: add and use SPI_MISC_CNTRL define
This register is currently used by the SPI DMA code that sets an
undocumented bit. A later patch will add and use some other bit in this
register.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I48447dcfb3cee07619a9b42434731f0b21458021
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83773
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 16:31:35 +00:00
Karthikeyan Ramasubramanian
c3245274e9 mb/google/brox: Tune Touchpad I2C parameters
Adjust Touchpad I2C fall time configuration such that it meets the
I2C fast mode specification(<= 400KHz).

BUG=b:328670295
TEST=Build Brox firmware and boot to OS. Confirm the I2C bus
frequency(375 KHz), rise(650 ns) and fall(330 ns) times meet the
specification.

Change-Id: I0006bfb9bb5839ffa1248d9f2ea055160ed0936e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83755
Reviewed-by: Bob Moragues <moragues@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
2024-08-07 16:23:14 +00:00
Sean Rhodes
53337836e4 mb/starlabs/starlite_adl: Remove has_cdm from devicetree
The property `has_cdm` only existed in an early patchset, the version
that was merged only requires `cdm_index` so remove the former that
was added in c6c75dfbaeff208c17bb47fdede855286e12d857.

Change-Id: I62a9456e9a4f1571328ba6fd09ae383a8fd11767
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83796
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-07 15:14:24 +00:00
Felix Singer
9869f3a7b6 mb/apple/macbookair4_2/dt: Move iGPU settings into igd device scope
Change-Id: I3161c7d99a2d94d6c85a6c9652b8e78d3f447252
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83783
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-07 13:24:28 +00:00
Felix Singer
b7b27c29c9 mb/apple/macbookair4_2: Clean up devicetree
Clean up the devicetree by removing settings set to 0, which are
initialized with 0 anyway, remove superfluous disabled devices and also
remove comments duplicating the device alias names.

Change-Id: I07005ae1db7d92fd50e72351031a5eb491768d3e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83782
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 13:24:13 +00:00
Pranava Y N
e848d31c15 MAINTAINERS: Add Subrata, Kapil and Pranava for intel/pantherlake
Add INTEL PANTHERLAKE SOC section for soc/intel/pantherlake and
add Subrata, Kapil and Pranava as maintainers.

Change-Id: Ife75a0d8111e694ae62db157eb36b09d976762c3
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83780
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-07 13:22:59 +00:00
Pranava Y N
be07e83ca1 MAINTAINERS: Add Subrata and Pranava for new google/fatcat entry
Add GOOGLE FATCAT MAINBOARDS section for src/mb/google/fatcat and
update the maintainers list to add Subrata Banik and Pranava Y N
as maintainers

Change-Id: I5ae0f0d24d43e91c2097c68446bb64b9ae507e2e
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-07 13:22:14 +00:00
Jayvik Desai
9e81a8e496 MAINTAINERS: Add Jayvik Desai for ADL SOC and Brya mbs
Change-Id: Ibb000fa5e35633504fdd346723efb0c367cbd075
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83726
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-08-06 18:37:52 +00:00
Sean Rhodes
6b2957c857 mb/starlabs/starbook/rpl: Nit GPIO changes
Remove some unused GPIOs and configurations for GPIO's that
aren't even connected.

Change-Id: I5b4691a0b5e8b1348304d11c1d59aa60517041ec
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83626
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-06 17:17:02 +00:00
Sean Rhodes
b8d02d6e47 mb/starlabs/starbook/rpl: Disconnect wireless GPIOs
The GPIOs for WiFi and Bluetooth are also connected to the EC.
They are controlled from there so remove the configuration here.

Change-Id: I7aef1b821420daf5ea9f6ae107021e5d406a5ec3
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83625
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-06 17:16:50 +00:00
Sean Rhodes
40e48a2659 mb/starlabs/starbook/rpl: Disconnect SCI/SMI GPIOs
The platform uses eSPI so these are not needed.

Change-Id: I81470658263f4b601c9964ff5bed86b22d24df3b
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83624
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-06 17:16:41 +00:00
Sean Rhodes
31afd9afe9 mb/starlabs/starbook/rpl: Add USB ACPI to devicetree
Use the USB ACPI to add entries for the USB and TCSS ports.

Change-Id: Iab8b6e03c8c05e459fb354bc008109c873a4846f
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83623
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-06 17:16:33 +00:00
Michał Żygowski
84101434c0 mb/msi/ms7d25,ms7e06: Enable discrete TPM module support
Now that multiple TPM drivers may be compiled in, it is possible to
support switching between fTPM and dTPM.

The patch adds:
- Device tree entry for PC80 discrete TPM
- TPM PIRQ# GPIO active low routed to IOAPIC for TPM interrupt
- MEMORY_MAPPED_TPM option to board's Kconfig to enable PC80 TPM driver

When the ME is disabled, e.g. via HECI command, chipset will route the
TPM traffic to SPI automatically. When a SPI TPM is connected to the
JTPM1 on the board, it will be probed successfully and initialized
in place of inactive PTT/fTPM.

Change-Id: Ie6e7026b6f1cec842bce4ef40b6db7feb75200e3
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80456
Reviewed-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-06 17:14:32 +00:00
Michał Żygowski
0c6d48f3ee drivers/{crb,pc80/tpm}: Drop conflicting tpm_config_t typedef
When both CRB and pc80 TPM drivers are compiled in, building fails
because the tpm_config_t typedef has two incompatible definitions.
Given that typedefs are discouraged by the project's coding style,
simply get rid of the tpm_config_t typedef.

TEST=Compile MSI PRO Z690-A target with CRB and PC80 TPM chips enabled
in devicetree.

Change-Id: Id41717e265362303a17745303a907c9c8f4f4e12
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82057
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-06 17:14:06 +00:00
Sean Rhodes
a25f310830 intel/alderlake: Add helper functions for Power Management
Clock Power Management, ASPM and L1 Substates have been
configured the same way since Skylake. The main control to
enable or disable is Kconfig, and then the level can be overridden
in devicetree.

Despite the UPDs remaining the same since Skylake, this is not the
case for Alder Lake, Raptor Lake and Meteor Lake.

Taking `starlabs/starbook` as an example, at the time of this
commit it has PCIEXP_CLK_PM, PCIEXP_ASPM and PCIEXP_L1_SUB_STATE
enabled.

On Comet Lake, this results in the correct configuration, verified
with the lspci command:
```
	LnkCap:	Port #0, Speed 5GT/s, Width x1, ASPM L1, Exit Latency L1 <8us
		ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
	LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
		ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
```
On Raptor Lake:

```
	LnkCap:	Port #0, Speed 16GT/s, Width x4, ASPM L1, Exit Latency L1 <64us
		ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
	LnkCtl:	ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
```

Clock Power Management, ASPM and L1 Substates are also not configured
for CPU root ports.

Add helper functions to configure these correctly based on Kconfig, but
retain the capability to override the specific levels from devicetree.

Change-Id: I9db18859f9a04ad4b7c0c3f7992b09e0f9484a81
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81638
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-06 16:53:36 +00:00
Sean Rhodes
c6c75dfbae mb/starlabs/starlite_adl: Add Alder Lake N StarLite Mk V
Tested using `edk2` from
`github.com/starlabsltd/edk2/tree/uefipayload_vs`:
* Windows 11
* Ubuntu 22.04
* Manjaro 22

No known issues.

https://starlabs.systems/pages/starlite-specification

Change-Id: I8724e578c21353032b844b20b868348580ff561b
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80706
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-06 16:52:20 +00:00
Yuchi Chen
b3c53b1109 soc/intel/common/intelblocks/gpio.h: Allow specifying the pad ownership
Add pad_own_reg_0 to `struct pad_community`. Pad ownership indicates
whether the GPIO is owned by host or Intel Management Engine. If owned
by host, then host ownership indicates whether the GPIO is owned by ACPI
or driver.

Change-Id: I30a934fd00a7a42cb156341da1954e4e4b1231d8
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83315
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-06 16:48:57 +00:00
Yuchi Chen
f61c136f8a soc/intel/common: Add CPU and PCIe IDs for Snow Ridge platform
CPU and PCIe IDs are from Intel Atom Processor C5100, C5300,
P5300 and P5700 Product Families EDS, doc No. 575160 rev 2.0.

Change-Id: I3f5d612765bbe9adffe0b6c7a4151f32b33e88b4
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83314
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-06 16:47:48 +00:00
Chen, Yuchi
377b133359 vc/intel/fsp/fsp2_0/snowridge: Add FSP headers for Snow Ridge SoC
Change-Id: I333b137c1dc08a3c06bdd3f7a78ca44a5dd043cc
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83192
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-08-06 16:46:50 +00:00
Krystian Hebel
7b12f93ad5 mb/qemu-{i440fx,q35}/rom_media.c: add code for writable flash
Depending on how firmware image was passed to QEMU, it may behave as:
- ROM - memory mapped reads, writes are ignored (FW image mounted with
  '-bios');
- RAM - memory mapped reads and writes (FW image mounted with e.g.
  '-device loader');
- flash - memory mapped reads, write and erase possible through
  commands. Contrary to physical flash devices erase is not required
  before writing, but it also doesn't hurt. Flash may be split into
  read-only and read-write parts, like OVMF_CODE.fd and OVMF_VARS.fd.
  Combined size of system firmware must not exceed 8 MiB by default
  (FW image(s) mounted with '-drive if=pflash').

This function detects which of the above applies and fills
region_device_ops accordingly.

Tested by starting QEMU with firmware passed as '-drive if=pflash',
'-drive if=pflash,readonly=on' and '-bios'. When started with firmware
passed through '-device loader', coreboot complains about corrupted
FMAP, but this is the same behavior as without this change:

    [ERROR]  Invalid FMAP at 0x40000
    [EMERG]  Cannot locate primary CBFS

Writable pflash support was added about 17 years ago, so it should be
supported by all QEMU versions currently in use. Since QEMU 5.0.0 it is
possible to change the limit of firmware size with `max-fw-size` machine
configuration option, up to 16 MiB, as bigger sizes would overlap with
default IO APIC memory range.

Change-Id: I3ab9f22c6165064a769881d4be5eab13a0a2f519
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82555
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-08-06 16:44:06 +00:00
Arthur Heymans
8d0d57f0a2 Kconfig: Reverse ARCH_SUPPORTS_CLANG
Since most targets support clang it's easier to reverse the semantics of
the Kconfig options.

Change-Id: Ib28e7a4cb286b9f8b05be94dae3947179f43c746
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81659
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-08-06 16:37:35 +00:00
Tyler Wang
2f2c67da52 acpi/acpigen_ps2_keybd: Fix total keymap size calculation
This patch move keymap size calculation inside of
has_alpha_num_punct_keys condition. When the condition is not met,
it can prevent total keymaps size calculate incorrectly.

BUG=none
TEST=emerge coreboot pass

Change-Id: I3dcf31d89924c1a8f2768e42065761b361e9ca41
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83694
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-06 14:54:59 +00:00
Ren Kuo
d94433ef92 mb/google/brox/var/jubilant: Update WWAN and UsbCam Settings
Update GPIOs for WWAN and USB Camera functions.

BUG=b:341188351
TEST=Build and verify on jubilant

Change-Id: I145aa994767ddc59be519b96017af71badf82734
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
2024-08-06 14:10:38 +00:00
Varun Upadhyay
244a37d4fd mb/google/trulo: Register Firmware name for ISH
Define ISH main firmware name so ISH shim loader can load firmware
from file system.

BUG=b:354607924
TEST=Boot trulo board, check that ISH is enabled and loaded
lspci shows: 00:12.0 Serial controller: Intel Corporation Device 54fc

Change-Id: Id60cb416a1cce5407bd483f0ce54f477584459b1
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83671
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-06 11:55:45 +00:00
Keith Hui
4ea6f9c288 mb/asus/p8z77-m_pro/overridetree.cb: Correct PCIe devices config
Match PCIe root port allocation and associated comments to
boardview, as follows:

Z77 PCIe ports 1-4: PCIEX16_3 (x4)
Z77 PCIe port 5: PCIEX1_1
Z77 PCIe port 6: RTL8111F LAN
Z77 PCIe port 7: ASM1042 USB3
Z77 PCIe port 8: ASM1061 eSATA
CPU PCIe lanes 1-8: PCIEX16_1
CPU PCIe lanes 9-16: Multiplexed via 4x ASM1480 to PCIEX16_1 lanes 9-16
  and PCIEX16_2 lanes 1-8
(CPU PCIe lanes are not covered by overridetree.cb.)

These are not hardware tested.

Change-Id: I472e28add254ea945b401d1ddfd03f29f46d8fd2
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-05 23:45:25 +00:00
Nico Huber
1360d65c98 mb/supermicro/x10slm-f: Add board id for flashing via BMC
The ID for X10SLM+F is 0811 as reported by Knogle on IRC.

Change-Id: Ie58aad50e66efbc3113541884beea9668d886b5d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83692
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-05 13:49:56 +00:00
Maximilian Brune
2fbfa0657f util/cbfstool/common.h Fix wrong return value doc
The compressing and decompressing functions return 0 on success and not
the other way around.

Change-Id: I9f8653aa805c62eb4bfc3560d7880921830c2c59
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83616
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-05 13:10:08 +00:00
Weimin Wu
ee6117bbf1 mb/google/dedede/var/awasuki: Disable SD card
Because Awasuki doesn't have SD card, disable related configurations.

BUG=b:351968527
TEST=abuild -v -a -x -c max -p none -t google/dedede -b awasuki

Change-Id: I1b0d2a9c2f9cdd4bca7c30cdc454ffa84b293146
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83706
Reviewed-by: zhongtian wu <wuzhongtian@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-05 13:09:25 +00:00
Felix Held
97e8ef4c70 soc/amd: add PSP SMI handler stub
The PSP can send SMIs to the x86 side to have the SMI handler service
requests from the PSP. This commit adds an empty PSP SMI handler; the
actual implementation is added in later patches to keep the patches
relatively small.

This patch is a slightly modified version of parts of CB:65523.

Test=When selecting SOC_AMD_COMMON_BLOCK_PSP_SMI, Mandolin still builds

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I65989ff529d728cd9d2cd60b384295417bef77ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83739
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-05 13:09:02 +00:00
Bob Moragues
5f3dd1cfed mb/google/brox: Add model brox-ti-pdc
BRANCH=None

BUG=b:348171026
TEST=Test on TI PDC device

Cq-Depend: chromium:5691079
Cq-Depend: chromium:5691080
Cq-Depend: chrome-internal:7464767
Original-Change-Id: I6ffb8bdb2245a74b0d5270435d0ffc8a44e7c2a6
Original-Signed-off-by: Bob Moragues <moragues@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/5691110
Original-Reviewed-by: YH Lin <yueherngl@chromium.org>
Change-Id: Iac5b4cd4dcb1d274553f78e9d4295f8f9ad8a863
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83749
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bob Moragues <moragues@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-08-05 13:08:49 +00:00
Angel Pons
2e7905b1a3 util/autoport: Put devicetree devices above chips
For Sandy/Ivy Bridge boards, this results in northbridge devices ending
up north of (above) southbridge devices. Which is the convention pretty
much all boards in the tree uses.

Change-Id: I9dc2ff13182ff9d92141b1736796749cea49d23a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-05 08:58:32 +00:00
Angel Pons
ea54d3e4d0 util/autoport: Use sudo to call log-making programs
Running autoport as root has the annoying side effect of making all
generated files owned by root. Prevent this by using sudo to invoke
log-making programs (lspci, dmidecode, acpidump, inteltool, ectool,
superiotool). These programs either need to be run as root or allow
collecting more information if run as root (lspci).

In case there's a valid reason not to use sudo, provide a prompt to
let autoport run the programs directly, as it originally did. There
might be someone trying to run autoport from an OS that lacks sudo.

Change-Id: I4bf4ddf8dd2cb930e9b7303e2ea986d8c072aa7a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-05 08:58:18 +00:00
Angel Pons
52a1c61b97 util/autoport: Streamline external program invocation
The original approach to call external programs was rather convoluted
and would fall back to running executables inside the current working
directory if running them from the location specified in the code did
not succeed, swallowing any errors from the first invocation.

Rewrite the system around the `LogMakingProgram` concept, a struct to
represent a program. Each program has a name, prefixes to try running
it from and the arguments to pass to it (if any). Plus, collect error
information from failed executions, but only show it when none of the
prefixes resulted in a successful invocation.

In addition, look for programs in PATH instead of CWD: it is unlikely
that all utils will be in the CWD, but utils can be in the PATH after
one installs them (`sudo make install`). For coreboot utils, look for
them in the utils folder first as the installed versions might not be
up-to-date.

Furthermore, print out the command about to be executed, as there are
some commands (e.g. `ectool` on boards without an EC) that can take a
very long time to complete.

Change-Id: I144bdf609e0aebd8f6ddebc0eb1216bedebfa313
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82403
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-05 08:58:11 +00:00
Arthur Heymans
a2180b3335 nb/intel/*: Match ACPI with resource allocation
Currently resource allocation starts top down from the default value
0xfe000000. This does not match what ACPI reports, so adapt
CONFIG_DOMAIN_RESOURCE_32BIT_LIMIT to reflect that.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I2ba0e96a7ab18d65b7fbbb38b1a979ea2ec6d1be
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80207
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-05 08:28:44 +00:00
Pranava Y N
f7eef77963 mb/google/brya/var/nova: Adjust Type-C port to USB 2.0 only
This patch introduces the following changes,
- Remove TCSS XHCI (USB 3.x) devicetree settings
- Update Over Current (OC) & USB 2.0 config
- Update TCSS-XHCI capabilities

BUG=b:348332200
TEST=Able to build google/nova and ensure lsusb can list genesys
hub device.

Change-Id: I4b4025bea41f67224ac35ff2077b1394f2c3e380
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83707
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-04 06:22:25 +00:00
Pranava Y N
c242c72206 mb/google/brya/var/nova: Remove PMC MUX setting
This patch removes the PMC MUX related setting from devicetree as Nova
doesn't include a MUX for it's USB-C port.

BUG=b:348332200
TEST=Able to build google/nova

Change-Id: I23a949ba9b598d7a86c6f8b08a2821651978e489
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-04 06:21:57 +00:00
Mate Kukri
ac9ffb9432 mb/dell/optiplex_9020: Fix UB in package power calculation
Fix potential undefined behaviour in the `get_pkg_power()` function:
- If `rapl_power_unit == 0`, `pkg_power_info / rapl_power_unit` is
  invalid
- If `rapl_power_unit > 7`, the result of the shift doesn't fit into a
  `uint8_t`

Signed-off-by: Mate Kukri <km@mkukri.xyz>
Change-Id: I48ef59c4fbeb0a55675ac24da31e6e0b194cb58d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83736
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-08-03 14:00:26 +00:00
Subrata Banik
b256e6303c mb/google/rex: Skip UART0 config in FSP
UART0 is already configured in coreboot, so this change sets SerialIo
config for UART0 to PchSerialIoSkipInit to skip initialization in FSP.

BUG=none
TEST=Able to build and boot google/rex0. Able to see all debug prints
over CPU uart.

Change-Id: I37744f05083eb82ba8ca579b628b69aa976e3d1f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83750
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-03 07:46:10 +00:00
Yu-Ping Wu
6886a62132 arch/arm64/armv8/mmu: Improve log format
Currently we use "%p" to print the address, which results in different
string lengths, depending on the value of the address. To improve
readability of the printed addresses in the log, change the format to
"0x%013lx", so that the length of the printed addresses will be
consistent.

In addition, print the level of the translation table when setting up a
new table.

Example log:

 Backing address range [0x0000000000000:0x1000000000000) with new L0 ...
 Mapping address range [0x0000000000000:0x0000200000000) as ...
 Backing address range [0x0000000000000:0x0008000000000) with new L1 ...
 Mapping address range [0x0000000100000:0x0000000130000) as ...
 Backing address range [0x0000000000000:0x0000040000000) with new L2
 Backing address range [0x0000000000000:0x0000000200000) with new L3
 Mapping address range [0x0000000107000:0x0000000108000) as ...
 Mapping address range [0x0000000200000:0x0000000300000) as ...
 Backing address range [0x0000000000000:0x0000000200000) with new L3 ...

BUG=none
TEST=emerge-geralt coreboot
BRANCH=none

Change-Id: Ib29c201e1b096b9c7cd750d2541923616bc858ac
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83652
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-03 02:13:30 +00:00
Arthur Heymans
7d57bc8eb3 soc/ti/am335x: Remove superfluous formats
These formats are already included in memlayout.ld.

Change-Id: I89d226440308ce3fbe00382698dcd8c88863e694
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83723
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-02 14:45:13 +00:00
Arthur Heymans
0edab62a28 soc/ti/am335x: Use Linker instead of compiler to link
Clang does not work that well as a linker for the header as it will
default to other linkers which do not work well here. Instead just use
the linker directly.

Change-Id: Id6ba42b470349a4b138a65b2a037f16a65982ef7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70161
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-02 14:45:03 +00:00
Dinesh Gehlot
5a70f8a092 soc/intel/common/block/cse: Enforce CSE sync with pertinent GBB flag
The patch enforces CSE sync when the GBB flag GBB_FLAG_FORCE_CSE_SYNC is
enabled and the system is currently booting from the RO section.
Additionally, it integrates forced CSE sync into eSOL decision-making.

BUG=b:353053317
TEST=Verified forced CSE sync on rex0 with GBB 0x200000

Cq-Depend: chromium:5718196
Change-Id: I228bc8ebf58719776f6c39e0bfbb7ad53d9bfb7f
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83686
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-02 14:44:10 +00:00
Dinesh Gehlot
896c76c5c1 security/vboot: Include new gbb flag to enforce CSE sync
This patch adds a GBB flag to coreboot, which, when enabled, enforces
CSE sync even if the current CSE version matches the version in CBFS.
The CSME sync GBB and flag are designed to enhance autotest
functionalities and are not intended or recommended for use in
developing any other features.

BUG=b:353053317
TEST=futility gbb --help

Cq-Depend: chromium:5718196
Change-Id: I6352959e1e898a90b4c6e12a22f8d6513f90ded9
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83685
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-02 14:43:04 +00:00
Dinesh Gehlot
2534539373 Update vboot submodule to upstream main
Updating from commit id 4b12d392e5b1:
   scripts: Add a script to convert a vbprivk to a PEM
to commit id f1f70f46dc54:
   2lib: Add gbb flag to enforce CSE sync

-Subproject commit 4b12d392e5b12de29c582df4e717b1228e9f1594
+Subproject commit f1f70f46dc5482bb7c654e53ed58d4001e386df2

Change-Id: I2c5b603ce5ea49e6c1aec293960184d84eedd1e7
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83733
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-02 14:36:57 +00:00
Sean Rhodes
45d2c3d543 i2c/drivers/generic: Return ROTM in a package
The ROTM method should return a package:

```
  Name (RBUF, Package (0x03)
  {
    "0 1 0",
    "1 0 0",
    "0 0 1"
  })
  Return (RBUF)
```

Adjust the acpigen to do this.

Change-Id: Id493f6955c1d0dc3449402262a8575091a828226
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83721
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-02 14:36:31 +00:00
Arthur Heymans
8c509f3645 soc/ti/am335x: Change and optimize memlayout
Clang builds (bootblock: 20800 bytes) are slightly larger than GCC
builds (bootblock: 18688 bytes) so increase the size of both bootblock
and romstage.

The technical reference manual mentions no upper limit to the size of
the bootblock in the TI header so increasing the bootblock size is
allowed.

To be able to link the clang bootblock increase it from 20K to 22K.

Change-Id: I8719bc3728d4cc8dba8d939cc154c3fc0884d47b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70160
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-02 14:34:50 +00:00
Amanda Huang
cb7dad7bc8 mb/google/brya/var/trulo: Remove mux references from typec port
The Type-C kernel driver no longer programs the AP mux. So remove device
references to the TCSS Mux control device from the Type-C port driver.

BUG=b:351117685
TEST=USB-C drive can be detected after system warm or cold reboot.

Change-Id: I2fd6e8fcebd194da03ba3f264ee89037ca11769a
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83746
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-08-02 05:44:50 +00:00
Wu Garen
475c75d34a mb/google/brox/var/greenbayupoc: update ALC236 verb table
The previous uploaded verb table is not fully applied due to
configuration error. Uploaded the verb table provided by Realtek which
can be found in b:336967284.

BUG=b:326412504, b:336967284
TEST=deploy and check volume

Change-Id: Ib9a8248c4a437fd204f40918d801a4a010a5c4df
Signed-off-by: Wu Garen <wu.garen@inventec.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83465
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Terry Cheong <htcheong@chromium.org>
2024-08-02 01:20:08 +00:00
Terry Cheong
3396c4027d mb/google/brox/var/brox: Enable Class-D calibration
DC offset of class-D amplifier is 7mV in Brox which is larger than the expected 3mV.
Add a section in the verb table to enable class-D calibration based
on the updated verb table provided by Realtek in b:342506575 comment#6.

This improves the offset to be less than 1mV.

BUG=b:342506575
BRANCH=main
TEST=Verify DC offset of speaker amplier output is less than 1mV with a multimeter when \
     playing -100dB sine waves.

Change-Id: I776f5c24ce3c829cbd64840957c1431608cf2b85
Signed-off-by: Terry Cheong <htcheong@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82794
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-02 01:19:36 +00:00
Ren Kuo
ef4d562d2f mb/google/brox: Create jubilant variant
Create the jubilant variant of the brox reference board by copying
the template files to a new directory named for the variant.

BUG=b:348543712
TEST=util/abuild/abuild -p none -t google/brox -x -a
make sure the build includes GOOGLE_JUBILANT.

Change-Id: Ic54437697058f8bce2167093bd88c0880d1b7cac
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83212
Reviewed-by: Bob Moragues <moragues@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
2024-08-01 20:38:52 +00:00
Felix Held
7e75d1ad26 soc/amd/common/smi_util: add PSP SMI helper functions
The PSP can send SMIs to the x86 side of the system. Add helper
functions to configure and to reset the PSP SMI generation. Since
Stoneyridge also selects SOC_AMD_COMMON_BLOCK_SMI, add the SMITRIG0_PSP
define and rename SMITYPE_FCH_FAKE0 to SMITYPE_PSP in its SoC-specific
smi.h to bring it in line with the newer SoCs.

This patch is split out from CB:65523.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I525a447c9a75fdb95b9750e85a02896056315edf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83702
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01 20:27:32 +00:00
Felix Singer
17968caa94 xcompile: Apply -Wextra with temporary exceptions to GCC
In order to detect more issues in our code, make GCC more picky by
enabling -Wextra. Disable a couple of warnings turned on by -Wextra
temporarily in order to keep everything compiling and working for now.
The warnings may be enabled step by step later.

Since xcompiles applies to coreboot and libpayload, add Wextra here
instead of the top-level Makefile.mk.

Change-Id: I60915cb66581dc2c9b6807335fd0e214b45e76d6
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83347
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01 20:22:53 +00:00
Sean Rhodes
0dba005f04 mb/starlabs/starbook/rpl: Merge and alphabetise FSP UPDs
Change-Id: I3c4a963b233f549c7a76c76333af87c887550ac3
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83622
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-01 18:49:45 +00:00
Sean Rhodes
e4592e4996 mb/starlabs/*: Add the subsystem ids for HDA
The Windows drivers require the subsystem ID to match on the PCI
device, so set these to allow the driver to install.

Change-Id: I01b36554d5322018efc72734a8e749cc06263577
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83621
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01 18:49:25 +00:00
Elyes Haouas
ed48fa6847 mb/emulation/qemu-q35/memmap: Remove redefine macros
SMRAMC, C_BASE_SEG, G_SMRAME, D_LCK, D_CLS, D_OPEN, ESMRAMC, T_EN,
TSEG_SZ_MASK and H_SMRAME are already defined in included "q35.h" file.

Change-Id: Ic3c01cca14749f77adecc327a78ac011ba3f4c0b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83429
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01 15:46:21 +00:00
Maxim Polyakov
cd55868873 util/superiotool/fintek: Add missing F81804 name for 0x0215 id
"0x1502 F81804 chipset ID, same for F81966" in
https://web.archive.org/web/20240628153609/https://github.com/torvalds/
linux/blob/master/drivers/gpio/gpio-f7188x.c

Change-Id: I6889ad8ad861465316333ff997956a05b74c5855
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83018
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01 15:41:22 +00:00
Lu, Pen-ChunX
00d538b562 soc/intel/xeon_sp: Add acpigen_write_pci_root_port
acpigen_write_pci_root_port writes SSDT device objects for PCIe
root port, _ADR and _BBN are provided. SSDT objects for direct
subordinate devices will also be created (if detected), _ADR and
_SUN are provided.

TEST=Build and boot on intel/archercity CRB

Change-Id: I434fea7880a463c2027abfa22ba2b3bb985815c0
Signed-off-by: Lu, Pen-ChunX <pen-chunx.lu@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82252
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-08-01 15:32:25 +00:00
zengqinghong
188909aad4 mb/google/nissa: Create teliks variant
Create the teliks variant of the nissa reference board by copying
the anraggar files to a new directory named for the variant.

BUG=b:352263941
BRANCH=None
TEST=1. util/abuild/abuild -p none -t google/brya -x -a
        make sure the build includes GOOGLE_TELIKS
     2. Run part_id_gen tool without any errors

Change-Id: I744f4d7c2d35544d3a8a8f76e24bad3298442768
Signed-off-by: zengqinghong <zengqinghong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83408
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-01 15:30:59 +00:00
Tyler Wang
f833cffef3 acpi/acpigen_ps2_keybd: Move KEY_DELETE to rest_of_keymaps
This patch supports keyboards that have delete key but without
numpad.

To prevent KEY_DELETE be defined twice, move it from
numeric_keypad_keymaps to rest_of_keymaps.

BUG=b:345231373
TEST=Build and test on Riven/Craaskino, delete key function
works

Change-Id: Ib922a2b52fa7152ba3d9deb44e2c8200b2a3802c
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83684
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-01 15:30:20 +00:00
Amanda Huang
874eb5bb40 mb/google/brya/var/orisa: Remove mux references from typec port
The Type-C kernel driver no longer programs the AP mux. So remove device
references to the TCSS Mux control device from the Type-C port driver.

BUG=b:351117685
TEST=USB-C drive can be detected after system warm or cold reboot.

Change-Id: I4a24fb69ebec87f65b679cde0e4a1a8827cd365d
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83722
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-01 12:52:41 +00:00
Felix Held
73870298e3 soc/amd/common/psp: move buffer sizes to common header
Since the P2C_BUFFER_MAXSIZE value will be needed in another compilation
unit, move the define to the common psp_def.h. P2C_BUFFER_MAXSIZE is
moved there too for consistency reasons.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8d4d93760c90ad6e0ecadf70600b1d697a02fa82
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83701
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31 20:07:46 +00:00
Felix Held
930d0b16cc soc/amd/common/psp_smm: introduce and use send_psp_command_smm
When sending mailbox commands to the PSP from SMM, the SMM flag needs to
be set right before sending the mailbox command and cleared right after
the command is sent. In order to not have this code duplicated, factor
it out into a function.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3628463dece9d11703d5a068fe7c604108b69c1f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83700
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-07-31 20:07:32 +00:00
Felix Held
e6c40f6272 soc/amd/common/psp_smm: add comments to psp_notify_smm
The reasoning behind this and the positive side effects of this aren't
too clear from the code, so point those out in a comment.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4f4121031fc1ef600cdf5551f61f1ef4e03b56a5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-07-31 20:07:17 +00:00
Felix Held
9c366417df soc/amd/common/psp_smm: add/improve comments to buffers and flags
Since it's not exactly obvious what 'c2p_buffer', 'p2c_buffer' and
'smm_flag' are used for, add comments to those.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4ec092a92fe9f0686ffb7103e441802fc05381f4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83698
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-07-31 20:07:03 +00:00
Felix Held
ad8d0eff74 device/path: rename domain path struct element to 'domain_id'
Rename the 'domain' element of the 'domain_path' struct to 'domain_id'
to clarify that this element is the domain ID.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Martin Roth <gaumless@gmail.com>
Change-Id: I3995deb83a669699434f0073aed0e12b688bf6e7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83677
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-07-31 14:32:51 +00:00
Felix Held
32c38ca221 device: introduce and use dev_get_domain_id
To avoid having constructs like 'dev->path.domain.domain' in the SoC
code, create the 'dev_get_domain_id' helper function that returns the
domain ID of either that device if it's a domain device or the
corresponding domain device's domain ID, and use it in the code.

If this function is called with a device other than PCI or domain type,
it won't have a domain number. In order to not need to call 'die',
'dev_get_domain_id' will print an error and return 0 which is a valid
domain number. In that case, the calling code should be fixed.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3d79f19846cea49609f848a4c42747ac1052c288
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83644
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31 14:32:19 +00:00
Maxim Polyakov
2c31e86d6b util/superiotool/fintek: Add f81966 register table
In accordance with the F81962/F81964/F81966/F81967 datasheet:
Release Date: Feb, 2018, Version: V0.18P [1].

[1] https://web.archive.org/web/20240707052102/http://
www.jetwaycomputer.com/download/Fintek/F81966_wdt_gpio.zip

Change-Id: Ic3418c337883538e47eb181cbe1ad2dc828e12a1
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83019
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-31 14:28:56 +00:00
Maxim Polyakov
365e511ee4 util/superiotool/fintek: Add f81866 register table
In accordance with the F81866A datasheet:
Release Date: Jan, 2012, Version: V0.14P [1].

[1] https://web.archive.org/web/20240707051837/http://www.
jetwaycomputer.com/download/Fintek/F81866_wdt_gpio.zip

Change-Id: I4367a1129fe628e7bf05d49678ea1c3718da710b
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83004
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31 14:28:24 +00:00
Maxim Polyakov
dc2ee2096a util/superiotool: Add extra selectors support
Some chips (fintek [1,2]) have registers with specific selector-fields
that can affect the address space of the device (for example, switch the
register bank). At the same time, these registers contain fields that
should not change after they are configured in BIOS (for example, set
the port to 2E/2F or 4E/4F). In this case, the selector should take into
account the mask of the register fields and there is no convenient and
easy way to add this in the code in the utility. The selector-fields
should be set manually before the dump and this action is done several
times.

This patch adds an extra-selector mechanism that allows superiotool to
make a correct dump in automatic mode.

Just add a structure with an index, mask, and value for the selector
inside the superio_registers chip for the corresponding LDN to switch
the register bank:

{FINTEK_F81966_DID, "F81962/F81964/F81966/F81967", {

* * *
{NOLDN, "Global",
  {0x28,0x2a,0x2b,0x2c,EOT},
  {0x00,0x00,0x00,0x00,EOT},
  {.idx = 0x27, .mask = 0xd, .val = 0x1} /* update extra selector */
},
{0x03, "LPT",
  {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
  {NANA,0x03,0x78,0x07,0x03,0xc2,EOT} /* without extra selector */
},
* * *

Tested with Fintek F81966 on Asrock IMB-1222:

- run superiotool on Ubuntu and dump the registers for the board with
  the vendor's firmware;
- add the superio chip initialization code to the board configuration
  in coreboot and build the project;
- boot Ubuntu on the board with coreboot and re-dump the registers;
- the register values from the board configuration code are the same
  in both dumps.

Found Fintek F81962/F81964/F81966/F81967 (vid=0x3419, id=0x0215) at 0x2e
(Global) -- ESEL[27h] 0x00 (Port Select Register) --
idx 02 07 20 21 23 24 25 26  27 28 29 2a 2b 2c 2d
val 00 0b 15 02 19 34 5a 23  80 a0 f0 45 02 e3 2e
def NA 00 15 02 19 34 00 23  02 a0 00 00 02 0c 28

* * *

The changes do not affect the configuration of existing chips, which
was tested on the Asrock H110-STX motherboard with Nuvoton NCT5539D
(the dump before and after the changes are the same).

[1] CB:83004
[2] CB:83019

Change-Id: If56af9f977381e637245bdd26563f5ba7e6cbead
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83196
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31 14:28:06 +00:00
Karthikeyan Ramasubramanian
fa66d33336 soc/intel/adl: Update DCACHE_BSP_STACK_SIZE
During the stages which use Cache-as-RAM (CAR), coreboot needs more than
1 KiB as configured in DCACHE_BSP_STACK_SIZE. After studying the UPDs
for various SoCs(ADL-P, ADL-N, RPL), coreboot stack requirement is
estimated to be 32 KiB. Update DCACHE_BSP_STACK_SIZE accordingly.

BUG=None
TEST=Build Brox BIOS image and boot to OS.

Change-Id: I723ba1f4289c393fe7376f989d760b26e75b33da
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83680
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-31 14:11:30 +00:00
Subrata Banik
8200a9ac38 mb/google/trulo: Keep ISH default enable
This patch drops fw_config probing for ISH because ISH IP should
remains on by default for all Trulo variants.

Additionally, removed the redundant ISH entries from variant
override devicetree.

BUG=b:354607924
TEST=Able to verify ISH PCI Device is available while booting eMMC sku.

```
lspci
00:00.0 Host bridge: Intel Corporation Device 461c
...
00:12.0 Serial controller: Intel Corporation Device 54fc
...
00:1a.0 SD Host controller: Intel Corporation Device 54c4
```

Also, able to enter S0ix with this patch.

```
> suspend_stress_test -c 1 --ignore_s0ix_substates

At AP console:

s0ix errors: 0
s0ix substate errors: 0
s0ix pc10 errors: 0

At EC console:
power state 5 = S0ix, in 0x38d87
```
Change-Id: Ic1e415ec848ac91a9bbf21b26597f4e6b5f7a1f5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83695
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31 03:56:14 +00:00
Raymond Chung
42e4dd5aef mb/google/brya/var/xol: Using baseboard's PchPmSlpAMinAssert settings
Reduce PchPmSlpAMinAssert (pch_slp_a_min_assertion_width) to minimum
time (98ms) from 2sec.

BUG=b:349595391
BRANCH=firmware-brya-14505.B
Test=Verified on xol

Change-Id: Ia4b7b7ab5dc9afeb3505dfd2b42d0d397aed7a5c
Signed-off-by: Raymond Chung <raymondchung@ami.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83683
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-31 02:14:15 +00:00
Rishika Raj
97bc693abc mb/google/brya/var/orisa: Remove redundant defaults from overridetree
Streamline variant-level overrides by removing redundant entries that
already exist in either the SoC-level or the platform-level configurations.

BUG=None
TEST=emerge-nissa coreboot

Change-Id: I0b28354dfb865900a78a9d0738e00aa952eade0e
Signed-off-by: Rishika Raj <rishikaraj@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83674
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-30 13:09:24 +00:00
Rishika Raj
8977282e12 MAINTAINERS: Update email id for ADL and google/brya mbs
Change-Id: Idcdd3e2525b621310aaf43608fd5fede8133d16a
Signed-off-by: Rishika Raj <rishikaraj@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83675
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-30 13:09:12 +00:00
Sean Rhodes
89282af63e i2c/drivers/generic: Add support for including a CDM
Chip Direct Mapping is exclusive to Windows; it allows specifying the
position where a chip is mounted. There are 8 positions and a _CDM
method should return 0xabcd0X, where X is the position.

Tested by booting Windows 11 on the StarLite Mk V, rotating the device
and checking the orientation is correct, where previously, it was
inverted.

Change-Id: If70c25288d835df7064b4051c43abeb2d6531f3b
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81409
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-29 20:24:41 +00:00
Yu-Ping Wu
e822d4b093 soc/mediatek/mt8196/memlayout: Fix the location of BOOTBLOCK comment
The comment for the BOOTBLOCK region should be written right above the
BOOTBLOCK declaration.

BUG=b:317009620
TEST=none
BRANCH=none

Change-Id: I7afdf74844a9d97169b4e4a23c3c9c6060e886d9
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83649
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-29 13:51:06 +00:00
Subrata Banik
e99d22e09f Revert "soc/intel/adl: Guard TWL SoC missing UPDs for build integrity"
This reverts commit 59ee65d271c7c617bcc240019231da4f0bd04db6.

Reason for revert:
- Usb4CmMode & CnviWifiCore Upds are available starting with TWL FSP
  version v5222.01. Therefore, no special handling is required.

BUG=b:330654700
TEST=Able to build google/tivviks.

Change-Id: I3c74ec5b9924e88a26984fe8d3275ba80edb14ab
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83658
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2024-07-27 07:00:38 +00:00
Subrata Banik
85dd48fd80 mb/google/brya/var/trulo: Add USB2 Bluetooth device on Port 10
This change adds a new USB2 Bluetooth device configuration on Port 10
for the Trulo variant.

* A new `drivers/usb/acpi` chip is added with:
    * `desc` set to "USB2 Bluetooth"
    * `type` set to "UPC_TYPE_INTERNAL"
    * `reset_gpio` set to "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_A13)"
    * `device` referencing `usb2_port10`

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I9a92a4d008eb4d0c339079ecbbb77facece435ba
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83666
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-27 06:55:03 +00:00
Subrata Banik
a5b6e60411 mb/google/brya/var/trulo: Remove unused Bluetooth device
This change removes the configuration for the unused USB2 Port 6
(index 5) and its associated Bluetooth device on the Trulo variant.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I9970274b9b1b1076a2f9d649d61c825cac71d0c7
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83665
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rishika Raj <rishikaraj@google.com>
2024-07-27 06:54:59 +00:00
Subrata Banik
b91546372a mb/google/brya/var/orisa: Remove unused Bluetooth device
This change removes the configuration for the unused USB2 Port 6
(index 5) and its associated Bluetooth device on the Orisa variant.

It also cleans up a redundant newline before the `serial_io_i2c_mode`
definition.

BUG=b:351976770
TEST=Builds successfully for google/orisa.

Change-Id: Icf1ff442530ad2263ad0b58829e5c7b2ce544439
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83664
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rishika Raj <rishikaraj@google.com>
2024-07-27 06:54:53 +00:00
Subrata Banik
a5aa6cb0b2 mb/google/brya: USB2 Port 9 for integrated BT on Trulo baseboard
This patch moves the configuration for integrated Bluetooth
functionality (USB2 Port 9) from Orisa variant to the Trulo baseboard.

This change is necessary to support the CNVi BT module on Trulo
variants. The configuration is skipped for Orisa.

Trulo: USB2 Port 9 is now configured as USB2_PORT_MID(OC_SKIP) to
       support the CNVi BT module.
Orisa: The previous configuration of USB2 Port 9 as a Bluetooth port for
       CNVi WLAN has been removed.

This change ensures proper Bluetooth connectivity is applicable for all
Trulo variants including Orisa and Trulo.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I760a82cb6f6c98db7249caf1ba7e6d6c5dc8f2c4
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83663
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-27 06:54:48 +00:00
Rishika Raj
c694522b52 mb/google/brya/var/orisa: Update fw_config probe for storage devices
1. Add STORAGE_UNKNOWN fw_config to enable all storage devices.

2. Update fw_config probe to enable/disable devices in devicetree.

3. Disable eMMC controller incase STORAGE_UFS or STORAGE_NVME fw_config
is enabled.

BUG=None
TEST=emerge-nissa coreboot

Change-Id: Id3a22aa2206e86fdca6f6fadbc849572890fee58
Signed-off-by: Rishika Raj <rishikaraj@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83657
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-27 06:54:25 +00:00
Amanda Huang
2ecc785a69 mb/google/brya: Select USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS for Orisa
This patch selects USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS for
Orisa variant which intends to achieve a unified AP firmware
image across UFS and non-UFS skus.

BUG=b:345112878
TEST=Able to enter S0ix on Orisa eMMC sku after disabling UFS
during boot path.

Change-Id: I969b0c0c785ed4c408f6fc6de71e7d0c1a1ea27c
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83659
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-27 06:53:02 +00:00
Yu-Ping Wu
fa9fbb40f9 arch/arm64/armv8/mmu: Add missing header arch/barrier.h
Also take the chance to sort the headers.

BUG=none
TEST=none
BRANCH=none

Change-Id: I9d487a40d0c58c6458b8b7d32b6401093fa417e7
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83651
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-07-27 05:13:28 +00:00
Varun Upadhyay
015c842620 vc/intel/fsp/twinlake: Update FSP headers to v5222.01
- Add Usb4CmMode & CnviWifiCore Upd support in FspsUpd.h
- Update UPD Offset in FspsUpd.h

BUG=b:354612775
TEST=Able to build and boot google/Tivviks

Change-Id: Ia68b6aa90c782a359b594f381e223772a897c6e6
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-27 03:41:54 +00:00
Subrata Banik
04762ca929 mb/google/brya: Select USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS
This patch selects USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS for
Google/Trulo variant which intends to achieve a unified AP firmware
image across UFS and non-UFS skus.

Note: Enabling this config would introduce an additional warm reset
during the cold-reset scenarios due to the function disabling of the
UFS controller as results we are expecting ~300ms higher boot time
(which might not be user visible because `cbmem -t` can't include
impacted boot time due to in-between resets).

BUG=b:355384185
TEST=Able to enter S0ix on Trulo eMMC sku after disabling UFS
during boot path.

Able to grep below debug prints while booting the eMMC sku.

[INFO ]  FW_CONFIG value from CBI is 0x20000000
[INFO ]  Disabling UFS controllers
...
[INFO ]  fw_config match found: STORAGE=STORAGE_EMMC

Change-Id: I06a84fa8c3843edae5932e19d394b18b72ace422
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83654
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
2024-07-27 03:41:14 +00:00
Subrata Banik
66b9c989ae soc/intel/meteorlake: Remove unnecessary #if ENV_RAMSTAGE
TEST=Able to build google/rex.

Change-Id: I0de87a2ff5ecb37f00ec745ad930e83f6356a3fe
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83637
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-26 23:03:48 +00:00
Tim Crawford
5f445f21e0 ec/system76/ec: Remove RPM calculation
System76 EC since system76/ec@80cfa91b9f ("acpi: Report RPM values
instead of raw tachometer values") performs the RPM calculation itself
and stores it  in EC RAM where previously the raw tachometer values were
saved. The SBIOS is no longer required to make the conversion.

Change-Id: I82a4e25a8ce0f274b2d98e7ff2b12595acf6c3c5
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83308
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
2024-07-26 23:03:33 +00:00
Sean Rhodes
c6b5b075ec mb/starlabs/starbook/rpl: Don't set tcss_aux_ori
Not setting tcss_aux_ori in devicetree is the same as
setting it to zero so remove it.

Change-Id: Ia0e90179dd05b23f1f36935be51327250c5a8684
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83620
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-07-26 13:49:10 +00:00
Maximilian Brune
07f0131116 arch/riscv: Remove opensbi submodule includes
Currently we include a header file from the opensbi submodule.
That causes some issues, since we merge outside code with our own.
Most recently there have been made attempts to make the coreboot
codebase C23 ready. The code that we include from opensbi however causes
the build to fail, since it is not C23 ready.

This patch effectivily detaches the coreboot codebase from the opensbi
codebase and just copies the structure and definitions that we need from
opensbi into coreboot.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I9d8f85ee805bbbf2627ef419685440b37c15f906
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83641
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-26 13:05:41 +00:00
Maximilian Brune
7dae497495 commonlib/device_tree.c: Add read reg property helper
Add a helper function to read the reg property from an unflattened
device tree.
It also factors out the common code into a new function called
`read_reg_prop`.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I7846eb8af390d709b0757262025cb819e9988699
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83457
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-07-26 11:06:29 +00:00
Li, Jincheng
2c9a12b588 mb/intel/beechnutcity_crb: Update SMBIOS info for type 0,1,2,3
Update wake-up type, mainboard feature flags and enclosure type.
All other info are used from src/lib/smbios_defaults.c

Change-Id: I8a7d4958171df121e2cd3acb3a71554c695d64ab
Signed-off-by: Li, Jincheng <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83327
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-07-26 11:05:10 +00:00
Li, Jincheng
61d61af6ea mb/intel/avenuecity_crb: Update SMBIOS info for type 0,1,2,3
Update wake-up type, mainboard feature flags and enclosure type.
All other info are used from src/lib/smbios_defaults.c

Change-Id: I8e68c057fefa1d408fb8d69fef066cb573c929a4
Signed-off-by: Li, Jincheng <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83328
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-26 11:05:02 +00:00
Jincheng Li
e44fe6a39e soc/intel/xeon_sp/gnr: Add dimm_slot configuration
Add sample DIMM slot configuration table for avenuecity CRB
and beechnutcity CRB. This table will be used to fill SMBIOS
type 17 table.

TEST=Boot on intel/avenuecity CRB
It will help to update Locator, Bank Locator and Asset Tag
with the value described in dimm_slot_config_table

Change-Id: I53556c02eb75204994a1bcb42eccb940e83bd532
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83326
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-26 11:04:54 +00:00
Rishika Raj
871f93549d soc/intel/mtl: Increase CAR_STACK_SIZE by 31KB for coreboot compatibility
This change increases the DCACHE_BSP_STACK_SIZE from 512KB + 1KB to
512KB + 32KB, addressing a requirement specified by coreboot where
stack usage is higher than 1KB alone.

BUG=None
TEST=None

Change-Id: Iba3620b3b7c470176330f5e07989cd3f6238713e
Signed-off-by: Rishika Raj <rishikaraj@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83540
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-07-26 10:58:58 +00:00
Yu-Ping Wu
8e48f94b39 soc/mediatek/mt8188/memlayout: Add a space in SRAM_L2C_START comment
Change-Id: I1888fedcc66ae13c76331d3f2f4465197ae51d35
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-07-26 07:23:34 +00:00
Felix Singer
9c78a0e422 mb/starlabs/starbook/cml: Drop superfluous devices from devicetree
In order to clean up a bit, drop devices which are equivalent to the
ones from chipset devicetree.

Change-Id: I92765b404508901c7e84fad0bca30489cf69abac
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83456
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-26 05:44:36 +00:00
Martin Roth
28c669e216 3rdparty: Remove chromeec submodule
The chromeec submodule is the largest submodule being pulled into the
coreboot tree, at over 400MB. The main branch also contains the majority
of these commits, so restricting it to a single branch still fetches
over 350MB.

Because there is only a single mainboard directory that enables the
build of the chromeec codebase by default, most people are fetching this
repo for no reason.

Based on this, we're going to change the way that the chromeec submodule
is used, fetching it the way we currently fetch external payloads. This
gives us 2 large advantages:
1) Only builds that actually need the chromeec repo will pull it down.
2) Each board that wants to build the chromeec codebase can use a
different commit, unlike submodules which all use the same "current"
commit.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I357c4c9b506dd3817a308232446144ae889bc220
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-26 04:36:52 +00:00
Matt DeVillier
6d6ec575b7 ec/google/chromeec: Drop 'choice' selections for EC and PD firmware
Since the EC and PD firmware sources are now limited to two options -
'none' and 'external' - drop the choice selection and make the
EC and PD external options independent.

TEST=build google/lulu with external EC binary using existing defconfig

Change-Id: Ie37ff3a188b414fd099fbb344858bca4df419086
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83639
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-26 02:58:41 +00:00
Matt DeVillier
a391ae18a8 ec/google/chromeec: Drop ability to build Chrome-EC, PD components
In preparation for dropping the Chrome-EC submodule, remove the ability
for Chrome-EC and PD components to be built as part of coreboot.
These components have not been used or buildable for many years.

Change-Id: Ibf6bd43e755cf5b4d2aa8a42f38dc52e7023e9b3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83638
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-26 02:58:36 +00:00
Felix Held
331cb328c2 soc/amd/common/psp_gen2: use MMIO access again
Now that we have a get_psp_mmio_base function that will work on all SoCs
that use the psp_gen2 code, we can move back to accessing the PSP
registers via their MMIO mapping. This sort-of reverts
commit 198cc26e4951 ("soc/amd/common/block/psp/psp_gen2: use SMN access
to PSP").

When doing SMN accesses from the SMI handler after the OS has taken over
ownership of the platform, there's the possibility to cause trouble by
clobbering the SMN access index register from SMM. So that should be
either avoided completely or the SMI code needs to save and restore the
original contents of the SMN index register.

The PSP MMIO base will be set up by the FSP before the resource
allocation in coreboot and be treated like a fixed resource by the
allocator. The first SMI where corresponding handler calls
'get_psp_mmio_base' happens when ramstage triggers the APM_CNT_SMMINFO
SMI right after mpinit which happens after the resource allocation. So
the PSP MMIO base address is expected to be configured and so the
'get_psp_mmio_base' function will cache the base address and won't need
to do any SMN access in subsequent calls that might happen after the OS
has take over control.

This isn't currently an issue, since the only PSP mailbox command from
the SMI handler after coreboot is done and the OS has taken over will
be during the S3/S4/S5 entry, and this will be triggered by the OS as
the last step after it is done with all its preparations for suspend/
shutdown.  There will however be future patches that add SMI-handlers
which can send PSP mailbox commands during OS runtime, and so we have
to make sure we don't clobber the SMN index register.

TEST=PSP mailbox commands are still sent correctly on Mandolin.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I25f16d575991021d65b7b578956d9f90bfd15f6c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83448
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-25 22:56:37 +00:00
Felix Held
645203a280 soc/amd/common/psp_gen2: return status from soc_read_c2p38
This sort-of reverts commit 00ec1b9fc7ba ("soc/amd/common/block/psp/
psp_gen2: simplify soc_read_c2p38") and is done as a preparation to
switch back to using the MMIO access to the PSP mailbox registers.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icca3c7832295ae9932778f6a64c493e474dad507
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83447
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-07-25 22:55:50 +00:00
Felix Held
c7f022ae95 soc/amd/common/block/psp_gen2: add get_psp_mmio_base
Add get_psp_mmio_base which reads the PSP MMIO base address from the
hardware registers. Since this function will not only be called in
ramstage, but also in SMM, we can't just look for the specific domain
resource consumer like it is done for the IOAPICs in the northbridge,
but have to get this base address from the registers. In order to limit
the performance impact of this, the base address gets cached in a static
variable if an enabled PSP MMIO base register is found. We expect that
this register is locked when it was configured and enabled; if we run
into the unexpected case that the PSP MMIO register is enabled, but not
locked, set the lock bit of the corresponding base address register to
be sure that it won't change until the next reset and that the hardware
value can't be different than the cached value.

This is a preparation to move back to using MMIO access to the PSP
registers and will also enable cases that require the use of the MMIO
mapping of the PSP registers.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1d51e30f186508b0fe1ab5eb79c73e6d4b9d1a4a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83446
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-07-25 22:55:38 +00:00
Felix Held
ebf90e3a88 soc/amd: add SoC-specific root_complex.c to SMM
The PSP code introduced in a following patch needs both SoC-specific
functions get_iohc_info and get_iohc_non_pci_mmio_regs to also be
available in SMM, so add those compilation units to the corresponding
target.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4e32084b45f07131c80b642bc73d865fc57688a8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83445
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-07-25 22:55:27 +00:00
Felix Held
e9e71132a3 soc/amd/*/root_complex: introduce and use domain_iohc_info struct
Instead of implementing the functions get_iohc_misc_smn_base and
get_iohc_fabric_id in the SoC code, move those functions to the common
AMD code, and implement get_iohc_info in the SoC code that returns a
pointer to and the size of a SoC-specific array of domain_iohc_info
structs that contains the info needed by the common code instead. This
allows to iterate over the domain_iohc_info structs which will be used
in a later patch to find the PSP MMIO base address in both ramstage and
smm.

TEST=Mandolin still boots and all non-PCI MIO resources are still
reported to the resource allocator

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ifce3d2b540d14ba3cba36f7cbf248fb7c63483fe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83443
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-07-25 22:55:15 +00:00
Felix Held
9af1d3f857 acpi,soc: use is_domain0 function
No need to open-code this when we have a function for this.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iae570ba750cb29456436349b4263808e2e410e2e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83643
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-07-25 22:54:43 +00:00
Felix Held
a17d22e51a device: move is_domain0 and is_dev_on_domain0 to common code
Move is_domain0 and is_dev_on_domain0 from the Intel Xeon SP code to the
common coreboot code so that it can be used elsewhere in coreboot too,
and while moving also implement it as functions instead of macros which
is more in line with the rest of helper functions in that new file.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I954251ebc82802c77bf897dfa2db54aa10bc5ac4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83642
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-25 22:54:21 +00:00
Felix Held
b133b7ae23 mb/protectli/vault_[adl_p,bsw]/Kconfig: drop unneeded MAINBOARD_VENDOR
MAINBOARD_VENDOR is already provided by the Kconfig file on the vendor
level, so there's no need to redefine it to the same value at the
mainboard level.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icfcbcec005fadb8eaf1b8f90e1d71b3c6ee32088
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83640
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-25 22:08:44 +00:00
Yu-Ping Wu
b6e1007e27 soc/amd: Ensure bank 0 is selected before accessing VBNV in CMOS
In AMD platforms, the bit 4 of CMOS's Register A (0x0a) is DV0 bank
selection (0 for Bank 0; 1 for Bank 1) [1]. Since the MC146818 driver
accesses VBNV via Bank 0, the bit must be cleared before we can save
VBNV to CMOS in verstage.

Usually there's no problem with that, because the Register A is
configured in cmos_init() in ramstage. However, if CMOS has lost power,
then in the first boot after that, the bit may contain arbitrary data in
verstage. If that bit happens to be 1, then CMOS writes in verstage will
fail.

To fix the problem, define vbnv_platform_init_cmos() to call
cmos_init(0), which will configure the Register A and therefore allow
saving VBNV to CMOS in verstage.

[1] 48751_16h_bkdg.pdf

BUG=b:346716300
TEST=CMOS writes succeeded in verstage after battery cutoff
BRANCH=skyrim

Change-Id: Idf167387b403be1977ebc08daa1f40646dd8c83f
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83495
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-25 20:53:32 +00:00
David Wu
5085fe6478 mb/google/nissa/var/riven: Add Fn key scancode
The Fn key on riven emits a scancode of 94 (0x5e).

BUG=b:345231373
TEST=Flash riven, boot to Linux kernel, and verify that KEY_FN is
generated when pressed using `evtest`.

Change-Id: Iddedd08fc50e8e8e369ce3d73edf0f3077867e87
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83614
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-25 14:21:56 +00:00
Sean Rhodes
a3863ca44a ec/starlabs/merlin: Improve accuracy of RSOC
Multiply before dividing to improve accuracy of the result.

Change-Id: I974cad3af4e1f86ae58e90c68db463fc436223af
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83619
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-25 14:12:34 +00:00
Subrata Banik
24e550fd61 mb/google/brya/var/trulo: Configure GPIO pins for ramstage
This patch configures GPIO pins as required for booting the Trulo
device from ramstage.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I7b540416083a923ba4d2e52aa8edafb4bfb9ac0e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83628
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-25 04:22:16 +00:00
Yu-Ping Wu
adac4af176 soc/amd/psp_verstage: Add -Oz flag for clang
When we tried to add CMOS support to PSP verstage (CB:83495), the clang
builds failed on boards with cezanne SoC (such as Guybrush), due to
over-sized verstage. On the other hand, there is no such problem for gcc
builds on the same boards.

Building PSP verstage by clang generates much larger verstage size (81K)
compared with using gcc (67K). To unblock adding features to verstage,
temporarily enable -Oz for clang builds.

Change-Id: I033458556986ade88fb8e68499b632deae4dd419
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83594
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-25 03:29:52 +00:00
Felix Singer
8cb97d804e mb/google/volteer/{delbin,drobit}: Use alias name for DPTF PCI device
Change-Id: If514ee7c1174d13b8ca8eb7fd20359e0730a8893
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83525
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24 21:32:35 +00:00
Felix Singer
26e5194e0d mb/protectli/vault_cml: Drop superfluous devices from devicetree
In order to clean up a bit, drop devices which are equivalent to the
ones from chipset devicetree.

Change-Id: Ie485684747efccb8fb0ab87f10694c52a98f3c88
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83455
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24 21:12:51 +00:00
Yidi Lin
552e35b76b Update arm-trusted-firmware submodule to upstream master
Updating from commit id 48f1bc9f5:
2024-05-02 10:13:54 +0200 - (Merge "feat(zynqmp): remove unused pm_get_proc_by_node()" into integration)

to commit id c5b8de86c:
2024-07-22 18:07:11 +0200 - (Merge "feat(debugv8p9): add support for FEAT_Debugv8p9" into integration)

This brings in 447 new commits.

Change-Id: I0a24e2b2b83d18d5ce8f3b1af710b5acde996ad0
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83613
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-07-24 13:10:46 +00:00
Yu-Ping Wu
928f49ca7a Update vboot submodule to upstream main
Updating from commit id b6f44e62:
2024-07-01 04:30:14 +0000 - (futility: updater: Increase try count from 8 to 10)

to commit id 4b12d392:
2024-07-17 01:47:56 +0000 - (scripts: Add a script to convert a vbprivk to a PEM)

This brings in 9 new commits:
4b12d392 scripts: Add a script to convert a vbprivk to a PEM
033d7bfa futility: updater: Increase try count from 10 to 11
f63e088e treewide: Ensure a space after if/for/while keywords
17a45712 2auxfw_sync: Clear display request before EC reset
e529f947 2ec_sync: Reactivate VB2_CONTEXT_EC_SYNC_SLOW
ca2d42d1 Android: Explicitly disable v1/v2 signing when using apksigner
fc7a7a5d futility: flash: Print ro_start and ro_len for debug
86542905 Migrate to new Android.bp build system
aa35a020 host/lib/host_p11_stub: Add missing includes

Change-Id: Ida8a27dcb0acf83022aff0118827e3d310fae1a5
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83612
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24 13:10:31 +00:00
Nicholas Chin
cf42f5d80f util/autoport/*.md: List Haswell as supported
As of commit 3f0bb2fb0741 (autoport: Add support for Haswell-Lynx Point
platform), autoport supports Haswell in addition to Sandy Bridge and Ivy
Bridge.

Change-Id: Iccc10441389580ff8e89c3718484d25d20970f68
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83609
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24 13:10:12 +00:00
Weimin Wu
7ba782814d mb/google/dedede/var/awasuki: Initialise overridetree
Initialise overridetree based on the schematics revision 20240715.

BUG=b:351968527
TEST=abuild -v -a -x -c max -p none -t google/dedede -b awasuki

Change-Id: Ie8194b6eca3e88f08f92e0ac8a9063b8de738652
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83496
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-07-24 13:09:48 +00:00
Jincheng Li
c19e32e69d soc/intel/xeon_sp: Share save_dimm_info among Xeon-SP SoCs
TEST=Build and boot on archercity CRB
No changes in boot log and 'dmidecode' result under centos

TEST=Build and boot on avenuecity CRB
It will add DMI type 16,17,19,20

Change-Id: I2f5b7a4ffabed033d54d4724b3c41246503166fe
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83325
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-24 09:18:41 +00:00
Arthur Heymans
dc8123a775 arch/x86/Makefile.mk: Remove obsolete romcc reference
No assembly.inc file is being generated by romcc anymore.

The -I. was only used in a single place that can use the common -Isrc
instead.

Change-Id: I57a3a6e1c2cf7cf30fb0cd94cc8455f715050490
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83563
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24 00:28:59 +00:00
Arthur Heymans
9b99eb5cf8 arch/x86: Build all stages using the same function
There is no difference in how early and later stages are linked so
rename the same function.

Change-Id: I458c7c6822b310847e7ab32519fd8d66a90f88f7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83562
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-07-24 00:28:31 +00:00
Arthur Heymans
47254261ba arch/x86: Link ramstage in one step
We only use the bfd linker currently but partial linking is not
supported by other linkers and is also a problem for LTO.

Change-Id: I3b23d86e604229262d7c762e23bb963a0e944b5d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71910
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24 00:26:23 +00:00
Matt DeVillier
42b695510a mb/google/dedede/var/galtic: Group fw_config fields together
No need to have separate sections, and will be cleaner when adding
another section in a subsequent patch.

Change-Id: I4ad6be9dd67b5adbc9c5b0fcab51ce0c54351173
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83605
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-07-23 18:36:09 +00:00
Michał Żygowski
256e98f604 mb/protectli/vault_adl_p: Add initial support for VP6630/VP6650/VP6670
It is a new incoming Protectli product based on Alder Lake-P SoC.
More details and documentation will be added later.

TEST=Boot Ubuntu 22.04 LTS and Windows 11 on VP6670.

Change-Id: If4ae5b14b69806b6b0727d1ca1dcf56f47cfcd8e
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80501
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-23 14:13:25 +00:00
Jarried Lin
3200976c1e mb/google/rauru: Add MediaTek MT8196 reference board
Add mainboard folder and drivers for new reference board 'Rauru'.

TEST=saw the coreboot uart log to bootblock
BUG=b:317009620

Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Change-Id: I789b622dcda999635f7aa2ce40adea6db28afa0e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83573
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-23 13:46:12 +00:00
Jarried Lin
8cb9641eca soc/mediatek/mt8196: Add a stub implementation of the MT8196 SoC
Add new folder and basic drivers for Mediatek SoC 'MT8196'.
Refer to MT8196_Chromebook_Application_Processor_Datasheet_V1.0 for
MT8196 SPEC detail.
This patch also enables UART and ARM arch timer.

TEST=saw the coreboot uart log to bootblock
BUG=b:317009620

Change-Id: I8190253ed000db879b04a806ca0bdf29c14be806
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83572
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-07-23 13:45:33 +00:00
Seunghwan Kim
24eee9bcb0 mb/google/brya/var/xol: Limit power limits for low/no battery case
Xol has a shutdown issue on our reliability test environment:
- High temperature
- No battery condition

It needs to have margin for the PL2 and PL4 values from the adapter
power, this will limit the PL2/PL4 values up to 30W/40W for xol's
45W power adapter. The new values are confirmed by our power team.

BUG=b:353395811
BRANCH=brya
TEST=built and verified MSR PL2/PL4 values.
     Intel doc #614179 introduces how to check current PL values.

[Original MSR PL1/PL2/PL4 register values for xol]
cd /sys/class/powercap/intel-rapl/intel-rapl\:0/
grep . *power_limit*
  constraint_0_power_limit_uw:18000000 <= MSR PL1 (18W)
  constraint_1_power_limit_uw:55000000 <= MSR PL2 (55W)
  constraint_2_power_limit_uw:114000000 <= MSR PL4 (114W)

[When connected 60W adapter without battery]
Before:
  constraint_0_power_limit_uw:18000000
  constraint_1_power_limit_uw:55000000
  constraint_2_power_limit_uw:60000000
After:
  constraint_0_power_limit_uw:18000000
  constraint_1_power_limit_uw:30000000
  constraint_2_power_limit_uw:40000000

[When connected 45W adapter without battery]
Before:
  constraint_0_power_limit_uw:18000000
  constraint_1_power_limit_uw:45000000
  constraint_2_power_limit_uw:45000000
After:
  constraint_0_power_limit_uw:18000000
  constraint_1_power_limit_uw:30000000
  constraint_2_power_limit_uw:40000000

Change-Id: Ic19119042ffdcc15c72764d8c27bcdce9f229438
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83479
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2024-07-23 13:45:10 +00:00
Nico Huber
0c1897e4fd xcompile: Drop CC_RT_EXTRA_GCC for PPC64
It looks like some unused artifact:  The PPC64 Makefile.mk doesn't
pick it up. Also, the only other architecture using this (x86) has
linker flags there, not compiler flags.

Change-Id: I734542db9ee5b62d9a39d303d4092cd83dfef54b
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83577
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-07-23 09:36:32 +00:00
Yu-Ping Wu
d8bed2d001 drivers/pc80/rtc/mc146818rtc: Add assertion of bank selection for AMD
As described in CB:83495, in AMD platforms, the bit 4 of CMOS Register A
is bank selection. Since the MC146818 driver accesses VBNV via Bank 0,
the value set in cmos_init() must not contain that bit.

To prevent RTC_FREQ_SELECT_DEFAULT from being incorrectly modified, add
an static assertion about the bank selection for AMD. Note that the
kernel driver also ensures RTC_AMD_BANK_SELECT isn't set for AMD [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/rtc/rtc-mc146818-lib.c?id=3ae8fd4157

BUG=b:346716300
TEST=none
BRANCH=skyrim

Change-Id: I6122201914c40604f86dcca6025b55c595ef609e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-07-23 07:54:39 +00:00
Jincheng Li
9b2d995bdb lib/smbios: Create SMBIOS type 4 entry
One smbios type 4 should be provided for each CPU instance.
Create SMBIOS type 4 entry according to socket number, with a
default value of 1.

TEST=Boot on intel/archercity CRB
No changes in boot log and 'dmidecode' result under centos

Change-Id: Ia47fb7c458f9e89ae63ca64c0d6678b55c9d9d37
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83331
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 22:30:47 +00:00
Seunghwan Kim
aa6865291a mb/google/brya/var/xol: Change touchpad I2C interrupt type to GPIO_INT
If user continues to use the touchpad for over 3 minutes on Xol, the
pointer movement is stuttering.

Touchpad I2C transaction should appear during the interrupt signal level
is low, but we could see some more I2C transaction after the interrupt
signal(GPP_F14) went to high.

We found experimentally that changing the interrupt type to GPIO_INT
from APIC_IRQ improved this issue. We are still investigating, would
like to apply this change first for Xol's dogfooding.

BUG=b:350609957
BRANCH=brya
TEST=built and verified there's no stuttering issue on touchpad movement

Change-Id: Ie1b59355a694e5a42367a20e03f6c5f93225e79c
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-07-22 20:02:43 +00:00
Subrata Banik
23990df919 mb/google/brya/var/trulo: Configure early and romstage GPIOs
This change adds early and romstage GPIO configurations for the trulo
variant, including:

Early GPIOs:
- GSC (Google Security Controller)
- WP (Write Protect)
- UART0 (for serial debug)

Romstage GPIOs:
- Touch Screen early power sequencing

CrOS GPIOs:
- CROS_GPIO_VIRTUAL
- GPIO_PCH_WP

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: Ic1b84f61ef62ddbadc2a45758fb3fce90fce0e88
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83568
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 17:31:00 +00:00
Subrata Banik
5ad528a10a mb/google/brya/var/trulo: Add fw_config for PDC
This patch adds FW Config to the device tree for choosing between the
discrete PD chip.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I0a8fb0225edecb063dede31efaec6f2502476977
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 17:30:56 +00:00
Subrata Banik
6ad1357dad mb/google/brya/var/trulo: Add PnP descriptions
This patch adds power related entries (FIVR and policy to control
lower power c-state transitioning) to the device tree.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: Ib125c91be79a81f3103dcd587dc685134a292e03
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83566
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2024-07-22 17:30:51 +00:00
Subrata Banik
46caf3e37d mb/google/brya/var/trulo: Add Thermal descriptions
This patch adds Thermal related entries (like, TDP, TCC and enabling
DPTF config with required sensor configuration) to the devicetree.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I32f9219c0ba6b70f847f0752bff8aa2e4fdd0979
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83565
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-22 17:30:46 +00:00
Jarried Lin
76723874a7 util/mtkheader: Add gfh header for mt8196 bootblock code
TEST=Build Pass.
BUG=b:317009620

Change-Id: Ida203a72c23b94b1848418c9727a5788df421eea
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83569
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-07-22 14:07:54 +00:00
Jarried Lin
a87649cee3 soc/mediatek: Move memmory macros into MediaTek common directory
To reduce duplicate memmory macros of MediaTek SoCs,
move the header file to a common directory.

TEST=Build geralt pass
BUG=b:317009620

Change-Id: Iea4add8fe3735085c13438a2e177bec177913191
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83571
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 14:07:34 +00:00
Jarried Lin
ae37d6158e soc/mediatek: Move symbols.h into MediaTek common directory
To reduce duplicate region declarations of MediaTek SoCs,
move the header file to a common directory.

BUG=b:317009620
TEST=Build geralt pass.

Change-Id: Iad1c9f520cdc5c6ad2b55e8f4ec6149fa47b17b1
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83570
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 14:06:28 +00:00
Arthur Heymans
27d24f21ab Makefile.mk: Mark stack as not executable
Suppress the warning:
    missing .note.GNU-stack section implies executable stack
    NOTE: This behaviour is deprecated and will be removed in a
    future version of the linker

Since we don't need an executable stack this is fine. Some newer
linkers like LLD even default to this.

Change-Id: Ib787cc464e0924ab57575cec9fbfd1d59bdd3481
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83560
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-22 14:05:53 +00:00
Arthur Heymans
c4b9206a22 Makefile.mk: Remove linker warning on RWX segments
Silence a linker warnings about segments with RWX. Having one segment
for all sections is a good design choice as it makes parsing the elf
into a loadable binary simpler.

Change-Id: I1e0f51c69dabaea314ac45924474d446a9ab68f4
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83559
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-22 14:05:27 +00:00
Shuo Liu
d12f317893 soc/intel/xeon_sp/spr: Return updated resource index for create_ioat_domain
create_ioat_domain creates the domain device with a number of
resources. Return the updated resource index so that the updated
index could be used as the starting index for additional resource
creation outside create_ioat_domain.

TEST=Build and boot on intel/archercity CRB

Change-Id: I9e719ae8407c7f31f88dbb407f003e2ded8f0faf
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83195
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-22 14:04:43 +00:00
Ashish Kumar Mishra
ae1cdeafa2 vc/google/chromeos: Add configurable compression for logo file in cbfs
This patch enables LZMA or LZ4 compression algorithm for the logo cbfs
file based on BMP_LOGO_COMPRESS_LZMA or BMP_LOGO_COMPRESS_LZ4 Kconfig.
Logo cbfs file is compressed based on CBFS_COMPRESS_FLAG, by default.
Based on logo file content and target platform, enabling LZ4 could
save significant boot time, with increase in file size.
For brox:
cb_logo LZ4 is +1265 bytes than LZMA, saves ~0.760ms in decomp.
cb_plus_logo LZ4 is +2011 bytes than LZMA, saves ~0.880ms in decomp.

BUG=b:337330958
TEST=Able to boot brox and verified firmware splash screen display
with LZMA and LZ4 compression.

Change-Id: I57fbd0d3a39eaba3fb9d61e7a3fb5eeb44e3a839
Signed-off-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83420
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 14:03:41 +00:00
Michał Żygowski
203b9fb352 soc/intel/alderlake/tcss: Add definition of IOM_READY bit
Add definition of the IOM_READY bit in the IOM_TYPEC_STATUS_1
register. Needed by Protectli VP66XX boards to poll for this bit
for about 2 seconds before FSP Silicon Init to have USB functionality.
ME is supposed to start fetching and executing the TCSS IPs FW right
after DRAM Init Done message, which happens after MRC. For most
platforms the time interval between the end of MemoryInit and start of
SiliconInit is enough for IOM_READY to get set.

TEST=Poll the IOM_READY bit on VP66XX platform and observe the
TCSS XHCI is up in lspci.

Change-Id: If868a77852468ebb73526b1571191cbdeb1804b9
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83356
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 13:59:32 +00:00
Tim Crawford
8b17b9b196 mb/system76/mtl: Add Darter Pro 10
The Darter Pro 10 (darp10) is an Intel Meteor Lake-H based board.

There are 2 variants to differentiate them as they have different
keyboards and so use different EC firmware.

- darp10: 16" model with 102 key keyboard
- darp10-b: 14" model with 83 key keyboard

Change-Id: Iaef03a47cf108591ef823bfa779777c7c05c6337
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82609
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 13:58:48 +00:00
Felix Held
a4b9c182dd soc/amd/common/root_complex: move IOHC_MMIO_EN definition to header
To be able to use the IOHC_MMIO_EN define in other compilation units,
move the define to the corresponding header file.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If88950418406d1709ed95b3d05f7e6ad66438f95
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-07-22 13:57:37 +00:00
Matt DeVillier
be06b8b98c payloads/edk2/Makefile: Add $(EDK2_PATH) as dependency for 'gop_driver' target
Without this, when doing a clean build with 'make j$(nproc)`, the build
can fail copying the GOP driver file since the target directory does
not exist yet.

TEST=build/boot google/hatch (akemi) w/edk2 payload and GOP driver init
on a clean git checkout.

Change-Id: Ic510d70041dc099e6bc469528b80d1e271976655
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83474
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-07-22 13:57:17 +00:00
Terry Cheong
a3d5444b54 mb/google/brya: change NAU8825 config to fix headset button detection
Brya/brask devices using NAU88L25 are not recognizing headset buttons
correctly. The reason is we are using wrong reference voltage of
MICBIAS. Use VDDA instead.

BUG=b:352215240
TEST=test with 3.5mm headset with buttons on volume up/down and pause

Change-Id: I0619021c6fd0a196c318aee58e07dc4149f1d64e
Signed-off-by: Terry Cheong <htcheong@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83470
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 13:57:04 +00:00
Rishika Raj
bd51c60322 mb/google/brya/variants/orisa: Change board strap memory config
Reorder GPIO pin mapping as per platform documentation:
* GPIO_MEM_CONFIG_0 -> GPP_E2
* GPIO_MEM_CONFIG_1 -> GPP_E1
* GPIO_MEM_CONFIG_2 -> GPP_E12
* GPIO_MEM_CONFIG_3 -> NC

BUG=None
TEST=emerge-nissa coreboot

Change-Id: I4e979686833095a904b114500dc1142def583afa
Signed-off-by: Rishika Raj <rishikaraj@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83549
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-22 09:45:31 +00:00
Subrata Banik
49bde8ce26 mb/google/brya/var/trulo: Add Audio descriptions
This patch adds descriptions for Audio device (Speaker, Jack and Mic)
to the device tree.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: Ied531dde856fb7c9a410b5667843c9be759cfc8f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 06:43:07 +00:00
Subrata Banik
1629f4bf7c mb/google/brya/var/trulo: Add eMMC descriptions
This patch adds descriptions for eMMC device (supported mode and DLL
tuning) to the device tree.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I8f1310313b8114731aa417610f245f94c8978ac0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 06:43:01 +00:00
Subrata Banik
5b761660c6 mb/google/brya/var/trulo: Add fw_config probe for storage devices
1. Add STORAGE_UNKNOWN fw_config to enable all storage devices,
this is used for the first boot in factory.

2. Add fw_config probe to enable/disable devices in devicetree, to
avoid suspend(s0ix) fail issue.

3. Disable eMMC controller incase STORAGE_UFS or STORAGE_NVME fw_config
is enabled.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: Ifdaa0bf35413981327097c260ab47e757f697e37
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 06:42:56 +00:00
Subrata Banik
039c7c8b01 mb/google/brya/var/trulo: Add CNVi descriptions
This patch adds descriptions for CNVi WiFi and BT device to the device
tree.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I7396917ca7875dcbe1d35a371cc450a9e070b18d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83551
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 06:41:50 +00:00
Subrata Banik
e60989db36 mb/google/brya/var/trulo: Add LSIO descriptions
This patch adds descriptions for Low Speed I/O (I2Cx, GSPIx, UARTx)
to the device tree.

It also includes entries that will generate ACPI code at runtime
with LSIO end-point device.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I94a3a7f6f85d84407f32ab4c879b236a80859f2d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83550
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 06:41:45 +00:00
Subrata Banik
3b3a052596 mb/google/brya/var/trulo: Add TCSS port descriptions
This patch adds descriptions for TCSS port, including over-current
(OC) pin configuration, to the device tree.

It also includes entries that will generate ACPI code at runtime
with port definitions, locations, and type information.

Additionally, implement the TCSS PMC MUX programming.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I60de314a92514d153ca039f6eaeb904b117b786c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83548
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 06:41:39 +00:00
Subrata Banik
4403c38498 mb/google/brya/var/trulo: Add USB2/3 port descriptions
This patch adds descriptions for USB2/3 ports, including over-current
(OC) pin configuration, to the device tree.

It also includes entries that will generate ACPI code at runtime with
port definitions, locations, and type information.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: I873810e401c4afdc162036f01bae7247f9b8c749
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83547
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-22 06:41:32 +00:00
Kun Liu
e5e683e84a mb/google/rex/variants/screebo: Generate RAM IDs
Generate 3 Samsung RAM IDs
K3KL9L90CM-MGCT  Samsung
K3KL6L60GM-MGCT  Samsung
K3KL8L80CM-MGCT  Samsung

BUG=b:331539447,b:333145301,b:333220620
TEST=Run part_id_gen tool without any errors

Change-Id: I4ba0fb409015c24446b2ae8e224fbce3910715e3
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83501
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-22 02:22:00 +00:00
Felix Singer
7d89c14c25 soc/intel/meteorlake/chip.h: Drop unused PmTimerDisabled setting
Change-Id: I6155ec45408dca83573c86e6db1ead5a82a0d77a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82994
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-21 07:05:42 +00:00
Subrata Banik
d6697cc918 mb/google/brya/var/trulo: Add minimal devicetree entries to boot
This patch adds minimal device entries and chip configs for Trulo
overridetree.cb to boot.

BUG=b:351976770
TEST=Builds successfully for google/trulo.

Change-Id: Ic8b90dbaaabb439c347a891650d255948d48810a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83546
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-21 05:02:15 +00:00
Subrata Banik
a468c84afe mb/google/brya: Centralize EC configuration in trulo baseboard
This change moves the EC configuration from the orisa variant to the
trulo baseboard, enabling reuse by other variants in the future.

BUG=b:351976770
TEST=Builds successfully for google/orisa.

Change-Id: Ib5611cf67a41950c1c4ce936a5d2bea7fdca5c68
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83544
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-21 05:02:04 +00:00
Subrata Banik
f945afc38d mb/google/brya: Centralize GPIO configuration in trulo baseboard
This change moves the GPIO configuration from the orisa variant to the
trulo baseboard, enabling reuse by other variants in the future.

BUG=b:351976770
TEST=Builds successfully for google/orisa.

Change-Id: If41c1b567a0ed6397bc935183c832a423f43e8b9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83545
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-21 05:01:32 +00:00
Subrata Banik
1cefae23f8 mb/google/brya: Enable SKIP_RAM_ID_STRAPS for TRULO variant
This change enables SKIP_RAM_ID_STRAPS for the TRULO board variant as
this board design won't stuff MEM strap GPIO hence, sets the static
SPD ID to 0 for the MT62F512M32D2DR-031 DRAM part.

BUG=b:351976770
TEST=Able to build google/trulo.

Change-Id: I1acb4680a143611c55f4fa6e032fde38c62af054
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-21 05:01:11 +00:00
Subrata Banik
0ec0f02e42 mb/google/brya/var/trulo: Populate DRAM configuration parameters
This patch adds key DRAM configuration parameters as below:
- Rcomp
- DQ byte map
- DQS CPU<>DRAM map
- ECT
- CCC Mapping
- SPD Index

Source: Trulo Schematics Rev0.5 (dated June'24)

BUG=b:351976770
TEST=Able to build google/trulo.

Change-Id: Ie7abc393a71becf26d53ae9e4fc56f66c7117051
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83541
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-21 05:01:02 +00:00
Subrata Banik
e8284e42c5 mb/google/brya/var/trulo: Add LPDDR5 DRAM (MT62F512M32D2DR-031)
This patch adds Micron Technology LPDDR5 DRAM
(part: MT62F512M32D2DR-031) for Trulo.

Make use of spd_tools to generate SPD file after following the below
steps:

1. make -C util/spd_tools
2. ./util/spd_tools/bin/part_id_gen ADL lp5
   src/mainboard/google/brya/variants/trulo/memory
   src/mainboard/google/brya/variants/trulo/memory/mem_parts_used.txt

Output files are:
1. dram_id.generated.txt
2. Makefile.mk

BUG=b:351976770
TEST=Able to build google/trulo.

Change-Id: Id35f6b57b716375abb66db187413f0f82361d962
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83539
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-21 05:00:44 +00:00
Tongtong Pan
0b9920b4f8 mb/google/dedede/var/awasuki: Add initial GPIOs config
Configure GPIOs according to schematics revision 20240712.

BUG=b:351968527
TEST=abuild -v -a -x -c max -p none -t google/dedede -b awasuki

Change-Id: Ic8f346b788b489f50ab96c0ace8541720a832f72
Signed-off-by: Tongtong Pan <pantongtong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83449
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
2024-07-19 16:40:12 +00:00
Tongtong Pan
38443fb8e4 mb/google/dedede/var/awasuki: Generate 3 RAM IDs
Vendor	DRAM Part Name			Type
SAMSUNG	K4U6E3S4AB-MGCL			LP4X
SAMSUNG	K4UBE3D4AB-MGCL			LP4X
MICRON	MT53E1G32D2NP-046 WT:B		LP4X

BUG=b:351968527
TEST=Run part_id_gen tool without any errors

Change-Id: I9a03c86770101ec70c2ee5d6b914313c1bf23b5f
Signed-off-by: Tongtong Pan <pantongtong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83427
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-07-19 16:39:57 +00:00
Tongtong Pan
add944eceb mb/google/dedede: Create awasuki variant
Create the awasuki variant of the waddledee reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.5.0.)

BUG=b:351968527
BRANCH=None
TEST=util/abuild/abuild -p none -t google/dedede -x -a
make sure the build includes GOOGLE_AWASUKI

Change-Id: If18afc92afdbdff5df3f5b034f4357feda6690b0
Signed-off-by: Tongtong Pan <pantongtong@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dolan Liu <liuyong5@huaqin.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-07-19 16:39:43 +00:00
Michał Żygowski
1236b1c603 superio/ite: Enable common driver for GPIO and LED configuration
Enables the driver for ITE SIOs supporting the GPIO register layout
(confirmed with datasheets for the modified ITE SIO Kconfigs, SIOs
with unavailable datasheets are unmodified).

Other ITE SIOs may select it with SUPERIO_ITE_COMMON_GPIO_PRE_RAM
and must then provide the number of GPIO sets specific to a chip
via SUPERIO_ITE_COMMON_NUM_GPIO_SETS.

Change-Id: I0868ff3e9022b135c21f4c1a6746d6440b8f0798
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83468
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-19 14:35:38 +00:00
Michał Żygowski
d1efb66be6 superio/ite/common: Add common driver for GPIO and LED configuration
Add a generic driver to configure GPIOs and LEDs on common ITE
SuperIOs. The driver supports most ITE SuperIOs, except Embedded
Controllers. The driver allows configuring every GPIO property
with pin granularity.

Verified against datasheets of all ITE SIOs currently supported by
coreboot, except IT8721F (assumed to be the same as IT8720F),
IT8623E and IT8629E.

Change-Id: If610d2809b56c63444c3406c26fad412c94136a5
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83355
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-19 14:35:09 +00:00
Jincheng Li
eff64c6757 arch/x86: Decouple socket type from SoC type
Change-Id: I2e15f26436626fbde7a93b47bea9f2601a302ffe
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83330
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-07-19 12:35:16 +00:00
Jincheng Li
04340496c1 cpu/intel: Add socket types
Add socket types for LGA1700, LGA3647_1, LGA4189, LGA4677.
Select the socket type for different boards.
For the socket types which are not defined in SMBIOS type4,
CPU_INTEL_SOCKET_OTHER could be used.

Change-Id: Ida3315694f3ce397b9ad9d676d3195da5f096cb7
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83329
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-07-19 12:35:09 +00:00
Subrata Banik
4cf322eda5 device/pci_ids: Add new Intel PTL device IDs for CNVi
This patch adds new CNVi PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the CNVi driver's `pci_device_ids` list to
include these new IDs.

Finally, dropped unused BT PCI IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I7d80403b87537aea41ff48ff6d274180577f1ac6
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83520
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 03:56:13 +00:00
Subrata Banik
c901841ec1 device/pci_ids: Remove unused Intel UFS device IDs
This patch removes the PCI device IDs for Intel LNL and PTL UFS
devices from `pci_ids.h` as they appear to be unused in the codebase.

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Ic795dd2e83c361a2aa04267d4663cf6bb9a755e2
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83519
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-19 03:56:08 +00:00
Subrata Banik
e5b53d9400 device/pci_ids: Add new Intel PTL device IDs for XDCI
This patch adds new XDCI PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the XDCI driver's `pci_device_ids` list to
include these new IDs.

Finally, dropped unused TCSS XDCI PCI IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I51196401904e2402ac7669fa852a541bb7c2d453
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83518
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-19 03:56:03 +00:00
Subrata Banik
c54d186717 device/pci_ids: Add new Intel PTL device IDs for CSE0
This patch adds new CSE0 PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the CSE0 driver's `pci_device_ids` list to
include these new IDs.

Finally, dropped unused CSE1-3 PCI IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I5656aeb8c5439c8361aeb3a3d759df1216d84f8b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83517
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 03:55:59 +00:00
Subrata Banik
f79e0893cd device/pci_ids: Add new Intel PTL device IDs for Audio
This patch adds new Audio (HDA/DSP) PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the Audio driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I3c9e420a6ae19d00fb5510c99d4c219dc43ad3c0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83516
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-19 03:55:53 +00:00
Subrata Banik
92ce786183 device/pci_ids: Add new Intel PTL device IDs for SRAM
This patch adds new SRAM PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the SRAM driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Ib6d62dad59965258dab453533dface9c359de586
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83515
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-19 03:55:47 +00:00
Subrata Banik
af8caf9e67 device/pci_ids: Add new Intel PTL device IDs for P2SBx
This patch adds new P2SBx PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the P2SBx driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Ie1c36bc1c014bb1e219afe0cafb6c9941f253b0c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-19 03:55:39 +00:00
Subrata Banik
f234cf4b21 device/pci_ids: Add new Intel PTL device IDs for XHCI/TCSS XHCI
This patch adds new XHCI/TCSS XHCI PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the XHCI driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I5ae8f493374087a5e684e0a04486cd64cea6f335
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83513
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 03:55:34 +00:00
Subrata Banik
c27ccb98b5 device/pci_ids: Add new Intel PTL device IDs for SMBUS
This patch adds new SMBUS PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the SMBUS driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I4b8b59cf4e005f0e17a25d0fbe761404dab432b3
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83512
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-19 03:55:29 +00:00
Subrata Banik
42c1f9c5fa device/pci_ids: Add new Intel PTL device IDs for Fast-SPI and GSPIx
This patch adds new Fast-SPI and GSPIx PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the SPI driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I5c7c0be6f219c93d4520494857d31ce1cf939f36
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83511
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-19 03:55:24 +00:00
Subrata Banik
661382960f device/pci_ids: Add new Intel PTL device IDs for UARTx
This patch adds new UARTx PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the UART driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I384a753f08ae5a752cef6009d07104e8ff4b4a6e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83510
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-19 03:55:18 +00:00
Subrata Banik
49eda5b524 device/pci_ids: Add new Intel PTL device IDs for I2Cx
This patch adds new I2Cx PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the I2C driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I79ba0b563146d658521cdd40aabb3ee882f4d187
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83509
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 03:55:12 +00:00
Subrata Banik
a3b1e400d3 device/pci_ids: Add new Intel PTL device IDs for PMC
This patch adds new PMC PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the PMC driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Iae468fdace2d9cfd532957e4f3c55b89b96a52a0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83508
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-19 03:55:07 +00:00
Subrata Banik
d8f8574a59 device/pci_ids: Add new Intel PTL device IDs for PCIe
This patch adds new PCIe Root Port PCI device IDs for Intel PTL-U
and PTL-H.

Additionally, updates the PCIe driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I5913c6ac0a4766c14f23954be1e885d45f69d36a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83507
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-19 03:55:01 +00:00
Subrata Banik
3c192de91f device/pci_ids: Add new Intel PTL device IDs for eSPI/LPC
This patch adds new eSPI/LPC PCI device IDs for Intel PTL-U and PTL-H.

Additionally, updates the LPC driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Ie9f0ea9536e2f73c2258e9e12b510d21212248ea
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-19 03:54:55 +00:00
Subrata Banik
9ad48e9ea4 device/pci_ids: Add new Intel PTL device IDs for ISH
This patch adds new ISH PCI device IDs for Intel PTL-U and PTL-H.

Additionally, updates the ISH driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: I280cfdb50e8d453e957cb4bccff3a7ee2fb3bd10
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83505
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-19 03:54:49 +00:00
Subrata Banik
a52e8e7b86 device/pci_ids: Add new Intel PTL device IDs for DID2
This patch adds new DID2 PCI device IDs for Intel PTL-U and PTL-H.

Additionally, updates the graphics driver's `pci_device_ids` list to
include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Iab499070c87e020e36901b4ea453a1893bd16ea0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83491
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 03:54:44 +00:00
Subrata Banik
9106a5a346 device/pci_ids: Add new Intel PTL device IDs for DID0
This patch adds new DID0 PCI device IDs for Intel PTL-U and PTL-H.

Additionally, updates the System Agent driver's `systemagent_ids` list
to include these new IDs.

Source: Intel PTL-EDS vol 1. Document Number 815002, Rev 0.51 Chapter 2

BUG=b:347669091
TEST=Able to build google/fatcat.

Change-Id: Ie4d77eb489e16d18b996fdda3216e1275083d7e7
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83490
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 03:54:38 +00:00
Yu-Ping Wu
c0540a3fc2 security/vboot: Introduce vbnv_platform_init_cmos()
Most x86 platforms use CMOS as the vboot nvdata (VBNV) backend storage.
On some platforms such as AMD, certain CMOS registers must be configured
before accessing the CMOS RAM which contains VBNV. More precisely,
according to AMD's spec [1], the bit 4 of Register A of CMOS is bank
selection. Since VBNV is accessed via bank 0 (see the MC146818 driver),
the bit must be cleared before the VBNV can be successfully written to
CMOS. Saving VBNV to CMOS may fail in verstage, if CMOS has lost power.
In that case, all the CMOS registers would contain garbage data.
Therefore, for AMD platforms the bit must be cleared in verstage, prior
to the first save_vbnv_cmos() call.

Introduce vbnv_platform_init_cmos(), which is no-op by default, and can
be defined per platform. The function will be called from vbnv_init() if
VBOOT_VBNV_CMOS.

[1] 48751_16h_bkdg.pdf

BUG=b:346716300
TEST=none
BRANCH=skyrim

Change-Id: Ic899a827bd6bb8ab1473f8c6c03b9fde96ea6823
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83494
Reviewed-by: Bao Zheng <fishbaozi@gmail.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-19 00:40:21 +00:00
Felix Singer
1b19d292db tgl,adl,rpl mainboards: Drop superfluous cpu_cluster device
The cpu_cluster device is defined in the chipset devicetree. So drop it
from the mainboards.

Change-Id: Ib84e7804c03f1c0779ab7053a09e397a267a3844
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83523
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 23:35:41 +00:00
Felix Singer
bf9910f265 soc/intel/tigerlake: Add cpu_cluster device to PCH-H devicetree
Change-Id: I30a98ae4989edc97d56d2b538930b3c67565d9dc
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83536
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2024-07-18 23:35:29 +00:00
Felix Singer
83387c97fb util/liveiso/nixos: Install various extractor tools
Firmware files are packaged in various formats and very often some
Windows-only executable is used for unpacking files. These extractors
allow to deal with some of them without having to run the executables.

Change-Id: I1346807508a6baba801c4d5ed0a575b17e06c8d4
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83522
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-07-18 23:30:44 +00:00
Daniel_Peng
3b07a890b5 mb/google/nissa/var/glassway: Add WIFI_SAR_ID_1
Set "option WIFI_SAR_ID_1 1" for WIFI_SAR_ID field in fw_config.

BUG=b:347108861
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I179dad5eeabc1d84aa0a2de5359be5848a2ecc39
Signed-off-by: Daniel_Peng <Daniel_Peng@pegatron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83478
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 09:23:43 +00:00
Yu-Ping Wu
b9a52a4c8d drivers/pc80/rtc/mc146818rtc: Use macros for CMOS addresses
Replace integer literals with macros for CMOS addresses for readability.

Change-Id: I454662c90fabb41af864728febdefa57f5ff2cb2
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83477
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-07-18 08:14:52 +00:00
Subrata Banik
41723aee67 soc/intel/meteorlake: Remove p2sb.c from bootblock build
This patch removes `p2sb.c` from the bootblock build for the
Meteor Lake platform.

BUG=none
TEST=Builds successfully for google/rex.

Change-Id: Ib2beeee68bb20568888d4b555c2fa82e0bf0fd3c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83489
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-07-18 06:01:48 +00:00
Subrata Banik
15cfc5df3a soc/intel/tigerlake: Switch to common eSPI header
This patch updates Tiger Lake code to use the common eSPI header file
(`intelpch/espi.h`) instead of the SoC-specific one.

BUG=none
TEST=Builds successfully for google/volteer.

Change-Id: I01eca0ab132b1788c4633d0e214d4dfde25f5b98
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83488
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 06:01:44 +00:00
Subrata Banik
825092a621 soc/intel/meteorlake: Switch to common eSPI header
This patch updates Meteor Lake code to use the common eSPI header
file(`intelpch/espi.h`) instead of the SoC-specific one.

BUG=none
TEST=Builds successfully for google/rex.

Change-Id: Ibb37413bb6c925650f55b0dcf70e7483bf257888
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83487
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-18 06:01:39 +00:00
Subrata Banik
59e65e9377 soc/intel/jasperlake: Switch to common eSPI header
This patch updates Jasper Lake code to use the common eSPI header
file (`intelpch/espi.h`) instead of the SoC-specific one.

BUG=none
TEST=Builds successfully for google/dedede.

Change-Id: I93dcd26588111d848be1580220945687890ef3b8
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-18 06:01:34 +00:00
Subrata Banik
651428b984 soc/intel/elkhartlake: Switch to common eSPI header
This patch updates Elkhart Lake code to use the common eSPI header
file(`intelpch/espi.h`) instead of the SoC-specific one.

BUG=none
TEST=Builds successfully for Intel Elkhartlake platform.

Change-Id: Iaef308ad1c8ecfb11448e75f39285a2170bbc49c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83485
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 06:01:29 +00:00
Subrata Banik
6b51ac0850 soc/intel/alderlake: Switch to common eSPI header
This patch updates Alder Lake code to use the common eSPI header file
(`intelpch/espi.h`) instead of the SoC-specific one.

BUG=none
TEST=Builds successfully for google/redrix.

Change-Id: Ib4452547325042de48ee4fca3d3910a031b56b64
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83484
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 06:01:21 +00:00
Subrata Banik
0c66434b83 soc/intel/cmn/pch: Consolidate eSPI.h into IA common code
This patch moves the SoC-specific `eSPI.h` file into the IA common
code to promote code reuse and reduce duplication across different
SoC generations.

TEST=Builds successfully for google/rex.

Change-Id: Icb09421eec45c1ef8ab50252543b000078f18b21
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83483
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-18 06:01:14 +00:00
Subrata Banik
e7c926482d soc/intel/meteorlake: Use common CAR API for cache reporting
Replace the SoC-specific `report_cache_info()` function with the
common `car_report_cache_info()` API from `car_lib`. This promotes code
reuse and reduces SoC-specific implementation for cache reporting.

BUG=none
TEST=Builds and boots successfully on google/rex platform.

Change-Id: Id5ffcab54232294ffa101f975d0ec51ac63f1910
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83482
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-18 06:01:05 +00:00
Subrata Banik
84c0d95f3f soc/intel/alderlake: Use common CAR API for cache reporting
Replace the SoC-specific `report_cache_info()` function with the
common `car_report_cache_info()` API from `car_lib`. This promotes code
reuse and reduces SoC-specific implementation for cache reporting.

BUG=none
TEST=Builds and boots successfully on google/marasov platform.

Change-Id: I18be2c33dbe5186643af52823eb2fb185a296909
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83481
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 06:00:57 +00:00
Subrata Banik
4c5c685882 soc/intel/cmn/cpu: Introduce common CAR APIs
This patch adds `car_lib.c` to the IA common code to consolidate
SoC-agnostic CAR APIs. Initially, it includes `car_report_cache_info()`
to provide a unified way to read cache information, reducing the need
for SoC-specific implementations.

TEST=Builds successfully for google/rex.

Change-Id: I2ff84b27736057d19d4ec68c9afcb9b22e778f55
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83480
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-18 06:00:51 +00:00
Subrata Banik
5909389057 soc/intel/mtl: Enable eSOL for x86_64 arch
This change removes the condition that
SOC_INTEL_METEORLAKE_SIGN_OF_LIFE is only enabled for x86_32 arch.
Now, it is safe to enable eSOL for x86_64 platform as well.

BUG=b:346682156
TEST=Able to see eSOL on google/rex64.

Change-Id: I825c988800ec303a8f37141f6487115b1c7c5d3a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83498
Reviewed-by: YH Lin <yueherngl@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 06:00:14 +00:00
Subrata Banik
cc7c1e33d5 mb/google/brya: Add config options for TRULO board
This change adds the necessary Kconfig options to enable support for
the TRULO board, including selecting the appropriate baseboard,
HDA verb table, and TCSS configuration.

Additionally, corrected the TPM_TIS_ACPI_INTERRUPT from `13` to `17`
for Trulo as applicable.

BUG=b:351976770
TEST=Able to build google/trulo.

Change-Id: I5c1cbd56cf2734058aced35868ae42c1c160f62e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83500
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 05:59:46 +00:00
Subrata Banik
a1d58894bf mb/google/brya/variants/trulo: Include hda_verb.c
This change adds hda_verb.c to the ramstage build, but only when the
CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB config option is enabled.

BUG=b:351976770
TEST=Able to build google/trulo.

Change-Id: I9b17126ff1493b5714d6ae715ad2863bdff4ed46
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83499
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 05:59:41 +00:00
Subrata Banik
31c123640e mb/google/brya: Standardize TPM TIS ACPI interrupt configuration
This patch sets a default value of 13 (GPE0_DW0_13/GPP_A13_IRQ) for
the `TPM_TIS_ACPI_INTERRUPT` configuration option across most Google
Brya variants. The HADES board uses interrupt 20 (GPE0_DW0_20/
GPP_A20_IRQ), and the ORISA board uses interrupt 17 (GPE0_DW0_17/
GPP_A17_IRQ).

This refactoring simplifies future additions of board-specific TPM
interrupt configurations, improving maintainability.

BUG=none
TEST=The timeless builds with this patch for both Nissa and Brya
devices produce the same binaries.

Change-Id: I9d913bf3da6957ab5c700dd746bc4b5350427d73
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83493
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-18 05:59:34 +00:00
Emilie Roberts
e638a113fa mb/google/brya: Fix pmc_mux port mapping for mithrax and felwinter
Fixes a pmc_mux port mapping error introduced in coreboot
commit 4fa8354

Mithrax and felwinter do not have sequential mux_conn[X] to connY
mappings which led to the kernel subsystem linking between Type C
connectors and USB muxes to be incorrect. The previous patch
attempted to fix this by changing the custom_pld layout. However
this broke USB usage except for charging.

This patch reverts the custom_pld layout and instead changes the pmc
hidden and tcss_xhci port mappings to match the hardware layout.

BUG=b:352512335 b:329657774 b:121287022 b:321051330 b:204230406
TEST=emerge-${BOARD} coreboot
TEST=Manually check that usb-role-switches are mapped to the correct
    port.
  Attach USB 3 A to C cable from development machine to left port of
    DUT.
  Attach nothing to right-hand port.
  ectool commands below are only for felwinter as a workaround for
    devices without a firmware patch to connect superspeed lines.
  ectool usbpd 0 none
  ectool usbpd 0 usb
  ectool usbpd 1 none
  ectool usbpd 1 usb
  echo host > /sys/class/typec/port0/usb-role-switch/role (should
    succeed)
  ls -l /sys/class/typec/port0/usb-role-switch (note CONX-role-switch)
  echo host > /sys/class/usb_role/CONX-role-switch/role (should succeed)
  echo host > /sys/class/typec/port1/usb-role-switch/role (should fail
    as no cable attached)
  ls -l /sys/class/typec/port1/usb-role-switch (note CONY-role-switch)
  echo host > /sys/class/usb_role/CONY-role-switch/role (should fail
    as no cable attached)
BRANCH=firmware-brya-14505.B

Change-Id: Iebd259842d3affa259069cd776b46759c1c60712
Signed-off-by: Emilie Roberts <hadrosaur@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83472
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-16 14:22:02 +00:00
Felix Singer
494a593d81 util/liveiso/nixos: Install TPM related tools
Change-Id: Idbf4f40f495fac6c08a9017bfbff25043d7fbb82
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-07-16 10:57:43 +00:00
Subrata Banik
408b409c2d util/cbfstool: Add eventLog support for ELOG_TYPE_FW_LATE_SOL
In order to support logging events for when we show early signs
of life to the user during CSE FW syncs add support for the
ELOG_TYPE_FW_LATE_SOL type.

BUG=b:305898363
TEST=verify event shows in eventlog CSE sync.

Change-Id: I862db946f6ff622ac83072e6bf27832732c0c318
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83462
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-16 05:05:51 +00:00
Subrata Banik
ca75c29271 commonlib: Add ELOG_TYPE_FW_LATE_SOL eventLog type
Add a new eventLog type of ELOG_TYPE_FW_LATE_SOL to support logging
when we show late (from payload) Signs Of Life (SOL) to the user.

BUG=b:305898363
TEST=Event shows in eventlog tool after CSE sync:
```
Late Sign of Life | CSE Sync Late SOL Screen Shown
```

Change-Id: Ibbe9f37a791e5c2a0c6e982942cf3043a2bd4b45
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83461
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-16 05:05:45 +00:00
Jeremy Compostella
dc35e66880 drivers/wifi: Support Radio Frequency Interference Mitigation
The 'Radio Frequency Interference Mitigation' DSM function 11
provides the desired status of the RFI mitigation.

The implementation follows document 559910 Intel Connectivity
Platforms BIOS Guideline revision 8.3 specification.

BUG=b:352768410
TEST=ACPI DSM Function 11 reflects the value of the SAR binary

Change-Id: I02808b0ce6a0a380845612e774e326c698ad1adc
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-15 18:15:40 +00:00
Jeremy Compostella
dd4b3aa7b9 drivers/wifi: Support Energy Detection Threshold
The 'Energy Detection Threshold' DSM function 10 provides the desired
status of the EDT optimizations.

The implementation follows document 559910 Intel Connectivity
Platforms BIOS Guideline revision 8.3 specification.

BUG=b:352788465
TEST=ACPI DSM Function 10 reflects the value of the SAR binary

Change-Id: I2e2e9d4f5420020bd7540cb36fa8aebfedf62285
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83430
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-07-15 18:14:58 +00:00
Felix Held
6b82519cba soc/amd/phoenix/include/gpio: update GPIO HID to AMDI0030
The UEFI reference firmware uses AMDI0030 instead of AMD0030 as HID for
the GPIO controller.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4a6fa1acdca0ee5b6e1358b6279b7c501d3dfd16
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83439
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-07-15 18:08:06 +00:00
Felix Held
5d281e5007 soc/amd/glinda/include/gpio: update GPIO HID to AMDI0030
The UEFI reference firmware uses AMDI0030 instead of AMD0030 as HID for
the GPIO controller.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8dd48d7d9cf3f6d75853bb825e5ddc32bba430b8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83438
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-07-15 18:08:00 +00:00
Felix Held
4affdcea86 soc/amd/glinda/include/gpio: update to match hardware
The table "IOMUX Functional Table" in PPR #57254 rev. 1.60 was used as a
reference. This should fix the ESPI_ALERT_D1 IOMUX setting for the
boards using the Glinda SoC which previously didn't match the hardware.
Compared to Phoenix, Glinda has two more chip select outputs for the
SPI2 controller and an additional ZST_STUTTER_RAIL IOMUX function.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id9adfbe0c7aee90d6fe990f239d82a1d013e7f5f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83437
Reviewed-by: Anand Vaikar <a.vaikar2021@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-07-15 18:07:53 +00:00
Anastasios Koutian
524fc52bdd mb/lenovo/t420: Use vendor default power limits
Also set the vendor default TCC offset temperature

Change-Id: Ia187b67ae28fbcda7d5d0e35ec64a3b21d97a21b
Signed-off-by: Anastasios Koutian <akoutian2@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83280
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-15 16:35:24 +00:00
Anastasios Koutian
3c9944ea41 cpu/intel/model_206ax: Allow turbo boost ratio limit configuration
Tested on ThinkPad T420 with the i7-3940XM.

Change-Id: I1c65a129478e8ac2c4f66eb3c6aa2507358f82ad
Signed-off-by: Anastasios Koutian <akoutian2@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-15 16:34:17 +00:00
Anastasios Koutian
3dbf0c5c5f cpu/intel/model_206ax: Allow package power limit clamping
Setting the clamp bit allows the CPU to operate below the highest
non-turbo frequency in order to obey the power limit.

Tested on ThinkPad T420 with the i7-3940XM.

Change-Id: Id0c0aedc29aca121d0fd1d8f8826089e13a026be
Signed-off-by: Anastasios Koutian <akoutian2@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-15 16:34:11 +00:00
Felix Singer
a5705f701d mb/clevo/cml-u/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: Ifc882c2ac9d4e9ce2ed4305bdd6859a5d1e1b09c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83441
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2024-07-15 07:25:59 +00:00
Nicholas Sudsgaard
b205f4e53e util: Add hda-decoder
This tool helps take off the burden of manually decoding default
configuration registers. Using decoded values can make code more
self-documenting compared to shrouding it with magic numbers.

This is also written as a module which allows easy integration with
other tools written in Go (e.g. autoport).

Change-Id: Ib4fb652e178517b2b7aceaac8be005c5b2d3b03e
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80470
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2024-07-15 07:22:32 +00:00
Felix Singer
b0fa6683de mb/google/poppy: Drop superfluous devices from devicetree
In order to clean up a bit, drop devices which are equivalent to the
ones from chipset devicetree.

Change-Id: Ief199db47fc529c510709ac37be6014b63244e84
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83454
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-15 02:10:39 +00:00
Iru Cai
3f0bb2fb07 autoport: Add support for Haswell-Lynx Point platform
Tested with the following devices (not exhaustive):
- Dell Latitude E7240
- Dell Precision M6800 and M4800
- Asrock Z87E-ITX
- Asrock Z87M OC Formula
- Asrock Fatal1ty Z87 Professional

Change-Id: I4f6e8c97b5122101de2f36bba8ba9f8ddd5b813a
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/30890
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-14 09:58:34 +00:00
Felix Singer
779f3c06f8 cfl/cml/whl mainboards: Drop superfluous cpu_cluster device
The cpu_cluster device is defined in the chipset devicetree. So drop it
from the mainboards.

Change-Id: I65bfeaf0b8771c123c0615531c2cc608b222949b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83440
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-13 22:06:14 +00:00
Matt DeVillier
cb922edbf6 mb/google/byra: Add VBTs for variants missing them
Several brya variants were missing VBT files, add and select them in
Kconfig.

Also select in Kconfig for VELL, which already had a VBT but was not
using/selecting it.

TEST=build/boot google/brya (marasov), verify display init functional
/ payload screen shown.

Change-Id: I6848c2b78cf37157299d94bf12c0b6d925ea1432
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83434
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-13 20:54:49 +00:00
Matt DeVillier
96df8b697f mb/google/hatch/var/jinlon: Replace hardcoded address with device type
Eliminates the use of a magic number, and the resulting DID entry in
the _DOD method is the same. The first entry was already changed in
commit 1810a1841528 ("mb/google/*: Replace use of gfx/generic addr
field with display type"), this one was missed.

TEST=build/boot google/jinlon w/o privacy screen, dump SSDT and verify
DID entry is unchanged but _ADR is now correct (since the DID flags are
not part of the address field).

Change-Id: Ief22928ea831d4cb5b483406ac388218a97ad98b
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-13 20:53:05 +00:00
Felix Singer
4250266bb7 mb/system76/whl-u/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: Iebe5f8729d463767f5a1b52c375d11bb9d413144
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78840
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2024-07-13 20:02:33 +00:00
Felix Singer
f67238ef76 mb/system76/oryp5/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: I4769f255ce5652a9969ad6535c997ec1ad0be8d2
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78839
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2024-07-13 20:02:26 +00:00
Felix Singer
42130522a5 mb/system76/cml-u/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: Ic33bf07041a8c966dce66109c577621513147609
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78838
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-13 20:02:19 +00:00
Felix Singer
dfc0ac0f95 mb/system76/addw1/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: Ide536c74683416b34b0984fe1bddb250e72b045b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78837
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2024-07-13 20:02:13 +00:00
Felix Singer
265897f9af mb/system76/oryp6/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: Id3605e8e05d9d97a73af966459692276265df8bc
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78836
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-13 20:02:06 +00:00
Felix Singer
5ca2d7ad99 mb/system76/bonw14/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: I2b0e19581e0f0111a56bc57185acfcdd70588141
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78835
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-13 20:02:01 +00:00
Felix Singer
108c9f6bb0 mb/system76/gaze15/dt: Make use of chipset devicetree
Make use of the alias names defined in the chipset devicetree and remove
devices which are equal to the ones from the chipset devicetree.

Change-Id: I290fcfdd7b2cff61c4f6cd153133c5205c6fd6d1
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2024-07-13 20:01:54 +00:00
Subrata Banik
67d01fd7ad libpayload: Unconditionally handle "CBMEM_ID_CSE_*" entries
This change removes the unnecessary conditional compilation around
CBMEM_ID_CSE_BP_INFO and CBMEM_ID_CSE_INFO handling in
cb_parse_cbmem_entry. These CBMEM IDs are only relevant on platforms
with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD enabled, and platforms without
this config option won't encounter these IDs when calling
cb_parse_cbmem_entry().

BUG=b:305898363
TEST=Builds and boots successfully:
    * google/rex0 with SOC_INTEL_CSE_LITE_SKU
    * google/rex64 with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD

Change-Id: Icf056f8426015e99509be5f5a67cb66468645cd9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83436
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-07-13 17:54:41 +00:00
Jamie Chen
5e21a96efc soc/intel/alderlake: Fix system hang by enabling SMI handling
Issue: System hang occurred due to unhandled SPI synchronous SMI,
triggered by LOCK_ENABLE bit and WPD assertion.

Solution: Enabled SOC_INTEL_COMMON_BLOCK_SMM_TCO_ENABLE configuration
to allow the system to handle and clear SPI synchronous SMI.

BUG=b:350623902
TEST=reboot test on 40 google/xol by ODM, all passed w/o
hang.

Change-Id: I4c14b1e3d537e46e671e950c91c9d0042fe26836
Signed-off-by: Jamie Chen <jamie.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83432
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: SH Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-by: Edward Doan <edoan@chromium.org>
2024-07-13 12:34:49 +00:00
Shon
acf5d16e15 mb/google/brask/var/bujia: remove DPTF fan control
Fan control is assign to EC handle now. Remove relate setting on coreboot.

BUG=b:351917517
BRANCH=firmware-brya-14505.B
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: Iff0776ce3db6f27e250162357abb3c7e9b1a0dc3
Signed-off-by: Shon <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83380
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-13 12:34:20 +00:00
Felix Singer
88bc0f1604 skl/kbl mainboards: Move PCIe related settings into their device scope
Change-Id: I1ffa87eeee521180f37371e5a0d1f9a1a06091aa
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83373
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-07-12 20:08:01 +00:00
Sowmya Aralguppe
702902d71f soc/intel: Adapt crashlog IP to also support 64-bit
This patch extends the crashlog IP support beyond 32-bit mode to
support Intel future generation SoCs, which may require crashlog
support for 64-bit architectures. uintptr_t data type is used for
Address pointers and void* for dereferencing

BUG=b:346676856
TEST=Successfully built Meteor Lake (rex) and tested for google/rex0
and google/rex64 images.

Change-Id: I552257d3770abb409e2dcd8a13392506b5e7feb7
Signed-off-by: Sowmya Aralguppe <sowmya.aralguppe@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83106
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-12 18:37:54 +00:00
Wentao Qin
c0871f62f7 mb/google/brox/var/lotso: Add FW_CONFIG for FP
This patch adds FW_CONFIG to accommodate different Lotso BoM
components across various SKUs.
1. Fingerprint sensor - FP Present/Absent

BUG=b:350360162
BRANCH=None
TEST=Boot image on SKU2 and check FP working.

Change-Id: I1ee5fcd1c29099bdbee741ef76c00cf45fcc1189
Signed-off-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83388
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-12 17:07:22 +00:00
Jeremy Compostella
9a31ba0ad2 mb/intel/mtlrvp: Set USB2-10 as cnvi_wifi bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

This commit also updates the USB2 port 10 description and set its type
to the more appropriate `UPC_TYPE_INTERNAL' type.

BUG=b:348345301
TEST=BRDS method is added to the CNVW device and returns the data
     supplied by the SAR binary blob

Change-Id: I66c9b75d2aaa1b221313b037defcd2c579fd6b61
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83310
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
2024-07-12 16:13:27 +00:00
George Burgess IV
794934cbee amdfwtool: make fields unsigned
The value stored in `gen` is only ever `1` or `0`. Storing `1` causes
Clang to warn, since the only valid values for a 1-bit int are -1 and 0:
```
amdfwtool.c:1487:27: error: implicit truncation from 'int' to a one-bit
wide bit-field changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]
 1487 |                 amd_romsig->efs_gen.gen = EFS_BEFORE_SECOND_GEN;
```

TEST=Rebuilt coreboot; no warning was emitted.

Change-Id: Ibd83be8302e8a717db7e7dc86a403b5648976586
Signed-off-by: George Burgess IV <gbiv@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83412
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2024-07-12 16:01:54 +00:00
David Wu
04937a9a20 mb/google/nissa/var/riven: add fw_config probe for storage devices
1. Add STORAGE_UNKNOWN fw_config to enable all storage devices,
this is used for the first boot in factory.

2. Add fw_config probe to enable/disable devices in devicetree
instead of variant.c, it can avoid suspend(s0ix) fail issue.

BUG=b:328580882
TEST=On riven eMMC and UFS SKUs, boot to OS and run
`suspend_stress_test -c 10` pass.

Change-Id: I518f1a5955fb88f304663112f1e3d4c744bde183
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83405
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-12 11:43:28 +00:00
Shon
4e279e5971 mb/google/brask/var/bujia: Disable thunderbolt
Bujia does not support Thunderbolt anymore,
therefore disable related TBT setting.
The bujia fit image CL, cf. chrome-internal:7468938.

BUG=b:349923139
BRANCH=firmware-brya-14505.B
TEST= USE="-project_all project_bujia" emerge-brask coreboot.

Change-Id: I4301a1f744aa9d4de9f0eba4147c49a4bb3ed922
Signed-off-by: Shon <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83402
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-12 11:41:48 +00:00
Subrata Banik
7233ad57e6 soc/intel/cmn/cse: Correct CMOS error message for CSE partition firmware
The CMOS entry for CSE partition firmware was incorrectly labeled as
`ramtop` and `partition firmware` in the error messages.

This patch corrects the messages to accurately refer to `CSE partition
firmware`.

Additionally, the alignment and size check comments are updated to
reflect this change.

Change-Id: Ib3a7fb88f52c4d0c47d828bcd1c4649e62d19654
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83415
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-12 05:49:31 +00:00
Matt DeVillier
2fa5e9fc6f Update amd_blobs submodule to upstream main
Updating from commit id ae5fc7d:
2024-03-15 19:58:57 +0100 - (picasso: Update PSP fw to version
00.08.14.7B)

to commit id 26c5729:
2024-07-10 10:10:50 -0500 - (CZN: Update SMU fw to 64.72.0)

This brings in 2 new commits:
26c5729 CZN: Update SMU fw to 64.72.0
942adff Add VanGogh blobs

Change-Id: I4c699379a196a0819201f7a6c9f1b3319edef4ff
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83413
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-11 17:32:59 +00:00
Subrata Banik
7f822a3368 libpayload/x86: Add x86-64 support to rdtsc()
This patch adds support for x86-64 to the rdtsc() function, allowing
it to correctly read the Time Stamp Counter (TSC) on both 32-bit and
64-bit x86 architectures.

BUG=b:242829490, b:351851626
TEST=Builds and boots on google/rex0 and google/rex64 systems and
manually verified correct TSC readings on x86-32 and x86-64 hardware.

Change-Id: I0afac3db2e82a245a37c2e5cf2302bf1dad62c01
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83414
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-07-11 15:27:30 +00:00
Subrata Banik
e94d29a02b soc/intel/cmn/cse: Refine boot partition logging
This patch ensures CSE boot partition (RO/RW) version information only
log when the status is "success". If the status is not successful,
log an error message indicating the failure and status code.

This change avoids logging potentially incorrect version information
when the boot partition is not valid.

BUG=b:305898363
TEST=Builds successfully for google/rex variants.

Change-Id: I1932302b145326a1131d64b04af1cbfd6d050b7b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-07-11 15:25:29 +00:00
Subrata Banik
24d81018ea mb/google/rex: Refactor CSE config options for model-specific settings
This patch refactors CSE config options, moving the selection of:

* `SOC_INTEL_CSE_LITE_SKU`
* `SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY_V2`
* `SOC_INTEL_CSE_SEND_EOP_ASYNC`

from the generic `BOARD_GOOGLE_REX_COMMON` to individual board models.
This enables finer-grained control over CSE features and sync behavior
on different Rex and variants platforms.

Specifically:

* `google/rex0`: Selects `SOC_INTEL_CSE_LITE_SKU` for CSE sync within
                 coreboot.
* `google/rex64`: Selects `SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD` and
                  `SOC_INTEL_CSE_SEND_EOP_BY_PAYLOAD` to defer CSE sync
                  to the payload.

BUG=b:305898363
TEST=Builds successfully for google/rex variants.

Change-Id: Ib5957496b1e1dad8d135b3e10541cb83dd339539
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83397
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-11 15:25:18 +00:00
Subrata Banik
48e6b82913 soc/intel/meteorlake: Conditional selection of CSE Lite PSR
This patch makes the selection of `SOC_INTEL_CSE_LITE_PSR` conditional
on both `MAINBOARD_HAS_CHROMEOS` and `SOC_INTEL_CSE_LITE_SKU` being
enabled.

This ensures that CSE Lite PSR is only active when both ChromeOS is the
target platform and CSE sync is performed inside coreboot.

BUG=b:305898363
TEST=Able to build google/rex.

Change-Id: I7199c034bbe6e7f077650417da67fa544f0b49d5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83396
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-11 15:24:51 +00:00
Subrata Banik
df052ff30e soc/intel: Extend CSE RW Update and ME read access for payload sync
Modify the dependencies for `SOC_INTEL_CSE_RW_UPDATE` and
`ME_REGION_ALLOW_CPU_READ_ACCESS` config options to include
`SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD`.

This allows these features to be enabled even when CSE sync is performed
in the payload, not just within coreboot (when `SOC_INTEL_CSE_LITE_SKU`
config is enabled).

BUG=b:305898363
TEST=Builds and boots successfully:
    * google/rex0 with SOC_INTEL_CSE_LITE_SKU
    * google/rex64 with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD

Change-Id: Id6ec19d74237f278e8383c89923523871b2cc2db
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-07-11 15:24:07 +00:00
Subrata Banik
62347c4669 soc/intel/meteorlake: Conditionally update CSE sync UPDs in FSP-M
This patch updates FSP-M UPDs conditionally to ensure CSE firmware
updates and VGA initialization control only when
`SOC_INTEL_CSE_LITE_SKU` config is enabled.

This ensures eSOL rendering is tied to CSE sync performed in coreboot,
preventing unnecessary setup when sync is deferred to the payload.

Deferring CSE sync to the payload results in the depthcharge screen.

BUG=b:305898363
TEST=Builds and boots successfully:
    * google/rex0 with SOC_INTEL_CSE_LITE_SKU
    * google/rex64 with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD

Change-Id: Iffdd4b1be4abba8c57e28542058a575cc6de674c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83394
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-07-11 15:23:42 +00:00
Subrata Banik
ea6b6acd01 soc/intel/cmn/cse: Refactor CBMEM ID handling for flexibility
This patch refactors the handling of CSE CBMEM IDs to enable platforms
to choose whether to perform CSE sync operations within coreboot or
defer it to the payload. This separation improves code organization,
ensuring `cse_lite.c` focuses on coreboot-specific CSE Lite tasks.

Now, platforms can select:
  * `SOC_INTEL_CSE_LITE_SKU` for CSE sync within coreboot
  * `SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD` for deferred payload sync

This change ensures mutually exclusive options, avoiding unnecessary
SPI flash size increases.

BUG=b:305898363
TEST=Builds and boots successfully:
    * google/rex0 with SOC_INTEL_CSE_LITE_SKU
    * google/rex64 with SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD

Change-Id: I74f70959715f9fd6d4d298faf310592874cc35d4
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83393
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-11 15:23:17 +00:00
Ronald Claveau
91d2f5d5e0 mainboard/dell: Add new mainboard XPS 8300 (Sandy Bridge)
Mainboard is identified as 0Y2MRG.
The version tested is with Nvidia dGPU (gfx 560ti).

The flash is a 4MiB Winbond W25Q32BVSIG.
It can be flashed internally with flashrom.
Add a strap on the service mode pin of the mainboard for internal flash.

Tested working:
- SeaBIOS
- All USB ports
- SATA
- dGPU
- Ethernet
- Environment control
- GPIOs
- S3 Sleep mode
- WakeOnLan

Change-Id: I7d394794fec580bc7aed3f6396ceb47d4a6fd059
Signed-off-by: Ronald Claveau <sousmangoosta@aliel.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83104
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-11 14:13:00 +00:00
Alper Nebi Yasak
30610597f2 drivers/qemu: Clarify config option name for QEMU display resolution
A previous commit splits out Cirrus display support from Bochs display
support, with both using the pre-existing Bochs config options for the
requested display resolution. Rename these config names to clarify they
are not only specific to the Bochs display driver.

Change-Id: Ie0a5e75731231bb768d7728867196c9ab5c53a00
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82060
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-11 11:05:43 +00:00
Alper Nebi Yasak
8ae0eff824 drivers/qemu: Split Cirrus display support from Bochs display support
QEMU's Cirrus display device is supported along with the Bochs driver
since commit 7905f9254ebc ("qemu: cirrus native video init"). It is no
longer the default since QEMU 2.2. The code supporting it can work
independently of the Bochs display driver and depends more heavily on
port I/O and VGA support code, so split it from that code to make it
easier to support the Bochs driver in other architectures.

Change-Id: Ic9492b501ed4fdcbda6886db60b1e5348715e667
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80375
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-11 11:05:22 +00:00
Alper Nebi Yasak
795994e025 mainboard/qemu-aarch64: Set CONFIG_PCI_IOBASE to 0x3eff0000
Define the PCI I/O base address necessary to use port I/O functions on
the qemu-aarch64 mainboard, so that we can get the VGA display devices
working. The config value is from hw/arm/virt.c [1]:

  [VIRT_PCIE_PIO] =           { 0x3eff0000, 0x00010000 },

[1] https://gitlab.com/qemu-project/qemu/-/blob/v8.2.3/hw/arm/virt.c#L164

Change-Id: I85439ba68740d64f789983b37d9c95f849ce4f72
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82059
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-11 11:03:31 +00:00
Nico Huber
7ac0f5b969 sconfig: Provide simple constants for aliased devices
Expose aliased PCI and PNP devices as `pci_/pnp_devfn_t` constants
in <static_devices.h>. They will be named `_sdev_<alias>` to have
a underscore prefix for consistency and to not collide with the
`struct device` objects (with `_dev_` prefix).

Change-Id: I2d1cfe12b1e7309f8235c84dd220bd090ebfe1b5
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82764
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-11 00:19:15 +00:00
Nico Huber
22a25d53e4 sb/intel/smbus: Implement smbus_send_byte()
Allows to use this driver for the SMBus console without sending an index
byte for every sent char (i.e. !CONSOLE_I2C_SMBUS_HAVE_DATA_REGISTER).

Tested with WiP VIA CX700-M2 port and FT4222H as receiver.

Change-Id: Ic368ef379039b104064c9a91474b188646388dd2
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82763
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-11 00:18:03 +00:00
Matt DeVillier
c4f735105b soc/amd/phoenix: Fix APOB NV size/base for non-vboot builds
The APOB NV size/base are embedded into the amdfw binary and read by
the PSP. These need to be synchronized with the FMAP region used by
coreboot to store the APOB data. soc_update_apob_cache() will only
use RECOVERY_MRC_CACHE if supported and if vboot is enabled, so the
NV base passed to the PSP needs to reflect that as well.

This fixes the issue of RAM training running on every boot on
non-vboot builds for Myst boards.

TEST=untested, but same change as made for Mendocino

Change-Id: Ib4a78a39badf0a067e22eebe5869e5ea51723f35
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2024-07-11 00:13:42 +00:00
Matt DeVillier
baec1c858d soc/amd/mendocino: Fix APOB NV size/base for non-vboot builds
The APOB NV size/base are embedded into the amdfw binary and read by
the PSP. These need to be synchronized with the FMAP region used by
coreboot to store the APOB data. soc_update_apob_cache() will only
use RECOVERY_MRC_CACHE if supported and if vboot is enabled, so the
NV base passed to the PSP needs to reflect that as well.

This fixes the issue of RAM training running on every boot on
non-vboot builds for Skyrim boards.

TEST=build/boot Skyrim (Frostflow), verify RAM training only
run on first boot after flashing.

Change-Id: I9be1699d675331b46ee9c42570700c2b72588025
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83400
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2024-07-11 00:13:20 +00:00
Nico Huber
ae77d8afac console/i2c_smbus: Allow to send data w/o register offset
Not every I2C target requires a register address. Not sending one
for every console char saves us a lot of overhead.

Change-Id: I1c714768fdd4aea4885e40a85d21fa42414ce32c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82762
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-11 00:06:22 +00:00
Nicholas Chin
77ae8f0f24 autoport: Drop ioapic, ioapic_irq, and lapic handling for devicetree
The ioapic and ioapic_irq keywords are no longer valid tokens as of
commit e84b095d3a23 (util/sconfig: Remove unused ioapic and irq
keywords), and the associated driver had previously been removed in
commit ca5a793ec31c (drivers/generic/ioapic: Drop poor implementation).
Thus, drop them from autoport. Also, the IOAPICIRQs map that this code
relied on to generate ioapic_irq entries never seems to have been
populated by any code in any previous commit, so this appears to have
been dead code since autoport was created.

The lapic keyword was removed from sconfig in commit 15d5183e4af7
(util/sconfig: Remove lapic devices from devicetree parsers) so remove
autoport handling for it as well.

Change-Id: Icf2582594b244cf5f726c722eb3a3c12573a2662
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83358
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-10 21:22:06 +00:00
Nico Huber
a054a20c31 console: Fix I2C/SMBus console if it's the only slow one
Change-Id: Ie44fdac6904a4467e408882bb8a5e08e6ff73f32
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82761
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-10 20:14:30 +00:00
Elyes Haouas
e7fa24470d cbmem_top: Change the return value to uintptr_t
Change-Id: Ib757c0548f6f643747ba8d70228b3d6dfa5182cd
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82752
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-10 12:55:46 +00:00
Shon Wang
a9997f891f mb/google/brask/var/bujia: Add wireless and memory thermal sensor
Bujia has 4 thermal sensors, so add two missing sensors settings.

BUG=b:351917517
BRANCH=firmware-brya-14505.B
TEST= USE="-project_all project_bujia" emerge-brask coreboot.
      check ACPI SSDT table have new TSR info.
      $ cat /sys/firmware/acpi/tables/SSDT > SSDT
      $ iasl -d SSDT
      check SSDT.dsl

Change-Id: Id9a17a22a717faac829e6b5e300351187a62dd43
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83302
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-10 12:13:48 +00:00
Elyes Haouas
a6a5ae0eaa emulation/qemu-q35: Remove redefine TSEG_SZ_MASK
TSEG_SZ_MASK is already defined in "q35.h"

Change-Id: I32ea08c18e1c41d16137ea14a1643f8c8d527722
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83386
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-10 11:40:12 +00:00
Elyes Haouas
eeb762ae33 Documentation: Use pkgconf over pkg-config
Change-Id: I3e9a92d019854214a5760f705b9cbe3cabe6d2e8
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83157
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-07-10 06:24:28 +00:00
Elyes Haouas
2a307e7d1b xcompile: Use one line per CLANG_CFLAGS_${TARCH} flag
Change-Id: I5c649898218a9c5d51d18a35264e9636e3dee179
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-10 05:06:38 +00:00
Abhishek Pandit-Subedi
f94ccc236f ec/google/chromeec: Stop checking CBI for UCSI
The ucsi_enabled flag is no longer used by the EC. Update coreboot to only use only EC_FEATURE_UCSI_PPM to determine whether UCSI is enabled.

BUG=b:319124515
TEST=emerge-brox coreboot chromeos-bootimage

Cq-Depend: chromium:5664227
Change-Id: Ia9d820c637e56a527fd90f45b1848158a960dee7
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83252
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Forest Mittelberg <bmbm@google.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-09 21:37:29 +00:00
Elyes Haouas
a1c5c626ff releases/coreboot-24.08: Remove ACPICA line
ACPICA reverted from 20240321 to 20230628 (commit 7c1813c1).

Change-Id: Id238f77c6a0b4052ae3d835caf98aaf26a7e570f
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83384
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-09 21:11:57 +00:00
Nicholas Chin
98f8961106 Documentation/Makefile: Fix test target
The test target called make with the `-K` flag, which is not valid.
Change it to `-k` (keep going if some targets fail) which is what was
probably intended.

It also tried to build the `doctest` target from Makefile.sphinx, which
results in an error. Further investigation reveals that this is because
the sphinx doctest extension was not enabled in conf.py. However, from
the documentation of doctest [1], it seems like it is intended to ensure
that documentation containing Python snippets along with the expected
output of the snippet remain in sync, which is something that we
probably don't need. So, remove the call to it.

[1] https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html"

Change-Id: Id514950b4486ed8644d078af222c96ed711fc8f9
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83381
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-07-09 21:10:25 +00:00
Nicholas Chin
46630de4b7 Documentation: Fix header levels
This fixes the following MyST Parser warnings:

- Non-consecutive header level increase
- Document headings start at H2, not H1

The header levels (the number of "#" characters before a heading) are
intended to form a logical hierarchy of each section and subsection in a
document. A subsection typically should have a header level one more
than its parent section. Most of these warnings are caused by extra "#"
characters, which were simply removed, or sections missing a "#"
character to make it fall under its parent section.

Notable changes:

getting_started/kconfig.md: Changed the header level of the "Keywords"
section from 2 to 3 to fall under "Kconfig Language" (level 2), and
increased the level of each keyword from 3 to 4 to remain under
"Keywords". This also fixes the warnings of "H3 to H5" increases, since
the Usage/Example/Notes/Restrictions sections for each keyword had a
level of 5.

soc/intel/cse_fw_update/cse_fw_update.md: Changed the first line to a
top level header acting as the title of the document. Without this
soc/intel/index.md displays all the level 2 headers in this document
instead of a single link to cse_fw_update.md.

Change-Id: Ia1f8b52e39b7b6524bef89a95365541235b5b1b9
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83382
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-07-09 21:10:15 +00:00
Nicholas Chin
18c79fe67b Docs: Fix paths in references to other markdown documents
This fixes a few "cross-reference target not found" warnings from MyST
parser. In these cases, the relative path to the target markdown
document was incorrect.

Change-Id: I5d01deacc3ba7401faba30fc832e2357d4aedad8
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83383
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-09 21:10:03 +00:00
Angel Pons
8a0b68064a mb/asrock/z97_extreme6: Fix EDID mapping for DVI-I
This board has a DVI-I connector, which supports both digital and analog
display outputs. The I2C bus to retrieve the EDID is shared between both
outputs, so `select GFX_GMA_ANALOG_I2C_HDMI_B` to describe this.

Can't currently test this due to lack of hardware.

Change-Id: Ib8239917e2f7ee5bb982621752ec406c2d3ca302
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82753
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-09 16:38:39 +00:00
Elyes Haouas
488898702d Documentation: Remove explicit install of 'm4'
Remove m4 as it will be installed automatically by flex and bison.

Change-Id: Ifb748e5aaabb96825813ddb92cf28d2ea7bdcbf9
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83156
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-07-09 07:31:19 +00:00
Elyes Haouas
2c6c3dbdf8 Doc/tutorial/part1.md: Correct libncurses-dev pkg name for debian
Change-Id: I5a71b914d40a9ea45be87f4581ff0072605e8c00
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83032
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-07-09 07:31:02 +00:00
Felix Singer
055ec248a0 payloads/ipxe/kconfig: Fix option name prefix
With commit 238ff1e9c7 ("payloads/ipxe: Prefix iPXE options with "IPXE"
instead "PXE""), the prefix for iPXE related Kconfig identifiers was
unified to "IPXE". So rename the identifier for the TRUST_CMD option as
well, which was introduced later.

Change-Id: I918358b859003503526ba7849494bb23f8c893fd
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83361
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-09 01:59:08 +00:00
Maximilian Brune
6841670e4d Makefile.mk: Fix int-shift-left
commit 4a8d73d6a4 ("Makefile.mk: Remove bc dependency") broke the left
shift, since the expr tool does not support shifting operations.

This patch uses the left shift operator inside arithmetic expansion.
Every posix shell should support this.

Tested:
Build amd/birman mainboard and check that the soft-fuse parameter
doesn't change.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: If3b29dae727875b0788100a2cb02c86736ffaf8c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83377
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-07-08 22:38:27 +00:00
Peter Marheine
b97ec4f016 chromeec: support reading long battery strings
The Chrome EC currently supports two ways to read battery strings on
ACPI platforms:

 * Read up to 8 bytes from EC shared memory BMFG, BMOD, ...
 * Send a EC_CMD_BATTERY_GET_STATIC host command and read strings from
   the response. This is assumed to be exclusively controlled by the OS,
   because host commands' use of buffers is prone to race conditions.

To support readout of longer strings via ACPI mechanisms, this change
adds support for EC_ACPI_MEM_STRINGS_FIFO (https://crrev.com/c/5581473)
and allows ACPI firmware to read strings of arbitrary length (currently
limited to 64 characters in the implementation) from the EC and to
determine whether this function is supported by the EC (falling back to
shared memory if not).

BUG=b:339171261
TEST=on yaviks, the EC console logs FIFO readout messages when used in
     ACPI and correct strings are shown in the OS. If EC support is
     removed, correct strings are still shown in the OS.
BRANCH=nissa

Change-Id: Ia29cacb7d86402490f9ac458f0be50e3f2192b04
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82775
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-08 13:01:39 +00:00
Maximilian Brune
4a8d73d6a4 Makefile.mk: Remove bc dependency
bc was added as dependency in commit 229e021110 ("Makefile.inc: Add left shift macro")

bc is not stated as dependency in our docs (e.g. package installation).
If you don't have bc installed you can easily get false positives on
coreboot builds. For example you build a mainboard and coreboot tells
you the build succeeded, even though you don't have bc installed.

This patch is from julius comment on CB:21601.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I6ab4bc2bd7a45e84b923d4fe7ec473e6c7db2146
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83313
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-08 12:58:01 +00:00
Alexander Goncharov
75703772d1 util/ifdtool: dump SPI modes from FLCOMP
These fields are documented in the Alder Lake-S Client Platform SPI
Programming Guide, but they are not presented in the Skylake-LP
Client Platform SPI Programming Guide

Change-Id: I624fe5cb28aa3cb207bc48aa8d31b2a71b70bcf2
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83282
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-08 12:55:58 +00:00
Anastasios Koutian
47a7fb3921 cpu/intel/model_206ax: Allow PL1/PL2 configuration
Tested on ThinkPad T420 with the i7-3940XM.

Change-Id: I064af25ec4805fae755eea52c4c9c6d4386c0aee
Signed-off-by: Anastasios Koutian <akoutian2@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-08 12:54:25 +00:00
Kun Liu
048bffc365 mb/google/brox/var/lotso: Update DTT settings for thermal control
update DTT settings for thermal control,according to b:348285763#comment6.

BUG=b:348285763
TEST=emerge-brox coreboot

Change-Id: I67e16a2596884d501273a5787119406dff7a20f9
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83304
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-08 06:11:26 +00:00
Amanda Huang
85cb9f7648 mb/google/brya: Select Intel PDC to PMC CONFIGURATION for orisa
Orisa uses PDC<->PMC direct connection for USBC mux configuration.
Select SOC_INTEL_TCSS_USE_PDC_PMC_USBC_MUX_CONFIGURATION to enable it.

BUG=b:345070027
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I3f740bedc8ff667d15f077fa57d201ab0d42ebf8
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83324
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
2024-07-08 02:21:44 +00:00
Amanda Huang
93daabfb8b mb/google/trulo/var/orisa: Add fw_config field for PDC control
Add a new fw config field to determine which firmware edition shall be
flashed to the PDC.

BUG=b:334793686
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I817e9415aca1d2f68b484d8e23b581e1a75d6f84
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83353
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-08 02:17:24 +00:00
Jakub Czapiga
227639cdd9 util/sconfig: Remove unnecessary strdup() calls
getopt() optarg value can be used without duplicaing if it is not
modified, as it is the case here.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ie5a27f64077af1c04b06732cd601145b8becacfd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70525
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-06 15:24:30 +00:00
Felix Singer
9b31a90e7f tgl mainboards: Move PCIe root port settings into their device scope
Change-Id: I110cc95d536cb0fd3b5db85b84cca7a96e31401c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83253
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-05 20:55:19 +00:00
Nicholas Chin
d9cb2c12d7 autoport: Print location of generated sources
Autoport determines the mainboard vendor and board names based on DMI
entries, which sometimes doesn't result in the most obvious name. In
addition, newcomers may not be familiar with coreboot's directory
structure and have no idea where to look. Print out the absolute patch
of the generated sources once autoport finishes so that it is easier to
locate the files.

Change-Id: I4ba00484ac57355d7539fa6e36e0e6df62719f8a
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83344
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-05 19:49:13 +00:00
Nicholas Chin
c7cb5e434b autoport: Factor out GPIO config generation
Intel chipsets from ICH7 through Lynxpoint use the same GPIO register
format and thus mainboards using using these platforms have similar
gpio.c files. Factor out the code to generate gpio.c from bd82x6x.go so
that it other chipsets added to autoport can use it.

This was originally written by Iru Cai in his Haswell autoport patch in
CB:30890; I have simply split out the code to a separate commit as it is
a separate logical change.

TEST=Generated output is identical before and after this patch when run
against logs from a Dell Latitude E6430

Change-Id: If1f506f6ad10144bd6acc42505592426bb7193b7
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83286
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-05 17:55:06 +00:00
Felix Singer
7a0deb4d1b util/liveiso/nixos: Install flashprog
Change-Id: Id0a0de9bbbe2d3b0885bec2abea0a2022a7e1cbb
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83352
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-05 12:57:23 +00:00
Sergii Dmytruk
1ad9c32ae3 payloads/external: don't prevent parallel build of iPXE
When starting a nested instance Make communicates information on the
number of jobs and how to synchronize difference instances via MAKEFLAGS
variable.  Explicitly overwriting it when invoking
payloads/external/iPXE/Makefile ends up forcing serial build of iPXE.
iPXE builds hundreds of files and its dependency generation is done
separately from compilation making the whole process take couple minutes
on a single CPU (which becomes several seconds if large enough number of
CPUs is available).

iPXE seems to have Make-based build system that has no problems with
parallel build and not utilizing that effectively turns it into a
bottleneck when building a coreboot image in parallel.

It's unclear whether MAKEFLAGS= was even added for any particular
purpose.  It doesn't prevent child instances from using variables of
parents, nor it prevents child instance from running in parallel
(because it's still passed as an environment variable that's processed
prior of variable assignments on command-line), but it does prevent
grandchild instance from running in parallel (actual iPXE's Makefile).

MFLAGS contains flags from MAKEFLAGS and isn't used implicitly by Make,
so no need to clear it either because iPXE doesn't use it.

Change-Id: Iac00e2f86d160793d3217e00ddc5012202b3196a
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83081
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-07-05 12:55:49 +00:00
Wentao Qin
282d647a0c mb/google/brox/var/lotso: Select USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS
SKU1 is UFS, SKU2 is NON-UFS, it needs to select this config to disable
the MPHY clock in the SKU2 configuration to ensure that S0ix functions
normally.

BUG=b:350609955
BRANCH=None
TEST=Boot image on SKU1/SKU2 and check S0ix working.

Change-Id: I2fbcc7ffaabf3c085a3345ec94a8d45b225b3450
Signed-off-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-05 02:49:33 +00:00
Felix Held
43ed6972e6 soc/amd/common/acpi/ivrs: use PCI_DEVFN macro
Use the PCI_DEVFN macro to make the calculation of the ivhd->device_id
value a bit clearer.

TEST=Timeless build results in identical binary for Mandolin

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7b7949ad3524790e7d7d527c488a32e785f55bc0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83343
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-04 19:47:29 +00:00
Felix Singer
a786d28c72 util/liveiso/nixos: Update to 24.05
Change-Id: I62dc3a7fd5b8aef467fc547015f23e41d3260122
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83276
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-04 14:34:20 +00:00
Kun Liu
577e810789 mb/google/lotso: Add hid report address for gt7986u
Add hid report address for gt7986u.

BUG=b:342932183
BRANCH=None
TEST=Verify touchscreen work normal.

Change-Id: I464c2691505083314528519f608108c8a31e6cc0
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83201
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-04 14:04:23 +00:00
Kun Liu
81e854897f drivers/spi/acpi: Update generic property list
Update generic property list for build test result fail
https://qa.coreboot.org/job/coreboot-gerrit/259702/

BUG=b:342932183
BRANCH=None
TEST=emerge-brox coreboot

Change-Id: Iecd8573343706184dce5edfc12fe7a143390e0e9
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83301
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com>
2024-07-04 14:04:05 +00:00
Wisley Chen
3018a6de3f mb/google/nissa/var/domika: Create a domika variant
This patch creates a new domika variant which is a Twin Lake platform.
This variant uses Yavilla board mounted with the Twin Lake SOC and hence
the plan is to reuse the existing yavilla code.

BUG=b:350399367
BRANCH=firmware-nissa-15217.B
TEST=build, and boot into OS

Change-Id: I42c56770f8b8d6018592253d2bb16b8166eb5719
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83291
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-04 10:37:30 +00:00
Amanda Huang
83112756c8 mb/google/brya: disable early EC sync for orisa
Disable VBOOT_EARLY_EC_SYNC for all trulo boards.

BUG=b:345112878
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I10b027d19dedbb190fc960b949017f9e4830d52a
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83303
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-04 02:22:58 +00:00
Maximilian Brune
19516187fe doc/tutorial/part1.md: Remove trailing whitespace
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ife87475d367c5491807215342536e3bb0fd15a45
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83312
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-04 00:27:37 +00:00
Shuo Liu
d4985430e3 soc/intel/xeon_sp/gnr: Add soc_pci_domain_fill_ssdt
Domain device objects are created with HID/CID/UID/_OSC/_PXM

Dynamic domain SSDT generation could benefit the support of SoCs with
multiple SKUs, or the case where one set of codes supports multiple
SoCs. One possible side-effect might be the extra performance cost for
generating these tables, which should not bring big impact on high
performance server CPUs.

GNR codes run with dynamic domain SSDT generation to fit for both
GraniteRapids and SierraForest SoCs.

TEST=Build on intel/avenuecity CRB
TEST=Build on intel/beechnutcity CRB

Change-Id: I28bfdf74d8044235f79f67d832860d8b4306670c
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-07-03 20:55:02 +00:00
Elyes Haouas
1ee4d2f39c tests/drivers/efivars: Remove duplicated <limits.h>
Already included <types.h> is supposed to provide <limits.h>. See
`Documentation/contributing/coding_style.md` section `Headers and includes`

Change-Id: I945eeeeccb16851f64d85cf5c67ea6e256082e11
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82724
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-07-03 20:21:06 +00:00
Maximilian Brune
7c1813c137 Revert "util/crossgcc: Update ACPICA from 20230628 to 20240321"
This reverts commit 41fdb882f1f0c3cda41651c2e9c920580415a0dc.

Reason for revert: The version downloaded does not match the version
that is printed out when executing `iasl --version`. coreboot notices
that and refuses to compile QEMU-Q35 mainboard. I tested it on 2
different PCs.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I3ce0c5798f14162eaa063a9a64e16e6dbbb9e468
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83296
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-03 18:42:16 +00:00
Jan Philipp Groß
58c7a84097 mb/asrock: Add Z97E-ITX/ac (Haswell/Broadwell)
This is a rudimentary port of this board. It was done with Haswell
Autoport, wherein some adjustments for Broadwell were made
(Thanks to Angel Pons!).
The VBT was copied from /sys/kernel/debug/dri/1/i915_vbt on version
2.20 of the vendor firmware.

Working:
- Broadwell MRC.bin
- S3 suspend and resume
- All DIMM slots
- Libgfxinit
- HDMI-Out Port
- DVI-I Port (including passive DVI to VGA adapter)
- USB 2.0 Ports
- USB 3.1 Gen1
- RJ-45 LAN Port
- SATA3 6.0 Gb/s Connectors
- m.2 PCIe SSD
- mPCIe WiFi slot
- x16 PCIe slot
- USB 3.1 Gen1 Header
- Front Panel Audio Connector
- edk2

Not yet tested:
- SATA Express 10 Gb/s Connector
- HDMI-In Port
- DisplayPort 1.2
- Optical SPDIF Out Port
- PS/2 Mouse/Keyboard Port
- USB 2.0 Headers

Not working:
- Broadwell CPUs, see commit f5105313cf69 (mb/asrock/z97_extreme6:
Add new mainboard)
Special thanks to Angel Pons for guiding me through the process of
porting this board and pushing it to Gerrit!

Change-Id: I3b940e9281814e8360900221714c0dfa3ae39540
Signed-off-by: Jan Philipp Groß <jeangrande@mailbox.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82760
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-03 17:57:38 +00:00
Jeremy Compostella
1f1d8d2bca mb/google/rex: Set cnvi_wifi bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

BUG=b:348345301
BRANCH=firmware-rex-15709.B
TEST=BRDS method is added to the CNVW device and return the data
     supplied by the SAR binary blob

Change-Id: I7f56ab8ac88c1fbc0b223b4286d2a998e424a46e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83299
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-03 17:01:37 +00:00
Poornima Tom
89566946fb drivers/wifi: Support 320Mhz Bandwidth Enablement per MCC
Add support for the configuration of 320MHz Bandwidth per MCC based on
countries. The implementation follows document #559910 Intel
Connectivity Platforms BIOS Guidelines revision 8.3.

BUG=b:333804562
BRANCH=firmware-rex-15709.B
TEST=WBEM method is added to the CNVW device and return the data
     supplied by the SAR binary blob

Change-Id: Ie76794825f1a0104d199c078aa4ffc714aa95b17
Signed-off-by: Poornima Tom <poornima.tom@intel.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81790
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-03 17:01:25 +00:00
Jeremy Compostella
71dda74fe8 drivers/wifi: Support Bluetooth Regulator Domain Settings
The 'Bluetooth Increased Power Mode - SAR Limitation' feature provides
ability to utilize increased device Transmit power capability for
Bluetooth applications in coordination with Wi-Fi adhering to product
SAR limit when Bluetooth and Wi-Fi run together.

This commit introduces a `bluetooth_companion' field to the generic
Wi-Fi drivers chip data. This field can be set in the board design
device tree to supply the bluetooth device for which the BRDS function
must be created.

This feature is required for Meteor Lake rex karis variant.

The implementation follows document 559910 Intel Connectivity
Platforms BIOS Guideline revision 8.3 specification.

BUG=b:348345301
BRANCH=firmware-rex-15709.B
TEST=BRDS method is added to the CNVW device and return the data
     supplied by the SAR binary blob

Change-Id: Iebe95815c944d045f4cf686abcd1874a8a45e209
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83200
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-03 17:01:17 +00:00
Jan Philipp Groß
2721846dab mb/asrock: Add Fatal1ty Z87 Professional (Haswell)
This port was done via autoport and subsequent manual tweaking.
Thanks to Angel Pons for helping me with the misbehaving ASM1061 ASPM!

The board features two socketed DIP-8 SPI flash chips, as well as a
BIOS selection via jumper and onboard Power and Reset switches.

Working:
- Haswell MRC.bin
- All four DDR3/DDR3L DIMM slots
- S3 suspend and resume
- Libgfxinit
- HDMI-Out Port
- both RJ-45 Gigabit LAN Ports
- USB 2.0 Ports
- USB 3.1 Gen1 Ports
- both USB 3.1 Gen1 headers
- HD Audio Jack (audio output)
- all six SATA3 6.0 Gb/s connectors by Intel
- all four SATA3 6.0 Gb/s connectors by ASMedia ASM1061
- all three PCI Express 3.0 x16 slots
- PCI Express 2.0 x1 slot
- half mini-PCI Express slot

Working (board-specific)
- Power Switch with LED (functional, yet no LED)
- Reset Switch with LED (functional, yet no LED)
- BIOS Selection via jumper

not (yet) tested:
- IR header
- COM Port header
- DisplayPort
- eSATA connector
- USB 2.0 headers
- PS/2 Mouse/Keyboard Port
- HDMI-In Port
- PCI slots

not (yet) working:
- Front panel audio connector
- Software fan control: While the Nuvoton chip is correctly discovered,
the numbering of the fan connectors is faulty, resulting in the wrong
fan being controlled.
- Dr. Debug: on vendor firmware, the LEDs turn off after successful
boot. On coreboot, the LED shows two bright zeros after boot.

Change-Id: Iae0b73d8e81be90ec3a2d5463df3ed170f603266
Signed-off-by: Jan Philipp Groß <jeangrande@mailbox.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82913
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-03 16:24:53 +00:00
Rui Zhou
16b18a8b30 mb/google/geralt: Replace GERALT_USE_MAX98390 with FW_CONFIG for TAS2563
Use FW_CONFIG to differentiate MAX98390 and TAS2563. Since config
GERALT_USE_MAX98390 is no longer needed after using FW_CONFIG,
we remove GERALT_USE_MAX98390 from Kconfig.

BUG=b:345629159
BRANCH=none
TEST=emerge-GERALT coreboot
TEST=Verify beep function through deploy in depthcharge successfully.

Change-Id: Ie9f0cbc30dd950b85581fc1924fa351efe1e0aab
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83287
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-07-03 14:31:32 +00:00
Tony Huang
e301f3934d mb/google/ovis/variants/deku: Add K3KL9L90CM-MGCT to RAM ID table
Add RAM ID for
K3KL9L90CM-MGCT                 0 (0000)

BUG=b:320203629
BRANCH=firmware-rex-15709.B
TEST=Run part_id_gen tool without any errors

Change-Id: Icb84838a6964b9318ded0573ad58a4fd1221867f
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83300
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-03 13:57:32 +00:00
Jing Tong
d5de10f02e mb/google/brox/var/lotso: Tune I2C frequency for 400 kHz
Before:
I2C0 - 401kHz
I2C4 - 405kHz

After:
I2C0 - 392kHz
I2C4 - 395kHz

HW: Change R8409/R8411 to 33ohm.

BUG=b:349743464,b:349735055
TEST=emerge-brox sys-boot/coreboot
     Test pass by EE

Change-Id: I985837b1b80e973f148529b446905580c0f95e98
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83290
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
2024-07-03 13:57:22 +00:00
Gang Chen
cae81a5674 soc/intel/xeon_sp/gnr: Support fast boot
Fast boot will used pre-saved hardware configuration data to
accelerate the boot process, e.g. DDR training is skipped by using
pre-saved training data. Enable fast boot on cold and warm resets
by default.

Change-Id: Ib5dc76176b16ea1be5dd9b05a375c9179411f590
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82080
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-07-03 12:09:06 +00:00
Yu-Ping Wu
409860687b security/vboot: Set VBOOT_ALWAYS_ENABLE_DISPLAY if BMP_LOGO
If BMP_LOGO is set, currently display_init_required() will always return
1, so that platform code will always initialize display. However, that
information isn't passed to vboot, which may result in unnecessary extra
reboots, for example when the payload needs to request display init (by
vb2api_need_reboot_for_display()).

Since there is already a Kconfig option VBOOT_ALWAYS_ENABLE_DISPLAY to
tell vboot that "display is available on this boot", enable it by
default if BMP_LOGO is set.

BUG=b:345085042
TEST=none
BRANCH=none

Change-Id: I20113ec464aa036d0498dedb50f0e82cb677ae93
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83256
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-07-03 08:43:01 +00:00
PugzAreCute
2d8fcc8778 mb/gigabyte/ga-h61m-series: Initial GA-H61M-S2P-R3 bringup
Working:
 - Both DIMM slots
 - All Rear USB 2.0 ports
 - Integrated graphics (libgfxinit)
 - Realtek RTL8111F GbE
 - Flashing internally with flashrom (Note: Works from stock too
        due to Gigabyte not following Intel recommendations,
        confusing ME)
 - SeaBIOS (1.16.3) to boot Arch Linux Installer
 - EDK II (uefipayload_202309, MrChromebox) to boot Arch Linux Installer
 - Audio output (green jack, rear)
 - S3 suspend/resume
 - VBT

Untested for now (i.e. should work, will eventually test):
 - EHCI debug
 - Front USB 2.0 ports
 - The other audio jacks
 - PCIe ports
 - Non-Linux OSes

Untestable (i.e. cannot test due to unavailable hardware):
 - PS/2 port
 - Serial port
 - SATA ports

Not working:
 - USB 3.0 ports: The on-board VLI VL805 does not have a flash chip,
   so its firmware needs to be loaded on each boot. However,
   documentation about the (chip-specific) firmware loading procedure
   is nowhere to be found.
 - Super I/O automatic fan control: not yet implemented in coreboot.
   To control fans, use software fan control methods in the meantime.

Change-Id: I106c195c890823f07227739c6b30133b996f6510
Signed-off-by: PugzAreCute <me@pugzarecute.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83267
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-03 08:28:58 +00:00
Subrata Banik
3d7a7f79b4 soc/intel/common: Skip ME version log for Lite SKU
This change skips the ME firmware version logging in
print_me_fw_version() if the ME firmware SKU is detected as Lite SKU.

The reasoning is that the RO (BP1) and RW (BP2) versions are already
logged by the cse_print_boot_partition_info() function for Lite SKUs,
making the additional log redundant.

The check for the Lite SKU has been moved to print_me_fw_version(),
where the decision to print the version is made, instead of in
get_me_fw_version(), where the version information is retrieved.

TEST=Able to build and boot google/rex.

w/o this patch:

[DEBUG]  ME: Version: Unavailable

w/ this patch:

Unable to see such debug msg.

Change-Id: Ic3843109326153d5060c2c4c25936aaa6b4cddda
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83258
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-03 06:13:59 +00:00
Subrata Banik
ac9396153c soc/intel/cmn/cse: Make ME firmware version query function static
This change modifies the get_me_fw_version() function to be statically
scoped within src/soc/intel/common/block/cse/cse.c, as it is only used
by the print_me_fw_version() function in the same file.

The function declaration is also removed from intelblocks/cse.h.

The order of the function definitions in cse.c was also changed to be
more logical, with the now static helper function get_me_fw_version()
defined first, before it is used.

TEST=Able to build google/rex.

Change-Id: Idd3a6431cfa824227361c7ed4f0d5300f1d04846
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83257
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-03 06:13:31 +00:00
Subrata Banik
2cf0df37e7 soc/intel/cmn/cse: Conditionally disable ME status reporting
This patch disables the ME status reporting functionality
(dump_me_status, print_me_fw_version) in the CSE driver when
SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD is defined.

This is likely intended for platforms or configurations where the
CSE communication is only limited to payload.

BUG=b:305898363
TEST=Able to build google/rex.

Change-Id: I5e360408a7847968117df475ff244d79ceafa23f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83233
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-03 06:13:17 +00:00
Subrata Banik
672cff29f1 drivers/intel/ish: Skip ISH version call if CSE sync is done by payload
This patch skips the ISH firmware version print when CSE sync is done
by payload. The payload is responsible to dump the ISH version as
ISH version resides into the CSE boot partition table.

BUG=b:305898363
TEST=Able to build google/rex.

Change-Id: I1895a4d3c44838a9cc6380912f09aa4f0e6687bd
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83231
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-03 06:13:11 +00:00
Subrata Banik
0d6289c1e0 soc/intel/cmn/cse: Skip CSE version call if sync is done by payload
This patch skips the CSE firmware version print when CSE sync is done
by payload. The payload is responsible to dump the CSE version.

BUG=b:305898363
TEST=Able to build google/rex.

Change-Id: I1a9e5583c79ebd81291a4b3ae24529b4582502cb
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83230
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-03 06:13:06 +00:00
Subrata Banik
e27b00a70b soc/intel/cmn/cse: Modify dependency on CSE EOP configs
Refactor CSE lite End-of-Post (EOP) configs to support
the alternative of sending CSE communication from the payload.

When the SOC_INTEL_CSE_SEND_EOP_BY_PAYLOAD config is selected, coreboot
will skip initiating CSE EOP operations and rely on the payload CSE
driver implementation.

The following configs are modified to ensure coreboot skips CSE
communication when SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD is enabled:
- SOC_INTEL_CSE_SEND_EOP_EARLY
- SOC_INTEL_CSE_SEND_EOP_LATE
- SOC_INTEL_CSE_SEND_EOP_ASYNC
- SOC_INTEL_CSE_SEND_EOP_BY_PAYLOAD

BUG=b:305898363
TEST=Able to build google/rex.

Change-Id: Ia6b616163d02be8d637b134fd3728c391fc63c90
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83229
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-03 06:13:00 +00:00
Subrata Banik
727bc08037 soc/intel/cmn/cse: Modify dependency on CSE lite configs
Refactor CSE lite configs (specifically CSE sync related) to support
the alternative of sending CSE communication from the payload.

When the SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD config is selected, coreboot
will skip initiating CSE sync operations and rely on the payload CSE
driver implementation.

The following configs are modified to ensure coreboot skips CSE
communication when SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD is enabled:
- SOC_INTEL_CSE_LITE_PSR
- SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY
- SOC_INTEL_CSE_LITE_SYNC_IN_ROMSTAGE
- SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE

BUG=b:305898363
TEST=Able to build google/rex.

Change-Id: I5ddaf6e29949231db84b14bf7ea2d34866bb8e6c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83228
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-07-03 06:12:55 +00:00
Felix Held
d05fe9fd3c Revert "Makefile.mk: Use Walloc-size GCC option"
This reverts commit 6ab188ee6c99b1d9924b607d7e939d91e35014ec.

This breaks the build using a slightly older toolchain that doesn't know
this option yet.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0bdc909c0e53b5353743dca521c963bbec792f7e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83311
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-07-03 04:49:57 +00:00
Elyes Haouas
de5bcd699a tree: Use <console/console.h> only when used
Change-Id: I3cb1f11beba61afdf2be6188bde9ff135f8ace50
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83288
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-07-03 04:39:42 +00:00
Martin Roth
9f62ece050 Makefiles: Add site_local-target to run early in the build
This double-colon target doesn't do anything unless it's implemented by
another makefile. It's intended to be used only by the site-local
makefile to allow it to run any necessary steps before the actual
coreboot build begins.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I01f98c9cf8375bca21ab87f9becf66a25402c758
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-07-02 18:44:39 +00:00
Jan Philipp Groß
e52ccf2db0 mb/asrock: Add Z87M OC Formula (Haswell)
This port was done via autoport and subsequent manual tweaking.
Special thanks to Nicholas Chin! This port would have never succeeded
without his help.

The board features two socketed DIP-8 SPI flash chips, as well as a
BIOS selection switch and onboard Power and Reset switches.

Working:
- Haswell MRC.bin
- All four DDR3/DDR3L DIMM slots
- S3 suspend and resume
- Libgfxinit
- HDMI-Out Port
- USB 2.0 Ports
- Vertical Type A USB 2.0
- USB 3.1 Gen1 Ports
- HD Audio Jack (audio output)
- Front panel audio connector (audio output)
- RJ-45 Gigabit LAN Port
- SATA3 6.0 Gb/s connectors
- mSATA/mini-PCI Express slot
- half mini-PCI Express slot
- PCI Express 3.0 x16 slots (both)
- PCI Express 2.0 x4 slot
- PCI Express 2.0 x1 slot

Working (board-specific)
- Power Switch with LED (functional, yet no LED)
- Reset Switch with LED (functional, yet no LED)
- BIOS Selection Switch
- Slow Mode Switch (locks the CPU at 800MHz)

not (yet) tested:
- IR header
- COM Port header
- Power LED header
- eSATA connector
- USB 2.0 headers
- PS/2 Mouse/Keyboard Port
- HDMI-In Port
- Optical SPDIF Out Port

not (yet) working:
- Software fan control: While the Nuvoton chip is correctly discovered,
the numbering of the fan connectors is faulty, resulting in the wrong
fan being controlled.
- Dr. Debug: on vendor firmware, the LEDs turn off after successful
boot. On coreboot, the LED shows two bright zeros after boot.
- Post Status Checker (PSC)

Change-Id: Iaa156b34ed65e66dd5de5a26010409999a5f8746
Signed-off-by: Jan Philipp Groß <jeangrande@mailbox.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82906
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-02 15:09:40 +00:00
Felix Singer
7784e099fb 3rdparty/vboot: Update submodule to upstream main
Updating from commit id 09fcd218:
2024-02-23 06:42:12 +0000 - (Makefile: Test compiler for -Wincompatible-function-pointer-types)

to commit id b6f44e62:
2024-07-01 04:30:14 +0000 - (futility: updater: Increase try count from 8 to 10)

This brings in 58 new commits:
b6f44e62 futility: updater: Increase try count from 8 to 10
cfc87db2 OWNERS: Add czapiga
eabf5784 OWNERS: Remove twawrzynczak and quasisec
f8af818e host: Add stub implementation for pkcs11 key
aaf4ecbb crossystem: Add support for Panther Lake gpiochip
de89c5cd make_dev_ssd: allow ptracers to write proc/mem
ffc9cc15 utility: Add vbnv_util.py for debugging
b6174bdb futility: show: Print keyblock signature size and data size
6e39c99f Android: Add support for doing zipalign before doing apksigner
ead73381 futility: flash: Enhance WP status reporting by adding more instructions
c3368084 futility: modify private key validation to work for both local and cloud
c22d72f8 futility: flash: Correct the output syntax of 32bit hex
f423ae13 crossystem: Drop support for tried_fwb and fwb_tries
fc5488c7 futility: flash: Correct the allowlist of options
16dede85 Revert "futility: Split load_firmware_image() into two functions for AP and EC"
ded07831 futility: Try to load ecrw versions regardless of image type
7a685705 futility: Refactor code for --manifest
f5ad0856 futility: Add more checks for incompatible arguments
05659d33 futility/updater_manifest: Warn about inconsistent RW versions
6720827b futility: Support ecrw version for --manifest
daae7e56 futility: Split load_firmware_image() into two functions for AP and EC
40c77bba futility: Warn about inconsistent RW_FWID_A and RW_FWID_B versions
c168ac8e tests/futility/data: Update bios_geralt_cbfs.bin with swapped ecrw
512648ae host/lib: Add cbfstool_file_exists() and cbfstool_extract()
e37e6511 sign_official_build: add missing info keyword
2c0758b4 sign_official_build: loem support for firmware
016f6149 scripts/image_signing/swap_ec_rw: Always add ecrw.* as raw CBFS file
b26c700a scripts/image_signing/swap_ecrw: Support ecrw.version
2e8d1003 tlcl: Add const qualifier to TlclTakeOwnership arguments
96b8674c host: stop installing unused image signing scripts
8da83c43 Android: Handle update certs using for hardcoded certs
4ca60534 scripts/image_signing: Add swap_ec_rw
d30d6b54 make_dev_ssd: Remove logic choosing editor value
4cc5d090 futility/dump_fmap: Fix error message prefix for '-x'
e7062a58 futility/dump_fmap: Exit with error if specified section is not found
4489dd09 scripts: Remove newbitmaps directory
8dcc82b0 host/lib/cbfstool: Redesign cbfstool_get_config_value() API
856fd693 Android: Hack for now to let things silently fail instead of erroring
28845c97 sign_uefi: Handle case where the crdyshim key does not exist
201244c3 sign_uefi_unittest: Refactor in preparation for more tests
702f8b53 tests: Add tests for cbfstool_get_config_value()
52a21327 Android: Add support for gcloud KMS in android signing
3310c49f tests/futility/test_update.sh: Use unique test names for IFD tests
493f7afc sign_gsc_firmware: add support for Nightly target
5c307cad keycfg: more consistent typo fix
11e4f60b image_signing: Add missing arg in sign_uefi_kernel
37c730d8 keycfg: handle arrays appropriately in key_config
59c37697 sign_uefi: Add detached crdyboot signature
b66926e2 sign_uefi: Refactor the is-pkcs11 function for reuse
94aa8b80 image_signing: Pass crdyshim private key to sign_uefi.py
0ac99bcb sign_uefi: Stop signing crdyboot files with sbsign
6f6a6432 vboot_reference-sys: replace denylist with allowlist
73ebd8f8 vboot_reference-sys: add vboot_host pkg-config fallback
476282ef make_dev_ssd: Skip firmware validity checks on nonchrome
9330a65a vboot_reference: Add support for allowing overlayfs
48c8833f sign_official_build: remove cloud-signing
aa70bb19 create_new_keys.sh: add --arv-root-uri
38d1af69 sign_official_build: Dedup calls to sign_uefi.py

Change-Id: I14aaf1e1e230107e7bae60195c7e4684bf5a0533
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-07-02 15:08:32 +00:00
Felix Singer
e548100877 3rdparty/fsp: Update submodule to upstream master
The filename of the Elkhart Lake FSP binary changed in the FSP
repository. It's unlikely that it will be renamed to the original name
soon. Thus, update the filename in the coreboot repository.

Updating from commit id cc6399e:
2024-03-04 15:40:41 +0800 - (IoT MTL-UH & MTL-PS PV (3471_49) FSP)

to commit id 800c857:
2024-06-25 15:47:28 +0800 - (Update Fsp.fd)

This brings in 23 new commits:
800c857 Update Fsp.fd
41e4590 NEX AZB IPU24.4 (5254_00) FSP
0efd8a3 IoT RPL-PS PV (5045_47) FSP
196e3fe Update README.md
380afd8 Update README.md
5dc88ca NEX ADL-PS IPU24.3/MR6 (5045_02) FSP
22762e9 Merge branch 'master' of https://github.com/intel/FSP
8134dbd Elkhart Lake IPU2024.3 FSP
3819544 add required SECURITY.md file for OSSF Scorecard compliance
a6ee963 Delete AlderLakeFspBinPkg.dec
9d819ea Deprecate Client/AlderLakeFspBinPkg
f963690 Raptor Lake FSP C.1.C8.50
f67f9ef Raptor Lake FSP C.0.C8.50
68c3cfa NEX ADL-PS IPU 2024.3 (5045_02) FSP
f0d04d9 NEX ADL-P IPU 2024.3 (5045_02) FSP
6fa139c NEX ADL-S IPU 2024.3 (5045_02) FSP
c4af5ac NEX TGL IPU 2024.3 (7092_01) FSP
8cf0372 IoT ADL-N MR4 (5061_00)
e5ceb0b Merge branch 'master' of https://github.com/intel/FSP
aada6a5 Elkhart Lake IPU2024.2 FSP
90d1d3b Update README.md
1a5a3ee Testing
61c069a NEX RPL-S MR3 (4445_03) FSP

Change-Id: I47013bce65054f2c496c9aa7c16e55b51d65e5fe
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83294
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-02 15:08:20 +00:00
Alexander Goncharov
15a89ac7e8 util/ifdtool: fix spacing issues
Ensure consistent spacing around colons in bit fields, operators,
statements and function calls.

Found by the linter (check-style).

Change-Id: I817b1dcf106cc360a7db56e5b4b0716d5419e2cd
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83281
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-02 14:48:31 +00:00
Martin Roth
eedc14da94 Makefile: Add symlink targets to help
Also capitalize the first letter of each help line while I'm here.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I595265d53a5ecfeb5989075dd4ce23dbdf366c00
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-07-01 16:52:20 +00:00
Martin Roth
ebf6b3c187 Makefile: update clean-symlink target
This almost completely replaces the original clean-symlink target to
remove links from site-local into the coreboot tree. Changes include:

- Symbolic links removed are based on the EXTERNAL_SYMLINKS value of
symlink.txt files under site-local.
- Verify that there are site-local symlink.txt files to work on before
doing anything.
- Verify that the symlink.txt files reference links inside the coreboot
directory.
- Print out whether or not there are remaining symbolic links in the
tree.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ife0e7cf1b856b7394cd5e1de9b35856bd984663c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83124
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-07-01 16:51:53 +00:00
Angel Pons
f7f9fc9271 nb/intel/sandybridge/chipset.cb: Add alias for cpu_cluster
Define a devicetree alias for `cpu_cluster` so that it can be referenced
in C code as `DEV_PTR(cpu_bus)`.

Change-Id: Id6ead3d98d8fc17cab44ecf0b2af60a23187e036
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83275
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-01 15:30:40 +00:00
Maximilian Brune
99bed46c5d commonlib/bsd/lz4_wrapper.c: Fix misaligned access
Currently the HiFive Unleashed produces the following exception:
[DEBUG]  Exception:          Load address misaligned
[DEBUG]  Hart ID:            0
[DEBUG]  Previous mode:      machine
[DEBUG]  Bad instruction pc: 0x080010d0
[DEBUG]  Bad address:        0x08026ab3
[DEBUG]  Stored ra:          0x080010c8
[DEBUG]  Stored sp:          0x08010cc8

The coreboot LZ4 decompression code does some misaligned access during
decompression which the FU540 apparently does not support in SRAM.

Make the compiler generate code that adheres to natural alignment by
fixing the LZ4_readLE16() function and creating LZ4_readLE32().

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Id165829bfd35be2bce2bbb019c208a304f627add
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81910
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-01 13:44:19 +00:00
Kun Liu
c693e92c74 drivers/spi/acpi: Add generic property list
The touchscreen vendor (Goodix) needs to use this value
(hid-report-addr) in the touch driver, and this value
needs to be changed later.So add generic property list to allow populating vendor specific device properties to ACPI SSDT table.

BUG=b:342932183
BRANCH=None
TEST=emerge-brox coreboot

Change-Id: I8b18e0a2925e6fd36e3a470bde9910661b7558b8
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83139
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-01 13:38:53 +00:00
Elyes Haouas
06575901cf soc/nvidia: Remove unneeded white spaces
Change-Id: Ifd19cdcfbdf0b01984e0db0aa880fdcb256663b4
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83255
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-01 13:38:20 +00:00
Yang Wu
def571c8ad mb/google/corsola/var/wugtrio: Add LCE_LMFBX101117480 MIPI panel
Add LCE_LMFBX101117480 MIPI panel for Wugtrio.
Datasheet: LMFBX101117480-10.1-TLCM-24.05.20-2.pdf

BUG=b:331870701
TEST=emerge-staryu coreboot chromeos-bootimage
BRANCH=corsola

Change-Id: I863e172400ffb26b5c9c240a21d15c6a2240b4ad
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83221
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-07-01 13:37:59 +00:00
Yang Wu
ce8934815a drivers/mipi: Add support for LCE_LMFBX101117480 panel
Add STA panel LCE_LMFBX101117480 serializable data to CBFS.
Datasheet: LMFBX101117480-10.1-TLCM-24.05.20-2.pdf
About the init code, we communicated with the vendor through the
datasheet to confirm the writing method of each register value.

BUG=b:331870701
TEST=build and check the CBFS includes the panel
BRANCH=None

Change-Id: I60858109e4b07f720461e320212d7b197ec1130c
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83220
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-07-01 13:37:20 +00:00
Elyes Haouas
4332d028fb Makefile.mk: Use Wcast-function-type GCC option
Change-Id: I25415d7fd82879889ffaa1bb534ad5d0b174854e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82736
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-01 11:43:30 +00:00
Elyes Haouas
6ab188ee6c Makefile.mk: Use Walloc-size GCC option
Change-Id: Ia26dcf097db125a5a734660d08d875459179241b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82734
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-01 11:31:36 +00:00
Felix Singer
2bca750f10 mb/intel/tglrvp/dt: Remove superfluous USB2_PORT_EMPTY settings
Configuring USB2_PORT_EMPTY is equal to just not setting it. So remove
it to clean up a bit.

Change-Id: I6854f4a0d3e7b51b242549556a5838d4183d3473
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-07-01 03:29:38 +00:00
Felix Singer
1f5a221a51 tgl mainboards: Move audio related settings into hda device scope
Change-Id: I1992c20dcdc5e974143690d44ee199d7c3394cfd
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83251
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-29 22:51:16 +00:00
Felix Singer
6ce6a5b369 tgl mainboards: Move genx_dec settings into eSPI device scope
Change-Id: I6d7bcd298408e15677f27d1a9797a490c57c9fc9
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-29 20:04:17 +00:00
Felix Singer
bc8f5405b5 tgl mainboards: Move usb{2,3}_ports settings into XHCI device scope
Change-Id: Ide5126c6e642ca16249efeaf46321724f2ddce9a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-29 20:03:50 +00:00
Felix Singer
0adf35537b Makefile.mk: Use one line per *_common flag
Use one line per *_common flag like it's done elsewhere in the tree.
It makes the list of options more readable.

Change-Id: I33c500e6eb74daf1e66c2b5e07b50f81c0f4587d
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83226
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-06-29 07:07:56 +00:00
Felix Singer
0486f2b3bb tgl mainboards: Drop disabled audio settings from dt
Configuring them to 0 is equal to not configuring them at all. So remove
them to clean up a bit.

Change-Id: I9a9eb370e8e9e8874ad8b4b8ac0f43d61c1a4b9b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-28 22:11:31 +00:00
Felix Singer
8c1daf9751 tgl mainboards: Move SATA related settings into SATA device scope
Change-Id: I03508c50fe56fd85f8bf89f724863e546d4140e9
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-28 21:43:18 +00:00
Felix Singer
df141f61cc mb/google/volteer/baseboard: Drop disabled SATA settings from dt
Configuring them to 0 is equal to not configuring them at all. So remove
them to clean up a bit.

Change-Id: I18134ac784fffb703e1fe513e5914f05faa749c9
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83248
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-28 21:43:11 +00:00
Felix Singer
f13284cedb mb/intel/tglrvp/dt: Make use of device alias names
Also, remove superfluous comments from devices which repeat their name.

Change-Id: I009330042b59c9e6e78aa6f3819546b771b26ff0
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83244
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-28 19:18:18 +00:00
Maximilian Brune
9a12acf1e3 include/device_tree.h: Fix function name fdt_node_name
Rename fdt_node_name to the actual function name and also rename the
references.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I527146df26264a0c3af1ad01c21644d751b80236
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83084
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-28 12:29:13 +00:00
Angel Pons
4bdb089147 device/azalia_device.c: Always read-write GCAP
In the HD Audio Specification Rev. 1.0a, every bitfield in the GCAP
register is RO (Read Only). However, it is known that in some Intel
PCHs (e.g 6-series and 7-series, documents 324645 and 326776), some
of the bitfields in the GCAP register are R/WO (Read / Write Once).
GCAP is RO on 5-series PCHs; 8-series and 9-series PCHs have a lock
bit for GCAP elsewhere.

Lock GCAP by reading GCAP and writing back the same value. This has
no effect on platforms that implement GCAP as a RO register or lock
GCAP through a different mechanism.

Change-Id: Id61e6976a455273e8c681dbeb4bad35d57b1a8a2
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83218
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-28 12:26:07 +00:00
Shuo Liu
2eb9d5ed62 soc/intel/xeon_sp: Reserve MMIO for Gen1 SoC
For Gen1 SoCs, the range starting from the end of VTd BAR to the end
of 32-bit domain MMIO resource window is reserved for unknown devices.
Get them reserved.

TEST=Build and boot on intel/archercity CRB

Change-Id: Ie133fe3173ce9696769c7247bd2524c7b21b1cf8
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-28 11:27:41 +00:00
Shuo Liu
0a6f5188e8 soc/intel/xeon_sp: Reserve MMIO range for VTd BAR dynamically
vtd_probe_bar_size is used to decide the BAR size.

TEST=Build and boot on intel/archercity CRB

Change-Id: Ie45dd29e386cbfcb136ce2152aba2ec67757ee3c
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82431
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-28 11:27:34 +00:00
Shuo Liu
bcd2473766 acpi: Add support for DRHD size reporting
VT-d spec 4.0 supports size definition for DRHD BAR to support DRHD
sizes larger than 4KB. If the value in the field is N, the size of
the register set is 2^N 4 KB pages.

Some latest OS (e.g. Linux kernel 6.5) will have VTd driver trying
to use the beyond 4KB part of the DRHD BAR if they exist. They need
the DRHD size field to set up page mapping before access those
registers.

Re-add acpi_create_dmar_drhd with a size parameter to support the
needs.

TEST=Build and boot on intel/archercity CRB

Change-Id: I49dd5de2eca257a5f6240e36d05755cabca96d1c
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82429
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-28 11:27:27 +00:00
Elyes Haouas
5702757118 mb/google/brox/variants/brox/fw_config.c: Remove unused macro
Change-Id: I8ce94c8bc7ed137eaace12d6cb0befa6c0d39a37
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82925
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-28 08:09:04 +00:00
Poornima Tom
6411916475 mb/google/nissa/var/nivviks: Disable CNVi Bluetooth based on fw_config
When CNVi based Wifi6 is disabled, CNVi based Bluetooth must be turned
off, based on fw_config. Otherwise, when device boots without the cbi
settings for wifi6, boot may fail with assertion error for line 817 &
819 of file 'src/soc/intel/alderlake/fsp_params.c'.

BUG=b:345596420
BRANCH=NONE
TEST=Dut boots fine with both Wifi6 & Wifi7 based cbi settings, along
with enumeration of corresponding BT device.

Change-Id: I03fde02fa4b36f4e47d6f0e95675feddb3bee7cd
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83148
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-28 03:52:59 +00:00
Poornima Tom
b80a691f15 mb/google/nissa/var/nivviks: Enable PCIe Wifi GPIOs based on fw_config
PCIe based GPIOs of Wifi7 module are enabled based on firmware config.

BUG=b:345596420
BRANCH=NONE
TEST= Based on fw config configured, wifi6 or wifi7 along with
bluetooth ports are detected.

Change-Id: If0584e91b5143c6df742961657d242c046409b3a
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83077
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-28 03:52:54 +00:00
Poornima Tom
a4756e3890 mb/google/nissa/var/nivviks: Enable Bluetooth for PCIE
PCIe based Bluetooth is on port8. This cl enables bluetooth for PCIe
based Wifi7 module.

BUG=b:345596420
BRANCH=NONE
TEST=With proper FW config enabled, BT gets detected on port8

Change-Id: I989cf6122f2555cc89f622e4ce5d21b574d0458e
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83076
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-28 03:52:45 +00:00
Poornima Tom
5a0e7f5be0 mb/google/nissa/var/nivviks: Enable wifi7 on pcie root port
Enable pcie based, discreete wifi7 on root port4.

BUG=b:345596420
BRANCH=NONE
TEST=Verified Wifi7 module detection based on cbi settings

Change-Id: I8c2f4a750a1cb00c587bce21bc83ee583d0f4341
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83075
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-28 03:52:41 +00:00
Poornima Tom
f930b9faae mb/google/nissa/var/nivviks: Add fw_config fields for wifi6 and wifi7
Add a new fw config field for wifi category as WIFI_6, which is CNVi
based and WIFI_7, which is PCIe based. Also, enable WIFI_6 for existing
CNVi based wifi port as well as bluetooth port.

BUG=b:345596420
BRANCH=NONE
TEST=Verified Wifi6 module detection

Change-Id: I4b218f772405bdb1b741b4d5e640d7b4f145cd76
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83074
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-28 03:52:34 +00:00
Poornima Tom
f582047f04 mb/google/nissa/var/nivviks: Update config for CNVi
Add wake configuration and set 'add_acpi_dma_property'=true for CNVi.
Also, add "set 'add_acpi_dma_property' to true to tell the OS to enforce DMA protection for this device.

BUG=b:345596420
BRANCH=NONE
TEST=SSDT dump showed below:
    Scope (\_SB.PCI0.RP01.WF00)
    {
        Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
        {
            0x23,
            0x03
        })
        Name (_DSD, Package (0x02)  // _DSD: Device-Specific Data
        {
            ToUUID ("70d24161-6dd5-4c9e-8070-705531292865"),
            Package (0x01)
            {
                Package (0x02)
                {
                    "DmaProperty",
                    One
                }
            }

Change-Id: If04539fe8dceb5c2edfc06a324ede11147b78b6d
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83138
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-28 03:52:28 +00:00
Elyes Haouas
16b4797579 arch/x86/mpspec: Use uintptr_t for mpc_apicaddr
Change-Id: I6cc2b3947a2c79e8962985e035e7cc74c2deb307
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83215
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-06-27 16:43:52 +00:00
Felix Singer
9f601f405d 3rdparty/arm-trusted-firmware: Update submodule to upstream master
Updating from commit id 17bef2248:
2024-02-05 23:33:50 +0100 - (Merge "feat(fvp): delegate FFH RAS handling to SP" into integration)

to commit id fe4df8bda:
2024-06-07 12:55:56 +0200 - (Merge "feat(rockchip): add RK3566/RK3568 Socs support" into integration)

This brings in 713 new commits.

Change-Id: Icce3595fef3a844034e7cc76fc8480ed5b21618c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83000
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-27 15:04:22 +00:00
Shon Wang
2ebfb79d33 mb/google/brask/var/bujia: Configure Serial IO UARTs Mode
This patch configures Serial IO UARTs mode as below.

UART0 and UART1 in PCI mode and keep UART2 disable as per hardware design.

BUG=b:338917836
BRANCH=firmware-brya-14505.B
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: I5617331aaf505b97e25a717b145fb70dc53f5a38
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83205
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-27 14:36:37 +00:00
Martin Roth
d5658fd7c0 Makefile: Add cleanall-symlink target
This target looks for symbolic links in the coreboot directory,
excluding the 3rdparty and crossgcc directories, which both typically
have numerous symbolic links, and deletes anything that is found.

All possible links are verified as symbolic links before being removed.

Any removed links show where they were linked from in case they need to
be restored.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I8a56e7c628701e4a0471833443b08ab2bcceb27e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83123
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-27 14:04:22 +00:00
Martin Roth
754fa0ebc6 Makefile: Update symlink target
This almost completely replaces the original symlink target for creating
symbolic links from site-local into the coreboot tree. Changes include:

- A comment about the format of the symlink.txt file
- Verify that there are symlink.txt files before doing anything.
- Note that symbolic links that already exist are being skipped.
- Only use the first line of the symlink.txt file
- Make sure the symbolic link to be created is inside the coreboot dir.
- Output errors to STDERR
- echo -e isn't supported by posix shells, so replace /t with two spaces

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I9b0d1b5bc19556bc41ca98519390e69ea104bd1b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-27 14:03:44 +00:00
Jing Tong
63f24372d5 mb/google/brox/var/lotso: GPP_B14 used for buzzer
ALC257 does not supoort built-in digtal buzzer, So use external pwm
to PCBEEP for beep sound.

BUG=b:346956771
BRANCH=None
TEST=emerge-brox coreboot sys-boot/chromeos-bootimage

firmware-shell: devbeep -> can output beep normally.

Change-Id: If924f9f27f229420e78015f418a97b2d5daf62e5
Signed-off-by: Jing Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-06-27 14:03:13 +00:00
Ravi Sarawadi
511222c187 drivers/wifi: Support Wi-Fi 7 11be Enablement
Add 802.11be (aka. Wi-Fi 7) enable/disable support based on document
559910 Intel Connectivity Platforms BIOS_Guidelines revision 8.3.

There are countries where Wi-Fi 7 should be disabled by default. This
adds capability for OEM to enable or disable by updating the board
specific Specific Absorption Rate (SAR) binary.

BUG=b:348345300
BRANCH=firmware-rex-15709.B
TEST=SSDT dump shows that the _DSM method returns the value supplied
     by the SAR binary for function 12

Change-Id: Ifa1482d7511f48f5138d4c68566f07ce79f37a7a
Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82207
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-06-27 04:52:39 +00:00
Felix Held
a3dc6c0d35 lib/string: use size_t for local variable in strncmp
Since the 'maxlen' parameter's type is changed to size_t, the type of
the local variable 'i' which this is compared against should also be
changed to size_t.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibe35d3741bc6d8a16a3bad3ec27aafc30745d931
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83224
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-06-27 03:30:46 +00:00
Felix Held
a41e5f1407 lib/string: change return types to match C standard
The return type of strspn and strcspn is supposed to be a size_t and not
a signed integer.

TEST=Now the openSIL code can be built with the coreboot headers without
needing to add '-Wno-builtin-declaration-mismatch' or
'-Wno-incompatible-library-redeclaration' to the cflags. Before the
build would error out with various 'mismatch in return type of built-in
function' errors.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0ff612e2eee4f556f5c572b02cbc600ca411ae20
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83223
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-27 03:30:37 +00:00
Felix Held
f04e5f9af7 lib/string: change parameter types to match C standard
The third parameter of strncpy and strncmp is supposed to be a size_t
and not a signed int.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I485e45e18232a0d1625d4d626f923ec66cfbe4a2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83222
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-27 03:29:42 +00:00
Angel Pons
245b688a28 device/azalia_device.c: Use azalia_enter_reset()
Use the existing `azalia_enter_reset()` function instead of explicitly
clearing the bit (and having to explain in a comment what this means).

Change-Id: I04924e68420a93a1ad46f5a7ab359e38c0f7e210
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83217
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-27 03:22:15 +00:00
Julius Werner
c20c83ca1b commonlib/device_tree: Improve node and property allocation speed
Now that the device tree code has been made available in libpayload, we
should reintroduce the node and property allocation optimization for
libpayload's memory allocator that was originally dropped when porting
this code from depthcharge to coreboot.

On a Qualcomm SC7180 unflattening a normal ChromeOS kernel device tree,
this saves roughly ~145ms. The total scratch space used is about ~1350
nodes and ~5200 properties, so we leave a little room to grow with the
constants hardcoded here.

Change-Id: I0f4d80a8b750febfb069b32ef47304ccecdc35af
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83208
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2024-06-27 00:29:17 +00:00
Subrata Banik
3aea34a993 mb/google/fatcat: Add minimal code support for fatcat
This patch adds initial code block required to build google/fatcat
board with Intel Meteor Lake Silicon. Later after the initial board
power-on is successful, we shall switch to Panther Lake silicon to
build the google/fatcat reference design.

BUG=b:347669091
TEST=Able to build the google/fatcat and able to hit power-on reset
using Intel Meteor Lake SoC platform.

Change-Id: Iad78aec51b2f0f240991c9c35842764a60be988e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83197
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-06-26 22:30:42 +00:00
Shuo Liu
f3aaa0e153 acpi: Rename acpi_create_dmar_drhd
For most of SoCs, DRHD is by default with the size of 4KB. However,
larger sizes are allowed as well. Rename acpi_create_dmar_drhd to
acpi_create_dmar_drhd_4k to support the default case while a later
patch will re-add acpi_create_dmar_drhd with a size parameter.

TEST=intel/archercity CRB

Change-Id: Ic0a0618aa8e46d3fec2ceac7a91742122993df91
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83202
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-26 18:07:30 +00:00
Amanda Huang
79d7f3a13e mb/google/trulo/var/orisa: Add STORAGE_NVME in fw_config storage field
Follow nissa baseboard setting for storage field.
option STORAGE_EMMC 0
option STORAGE_NVME 1
option STORAGE_UFS  2

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I75b4b3037c245f7d517cb33d487f71da98f6c4e8
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83207
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-26 18:06:04 +00:00
Wen Zhang
4f9bab7ac0 mb/google/brox/lotso: Add Fn key scancode
The Fn key on Lotso emits a scancode of 94 (0x5e).

BUG=b:322721490
TEST=Flash Lotso, boot to Linux kernel, and verify that KEY_FN is
generated when pressed using `evtest`.

Change-Id: I999627f0ea9db1d79376150a04920ac877a48447
Signed-off-by: Wen Zhang <zhangwen6@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83204
Reviewed-by: Dengwu Yu <yudengwu@huaqin.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-06-26 18:05:27 +00:00
Karthikeyan Ramasubramanian
f52b2748b2 mb/google/brox: Disable Touchscreen for hardware board version 1
On board version 1 and later, touchscreen is not stuffed. Hence
configure the relevant GPIOs as not connected, disable the concerned I2C
bus in the devicetree as well as SoC chip config for board version 1.

BUG=b:347333500
TEST=Build Brox BIOS image and boot to OS. Ensure that there are no
peripherals detected in I2C 1 bus through i2cdetect tool. Ensure that no
touchscreen devices are exported through ACPI SSDT table. Ensure that
other I2C peripherals - eg. Trackpad and Ti50 are functional. Ensure
that the device is able to suspend and resume for 25 cycles.

Change-Id: Ia0578b90b0e8158ae28bcc51add637844ba6acf6
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83199
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-26 14:31:18 +00:00
Karthikeyan Ramasubramanian
e35d7e8d14 mb/google/brox: Add default ACPI brightness levels
Kernel need the default brightness steps. Otherwise following error
messages are observed in the kernel:
[Firmware Bug]: ACPI(GFX0) defines _DOD but not _DOS
ACPI BIOS Error (bug): Could not resolve symbol [^^XBCL], AE_NOT_FOUND
ACPI Error: Aborting method \_SB.PCI0.GFX0.LCD0._BCL due to previous
error (AE_NOT_FOUND)

BUG=b:346807006
TEST=Build Brox BIOS image and boot to OS. Ensure that the concerned
error messages are resolved. Ensure that the backlight controls are
functional.

Change-Id: Icd569b0efef31908edb1b7dc384e60a16fc5bd0c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83152
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-06-26 14:29:37 +00:00
Felix Singer
576f1cd44b skl mainboards/dt: Move SsicPortEnable setting into XHCI device scope
Change-Id: I64ffba35303c1291f56ae6a038325a7482158ad3
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83189
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-26 11:44:19 +00:00
Felix Singer
4b72203989 skl mainboards/dt: Move serirq setting into LPC device scope
Change-Id: I84da5365907664ce223dec4adb22a8f1a6e2a144
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83188
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2024-06-26 11:44:13 +00:00
Felix Singer
df7de392ef skl mainboards/dt: Move SATA related settings into SATA device scope
Change-Id: I50706d7a077767d2295d6d5f209c30109d607277
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83179
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-26 11:44:08 +00:00
Felix Singer
dcddc53fde skl mainboards/dt: Move genx_dec settings into LPC device scope
Change-Id: Iecb4851bedb7c9ed7793763d80acbcbb068e8832
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83172
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-26 11:44:02 +00:00
Felix Singer
6c83a71b0a skl mainboards/dt: Move usb{2,3}_ports settings into XHCI device scope
Change-Id: I22ba991a9d559b0ecc7b3ceddcfd099890dd6c3a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-06-26 11:43:56 +00:00
Tony Huang
c7c8cf2edd soc/intel/common: Extend WAIT_FOR_DP_MODE_ENTRY_TIMEOUT_MS to 1500ms
Some dongles require more time to be ready,
this CL extedns the DP mode entry timeout from 0.5s to 1.5s and make
sure the tested dongle display works.

Before:
[WARN ]  DP not ready after 500ms. Abort.

After:
[INFO ]  DP ready after 1211 ms

BUG=b:348309582
TEST=emerge coreboot
     verify tested dongles and monitors display works

Change-Id: I22d7800b50f6f7de9f147ae6998a5015d0dc0be9
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83206
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2024-06-25 21:56:52 +00:00
Nicholas Sudsgaard
516d05f43d device/azalia: Separate codec checking and initialization
This also changes how debug messages will be printed. I focused on
reducing clutter on the screen and made the style of the messages
consistent.

Before:
azalia_audio: Initializing codec #5
  codec not ready.
azalia_audio: Initializing codec #4
  codec not valid.
azalia_audio: Initializing codec #3
azalia_audio: viddid: ffffffff
azalia_audio: verb_size: 4
azalia_audio: verb loaded.

After:
azalia_audio: codec #5 not ready
azalia_audio: codec #4 not valid
azalia_audio: initializing codec #3...
azalia_audio:  - vendor/device id: 0xffffffff
azalia_audio:  - verb size: 4
azalia_audio:  - verb loaded

Change-Id: I92b6d184abccdbe0e1bfce98a2c959a97a618a29
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80332
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-25 20:58:35 +00:00
Kun Liu
ff16fc07b6 lotso: Update board type to BOARD_TYPE_ULT_ULX
Update board type to BOARD_TYPE_ULT_ULX

BUG=b:348147663
BRANCH=none
TEST=Built and compare the results of
command 'dmidecode --type 17 | grep Speed'

[Before]
  Speed: 8400 MT/s
  Configured Memory Speed: 6400 MT/s
[After]
  Speed: 8400 MT/s
  Configured Memory Speed: 5200 MT/s

Change-Id: I049d7c19424f41e83480f4b80bafd6ef8b9e30f6
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
2024-06-25 15:51:21 +00:00
Nicholas Chin
a38203532d util/autoport: Move SPDX header before defines in dsdt.asl
Macros were being printed before the SPDX header in dsdt.asl, so fix
this. Previous output:

#define BRIGHTNESS_UP \_SB.PCI0.GFX0.INCB
#define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB
/* SPDX-License-Identifier: GPL-2.0-only */

Change-Id: Idebdcf816911af9d262a114c86461e6fa5bfd1f8
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83187
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-25 14:49:45 +00:00
Robert Chen
c40e3c9c19 mb/google/dedede/var/kracko: Add LTE only daughterboard support
Add FW_CONFIG for no port LTE skus, and probe LTE port in devicetree.

BUG=b:339534479
BRANCH=firmware-dedede-13606.B
TEST=emerge-dedede coreboot chromeos-bootimage
flash and check boot log on DUT.

Change-Id: I5235df33a36f3b9472ee8b615e4622f6ee3fb1a4
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83054
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-25 12:36:58 +00:00
Martin Roth
c3e7d833dd Kconfig: Update FW_CONFIG Kconfig options
If a board supports FW_CONFIG or ChromeEC CBI, the options should be
selected by the mainboard. These are not something that need to be a
choice to enable or disable in Kconfig.

The defaults are pointless, so remove them. The symbols default to no.

Correct the descriptions of FW_CONFIG_SOURCE_CBFS and
FW_CONFIG_SOURCE_VPD. They come after CBI and do not override any other
options.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Icf170dc2ef790d6f5a897a9c7c2ea64033bf1dc9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83118
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-25 08:12:58 +00:00
Amanda Huang
dc0ae6bdc7 mb/google/trulo/var/orisa: Fill in ec.h
Fill in ec.h according to schematic_20240614.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: Ie1edf655fd20c0c1baee01fa90ed03501e3fe161
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83154
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-25 06:41:00 +00:00
Amanda Huang
df30d9199e mb/google/trulo/var/orisa: Fill in gpio.h
Fill ec pins in gpio.h and configure GPE0 DW2 in overridetree according to schematic_20240614.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I9de842a8a66632314d5fdf6444005d34338a1100
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83155
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2024-06-25 06:40:38 +00:00
Nicholas Chin
7c05c61b0b util/autoport: Remove extra blank lines from generated files
The generated dsdt.asl and early_init.c files contained 2 consecutive
blank lines, so remove one of them.

Change-Id: Iad74098518320c5389cb86badb8737e81dd656ae
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83186
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-24 18:02:56 +00:00
Patrick Rudolph
4b43dac16b acpi/acpi: Fix Qemu's XSDT patching code
Since Qemu doesn't provide an XSDT, coreboot adds one as separate ACPI
table. Qemu only provides the smaller ACPI 1.0 RSDP, but the XSDT can
only fit into the bigger ACPI 2.0 RSDP. Currently the exsting RSDP is
being reused, without a size check, which works fine on the first boot.
However after reboot the XSDT pointer seems to be valid, even though the
checksum isn't. Since the XSDT then isn't reserved again on reboot, the
memory it's pointing to is reused by other tables, causing the
payload/OS to see an invalid XSDT.

Instead of corrupting the smaller existing RSDP, allocate a new RSDP
structure and properly fill it with both, existing RSDT and XSDT.

In addition return the correct length of allocated ACPI tables to the
calling code. It was ommiting the size of the allocated XSDT and SSDT.

TEST: Run "qemu-system-x86_64 -M q35" and reboot the virtual machine.
      With this patch applied XSDT is always valid from the OS
      point of view.

Change-Id: Ie4972230c3654714f3dcbaab46a3f70152e75163
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83116
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-24 17:12:48 +00:00
Shelley Chen
f78979007a mb/google/brox: Add support for batteryless booting
Set PsysPL2 and PsysPL3 in addition to making adjustments
to PL2 and PL4 in order to prevent brownouts when we don't
have a battery or have an empty battery at boot time.

BUG=b:335046538,b:329722827
BRANCH=None
TEST=flash
     Able to successfully boot on a SKU1 with 45W, 60W+ adapters
     and SKU2 with a 60W or higher type C adapter.
     30W is still being worked on.

Change-Id: Ie36f16b2c938dce29cd2130a86fc8c08f5ba0902
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83087
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-06-24 16:43:27 +00:00
Aseda Aboagye
c72c760f4a acpigen_ps2_keybd: Support a Do Not Disturb key
This commit simply adds support for a Do Not Disturb key. HUTRR94 added
support for a new usage titled "System Do Not Disturb" which toggles a
system-wide Do Not Disturb setting.

BUG=b:342467600
TEST=Build and flash a board that generates a scancode for a Do Not
Disturb key. Verify that KEY_DO_NOT_DISTURB is generated in the Linux
kernel with patches[0] that add this new event code using `evtest`.

[0] - https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?id=22d6d060ac77955291deb43efc2f3f4f9632c6cb

Change-Id: I26e719bbde5106305282fe43dd15833a3e48e41e
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82997
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Forest Mittelberg <bmbm@google.com>
2024-06-24 15:17:56 +00:00
Aseda Aboagye
2f69c2c40a acpigen_ps2_keybd: Support an Accessibility key
Add support for an Accessibility key. HUTRR116 added support for a new
usage titled "System Accessibility Binding" which toggles a
system-wide bound accessibility UI or command.

BUG=b:333095388
TEST=Build and flash a board that contains an accessibility key. Verify
that KEY_ACCESSIBILITY is generated in the Linux kernel with patches[0]
that add this new event code using `evtest`.
```
Testing ... (interrupt to exit)
Event: time 1718924048.882841, -------------- SYN_REPORT ------------
Event: time 1718924054.062428, type 4 (EV_MSC), code 4 (MSC_SCAN), value a9
Event: time 1718924054.062428, type 1 (EV_KEY), code 590 (?), value 1
Event: time 1718924054.062428, -------------- SYN_REPORT ------------
Event: time 1718924054.195904, type 4 (EV_MSC), code 4 (MSC_SCAN), value a9
Event: time 1718924054.195904, type 1 (EV_KEY), code 590 (?), value 0
Event: time 1718924054.195904, -------------- SYN_REPORT ------------
```

[0] - https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?id=0c7dd00de018ff70b3452c424901816e26366a8a

Change-Id: Ifc639b37e89ec251f55859331ab5c2f4b2b45a7d
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82996
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Forest Mittelberg <bmbm@google.com>
2024-06-24 15:17:20 +00:00
Sowmya V
a5e996feae mb/google/brya: Create tereid variant
This patch creates a new tereid variant, which is a Twin Lake platform.
This variant uses Nereid board mounted with the Twin Lake SOC and
hence the plan is to reuse the existing nereid variant code.

BUG=b:346442939
TEST=Generate the Tereid firmware builds and verify with boot check.

Change-Id: I052c3ba93d00e2df7e205c3127210bacaa956ca0
Signed-off-by: Sowmya V <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83145
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-24 15:15:36 +00:00
Felix Singer
e128edb17f acer/aspire_vn7_572g: Drop superfluous SATA AHCI mode configuration
The SATA controller is configured to AHCI mode by default. Drop the
setting from the devicetree.

Change-Id: I027b393300e2cbad827e176afddc197007314f10
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83178
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
2024-06-24 14:23:45 +00:00
Felix Singer
ba7569c10b skl mainboards/dt: Drop SataPortsDevSlp[x] setting if disabled
The attributes are initialized with 0 and thus setting them to 0 makes
them superfluous. Remove them.

Change-Id: I572a9092633c61907794ecbbbe431066d889c5fb
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83177
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-24 14:23:34 +00:00
Felix Singer
00e1376943 skl mainboards/dt: Drop SataPortsEnable[x] setting if disabled
The attributes are initialized with 0 and thus setting them to 0 makes
them superfluous. Remove them.

Change-Id: Icdf58a85bbde0dcb4e555df68cd20eade241dde3
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83176
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
2024-06-24 14:23:27 +00:00
Felix Singer
d91e20f19b skl mainboards/dt: Drop SataSalpSupport setting if disabled
The attributes are initialized with 0 and thus setting them to 0 makes
them superfluous. Remove them.

Change-Id: Icb41f0a9baded01267410bd4c9458ab4bfb82b70
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83175
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
2024-06-24 14:23:19 +00:00
Felix Singer
842ee24340 skl mainboards/dt: Drop ScsEmmcHs400Enabled setting if disabled
The attributes are initialized with 0 and thus setting them to 0 makes
them superfluous. Remove them.

Change-Id: I1239132d5f25345ebb051d216e9187f3d2250339
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83174
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-24 14:23:13 +00:00
Felix Singer
0c1daa59b9 skl mainboards/dt: Drop SsicPortEnable setting if disabled
The attributes are initialized with 0 and thus setting them to 0 makes
them superfluous. Remove them.

Change-Id: Ic16d568c38d708da27efa7229e23019e71c0019b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83173
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-24 14:22:46 +00:00
Werner Zeh
1a77d1e437 Makefile.mk: Fix inclusion of site-local/Makefile.inc
In commit 854dd9a5d1153fbb7ace2a7619bb98d024e284ce
(Makefile.mk: Put site-local path first) the inclusion of
site-local/Makefile.inc was moved to the first place. Unfortunately,
the very next line where subdirs-y is modified resets the variable
instead of extending it which overwrites the inclusion of
site-local/Makefile.inc. This breaks setups where
site-local/Makefile.inc is required.

This patch fixes it.

Change-Id: I36ad1aca5742869c84e2fb556f898f896c6f037a
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83190
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
2024-06-24 14:01:40 +00:00
Amanda Huang
ad3472a93c mb/google/trulo/var/orisa: Configure SEN_MODE_EC_PCH_INT_ODL as input
Configure GPP_R2 as input, no pull according to schematic_20240614.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: Ic678b77e5489f56d8ff92b265a6ca5852c0f7e8d
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83142
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-24 03:08:42 +00:00
Felix Singer
c0ba181403 skl mainboards: Move cpu_cluster device to chipset devicetree
Change-Id: I7114612e686a0bf3cfc241f45fa62077fad16f5a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83161
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-23 23:22:07 +00:00
Nicholas Chin
273be9f251 util/autoport: Remove bd82x6x/pch.h from generated mainboard.c
The southbridge/intel/bd82x6x/pch.h header was previously used to
configure a few registers in SPIBAR, but these have since been moved to
PCH code and the devicetree, making it unnecessary in mainboard.c

Change-Id: I904c95394b4fea73b4990342e647595b5f10335f
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82601
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-23 17:42:45 +00:00
Elyes Haouas
a93b5c8468 mb/emulation/qemu-riscv/cbmem.c: Fix device_tree.h include
Change-Id: I0b49ff8b6275fdde326c79ec21c34faa03094f9e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83160
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-06-22 09:21:27 +00:00
Maximilian Brune
da336cd5c6 treewide: Move device_tree to commonlib
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I990d74d9fff06b17ec8a6ee962955e4b0df8b907
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77970
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-22 04:02:04 +00:00
Maximilian Brune
5afdcd9190 libpayload/include/endian.h: Add 64 bit enc/dec
Add 64 bit encode/decode functions to libpayload, since it is required
in the patch that moves device_tree to commonlib.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I5dba9a7f41147a511ba1250786e7c51ce623e70a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83082
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-22 03:59:03 +00:00
Nikolai Vyssotski
854dd9a5d1 Makefile.mk: Put site-local path first
"site-local" Makfile(s) may need to override some of the macros/paths
used elsewhere in src/* Makefiles. If we include it last src/*
Makefile.mk will have already been processed. MAINBOARD_BLOBS_DIR is
an example where the path needs to be overwritten in site-local
requiring it to be included first before src/mainboard/* Makefile.mk
is processed.

Change-Id: I8ea865cd73aba5092a628b0422e5c4121b32fb4d
Signed-off-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-06-21 20:37:27 +00:00
Eran Mitrani
5fccf367b8 libpayload: add cse_*info pointer to lib_sysinfo
Set a pointer in lib_sysinfo for CSE_BP_INFO and CSE_INFO.

BUG=b:343022317
TEST=Verified CBMEM data in depthcharge on Screebo

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I3aa64d1e439a0596e732a3c0608d60913cefd19f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82790
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-21 19:59:39 +00:00
Elyes Haouas
e9b741c2bd coreboot-sdk/Dockerfile: Remove explicit install of 'm4'
Remove m4 as an explicity installed package as it will be
installed automatically by flex and bison.

Change-Id: Ic4f1c5e6f3324429914bf593047d802dfcc0cb30
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82512
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 19:56:15 +00:00
Morris Hsu
96d48fe3d2 mb/google/brask/var/constitution: Generate SPD ID for supported parts
Add supported memory part in mem_parts_used.txt, then generate.

H54G56CYRBX247

BUG=b:199645942
TEST=run part_id_gen to generate SPD id

Change-Id: I2169d71695d8d133d26cafe5c7be33b976dd8603
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83127
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 16:48:47 +00:00
Aseda Aboagye
37cea5a9c0 ec/google/chromeec: Update ec_cmd_api.h and ec_commands.h
Generated using update_ec_headers.sh [EC-DIR].

The original include/ec_commands.h version in the EC repo is:
  d0771e49e7 MKBP: Increase key matrix size
The original include/ec_cmd_api.h version in the EC repo is:
  d0771e49e7 MKBP: Increase key matrix size

Change-Id: I4f3dfc3f145e50e6114894352cdc118ad5a9565b
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82995
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Forest Mittelberg <bmbm@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 16:46:42 +00:00
Aseda Aboagye
d5c177c9a5 include/input-event-codes.h: Update to latest HID tree
This commit simply updates the input-event-codes.h to the HID
maintainers' tree at SHA c412e40267dd4ac020c5f8dc8c1cccc04e796ff4.

Change-Id: Ic1fb9b18ced37866b84230929cd5c785d0dde9ba
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82993
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-06-21 16:46:04 +00:00
Maxim Polyakov
81f4beba79 util/intelp2m: Remove blank line after '{'
The generator inserts into the gpio.h an unnecessary blank line in
front of the list of macros in the table. Let's remove this from the
template to make the code cleaner. These changes have no effect on the
configuration of macros.

Change-Id: I1141ca630cb6d9a46be5bce2b434762ef8e6fdd0
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83003
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 16:07:07 +00:00
Maxim Polyakov
a022d88b6f util/intelp2m/platforms: Fix DW register number before clear it
This error does not affect the generated files as the tests are
running [1, 2, 3]. However, this once again confirms the need to
work on updating the utility.

[1] CB:67132
[2] CB:67133
[3] CB:67134

Change-Id: I91e74d65977bd5e10589530258d1709ea33f1af5
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83002
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 16:06:41 +00:00
Patrick Rudolph
0395b4b5f2 mb/emulation/qemu: Configure TSEG size
Configure TSEG size by reading CONFIG_SMM_TSEG_SIZE in romstage.
The remaining Qemu code can already handle the bigger TSEG region.

TEST: Increased TSEG to 8MiB.

Change-Id: I1ae5ac93ecca83ae9c319c666aac844bbd5b259f
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83114
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-06-21 15:52:24 +00:00
Patrick Rudolph
f40f5b6dd5 commonlib/fsp_relocate: Add PE32+ support
Add support for PE32+ binaries which can be found on X64 UEFI
builds.

TEST: Able to relocate and boot a X64 FSP.

Change-Id: I22586834d7c9f3ab3a5e31bba957584587ec14e0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82680
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 15:49:38 +00:00
Elyes Haouas
f725c24c37 util: Move remainings from ipqheader to qualcomm directory
With commit 101098c41a ("sdm845: Combine BB with QC-Sec for ROM boot"),
most files from ipqheader were moved to the qualcomm directory.

Change-Id: I4e5136bd5ec4fd47bbd93cea2e4614fa63a3bd4e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83028
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-21 15:19:00 +00:00
Kapil Porwal
53e5d1f553 soc/intel/cmn/block/cse: Create CBMEM entries for payload to fill with CSE info
Currently, the payload cannot create new CBMEM entries as there is
no such infrastructure available. The Intel CSE driver in the payload
needs below CBMEM entries -

1. CBMEM_ID_CSE_INFO to -
  a. Avoid reading ISH firmware version on consecutive boots.
  b. Track state of PSR data during CSE downgrade operation.

2. CBMEM_ID_CSE_BP_INFO to avoid reading CSE boot partition
information on consecutive boots.

The idea here is to create required CBMEM entries in coreboot so
that later they can be consumed by the payload.

BUG=b:305898363
TEST=Store CSE version info in CBMEM area in depthcharge on Screebo

Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: I9561884f7b9f24d9533d2c433b4f6d062c9b1585
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83103
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 15:17:12 +00:00
Subrata Banik
2a84b83349 soc/intel/cmn/acpi: Add support for PCR_BASE_ADDRESS above 4 GiB
This change updates the Northbridge ASL to conditionally include a
QWordMemory resource for `SM01` when the `CONFIG_PCR_BASE_ADDRESS`
is above 4 GiB.

If `CONFIG_PCR_BASE_ADDRESS` is below 4 GiB, or falls within the
PCH reserved range, the existing handling of `SM01` remains unchanged
(as a DWordMemory resource).

TEST=Built with CONFIG_PCR_BASE_ADDRESS both above and below 4 GiB,
verified ASL output.

Change-Id: I9547377cdea6cb4334ab59b3bc837059fbb22e3b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83112
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Reviewed-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21 03:20:56 +00:00
Subrata Banik
6fc8bd9a7b util/ifdtool: Add Panther Lake platform support under IFDv2
BUG=b:347669091
TEST=Able to build ifdtool.

Change-Id: Id261898932f11f4c9066453bce18fd889996e171
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83141
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-21 03:20:46 +00:00
Yu-Ping Wu
0d01d06912 soc/mediatek/mt8188: Respect ARM64_BL31_OPTEE_WITH_SMC option
Since BL31_MAKEARGS is already handled in arm64/Makefile.mk, remove the
duplication from mt8188/Makefile.mk. In addition, reserve the memory
range for running OP-TEE only if ARM64_BL31_OPTEE_WITH_SMC is enabled.

BUG=b:347851571
TEST=emerge-geralt coreboot
BRANCH=geralt

Change-Id: I88a9a07a685a6c9fe9739b6101ccb8a5ce23fd8b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83128
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-21 01:49:49 +00:00
Yu-Ping Wu
3ac5fb3091 arch/arm64: Add Kconfig option ARM64_BL31_OPTEE_WITH_SMC
Add a new Kconfig option ARM64_BL31_OPTEE_WITH_SMC to control whether to
build the OP-TEE dispatcher for BL31. This config also enables the BL31
build option OPTEE_ALLOW_SMC_LOAD, which allows loading the OP-TEE image
after boot via a Secure Monitor Call (SMC). For ChromeOS devices,
CROS_WIDEVINE_SMC is also enabled to allow passing secrets from firmware
to OP-TEE.

BUG=b:347851571
TEST=emerge-geralt coreboot
BRANCH=geralt

Change-Id: I4dcf82d47b537146d71ce3cd2050ec597ed0734f
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83111
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-21 01:49:43 +00:00
Subrata Banik
063c594e9f libpayload/x86: Extend exception handling to x86_64 architecture
Adds 64-bit (x86_64) support to libpayload's exception handler,
previously limited to x86_32.

Ensures `exception_init_asm` is called when building with
LP_ARCH_X86_64 Kconfig.

BUG=b:336265399
TEST=Successful build and boot of google/rex and google/rex64 on
ChromeOS.

Verified correct x86_64 exception handling by triggering "Debug
Exception" using firmware-shell as below:

firmware-shell: mm.l -0
Debug Exception
Error code: n/a
REG_IP:    0x0000000030023e9f
REG_FLAGS: 0x0000000000000046
REG_AX:    0x0000000000000009
REG_BX:    0x0000000000000000
REG_CX:    0x0000002000000000
REG_DX:    0x0000000000000001
REG_SP:    0x0000000034072ec0
REG_BP:    0x0000000000000009
REG_SI:    0x0000000000000029
REG_DI:    0x0000000034072eef
REG_R8:    0x0000000000000009
REG_R9:    0x0000000000000000
REG_R10:   0x0000000000000000
REG_R11:   0x0000000034072d70
REG_R12:   0x0000000000000004
REG_R13:   0x0000000000000001
REG_R14:   0x0000000034072ee6
REG_R15:   0x0000000000000004
CS:     0x0020
DS:     0x0000
ES:     0x0000
SS:     0x0018
FS:     0x0018
GS:     0x0050
Dumping stack:
0x340730c0: 3003c32e 00000000 ... 00000000 00000000
0x340730a0: 30034bc6 00000000 ... 0000002a 00000000
0x34073080: 34073234 00000000 ... 00002e65 00000000
...
...
0x34072ee0: 340730ed 30300000 ... 34073000 00000000
0x34072ec0: 34072ed8 00000000 ... 00000000 00000008
Ready for GDB connection.

Change-Id: I8f0aa1da8d179a760e8d49c3764dfd5a69d06887
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83036
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-20 19:51:18 +00:00
Arthur Heymans
6ed0ba1e93 cbfstool: Read XIP stage alignment requirements from ELF
On x86_64 romstage can contain page tables and a page table pointer
which have an larger alignment requirement of 4096. Instead of
hardcoding it, read if from the ELF phdrs.

Change-Id: I94e4a4209b7441ecb2966a1342c3d46625771bb8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82102
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-20 19:34:14 +00:00
Roger Wang
71c9010443 mb/google/nissa/var/sundance: Increase I2C1 hold time to 126ns
According to the vendor spec, I2C1 hold time needs > 100ns.
System needs to adjust the I2C1 sda_hold value from 7 to 13,
the system will change the I2C1 hold time from 70ns to 126ns.

BUG=b:347157276

TEST=built bootleg and verified test result by EE team

Change-Id: I722ec93177b6debf6b4c99de2df68c942560a3ff
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83080
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-20 13:06:53 +00:00
Jing Tong
daea4e7934 mb/google/brox/var/lotso: enable CNVi bluetooth
Lotso's WIFI_BT is same design as brox, copy from brox.

BUG=b:339612353
TEST=emerge-brox coreboot chromeos-bootimage and boot on

Change-Id: I030e306dc5d9d3fcb6314bc491dbf5c9ae60bcb7
Signed-off-by: Jing Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83126
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
2024-06-20 06:56:22 +00:00
Felix Singer
37c8c85b30 documentation: Fix evaluation of reStructuredText
eval_rst isn't a valid directive. Use eval-rst instead. Also, add curly
braces where necessary since the MyST parser requires them.

Change-Id: I68337354e9bd4de4b2c29d4e42c3bb22337fbe06
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83117
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-06-19 17:43:06 +00:00
Martin Roth
1eccf77a78 util: Break up spdx identifier text in scripts & makefiles
The SPDX parsers can find the SPDX identifiers in the scripts and
makefiles if they aren't broken up. This unnecessarily confuses things
when we're doing license parsing.

Change-Id: I215ed047397f342c912f1a969315fa184a124f6a
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80585
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-06-19 17:42:43 +00:00
Jian Tong
3fc7a8f507 mb/google/brox/var/lotso: Update devicetree setting
Based on schematics NB7228A_LOTSO_INTEL_MB_PROTO_20240521A_BOM.pdf update devicetree settings.

BUG=b:333494257
TEST=emerge-brox coreboot chromeos-bootimage and boot on

Change-Id: Ic9a7a9062f5c6e45c5bd9617f3b2a0634b8dc1db
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83051
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-19 03:15:17 +00:00
Jing Tong
466bbc2b6d mb/google/brox/var/lotso: Update verb table from ALC256 to ALC257
Update verb table provided by Realtek on 20240614.

BUG=b:344471736
TEST=emerge-brox sys-boot/coreboot sys-boot/chromeos-bootimage

Device list:
cat /sys/bus/hdaudio/devices/ehdaudio0D0/chip_name
ALC257
cat /sys/bus/hdaudio/devices/ehdaudio0D0/vendor_name
Realtek

Headphone detection:
Event: time 1718633617.056092, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1718633621.471708, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1718633623.898046, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1718633625.743663, type 1 (EV_KEY), code 115
(KEY_VOLUMEUP), value 1
Event: time 1718633625.743678, type 1 (EV_KEY), code 115
(KEY_VOLUMEUP), value 0

Change-Id: Idde8963de9302849f87b7c262f17d9c9d99b46dc
Signed-off-by: Jing Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83109
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-19 03:15:02 +00:00
David Wu
c295d01451 mb/google/nissa/var/riven: Disable unused GPIOs based on fw_config
Disable LTE, stylus and WFC related GPIOs based on fw_config.

BUG=b:337169542
TEST=Local build successfully.

Change-Id: I91adc4e70d0d23b737d4fa6725cd96e63108f874
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83062
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-18 22:03:18 +00:00
Roger Wang
9abc91cc45 mb/google/nissa/var/sundance: disable pcie port7
Disable pcie port7 to prevent s0ix issue when run the FAFT sleep test.

BUG=b:328147465
TEST=Build and check S0ix function and verify FAFT sleep funciton.

Change-Id: I53f704ed11a5c63b5c079c6e60ce2fa32bbd8b1a
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-18 21:52:54 +00:00
Roger Wang
2b8367ed4b mb/google/nissa/var/pujjoga: disable pcie port7
Disable pcie port7 to prevent s0ix issue when run the FAFT sleep test.

BUG=b:335312655
TEST=Build and check S0ix function and verify FAFT sleep funciton.

Change-Id: I7918e26fe382d4d9992a0e2744a2f8894a070e36
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83058
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-18 21:52:40 +00:00
Sumeet Pawnikar
f3c6261931 MAINTAINERS: Add Intel DPTF section with Sumeet Pawnikar as maintainer
I am the one who takes care of end to end DPTF (Thermal Management)
related coreboot things across various X86 based platforms.

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Change-Id: I08a1ae48bd5b66ee2f7903615e64d0bab5e0d7d0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-18 19:36:53 +00:00
Roger Wang
e6d2b8a775 mb/google/nissa/var/pujjoga: Update DPTF parameters
Adjust settings as recommended by thermal team.

Update DPTF parameters based on b:346930334

BUG=b:346930334

TEST= built bootleg and verified test result by thermal team

Change-Id: I363eaa72b5190212b014fe4e2c2fca10e2a3f408
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83079
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-18 13:09:19 +00:00
Roger Wang
1985cac30b mb/google/nissa/var/sundance: Update DPTF parameters
Adjust settings as recommended by thermal team.

Update DPTF parameters based on b:346932306

BUG=b:346932306

TEST= built bootleg and verified test result by thermal team

Change-Id: I6a529365249a5372dd87ef28cb9ea8d540b9cac0
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83078
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2024-06-18 13:08:40 +00:00
Anand Vaikar
6e8d0122eb soc/amd/cezanne: Add AMD Renoir SOC support
Add AMD SOC Family 17h Renoir CPUIDs per PPR doc #55922

Renoir is similar to Cezanne with only differences in CCX count.
Cezanne has one Zen3 CCX with 8 cores per CCX compared to
the two Zen2 CCX with 4 cores per CCX. Hence, coreboot side
Cezanne SOC code should be mostly compatible with Renoir and
can be leveraged.

Change-Id: I6b43eb782527351c79b835d094a5b61103cd6642
Signed-off-by: Anand Vaikar <a.vaikar2021@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83099
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-18 13:08:00 +00:00
Subrata Banik
3d523c4cd8 cpu/x86: Rename paging structure variables for clarity
The following variables have been renamed:

* PDPE_table -> PDPT (Page Directory Pointer Table)
* PDE_tables -> PDT (Page Directory Table)

This change improves the consistency and clarity of the code
as per AMD Architecture Programmer's Manual document.

PML4 -> PDPT -> PDT -> 2MB Physical Page

TEST=Able to build and boot google/rex64.

Change-Id: Ib57d1d54c2c1f4fcce2315b508ed7643251a20c5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-06-18 08:25:24 +00:00
Subrata Banik
04fd591b08 cpu/x86: Rename PDE_table to PDPT for 1 GiB page mappings
This commit fixes an incorrect variable name in the page table setup
for 1 GiB pages.

The label PDE_table was used when it should have been PDPT, as it
represents a "Page Directory Pointer Table (PDPT)", not a "Page
Directory Table (PDT) or PDE_Table".

This change ensures correct nomenclature and consistency in the code.

PML4 -> PDPT --------> 1GB Physical Page

As per x86-64 specification, 1GB pages bypass the Page Directory Table
(PDT) level of the page table hierarchy, mapping directly from the
Page Directory Pointer (PDPT) Table to the physical page.

Change-Id: I1e1064653a265215054f31f0e4e46bf8200ca471
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83100
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-06-18 08:25:17 +00:00
Matt DeVillier
5acdfa23fd Revert "mb/google/brox/var/lotso: enable CNVi bluetooth"
This reverts commit 0e0bc618e3ed1888ac140010057dc7485443c3c2.

Reason for revert: Merged out of order, breaks tree

Change-Id: I22bd85a2008db471177257a8b779c06898b1010c
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83105
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-06-17 16:05:54 +00:00
Fabian Meyer
92e372bb35 util/intelp2m: Add support for Emmitsburg macro generation
Test: Generated GPIO for ASRock Rack SPC741D8-2L2T/BCM.

Change-Id: Ib7ded47fb1c0b87ebb3cecaf3e41319ac552b797
Signed-off-by: Fabian Meyer <fabian.meyer@student.kit.edu>
Co-authored-by: Yussuf Khalil <yussuf.khalil@kit.edu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maxim <max.senia.poliak@gmail.com>
2024-06-17 14:30:28 +00:00
David Wu
2fb6eec811 mb/google/nissa/var/riven: Disable storage devices based on fw_config
Disable devices in variant.c instead of adding probe statements to
devicetree because storage devices need to be enabled when fw_config is
unprovisioned, and devicetree does not currently support this (it
disables all probed devices when fw_config is unprovisioned).

BUG=b:337169542
TEST=Local build successfully.

Change-Id: I3d71a35e9c0a33b72720b093b5a05eb69d5bb9f8
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83060
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-17 14:29:40 +00:00
David Wu
56d116f449 mb/google/nissa/var/riven: Add initial override devicetree
Add initial override devicetree for riven based on
the latest schematic (Riven(ZDK)_MB_Proto_0601.pdf).

1. Add eMMC DLL tuning value (copy from craask)
2. Configure I2C frequency (copy from craask)
3. Add audio codec and speaker amp settings
4. Add Elan touchscreen settings (copy from craask)
5. Add WFC and usb settings (copy from craask)
6  Add Elan and Synaptics touchpad settings (copy from craask)
7. Add WIFI6(CNVI) and WIFI7(PCIE) configuration
8. Add LTE settings (copy from craask)

BUG=b:337169542
TEST=Local build successfully.

Change-Id: I1dda3557edb44dda9c3a1efaf98437352978561c
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83059
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-17 14:29:11 +00:00
Angel Pons
d15a49b069 util/autoport: Factor out yes/no prompt handling
In preparation for introducing other yes/no prompts, factor out the
logic into a common function.

Change-Id: Iff1f0c6c665a5352013122fb791121a116c434f3
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82402
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-17 14:28:28 +00:00
Felix Held
9060994014 vc/amd/opensil/*/opensil.h: add missing device/device.h include
device/device.h provides the definition of struct device.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id1c3c09665e3eedec6055f4a0586016c5a5537bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83083
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-17 14:27:30 +00:00
Angela Czubak
c5755810df mb/google/drallion: Set touchpad IRQs as wake source
Elan touchpad driver in newer linux kernels (>= 5.15) no longer
explicitly configures the touchpad as a wakeup source for devices
not using device tree. It is now assumed this information should be
extracted from ACPI, therefore we need to update drallion's devicetree
so that the device regains its lost capability.

TEST=update drallion FW and verify touchpad can cause wake up from
     suspend

Change-Id: Iff21afda144cc11a013cb72816064df1c9eb21ae
Signed-off-by: Angela Czubak <aczubak@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83070
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-17 14:27:19 +00:00
CoolStar
a48a3f3ef3 ec/google/chromeec/acpi/cros_ec: Ensure GpioInt and _PRW are mutually exclusive
Under Windows ACPI, GpioInt and _PRW must be mututally exclusive within
the scope of a device, otherwise a BSOD occurs with an ACPI_BIOS_ERROR.
To enforce this, only use _PRW when EC_ENABLE_SYNC_IRQ_GPIO is not set.
If both EC_ENABLE_WAKE_PIN and EC_ENABLE_SYNC_IRQ_GPIO are set, then
ensure that the GpioInt is flagged as ExclusiveAndWake (vs just
Exclusive) so that the CREC device is still able to wake the device
as needed.

TEST=Build/boot google/{nocturne,frostflow} to Win11 w/ sync_irq_gpio
and wake_pin both enabled.

Change-Id: Ia59cce2ee12bfc8d3ac0173a7a4ec88d7079a958
Signed-off-by: CoolStar <coolstarorganization@gmail.com>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82233
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-17 14:26:13 +00:00
Matt DeVillier
c98ef0dd25 mb/google/brya/base/nissa: Add default GMA panel
Enables ACPI brightness controls to be generated, and display
brightness controls to be functional under Windows.

TEST=build/boot Win11 on google/brya (craaskin), verify display
brightness controls present and functional.

Change-Id: I821b912cf52b5b89c5c9d831a5a15566b1b31639
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83071
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-17 14:25:40 +00:00
Matt DeVillier
5f15771616 mb/google/brya: Add default ACPI brightness levels
Boards using the brya baseboard already generate ACPI brightness
controls via their use of the gfx/generic driver, but need the
default brightness steps in order for display brightness control
to be functional under Windows.

TEST= build/boot Windows 11 on banshee, verify brightness controls
functional.

Change-Id: I03bb7a7309476839c49d2e862a036d9e89800605
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70372
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-17 14:25:24 +00:00
Jian Tong
0e0bc618e3 mb/google/brox/var/lotso: enable CNVi bluetooth
Lotso's WIFI_BT is same design as brox, copy from brox.

BUG=b:339612353
TEST=emerge-brox coreboot chromeos-bootimage and boot on

Change-Id: I3946297db7f10a31570f773bdc5665f9f472c9fe
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83053
Reviewed-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-17 12:02:12 +00:00
Amanda Huang
ad68d05324 mb/google/trulo/var/orisa: Configure GPIO settings
Configure GPIOs according to schematic_20240607.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: I760a7a234df43db3a557b3be9e20ff7aa5f80b72
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82661
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-17 06:39:53 +00:00
David Wu
de366a5252 mb/google/nissa/var/riven: Use unified AP FW for UFS/Non-UFS SKUs
This patch selects USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS which intends to achieve a unified AP firmware image across UFS and non-UFS skus.

BUG=b:328580882
TEST=Local build successfully.

Change-Id: Ifcee68a3492ab4606819de0be41701f803151f66
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83061
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-17 06:34:28 +00:00
Felix Singer
a03fc30baa mb/hp/snb_ivb_laptops/8560w: Move genx_dec settings into LPC scope
Change-Id: I3cb0a39c83d6c92d604f1190538db88d97a81693
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83091
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-06-17 02:28:44 +00:00
Felix Singer
24ea4daf8f mb/hp/snb_ivb_laptops/8560w: Make use of device alias names in dt
Also, remove superfluous comments from devices which repeat their name.

Change-Id: I26f7d5155f73bcf3cb3872f206c946da5029bda8
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-06-16 17:26:41 +00:00
Nicholas Chin
090f352c2c console: Only add non-stub code to romstage if SEPARATE_ROMSTAGE=y
If both CONFIG_SEPARATE_ROMSTAGE and CONFIG_BOOTBLOCK_CONSOLE are not
set, compilation will fail with errors indicating redefinitions of
various console methods.

When BOOTBLOCK_CONSOLE is not set, the __CONSOLE_ENABLE__ macro in
include/console/console.h evaluates to zero when compiling the
bootblock, resulting in various console methods being defined as stubs
in the header. In a typical build with a separate bootblock and
romstage, this will not cause a conflict as the non-stub definitions
found in the console/*.c files are added conditionally to the bootblock
depending on CONFIG_BOOTBLOCK_CONSOLE.

When SEPARATE_ROMSTAGE is not set, the list of romstage objects gets
added to the bootblock. Since the console sources were unconditionally
added to romstage, the non-stub definitions were able to slip into the
bootblock, causing a redefinition of the stubs.

Avoid this by conditionally adding these sources to romstage depending
on CONFIG_SEPARATE_ROMSTAGE. If SEPARATE_ROMSTAGE is set, the non-stub
definitions are handled in the same way as they were before. If it is
not set, the union of bootblock and romstage objects will only include
the non-stub definitions based on CONFIG_BOOTBLOCK_CONSOLE, which uses
existing console/Makefile.mk rules for the bootblock.

TEST=qemu-i440fx builds successfully with all possible settings of
CONFIG_SEPARATE_ROMSTAGE and CONFIG_BOOTBLOCK_CONSOLE.

Change-Id: I59b3f0c52a4338b1573e0a647bc16cec4943fd7f
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83088
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-16 13:47:11 +00:00
Benjamin Doron
32bf60ee5c soc/intel/alderlake: Use the RPL-P IoT FSP if desired
This change also drops a duplicated config default line, which might be
why this was omitted.

Change-Id: I2b4c8b316adaadec3e49d5162b37b37629331b06
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83086
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-16 13:45:20 +00:00
Felix Singer
4cd9056e32 mb/gigabyte/ga-b75m-d3h: Make use of device alias names in dt
Also, remove superfluous comments from devices which repeat their name.

Change-Id: Ia4a9a5c5897fe78a1243e4c42a7d8753cfe039c0
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83095
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-16 13:43:44 +00:00
Felix Singer
b4e8ccee93 mb/gigabyte/ga-b75m-d3h: Remove superfluous comments from dt
Change-Id: I20aca1a63306b0f39f97fd0b85d61cd957cb2150
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83094
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-16 13:43:32 +00:00
Felix Singer
70b411c44d mb/gigabyte/ga-h61m-series: Make use of device alias names in dt
Also, remove superfluous comments from devices which repeat their name.

Change-Id: I00473e44fce9197f818f5a8d131e9be31e8b0f69
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83093
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-16 13:43:19 +00:00
Felix Singer
080f0bace1 mb/gigabyte/ga-h61m-series: Remove superfluous comments from dt
Change-Id: I6026498c2853f5951227ace57b7198579f342647
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83092
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-16 13:43:08 +00:00
Nicholas Chin
c862608847 mb/dell/snb_ivb_latitude: Move E6430 USB config to devicetree
As of commit ee12634872 (nb/sandybridge,sb/bd82x6x: Configure USB from
southbridge devicetree) and earlier commits, the USB port configuration
should be located in the devicetree instead of the mainboard_usb_ports
array, typically located in the boards early_init.c.

TEST=USB ports still function; and the USBIRx, USBPDO, USBOCM1, and
USBOCM2 RCBA registers in the inteltool dump did not change between
an E6430 build before and after the sb/intel/bd82x6x that moved the
usb config to the devicetree.

Change-Id: Ia5aa03a5894a8ef29e863470925a223f52e0ab70
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83006
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-16 13:42:45 +00:00
Martin Roth
bbac6b9f8a .gitmodules: Use https to fetch modules
Instead of using a relative path for the submodules, specify the sub-
module URLs as pointing at coreboot.org, using https.

While the relative path works well for coreboot itself, when the repo
is forked and fetched from from anywhere other than review.coreboot.org,
this file either needs to be modified, or all the submodules need to be
checked out as well.

Change-Id: Ie4f95c70a7f194d1073dc561c9f33dcc108060cc
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80552
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-15 11:48:04 +00:00
Iru Cai
56ed345b5e mb/hp: Add Elitebook 8560w as an HP Sandy/Ivy Bridge laptop variant
The components listed in the documentation work in this port.
The MXM structure of the vendor firmware is added, which is
used by the VGA option ROM with int15h functions.

Change-Id: I15181792b1efa45a2a94d78e43c6257da1acf950
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-15 08:35:27 +00:00
Angel Pons
cb125d6f94 util/inteltool: Add more Westmere/Ironlake device IDs
The host bridge PCI device ID can be changed by the firmware. There
is no documentation about it, though. There's 'official' IDs, which
appear in spec updates and Windows drivers, and 'mysterious' IDs,
which Intel doesn't want OSes to know about and thus are not listed.

For the sake of completeness, add the PCI device IDs for Clarkdale.
Though coreboot only supports Arrandale, both of them are Ironlake.

It is possible that the Management Engine handles changing the PCI
device ID, which would not happen when using a broken ME firmware.

Change-Id: I85a48fcf0e0e62f42fe147a5d4e2d557b2143e5b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60215
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-14 15:41:26 +00:00
Sergii Dmytruk
d20cc994ba util/smmstoretool: add uint64 data type
It's in particular useful for working with variables that contain 64-bit
pointers, like CapsuleUpdateData* global variables defined by UEFI
specification.

Change-Id: I4b46b41cdc5f69d4ca189659bef1e44f64c0d554
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-06-14 14:19:46 +00:00
Sergii Dmytruk
dd6c3b4a61 util/smmstoretool: fix uint{16,32} not being listed by help
These data types were added during review of CB:79080 but they weren't
added to the help message.

Change-Id: I6e79d65c80c292c3f5d2a2611e602db5cc6cf374
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82610
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2024-06-14 14:18:58 +00:00
Jincheng Li
d6c58b79e7 soc/intel/common/block: Move VTd basic definitions into header file
TEST=Build and boot on intel/archercity CRB

Change-Id: I4f9e606cf9ec01ec157ef4dd7c26f6b5eb88c7b7
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82941
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-14 13:57:03 +00:00
Seunghwan Kim
99a190105f mb/google/brya/var/xol: Turn off camera power during s0ix
Turn off camera power during s0ix to improve power consumption.

BUG=None
BRANCH=brya
TEST=built and verified GPP_A17 went to low during s0ix with a scope.

[Measurement of s0ix power consumption - 1 hour avg]
 Before this: 301.4 mW
 After this: 299.8 mW

Change-Id: Iae02d06e9f5a5988563b2b7ae36d153aecedb9d7
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83029
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-06-14 12:36:00 +00:00
Alper Nebi Yasak
08d7d31384 mainboard/qemu-riscv: Get top of memory from device-tree blob
Trying to probe RAM space to figure out top of memory causes an
exception on RISC-V virtual machines with recent versions of QEMU, but
we temporarily enable exception handlers for that and use it to help
detect if a RAM address is usable or not. However, QEMU docs recommend
reading device information from the device-tree blob it provides us at
the start of RAM.

A previous commit adds a library function to parse device-tree blob that
QEMU provides us. Use it to determine top of memory in RISC-V QEMU
virtual machines, but still fall back to the RAM probing approach as a
last-ditch effort.

Change-Id: I9e4a95f49ad373675939329eef40d7423a4132ab
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-06-14 12:35:22 +00:00
Jett Rink
d41ad724cd tpm: Add Ti50 OpenTitan DID_VID
The OpenTitan HW implements the same firmware interface as the Ti50
H1D3C hardware variant; it just has a different DID_VID. Allow this new
DID_VID to be recognized correctly.

BUG=b:324940153

Change-Id: Iaacf6d88bc6067948756c465aac1cd8b24ecae1f
Signed-off-by: Jett Rink <jettrink@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83033
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-14 12:33:31 +00:00
Werner Zeh
ce9562f662 Documentation/index.md: Add coreboot's blob policy
Every now and then we have discussions about blobs and how and if they
should be introduced or handled. This patch adds a clear statement on
the project's view on this topic to avoid unclear situations in the
future.

Change-Id: I20bc0b345c129ecd59aa1190647d89f6d4e07d46
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82086
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-14 08:57:13 +00:00
Subrata Banik
21c9390d97 soc/intel/adl: Skip RW CBFS ucode update if RO is locked
This patch eliminates coreboot from loading microcode from RW CBFS
(when the RO descriptor is locked, which indicates a fixed RO image)
because the kernel can already patch the microcode on BSPs and APs
while booting to OS.

This may be a chance to lower the burden on the AP FW side because
patching microcode on in-field devices is subject to firmware updates,
which are rarely published and, if required, must go through the
firmware qualification testing procedure (which is costly, unlike
kernel updates for ucode updates).

1. The FIT loads the necessary microcode from the RO during reset.
2. Reloading microcode from RW CBFS impacts boot time
   (~60ms, core-dependent).
3. The kernel can still load microcode updates.

ChromeOS devices leverage RO+RW-A/RW-B booting. The RO's microcode is
sufficient for initial boot, and the kernel can apply updates later.

BUG=none
TEST=Verified boot optimization; in-field devices skip RW-CBFS microcode
loading when RO is locked.

Change-Id: I68953d45d3624aba0a3be28bc7b266b7621ddcc4
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82999
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-13 14:30:31 +00:00
Matt DeVillier
4f0b2e04bc soc/intel/apollolake: Add SoC-specific microcode update check for GLK
While both APL and GLK load the CPU microcode from FIT, only GLK
supports the PRMRR/SGX feature. When this feature is supported, the
FIT microcode load will set the msr (0x08b) with the patch id/revision
one less than the revision in the microcode binary. This results in
coreboot attempting (and failing) to reload the microcode again in
ramstage. Avoid the microcode reload attempt for GLK by using a SoC-
specific microcode update check which accounts for the off-by-1 when
comparing versions.

Implementation is based on the one used for SKL and CNL, but modified
based on feedback in comments on Gerrit.

TEST=build/boot google/reef (electro) and google/octopus (ampton),
verify in cbmem console log that CPU microcode update in ramstage is
skipped due to already being up to date, and that GLK uses the
SoC-specific check and APL uses the non-specific/general one.

Change-Id: Iab97f23d4388d5057797bb13f585db821c735bd0
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83037
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-13 11:47:48 +00:00
Mate Kukri
5f0c3a6ae2 mb/dell/optiplex_9020: Fix integrated video port list
- Physical DP ports are DP2/DP3 (HDMI2/HDMI3 for DP++)
- VGA port is Analog
- DP1 is not connected

Signed-off-by: Mate Kukri <kukri.mate@gmail.com>
Change-Id: I8ed79167d5445d607acbee491c3382ff2585583f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-13 11:47:24 +00:00
Matt DeVillier
5d904b909a drivers/gfx/generic: Don't set DOD constraints when generating device address
When dynamically generating the DOD (Display Output Device) device
address (_ADR), don't set the DOD constraint flags; only set them when
using the address value to generate the DOD package.

This fixes ACPI brightness control functionality under Windows 11.

Before: Name (_ADR, 0x80010400)
After:  Name (_ADR, 0x00000400)

TEST=build/boot Win11 on google brya (banshee), ensure display
brightness controls present and functional.

Ref: ACPI Spec 6.5 Appendix B.6.1 - _ADR

Change-Id: I1d710c6e55e6cb1d20d580bd784221ee1482b871
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83025
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-13 11:46:53 +00:00
Subrata Banik
04202d1a7e libpayload/arch/x86: Fix register alignment in exception state dump
Removed an extra space character from the `printf` format string in
`dump_exception_state` to ensure proper alignment of register values
when printed during exception handling.

BUG=b:336265399
TEST=Built and booted google/rex64 successfully.
Verified correct alignment in exception state dumps.

Change-Id: I8ff92775e32ee754967b1b0a43cd68971b4aadfc
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83047
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-12 19:40:12 +00:00
Maximilian Brune
e437cb5f87 soc/sifive/fu540/chip.c: Add RAM resources
Add RAM region so that the payload can be placed in there without
coreboot complaining that the payload doesn't target a RAM region.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Id07eae3560ce69cd8a6a695702fa0b4463c50855
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81909
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-12 19:16:26 +00:00
Maximilian Brune
61dee38ee0 configs: Add Hifive Unleashed config with OpenSBI
OpenSBI often breaks if you update it. This should ensure that jenkins
keeps an eye on it.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I2101b194bf0d74f4f444fba507e0294bddc746d3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81859
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-06-12 19:16:04 +00:00
Maximilian Brune
40c4cbed2f soc/sifive/fu540/memlayout.ld: Enlarge OpenSBI region
OpenSBI got bigger and doesn't fit anymore in 128K which causes coreboot
to not compiler anymore because the region overlaps with ramstage

This patch simply increases the size and uses the OpenSBI linker macro
instead.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: If1ccaafbf91dae986c470020faf9c0b4fba448e5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83046
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-06-12 19:15:44 +00:00
Matt DeVillier
12f1fe68fc mb/google/volteer/var/drobit: Update boot resolution in VBT
Enable the fixed boot mode option in the VBT and set it to 1920x1080,
so that drobit boards equipped with 4K screens are legible at boot.

TEST=build/boot drobit w/4K screen using edk2 payload, verify boot
resolution set to 1080p and UEFI menus readable without a magnifying
glass.

Change-Id: If1f9e36d9bbdc2955ba890e2832aa64af9ba8f73
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-12 16:45:32 +00:00
Kun Liu
48a7246bec mb/google/brox: Generate RAM IDs
Generate RAM IDs for

K3KL6L60GM-MGCT
H9JCNNNBK3MLYR-N6E
K3KL8L80DM-MGCU
MT62F1G32D2DS-023 WT:C
H58G56BK8BX068

BUG=b:333494257
BRANCH=None
TEST=Run part_id_gen tool without any errors

Change-Id: I7a240a263816193b9f3d418385c1673e9d3f89db
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83040
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
2024-06-12 14:57:08 +00:00
Jian Tong
95332df9d3 mb/google/brox/var/lotso: Update gpio setting
Based on lotso EVT schematics update gpio settings.

GSPI0_CS0_L -> NF7
GSPI0_MISO -> NF7
GSPI0_MISO -> NF7
GPP_F18 -> EDGE_SINGLE

BUG=b:333494257
TEST=emerge-brox coreboot chromeos-bootimage and boot on

Change-Id: I12d84538566c4d51fe346eb5609e55d91ddafbea
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83039
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
2024-06-12 14:50:02 +00:00
Keith Hui
f883855cd7 util/autoport: Update for recent USB developments
Update autoport for:

1. Commit ee126348726b ("nb/sandybridge,sb/bd82x6x: Configure USB from
southbridge devicetree")
2. Commit 94625d2aae76 ("sb/intel/bd82x6x: Allow actual USBIRx values
for native USB config")

As a side effect of #2 above, no more (broken anyway) FIXME comment
will be written for usb_port_config.

Change-Id: I3b8f44d9de19a7446e2fbcbce1aab6ec6583ebe3
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82656
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-12 12:34:37 +00:00
Leo Chou
1d74c0d5f3 mb/google/nissa/var/pujjoga: Add WWAN power off sequence
Pujjoga support EM060 WWAN, use wwan_power.asl to handle the
power off sequence.

BUG=b:346479638
TEST=Build and boot on pujjoga

Change-Id: I1273d09385c661835d741691b3c4af26e72a9f86
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83042
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-12 11:03:43 +00:00
Leo Chou
123a44e252 mb/google/nissa/var/pujjoga: Tune SX9324 registers setting
Currently, the P sensor does not work.
So add SX9324 registers settings based on tuning value from SEMTECH.

BUG=b:340749850
TEST=Check i2c register settings on Pujjoga and
confirm P sensor function can work by kernel 6.6 driver.

Change-Id: I205c1f5228d792afc763a06f74a8744918e2da75
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82689
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-12 11:03:26 +00:00
Leo Chou
4cd75854ce mb/google/nissa/var/sundance: Add wifi sar table
Add AX211 wifi sar table for sundance wifi sar config.
Use fw_config to separate different wifi card settings.

WIFI_SAR_TABLE_AX211:	0

BUG=b:332978681
Test=emerge-nissa coreboot

Change-Id: Ide84996da567e4f866a2a1309a6976ed8df635a6
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83044
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-12 11:03:00 +00:00
Leo Chou
fdeebb7558 mb/google/nissa/var/sundance: Add FW_CONFIG probe for WWAN devices
Add FW_CONFIG probe based on sundance boxster of below devices:
WWAN

Schematic version: NEC_SHIKIBU_ADL_N_MB_EVT_20240330

BUG=b:332978681
TEST=Boot to OS and verify the WWAN devices is set based on
fw_config.

Change-Id: I14339201d8ee21c85fefa96a49323e0c25cb8eca
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83041
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-12 11:02:36 +00:00
Amanda Huang
74472453ed mb/google/trulo/var/orisa: Disable storage devices based on fw_config
Disable devices in variant.c instead of adding probe statements to
devicetree because storage devices need to be enabled when fw_config is
unprovisioned.

BUG=b:345112878
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I1e5e49c1baa8d2b00134c26cc3b69aa15712b512
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82907
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-12 11:02:13 +00:00
Amanda Huang
24d66f8303 mb/google/trulo/var/orisa: Enable HDA Codec ALC256
We use ALC256 as HDA codec on orisa. Add verb table and the
related device tree changes for HDA related registers.

BUG=b:338523452
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: I92051886341bd317cce6061ece83439d156b0f90
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82719
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-12 11:01:31 +00:00
Amanda Huang
7ba0cc0f4c mb/google/trulo/var/orisa: Add overridetree
Add override devicetree based on schematic_20240607.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: Id3ceff41fdb8e4a57bd6dab6247b622a5d13587d
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-12 07:04:39 +00:00
Kapil Porwal
829b94dc98 treewide: Move skip_atoi function to commonlib
BUG=none
TEST=Build and verify on Screebo
TEST=make unit-tests

```
$ make tests/commonlib/bsd/string-test
[==========] tests_commonlib_bsd_string-test(tests): Running 1 test(s).
[ RUN      ] test_skip_atoi
[       OK ] test_skip_atoi
[==========] tests_commonlib_bsd_string-test(tests): 1 test(s) run.
[  PASSED  ] 1 test(s).
```

Change-Id: Ifaaa80d0c696a625592ce301f9e3eefb2b4dcd98
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82910
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-11 21:06:59 +00:00
Reagan Bohan
3da7829958 mb/razer/blade_stealth_kbl/h3q: add VBIOS table
This commit adds the VBIOS table, extracted from Linux sysfs running on
the stock firmware version 8.02, to the coreboot tree, required for
some graphics backends.

Change-Id: I0d1c9795741e112154bfe6885eea744538373d5a
Signed-off-by: Reagan Bohan <xbjfk.github@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82460
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-11 20:51:58 +00:00
Reagan Bohan
8979955900 mb/razer/blade_stealth_kbl: add panel_cfg
This commit defines the panel_cfg register for the Razer Blade Stealth
(Kaby Lake). This enables libgfxinit support. These values are derived
from the stock firmware. First, VBIOSes were extracted from the stock
firmware. Then, intelvbtool was used to extract the VBT from each of the
VBIOS tables. Finally, intel_vbt_decode from igt-gpu-tools was used to
extract the register values. Although there were multiple VBIOSes
present in the firmware, all VBIOSes across both firmwares (on version
1.50 for the H2U and 8.02 for the H3Q) had the same register values.

Change-Id: I4c8b26ffb7a70d08655986084a714206d9d0c96a
Signed-off-by: Reagan Bohan <xbjfk.github@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82458
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-11 20:51:47 +00:00
Matt DeVillier
bdd3b00926 sb/intel/lynxpoint/fadt: Fill extended FADT after populating lengths
Commit 88decca14f84 ("ACPI: Add helper fill_fadt_extended_pm_io()")
moved the population of the extended FADT to a separate function, but
incorrectly placed that function call before various length fields were
populated, leading to spurious validation errors in the cbmem boot log.

Correct this by moving the call to fill_fadt_extended_pm_io() after
the required fields are populated.

TEST=build/boot google/slippy (wolf), verify no FADT errors in cbmem
console log.

Change-Id: I1f8522e4813e6071692206f2b7ad2a2f5086071e
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83035
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-11 18:59:24 +00:00
Elyes Haouas
6a673d46ee soc/amd/genoa_poc: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: I0e5fba7db7d97835001934cb140f4c76bdc46d3e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82889
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-06-11 14:42:20 +00:00
Elyes Haouas
05bb053e63 tree: Drop non-existent directories from subdirs-y
Change-Id: Icb9e72edf3a982a095dceee4da19f90c53fcddd0
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-11 11:26:07 +00:00
Amanda Huang
6a5c50b995 mb/google/trulo/var/orisa: Add memory config
Fill in memory config based on the the schematic_20240607.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: I1456f7385e092b606fc0a35b25f3454600af8b23
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82662
Reviewed-by: Eric Lai <ericllai@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>
2024-06-11 06:28:29 +00:00
Nicholas Chin
e262230b78 MAINTAINERS: Add Nicholas Chin for all Dell Latitudes
All of the Dell Latitudes from GM45 and until at least Haswell use a
derivative of the MEC5035 EC, and I have been actively working on
coreboot support for this EC and boards that use it. Rename the "E6400
MAINBOARD" section to "DELL LATITUDE" and add mb/dell/snb_ivb_latitude
and mb/dell/e7240 as additional paths.

Change-Id: I7ba46980bfc8569a85593e415f01cc83fe7d67d7
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83008
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-10 10:38:05 +00:00
Angel Pons
496362d7e1 util/autoport: Assign SPD addresses in devicetree
Commit 45e4ab4a660c (mb/*: Update SPD mapping for sandybridge boards)
changed the way in which SPD addresses are set up for SNB/IVB boards,
but autoport was not updated to reflect these changes. Result is:

    register "spd_addresses" = "{0x50, 0x51, 0x52, 0x53}" # FIXME: Put proper SPD map here"

The stray quote at the end is irritating, but is hard to get rid of
without substantial refactoring of autoport's guts. But, given that
this is a FIXME comment, anyone using autoport should just drop the
comment after verifying the SPD map, so it's not a big deal.

In addition, update the corresponding section of the README, which
was horrendously out-of-date.

Change-Id: I6ad38f53afc4fafb45be7f086723cc0782a965ed
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82405
Reviewed-by: Keith Hui <buurin@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-10 10:36:45 +00:00
David Wu
8da4d8840c mb/google/nissa/var/riven: Add GPIO table
Refer to the reference board of nivviks, and update GPIO settings
based on latest schematic (Riven(ZDK)_MB_Proto_0601.pdf).

BUG=b:337169542
TEST=Local build successfully.

Change-Id: Ic43c743fcc2ec89b5a9e2fbe1a87b833d59f1e74
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82973
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-10 10:33:09 +00:00
Subrata Banik
e169419946 arch/x86: Clarify help text for 64-bit support
The word "experimental" has been removed from the help text for
HAVE_X86_64_SUPPORT Kconfig. This is because the x86_64 architecture
has now been officially tested and enabled for several x86 SoC
platforms.

This work will provide us with the foundation we need to begin working
with Intel's next-generation SoC platform (which requires to support
64-bit mode of booting by default).

Therefore, we can now remove the word "experimental" from the
"HAVE_X86_64_SUPPORT" Kconfig help text.

TEST=Able to build and boot google/rex64 in 64-bit mode to ChromeOS.

Change-Id: Ibd629f4e2722f3cbabbe297d4481790c9fa9226a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83009
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-10 09:43:59 +00:00
Angel Pons
9058b46f9c sb/intel/lynxpoint/pcie.c: Add 9-series PCH-H device IDs
Looks like PCIe root port device IDs for 9-series PCH-H are missing from
commit 434d7d45829e (sb/intel/lynxpoint: Add PCI DIDs for 9 series PCHs)
for some reason. Add them, so that coreboot performs PCIe initialisation
for 9-series PCH-H.

Change-Id: I1589418e5e25daabbf09c66c637e9c4f86aa02a6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82947
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-09 18:47:52 +00:00
Nicholas Chin
c2d967aaf9 mb/asrock/h110m/Makefile.mk: Remove superfluous spd from subdirs-y
The H110M does not use memory down, and the spd directory doesn't exist
in the board's directory in the first place. This was probably just copy
and paste leftover from some existing Skylake board in the initial port.

TEST=Timeless build does not change.

Change-Id: I35744310b2bf8a14165dae9808c982e6dc274a74
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83010
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-09 12:25:33 +00:00
Maximilian Brune
ab4b220a35 cpu/x86/Kconfig: Add SMM Kconfig help
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ia0a5c48c6314f53c4ed72958f5d6f839f0a5c2ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77973
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-09 12:01:00 +00:00
Michał Żygowski
3f56bd2394 superio/ite/it8659e: Add driver for ITE IT8659E
Based on the non-public "ITE IT8659E-I Preliminary Specification V0.7.2
(For H Version)".

TEST=Initialize IT8659E on the new Protectli platform

Change-Id: I11657ec6e1c880f0cee247071486a904a92bb7a1
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-09 11:14:25 +00:00
Michał Żygowski
e80b4c7f1a util/superiotool: Add support for dumping ITE IT8659E configuration
Based on the non-public "ITE IT8659E-I Preliminary Specification V0.7.2
(For H Version)".

TEST=Dump IT8659E configuration on the new Protectli platform

Change-Id: Ic036f8b99d5bd0107be7850fc4509da1bf020fe5
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80495
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-09 11:12:37 +00:00
David Milosevic
ad83eb1ee6 mainboard/emulation/qemu-sbsa: Add qemu-sbsa board
Add coreboot support for qemu's sbsa-ref (Server Base System
Architecture) machine (-m sbsa-ref).

The qemu-sbsa coreboot port runs on EL2 and is the payload of the
EL3 firmware (Arm Trusted Firmware).

Note that, coreboot expects a pointer to the FDT in x0. Make sure
to configure TF-A to handoff the FDT pointer.

Example qemu commandline:

  qemu-system-aarch64 -nographic -m 2048 -M sbsa-ref \
                      -pflash <path/to/TFA.fd> \
                      -pflash <path/to/coreboot.rom>

The Documentation can be found here:
Documentation/mainboard/emulation/qemu-sbsa.md

Change-Id: Iacc9aaf065e0d153336cbef9a9b5b46a9eb24a53
Signed-off-by: David Milosevic <David.Milosevic@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79086
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-06-08 20:41:14 +00:00
Iru Cai
91cda2af74 mainboard: add Dell Latitude E7240
Based on autoport output.

It boots to Arch Linux (Linux 6.6.3) from USB and mSATA with SeaBIOS.

Change-Id: I6933bdbcc8d0bbb85d62657624740266284ac71c
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79746
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-08 17:32:00 +00:00
Michał Żygowski
ca5254acc0 soc/alderlake/romstage: Set UsbTcPortEnPreMem UPD based on devicetree
The UsbTcPortEn UPD for FSP-S is being set in ramstage, however the
equivalent FSP-M UPD, the UsbTcPortEnPreMem, was not being set.
Following the Meteor Lake example, set the UsbTcPortEnPreMem UPD
as well for Alder Lake.

Setting this FSP-M UPD will cause FSP to properly program sideband
use BSSB_LSx pins for the enabled Type-C ports. Required for proper
DCI debug and TCSS initialization flow.

Change-Id: If3b79167ec1769ddfb7d28a6c78a3e80bd10afe7
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80500
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-08 08:18:26 +00:00
Nicholas Chin
f0fb3af828 mb/dell: Add Latitude E6430 (Ivy Bridge)
Mainboard is QAL80/LA-7781P (UMA). The version with an Nvidia dGPU was
not tested. This is based on the autoport output with some manual fixes.
The VBT was obtained using `intelvbttool --inlegacy --outvbt data.vbt`
while running version A24 (latest version) of the vendor firmware.

The flash is 8MiB + 4MiB, and can be easily accessed by removing the
keyboard. It can also be internally flashed by sending a command to the
EC, which causes the EC to pull the FDO pin low and the firmware to skip
setting up any chipset based write protections [1]. The EC is the SMSC
MEC5055, which seems to be compatible with the existing MEC5035 code.

Working:
- Libgfxinit
- USB EHCI debug (left side usb port is HCD index 2, middle port on the
  right side is HCD index 1) with the CH347
- Keyboard
- Touchpad/trackpoint
- ExpressCard (tested with USB 3.0 card)
- Audio
- Ethernet
- SD card reader
- mPCIe WiFi
- SeaBIOS 1.16.3
- edk2 (MrChromebox's fork, uefipayload_202309)
- Internal flashing using dell-flash-unlock

Not working:
- S3 suspend: Possibly EC related, DRAM power is getting cut when
  entering S3
- Physical wireless switch: this triggers an SMI handler in the vendor
  firmware which sends commands to the EC to enable/disable wireless
  devices, and has not been reimplemented
- Battery reporting: needs ACPI code for the EC
- Brightness hotkeys: probably EC related
- The system reports that the power button was pressed and shuts down
  when the CPU hits around 86 degrees Celsius, before the CPU can
  thermal throttle. Likely EC and possibly PECI related.
- Integrated keyboard with upstream GRUB 2.12 payload: Upstream GRUB
  initializes the 8042 PS/2 controller in a way that is incompatible
  with how the EC firmware emulates it. GRUB tries to initialize the
  controller with scan code set 2 without translation, but the EC only
  ever returns set 1 scan codes to the system and thus is only works as
  an untranslated set 1 keyboard or a translated set 2 keyboard,
  regardless of commands to set the scan code. A USB keyboard works
  fine.

Unknown/untested:
- Dock
- eSATA
- TPM
- dGPU on non-UMA model
- Bluetooth module (not included on my system)

[1] https://gitlab.com/nic3-14159/dell-flash-unlock

Change-Id: I93c6622fc5da1d0d61a5b2c197ac7227d9525908
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77444
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-08 06:18:28 +00:00
Elyes Haouas
ba47ff7197 tree: Remove unused <option.h>
Change-Id: Ia3df14ebd365c00902b5d2ba300d8ade4c2d6c26
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82690
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-06-08 00:23:19 +00:00
Keith Hui
b498a4c805 sio/nuvoton: Add Kconfig for shared PS/2 port
Introduce HAVE_SHARED_PS2_PORT Kconfig for this Super I/O to have
mainboards indicate if they have one shared PS/2 port on the rear
panel. On these boards (where a Y-cable cannot allow both
keyboard and mouse to work off the same port), if a PS/2 keyboard is
not present, SIO should be configured to swap its role to mouse, to
allow the OS to find and initialize any mouse connected.

Supporting code will come in a separate patch. Idea is to condition
them on this Kconfig.

Change-Id: I156b15c6ba233cbe8b9ba4d2cfbca6836ad7483a
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82631
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-08 00:20:24 +00:00
Keith Hui
a911b75848 mb/*: Remove old USB configurations from SNB/bd82x6x boards
Remove USB configurations and data structures from northbridge
devicetree (SNB+MRC boards) and bootblock/romstage C code
(native-only SNB boards). All USB configurations are drawn from
southbridge devicetree going forward.

Change-Id: Ie1cd21077136998a6e90050c95263f2efed68a67
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81882
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-08 00:19:23 +00:00
Keith Hui
ee12634872 nb/sandybridge,sb/bd82x6x: Configure USB from southbridge devicetree
Transfer all USB responsibilities to southbridge/intel/bd82x6x,
using one set of USB port configuration supplied by mainboards
in the southbridge section of their devicetree.

For MRC raminit, export southbridge_fill_pei_data() as a hook for
southbridge code to implement. With new code via this hook, bd82x6x
fills pei_data based on this one set of USB port config.

For native raminit, early_usb_init() now goes directly to the devicetree
and no longer get passed an address to it.

TEST=abuild passes for all affected boards. All USB ports still work
on asus/p8x7x-series/v/p8z77-m.

Change-Id: I38378c7ee0701abc434b030dd97873f2af63e6b0
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81881
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-08 00:11:36 +00:00
Keith Hui
0aa069fb10 mb/asus/p8z77-m: Update USB current map to match vendor
This board has used the USB current map from asus/p8z77-m_pro since it
first landed in coreboot, which actually doesn't match vendor firmware.
Apply values obtained from hardware while running vendor firmware
to both native and MRC config.

Change-Id: I7ce13493c3ecac8154460c1fedf05e2d70a8e394
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82756
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-08 00:10:10 +00:00
Keith Hui
51a57eb5ea mb/*: Add consolidated USB port config for SNB+MRC boards
For each sandybridge boards with option to use MRC or native platform
init code, add a copy of the board's USB port config, consolidated between
both code paths, into the southbridge devicetree, using special values
allocated for this consolidation.

These get hooked up in a separate patch.

Change-Id: I53efca3d29b3c5d4d5b7e3d6dc3e6ce6c34201e6
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81880
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-08 00:08:33 +00:00
Keith Hui
1acb3e118b mb/asus/p8z77-v: Apply updated USB current map to sb devicetree
This map is found stored in plain text in vendor firmware image.

They will take effect when USB config is transitioned to southbridge
devicetree.

Change-Id: Iab0a225560856771407bb815ff4d8bc95d0f884f
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82755
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-06-08 00:05:55 +00:00
Keith Hui
c36b5ea189 mb/*: Copy bd82x6x boards' USB port config into devicetree
For mainboards using southbridge/intel/bd82x6x, copy the contents
of mainboard_usb_ports array into southbridge devicetree. In-line
comments are maintained.

Boards also capable of using MRC raminit are done in a separate
patch.

Change-Id: Ia8a967eb3466106f3a34e024260e13d02f449a25
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81879
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 22:39:18 +00:00
Keith Hui
51a01bdcd6 sb/intel/bd82x6x/early_usb.c: Align native current map with MRC
Replace 3 unused values in the map with those found during a Ghidra
examination of MRC binary, and on hardwares running vendor firmware
(asus/p8z77-m and HP Z210 CMT Workstation).

The outgoing values were introduced in commit 216ad2170ca8
("sb/intel/bd82x6x: Add new USB currents") in anticipation for
Gigabyte GA-Z77-DS3H mainboard, but effort to land it was eventually
abandoned. Since commit xxxxxxxxxxxx, such values can be placed
directly in the port config, so there should be no hurdle should that
effort be resurrected.

Add a few #defines in pch.h to place some inline documentation
on MRC values, but more will be documented in the future when this
mapping is introduced MRC-side.

Finally, update autoport to match.

Change-Id: I195c7f627994e48f7a6e6698589504dc96248cff
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82754
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-06-07 22:35:02 +00:00
Keith Hui
943b540914 sb/intel/bd82x6x: Make space for USB port config in devicetree
This is the first step to:

- Move USB port configs, which are static, from C code to devicetree;
- Unify USB port configs between MRC and native code path.

Change-Id: I59af466d41790e2163342cac8676457ac19371ea
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81878
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 22:34:24 +00:00
Keith Hui
317a982ddb nb/intel/sandybridge: Refactor pei_data building code
Incorporate fixed constants and simple data members into struct
pei_data as it gets initialized and make more use of existing helpers.
Compiler zeroes structs set up this way so the memset() is no longer
needed.

Drop northbridge_fill_pei_data() as it gets replaced entirely.

Gut southbridge_fill_pei_data() in preparation for having southbridge
code fill in USB-related members.

This is to make the code easier to maintain, and realizes small savings
in compiled code size too.

Change-Id: I3140cb99b0106669aa27788641c2895ced048e95
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82480
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 22:33:59 +00:00
Keith Hui
94625d2aae sb/intel/bd82x6x: Allow actual USBIRx values for native USB config
For USB to work under native code path, the USB port config needs to
include a current setting for each port, which gets mapped to an
initialization value that gets programmed into the USBIRx register
for the respective port. This map resides in early_usb.c.

The need to update it, whenever we see a previously unaccounted for
initialization value, is getting out of hand.

Instead this patch will allow specifying those values, presumably
taken from an inteltool dump while running vendor firmware,
directly in the USB port map.

Because all USBIRx values are always in the 0x20000yyy form, we only
need the lowest 12 bits. We have more than enough space in the USB
port config structure for this.

As the lowest yyy value we saw so far is 0x53, a note is included to
limit the map to not more than 80 entries. Any value that is too big
to be an index into the map is programmed directly, + 0x20000000, into
the registers.

This opens the future possibility to use the map for a simpler
mapping for boards also using MRC, and remove the need for any
mapping at all for the rest.

Change-Id: I3d79b33bac742faa9bd4fc9852aff73fe326de4e
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82655
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-06-07 22:33:10 +00:00
Kapil Porwal
83cd6f9f89 soc/intel/cmn/cse: Support CSE sync from payload
Skip CSE sync in coreboot when payload is doing it.

BUG=b:305898363
TEST=Verify CSE sync from depthcharge on Screebo

Change-Id: Ifa942576c803b8ec9e1e59c61917a14154fb94b2
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82660
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-06-07 22:30:57 +00:00
Maciej Pijanowski
9a5cc95586 util/smmstoretool: explain what happens when no store is found
We are going to expose ths tool to end users, and want to take
care that the presented information can be consumed by them.

The current code simply prints below warnings if we use release
binary available for end-user to download:

No firmware volume header present
No valid firmware volume was found

It will be concerning and not clear to end users, they might not
understant why it happens, what are the implications, and whether
it is something that they should worry about.

This commit tries to explain what actually happens here.

Change-Id: Iaa2678f5ae7c243811484c0567ced97ae0b3fc0a
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82692
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-06-07 22:30:01 +00:00
Elyes Haouas
f87fa53e4a soc/mediatek/mt8173/i2c.c: Remove unused macro
Change-Id: I90fbd7ce0e1c6cd15d73cb73dc774df2de56b346
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82932
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-06-07 18:57:21 +00:00
Sean Rhodes
cb9591cef0 ec/starlabs/merlin/battery: Calculate unknown values
If the EC doesn't know a value, it will report it as 0xffff. In these
cases, calculate a value to used based on others. For example, if the
EC doesn't know the last full charge capacity, report the design
capacity to the OS.

Change-Id: I310555ff913c2e492bbaec4d77281ac32c0de7a3
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81408
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:54:13 +00:00
Sean Rhodes
7c4cc60a6c ec/starlabs/merlin/battery: Check values are valid before using them
Change-Id: I559aca98044b7f0e6b08c475b5383c014bb4cd3f
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81407
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:52:46 +00:00
Sean Rhodes
111fec8646 ec/starlabs/merlin: Rename BRPR to B1RP
Rename the BRPR (Battery Remaining Percentage) to B1RP to match
the format of the other variables.

Change-Id: I64a744d78180156e16dbd483a35c7f97ac84bcba
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81406
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:52:18 +00:00
Sean Rhodes
d4d321ff89 ec/starlabs/merlin: Report the battery cycle count to ACPI
Change-Id: Iccb60d3530227fb71a3ce5a3ab1421627cc86611
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81405
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:51:45 +00:00
Sean Rhodes
95e726e5b7 ec/starlabs/merlin/*: Remove temperature and control variables
The BT1T (temperature) and BT1C (control) are not used so remove
them.

Change-Id: Ie6e85042ec59851bcfb4c88a2e04181c3c39f89c
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81404
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:50:55 +00:00
Sean Rhodes
d57e57eb22 ec/starlabs/merlin/*: Fix the size of the battery soc
The battery remaining percentage is a uint16_t, so correct this in
the EC memory. This change is non-function, as the EC is little
endian.

Change-Id: I56a0ae8199a95c9722e9bcb4c0739f4ef1d6ab05
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81403
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:49:31 +00:00
Sean Rhodes
a273e1da86 ec/starlabs/merlin/battery: Add extended battery information
Add BIX Method to report extended battery information.

Change-Id: Ie5baecb20c7d4600e0cf1d19ff5f67ce2003fa1d
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81402
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-07 18:48:44 +00:00
YH Lin
d401e10c57 mb/google/brya/var/xol: add support for wifi sar table
Add wifi sar table support for xol. Bit 31 in CBI/FW_CONFIG
is used to select different sar table (index 0 or 1) but only
0 is in used at the moment.

BUG=b:344274789
BRANCH=firmware-brya-14505.B
TEST=emerge-brya coreboot chromeos-bootimage

Change-Id: Id4dc74c4f2a807d2e531b419ecb7b590d4c32ac2
Signed-off-by: YH Lin <yueherngl@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-07 18:42:23 +00:00
Sumeet Pawnikar
49acc32cba mb/google/brox/var/brox: update thermal settings to start fan early
Current existing temperature thresholds of TSR1 sensor are set at 60C
to start fan. Due to this CPU gets hot and temperature goes over 80C.
In this situation, fan does not even start to lower down CPU temperature.

With updated new settings based on tuning from thermal team, start fan
early at 40C for TSR0 and TSR1 so the CPU temperature stays below 80C.

BUG=b:339493551
TEST=Built and tested on google/brox board

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Change-Id: I4765c13c10e436733d8c9d017085968daa561ccc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82784
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-06-07 18:41:37 +00:00
Elyes Haouas
f90d5d8820 mb/siemens/mc_apl1: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: If43089560a391d6a844ef1716b277e3146c66945
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82861
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2024-06-07 18:40:27 +00:00
Subrata Banik
b6e949ff8e mb/google/rex0: Restore SSD power sequencing GPIOs in ramstage
This change restores the EN_PP3300_SSD GPIO configuration in the
ramstage for the Rex0 variant. This is necessary to enable testing
of RO lockdown scenarios on FSI'ed Screbo devices, where bootblock
changes are not applicable.

Additionally, ensures locking the GPIO PAD from getting misconfigured
after booting to OS.

BUG=b/337971452
BRANCH=firmware-rex-15709.B
TEST=Able to boot google/rex with RO locked to an older version without
SSD GPIO refactored, and RW is with the latest revision.

Change-Id: Ia7564b14a20d00e9bb2c9466b7a737dd97f01351
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82909
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-07 18:40:00 +00:00
Leo Chou
b0692f65b6 mb/google/nissa/var/pujjoga: Add wifi sar table
Add AX211 and AX203 wifi sar table for pujjoga wifi sar config.
Use fw_config to separate different wifi card settings.

WIFI_SAR_TABLE_AX211:	0
WIFI_SAR_TABLE_AX203:	1

BUG=b:336167281
Test=emerge-nissa coreboot

Change-Id: If0f542cb13e93e99960bf65d616b26cee7617a43
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82702
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-06-07 18:39:16 +00:00
Leo Chou
6fa1847923 mb/google/nissa/var/pujjoga: Add FW_CONFIG probe for WWAN devices
Add FW_CONFIG probe based on pujjoga boxster of below devices:
WWAN

Schematic version: 500E_GEN4S_ADL_N_MB_0418

BUG=b:336167281
TEST=Boot to OS and verify the WWAN devices is set based on
fw_config.

Change-Id: I94cb9ffe47888a8b7b5c6837ddfc390a1d2e77d1
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82701
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-07 18:38:07 +00:00
Leo Chou
ee0c3d0a85 mb/google/dedede/var/boten: Add new supported memory part
Add bookem new supported memory parts in mem_parts_used.txt.
Generate SPD id for this part.

Zilia SDVB8D8A34XGCL3N3T

BUG=b:344482259
TEST=Use part_id_gen to generate related settings

Change-Id: I1cbf641e2bbe4fd4eea02a1bfa3d6b3c06e567e4
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82783
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-07 18:37:01 +00:00
Leo Chou
c96f3c24fd spd/lp4x: Add SPD for Zilia SDVB8D8A34XGCL3N3T
This adds support for Zilia SDVB8D8A34XGCL3N3T LP4x chips.

Generatd SPD data with:
util/spd_tools/bin/spd_gen spd/lp4x/memory_parts.json lp4x

BRANCH=None
BUG=344482259

Change-Id: I4408e62ab2a15002960c1d9659ab6af45bd7f7bb
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82782
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-07 18:36:42 +00:00
Shon Wang
f857d30787 mb/google/brask/var/bujia: fix type-c USB2 problem
Enable type-c port 0 USB2 function.

BUG=b:327549688
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: I0d7adc329a8c26941957d7a7472a5166b07bda5b
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82903
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:35:36 +00:00
Sean Rhodes
6e755cef04 mb/starlabs/*: Add Kconfig values for battery information
Add Kconfig strings for the battery:
* Model
* OEM
* Technology

Change-Id: Ibbce87ad54874f490af45c41f31956a7e9e996f3
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81401
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:33:55 +00:00
Sean Rhodes
38170736e9 mb/starlabs/labtop/cml: Increase TCC Offset
These values were configured based on a default value of 110, but for
CML, it's actually 100.

Adjust it accordingly.

Change-Id: Ibffeeab67a7277625db9bdedca36d759ff0e72f6
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81414
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:32:33 +00:00
Sean Rhodes
df2c85f52b mb/starlabs/starbook/kbl: Configure the TCC Offset based on Power Profile
Configure the TCC Offset based on the active power profile

Change-Id: I58940441a7cefc7a2a07e5e9f7e8a15cb8730ef3
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81413
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-06-07 18:32:11 +00:00
Sean Rhodes
2524c61df6 mb/starlabs/starbook/kbl: Use function for getting power profile
All other variants use a function and definitions to get the power
profile. Make this board to the same.

Change-Id: I07ce71e20bd71229bb0cd3438ab59140cd0d8b42
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81412
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:31:50 +00:00
Sean Rhodes
ee49088cc3 mb/starlabs/starbook/cml: Switch to the merlin EC
Change-Id: I27062c38c10df1d03f563b2f5391f79a3b6ee4fe
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81411
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 18:31:06 +00:00
Elyes Haouas
ea96ed3c72 ec/starlabs/merlin/ite: Remove unused <pc80/keyboard.h>
Change-Id: I3eea1a6d5bf652b9d9b430e9cd59ef9a3ea9fe2f
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82408
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-06-07 18:30:24 +00:00
Kun Liu
aa65c8ed95 spd/lp5: Add SPDs for MT62F1G32D2DS-023 WT:C and K3KL8L80DM-MGCU
Add MT62F1G32D2DS-023 WT:C and K3KL8L80DM-MGCU
in the memory_parts.json and re-generate the SPD

Micron:MT62F1G32D2DS-023 WT:C
Samsung:K3KL8L80DM-MGCU

BUG=b:337730271
TEST=util/spd_tools/bin/spd_gen spd/lp5/memory_parts.json lp5

Change-Id: Ic5c3ed46829330f83e144cf8d18be6fa808431aa
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82604
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-07 15:59:38 +00:00
Arthur Heymans
2993553de6 soc/intel/common/uart: Drop chip in favor of devicetree ops
It is now possible to hook up device ops directly to devices in
devicetree which removes the need for a fake chip.

This also fixes Hermes booting as the PCI ops were incorrectly hooked up
to a dummy device. The intel uart driver was requesting a resource from
the generic device and died since it does not exist:

    [EMERG]  GENERIC: 0.0 missing resource: 10

This was broken in commit b9165199c32a (mb/prodrive/hermes: Rework UART
devicetree entry).

Change-Id: I3b32d1cc52afaed2a321eea5815f2957fe730f79
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82940
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-07 11:15:00 +00:00
Angel Pons
ca9f948541 mb/**/hda_verb: Use AZALIA_PIN_CFG_NC(0)
Replace `0x411111f0` with `AZALIA_PIN_CFG_NC(0)`, which evaluates to the
same value and conveys additional information to the reader. Done with a
bulk search and replace operation.

Change-Id: Ibd84daec017bc1ab1ee4edd906fda80231c134cc
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82394
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-07 11:13:19 +00:00
Ronak Kanabar
14feda4412 soc/intel/alderlake: select Kconfig MRC_CACHE_USING_MRC_VERSION
This patch introduces support for storing the MRC cache based on the
MRC version for both ADL-N and TWL platforms. It select the
MRC_CACHE_USING_MRC_VERSION option when client SOC_INTEL_ALDERLAKE_PCH_N
is chosen.

BUG=b:296433836

Change-Id: Icc7e4ecd84a7d2818d54acc6ac5d0592544bb9ce
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81038
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Brandon Weeks <bweeks@google.com>
2024-06-07 06:16:46 +00:00
Ronak Kanabar
bf1166e8a6 intel/alderlake/Kconfig: Use vendorcode headers for Client ADL-N FSP
This patch is to switch Client ADL-N FSP headers to vendorcode from IOT
headers. Also guard IOT headers & bin path with FSP_TYPE_IOT Kconfig.

BUG=b:296433836
TEST=Able to build and boot google/nivviks

Change-Id: I1ffcc3f284c213ff0533de3a0e228aacf523b380
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82781
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-07 06:16:41 +00:00
Ronak Kanabar
a2de509274 mb/cwwk/adl: Select FSP_TYPE_IOT
Currently, the 3rdparty/fsp submodule contains only the IoT FSP for
ADL-N. However, coreboot's Kconfig is incorrectly applying the IoT
FSP for both Client and IoT configurations, despite the Client FSP
requiring distinct headers.

The CWWK CW-ADL-4L-V1.0 board relies on the FSP provided by the
3rdparty/fsp submodule, which means it has been using the IoT FSP by
default. To ensure the board continues to use the correct FSP as we
plan to introduce Client FSP headers into vendorcode, we are now
explicitly select FSP_TYPE_IOT for the CWWK CW-ADL-4L-V1.0 board.

Change-Id: Ie3844cb24740e4d95ee835a44e55b4d5cb6854e5
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82915
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Brandon Weeks <bweeks@google.com>
2024-06-07 06:16:33 +00:00
Ronak Kanabar
c9302d5d39 mb/aoostar/wtr_r1: Select FSP_TYPE_IOT
Currently, the 3rdparty/fsp submodule contains only the IoT FSP for
ADL-N. However, coreboot's Kconfig is incorrectly applying the IoT
FSP for both Client and IoT configurations, despite the Client FSP
requiring distinct headers.

The aoostar/wtr_r1 board relies on the FSP provided by the 3rdparty/fsp
submodule, which means it has been using the IoT FSP by default. To
ensure the board continues to use the correct FSP as we plan to
introduce Client FSP headers into vendorcode, we are now explicitly
select FSP_TYPE_IOT for the aoostar/wtr_r1 board.

Change-Id: I68feeaaffd825013ae1012694047b067535e7341
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82914
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-07 06:16:27 +00:00
Ronak Kanabar
491afc3cc7 soc/intel/alderlake: Guard PchPcieClockGating & PchPciePowerGating UPDs
PchPcieClockGating & PchPciePowerGating UPDs are not available for ADL_N
FSP headers. Add guard to Avoid PchPcieClockGating & PchPciePowerGating
programming for ADL_N FSP.

Change-Id: I2f1625038896b07c354498fe431cad97fb9b5bdb
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82917
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-07 06:16:19 +00:00
Nico Huber
bfb39806c9 nb/intel/haswell: Synchronize lists of graphics PCI IDs
Both, the list of IDs that we hooked our driver up to and the list
that we use for VBIOS mapping, had gaps. Fill those.

Change-Id: I97c09bb113cf0f35ae158abbd0ba2632dbad7cad
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82787
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-06 23:55:24 +00:00
Felix Singer
e03423c3bf doc/distributions: Update NovaCustom domain
NovaCustom's official domain changed to novacustom.com. Update the
reference accordingly.

Change-Id: I1fe9c3a2e3335d0ea5a5352cc1948b1a82c327ec
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82159
Reviewed-by: Wessel klein Snakenborg
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-06 23:11:34 +00:00
Felix Singer
d7b2c12b49 mb/siemens/chili: Remove superfluous device entries from dt
Remove the entries which have the same state as the ones from the
chipset devicetree.

Change-Id: I4981cd835ef28a673d480808dd486fed4d9b45e5
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80043
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-06 22:31:43 +00:00
Alper Nebi Yasak
4e00e6291a arch/io.h: Add port I/O functions to other architectures
The QEMU Bochs display driver and the QEMU Firmware Configuration
interface code (in the qemu-i440fx mainboard dir) were written for x86.
These devices are available in QEMU VMs of other architectures as well,
so we want to port them to be independent from x86.

The main problem is that the drivers use x86 port I/O functions to
communicate with devices over PCI I/O space. These are currently not
available for ARM* and RISC-V, although it is often still possible to
access PCI I/O ports over MMIO through a translator.

Add implementations of port I/O functions that work with PCI I/O space
on these architectures as well, assuming there is such a translator at a
known address configured at build-time.

Change-Id: If7d9177283e8c692088ba8e30d6dfe52623c8cb9
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80372
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-06 22:05:14 +00:00
Jian Tong
e4d73ec578 mb/google/brox/var/lotso: Add dq map setting
Based on lotso EVT schematics add dq map settings.

BUG=b:333494257
TEST=emerge-brox coreboot chromeos-bootimage and boot on

Change-Id: I4f03e8a90522cbf2fe06f4160414202dcc4a2199
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82600
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Dengwu Yu <yudengwu@huaqin.corp-partner.google.com>
2024-06-06 16:19:57 +00:00
Nicholas Chin
90857b7381 mb/asrock: Add Z87E-ITX (Haswell)
This was done using Haswell autoport, with manual fixes to get the
output to build against current main. I do not physically have this
board; I was sent the output of autoport with some fixes on top of
which I added additional changes. The VBT was copied from
/sys/kernel/debug/dri/0/i915_vbt on version 2.70 of the vendor firmware.

The flash chip is 8MiB in a socketed DIP8 package, making it easy to
externally flash to recover from a brick.

Working:
- Haswell MRC.bin
- S3 suspend and resume
- Libgfxinit
- HDMI
- DVI-I (including passive DVI to VGA adapter)
- DisplayPort
- SATA ports
- mSATA SSD
- mPCIe WiFi slot
- Rear USB ports
- USB 3.0 header
- Audio header
- Ethernet
- x16 PCIe slot
- EHCI debug with the CH347 (top USB 2.0 port by the PS/2 connector)
- edk2 (MrChromebox uefipayload_202309)

Not Tested:
- PS/2 keyboard/mouse
- eSATA
- USB 2.0 header

Change-Id: I56c22d8f5505f9a4da25f8b4406b00978af1a586
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81022
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-06 15:48:42 +00:00
Elyes Haouas
97ee153046 mb/intel/coffeelake_rvp: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: I98aa3f582963f76690f907b678ac322ed4cc99d1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82846
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-06 03:40:40 +00:00
Elyes Haouas
475aaf880f mb/starlabs/starbook: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: I972516443bc57e193aefd54516ca994087d92054
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82844
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-06-06 03:40:12 +00:00
Julius Werner
c770ad6246 cpu/x86: Make 1GB paging the default
This patch flips the polarity of CONFIG_USE_1G_PAGES_TLB into
CONFIG_NEED_SMALL_2MB_PAGE_TABLES which is off by default, meaning
CPUs added in the future will automatically build the smaller 1GB pages.
We can expect support for this feature to be available on all future CPU
generations (with the possible exception of embedded edge cases), so
this default setting should make mistakes less likely and keep
maintenance effort lower. (Besides, enabling the support where it
doesn't work fails fast, whereas keeping it disabled where it could work
is an inefficiency that can easily go overlooked for a long time.)

While this is technically a CPU feature, not a northbridge feature, we
support a lot more individual CPUs than northbridges in the pre-SoC era,
and they tend to be closely coupled anyway. So select the option at the
northbridge level for older CPUs to keep things simpler.

Change-Id: I2cf1237a7fb63b8904c2a3d57fead162c66bacde
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-05 20:31:03 +00:00
Maximilian Brune
25e3c63b53 payloads/external/leanefi: Add missing license
Change-Id: Ib95cb55add23fa172f187cbcb475958767f8a923
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82905
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-05 19:56:23 +00:00
Jian Tong
c2149b7e6a mb/google/brox/var/lotso: Update gpio setting
Based on lotso EVT schematics update gpio settings.

BUG=b:333494257
TEST=emerge-brox coreboot chromeos-bootimage and boot on

Change-Id: I13485cc7ccd8b15352f5e21ad9336aa2b3d35749
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82573
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Shelley Chen <shchen@google.com>
2024-06-05 17:41:38 +00:00
Felix Singer
52fef2e376 3rdparty/intel-microcode: Update submodule to upstream main
Updating from commit id 41af345:
2024-03-11 19:11:14 -0600 - (microcode-20240312 Release)

to commit id 5278dfc:
2024-05-31 18:42:47 -0600 - (microcode-20240531 Release)

This brings in 2 new commits:
5278dfc microcode-20240531 Release
27ace91 microcode-20240514 Release

Change-Id: Ia34ba03a9c2f206be760133edbbadcc541ff273b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82789
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-05 11:11:19 +00:00
Yidi Lin
6643b5e374 libpayload/arm64: Support FEAT_CCIDX
ARM SoC supports FEAT_CCIDX after ARMv8.3. The register field
description of CCSIDR_EL1 is different when FEAT_CCIDX is implemented.
If numsets and associativity from CCSIDR_EL1 are not correct, the system
would hang during mmu_disable().

Rather than assuming that FEAT_CCIDX is not implemented, this patch
adds a check to dcache_apply_all to use the right register format.

Reference:
- https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/12770

BUG=b:317015456
TEST=mmu_disable works on the FEAT_CCIDX supported SoC.

Change-Id: I892009890f6ae889e87c877ffffd76a33d1dc789
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82636
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-06-05 11:09:16 +00:00
Yidi Lin
628b8ed549 arch/arm64: Support FEAT_CCIDX
ARM SoC supports FEAT_CCIDX after ARMv8.3. The register field
description of CCSIDR_EL1 is different when FEAT_CCIDX is implemented.
If numsets and associativity from CCSIDR_EL1 are not correct, the system
would hang during mmu_disable().

Rather than assuming that FEAT_CCIDX is not implemented, this patch
adds a check to dcache_apply_all to use the right register format.

Reference:
- https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/12770

BUG=b:317015456
TEST=mmu_disable works on the FEAT_CCIDX supported SoC.
TEST=manually add mmu_disable to emulation/qemu-aarch64/bootblock.c and
     verify with the command
     qemu-system-aarch64 -bios \
     ./coreboot-builds/EMULATION_QEMU_AARCH64/coreboot.rom -M \
     virt,secure=on,virtualization=on -cpu max -cpu cortex-a710 \
     -nographic -m 8192M

Change-Id: Ieadd0d9dfb8911039b3d36c9419af4ae04ed814c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82635
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-06-05 11:08:48 +00:00
Naresh Solanki
d1459792a6 mb/ibm/sbp1: Update PCIe port slot number for NIC
Based on schematic, update slot number for PCIe port used for NIC
controller.

Change-Id: I7a1ead8f7e4588db45303041e60dbfe27ee12ea7
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82899
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-06-05 11:03:51 +00:00
Angel Pons
4e5655a756 Xeon-SP boards: Factor out OCP VPD get_cxl_mode() impl
There's two copies of the `get_cxl_mode()` function to map the OCP VPD
value to the values expected by platform code. As this is unnecessary,
have a single copy of this function in the OCP VPD driver code. As the
`get_cxl_mode()` function is Xeon-SP only, keep it in a separate file.

This change simplifies things for boards using OCP VPD for CXL and has
no impact for boards *not* using OCP VPD:

- Boards not using OCP VPD can still define get_cxl_mode() in mainboard
  code as needed, just like they were able to do before.
- Boards using OCP VPD but without CXL (`SOC_INTEL_HAS_CXL` is not
  enabled), this code won't get compiled in at all (see `Makefile.mk`).
- Boards using OCP VPD and CXL will automatically make use of this
  `get_cxl_mode()` definition, which should be the same for all boards.

It is possible that this may need to be expanded/adapted in the future,
which is easy to handle in a follow-up commit when the need arises.

TEST=Build and boot on intel/archercity CRB

Change-Id: I935c4eb5b2392e2d0dc01b9f66d46c79b8141ea7
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82224
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-06-05 10:59:59 +00:00
Jincheng Li
e1664278a7 soc/intel/xeon_sp: Remove duplicated Kconfig POSTCAR_STAGE
POSTCAR_STAGE is already selected in XEON_SP_COMMON_BASE

Change-Id: I3f94e6cc76c8f376119ffa8ec43fa1a43fb40977
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82795
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-06-05 09:40:41 +00:00
Amanda Huang
602653abed mb/google/trulo/var/orisa: Configure TPM IRQ for orisa
Set GSC_SOC_INT_ODL to GPP_A17 instead of GPP_A13.

BUG=b:333486830
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: I065fdf2a66036c6df1e16dda3b2a684b5202cccc
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82717
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-05 05:00:52 +00:00
Elyes Haouas
9f599c2fe7 mb/starlabs/lite: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: Ib8f7ac7e586390a1d25cbe84d6d4c3ba31ff078f
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82843
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-06-04 21:16:54 +00:00
Elyes Haouas
267f48f573 soc/intel/xeon_sp: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: I950b8859b51fb61edc0cf1115f6665378bc0b836
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82887
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-04 21:16:22 +00:00
Elyes Haouas
6b965bb4c6 soc/mediatek/common: Prefer include <soc/gpio.h> via <gpio.h>
Change-Id: I50e874790dedcb6bf3b3ac8368821f22611aa3b7
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82894
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-04 21:15:54 +00:00
Maximilian Brune
96084d5957 payloads/external/leanefi/Makefile: Fix clean target
Just follow the examples of other payloads and simply remove the build
directory of said payload.

Change-Id: Idf2a8f3b9ecbb300514d2d1deede76785fd402b7
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82897
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04 15:33:06 +00:00
Seunghwan Kim
b152f10d5a mb/google/brya/var/xol: Enable FSP UPD LpDdrDqDqsReTraining
Set LpDdrDqDqsReTraining to 1 for xol. Value 0 will cause black screen
issue.

Reference: https://review.coreboot.org/c/coreboot/+/79527
> FSP default value for LpDdrDqDqsReTraining is 1. For boards
> that didn't set LpDdrDqDqsReTraining to any value, 0 was being
> assigned and it caused black screen issue.

BUG=b:332980211
BRANCH=brya
TEST=Built and verified there is no black screen issue during power
on/off test for over 100 cycles.

Change-Id: Ia346ce559b4509ea1a63abe28b12ad909f9b7b0d
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82778
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-04 14:50:34 +00:00
Shon Wang
b870b66834 mb/google/brask/var/bujia: change ALC5650 to ALC5682I-VS
Due to system spec change, change audio codec ALC5650 to ALC5682I-VS

BUG=b:329787697
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: I38e5c58b3ef3fbe709b98601975ae3821bb77213
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82774
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-04 14:49:19 +00:00
Ronak Kanabar
79be6da071 vc/intel/fsp: Update ADL N FSP headers from v3343.05 to v5021.00
Update generated FSP headers for Alder Lake N from v5021.00

Changes include:
- Add FspProducerDataHeader.h header file
- Open Usb4CmMode & CnviWifiCore Upd in FspsUpd.h
- Update UPD Offset in FspsUpd.h

BUG=b:296433836
TEST=Able to build and boot google/nivviks

Change-Id: Ieb4cc8f2f83d8f6e821894f0ec2e56262a25743c
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82780
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-04 13:59:30 +00:00
Ronak Kanabar
397a4965b2 Revert "vc/intel/fsp2/alderlake_n: Drop unused header files"
This reverts commit 79503ef515967ffceab7bd2a16a381e6a02c3d30.

The Intel FSP repository at https://github.com/intel/FSP.git currently
lacks the Client ADL-N headers. The existing coreboot code references
the "IoT/AlderLakeN/" directory for these headers, but it is missing the
crucial FspProducerDataHeader.h file. Without this header, the ADL-N
platform is unable to utilize the appropriate MRC version needed for
updating MRC caches. This patch aims to restore the necessary FSP
headers for the ADL-N platform within the vendorcode directory.

Change-Id: I99e9d5a07b4ca8d1666e3fd50d3d363ed5d4618e
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82779
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-04 13:59:24 +00:00
Elyes Haouas
78bd2710a7 util/xcompile: Use new GCC's warning options only if supported
Wflex-array-member-not-at-end & Wcalloc-transposed-args are
not supported when using GCC older than GCC-14.
Use them only when supported.

Change-Id: I11c1e729569c8130bd254a10454c5066a72974d6
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82785
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04 10:23:03 +00:00
Maximilian Brune
b62f86be43 payloads: Add leanefi payload
This adds another external payload to coreboot. The payload has been
heavily based on u-boots UEFI implementation.

The leanefi payload is basically a translator from coreboot to UEFI. It
takes the coreboot tables and transforms them into UEFI interfaces.
Although it can potentially load any efi application that can
handle the minimized interface that leanefi provides, it has only
been tested with LinuxBoot (v6.3.5) as a payload. It has been optimized
to support only those interfaces that Linux requires to start.

Among other leanefi does not support:
- efi capsule update (also efi system resource table)
- efi variables
- efi text input protocol (it can only output)
- most boot services. mostly memory services are left (e.g. alloc/free)
- all runtime services (although there is still a very small runtime
  footprint that is planned to be removed in the near future)
- TCG2/TPM (although that is mostly because of laziness)
The README.md currently provides more details on why.

The payload currently only supports arm64 and has only been tested
on emulation/simulator targets. The original motivation was to get ACPI
on arm64 published to the OS without using EDK2. It is however also
possible to supply the leanefi with a FDT that is published to the OS.
At that point one would however probably use coreboot only instead of
this shim layer on top. It would be way nicer to have Linux support
something else than UEFI to propagate the ACPI tables, but it requires
to get the Linux maintainer/community on board. So for now this shim
layer ciruimvents that.

LBBR Test:
// 1. dump FDT from QEMU like mentioned in aarch64 coreboot doc
// 2. compile u-root however you like (aarch64)
// 3. compile Linux (embed u-root initramfs via Kconfig)
// 4. copy Linux kernel to payloads/leanefi/Image
// 5. copy following coreboot defconfig to configs/defconfig:
CONFIG_BOARD_EMULATION_QEMU_AARCH64=y
CONFIG_PAYLOAD_NONE=n
CONFIG_PAYLOAD_LEANEFI=y
CONFIG_LEANEFI_PAYLOAD=y
CONFIG_LEANEFI_PAYLOAD_PATH="[path-to-linux]/arch/arm64/boot/Image"
CONFIG_LEANEFI_FDT=y
CONFIG_LEANEFI_FDT_PATH="[path-to-dumped-DTB]"
// 6. compile coreboot
make defconfig
make -j$(nproc)
// 7. run qemu like mentioned in coreboot doc (no FIT)
// 8. say hello to u-root and optionally kexec into the next kernel

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I4093378e89c3cb43fb0846666de80a7da36b03f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78913
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ron Minnich <rminnich@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04 00:26:14 +00:00
1800 changed files with 76968 additions and 16629 deletions

37
.gitmodules vendored
View File

@ -1,70 +1,67 @@
[submodule "3rdparty/blobs"]
path = 3rdparty/blobs
url = ../blobs.git
url = https://review.coreboot.org/blobs.git
update = none
ignore = dirty
[submodule "util/nvidia-cbootimage"]
path = util/nvidia/cbootimage
url = ../nvidia-cbootimage.git
url = https://review.coreboot.org/nvidia-cbootimage.git
[submodule "vboot"]
path = 3rdparty/vboot
url = ../vboot.git
url = https://review.coreboot.org/vboot.git
branch = main
[submodule "arm-trusted-firmware"]
path = 3rdparty/arm-trusted-firmware
url = ../arm-trusted-firmware.git
[submodule "3rdparty/chromeec"]
path = 3rdparty/chromeec
url = ../chrome-ec.git
url = https://review.coreboot.org/arm-trusted-firmware.git
[submodule "libhwbase"]
path = 3rdparty/libhwbase
url = ../libhwbase.git
url = https://review.coreboot.org/libhwbase.git
[submodule "libgfxinit"]
path = 3rdparty/libgfxinit
url = ../libgfxinit.git
url = https://review.coreboot.org/libgfxinit.git
[submodule "3rdparty/fsp"]
path = 3rdparty/fsp
url = ../fsp.git
url = https://review.coreboot.org/fsp.git
update = none
ignore = dirty
[submodule "opensbi"]
path = 3rdparty/opensbi
url = ../opensbi.git
url = https://review.coreboot.org/opensbi.git
[submodule "intel-microcode"]
path = 3rdparty/intel-microcode
url = ../intel-microcode.git
url = https://review.coreboot.org/intel-microcode.git
update = none
ignore = dirty
branch = main
[submodule "3rdparty/ffs"]
path = 3rdparty/ffs
url = ../ffs.git
url = https://review.coreboot.org/ffs.git
[submodule "3rdparty/amd_blobs"]
path = 3rdparty/amd_blobs
url = ../amd_blobs
url = https://review.coreboot.org/amd_blobs
update = none
ignore = dirty
[submodule "3rdparty/cmocka"]
path = 3rdparty/cmocka
url = ../cmocka.git
url = https://review.coreboot.org/cmocka.git
update = none
branch = stable-1.1
[submodule "3rdparty/qc_blobs"]
path = 3rdparty/qc_blobs
url = ../qc_blobs.git
url = https://review.coreboot.org/qc_blobs.git
update = none
ignore = dirty
[submodule "3rdparty/intel-sec-tools"]
path = 3rdparty/intel-sec-tools
url = ../9esec-security-tooling.git
url = https://review.coreboot.org/9esec-security-tooling.git
[submodule "3rdparty/stm"]
path = 3rdparty/stm
url = ../STM
url = https://review.coreboot.org/STM
branch = stmpe
[submodule "util/goswid"]
path = util/goswid
url = ../goswid
url = https://review.coreboot.org/goswid
branch = trunk
[submodule "src/vendorcode/amd/opensil/genoa_poc/opensil"]
path = src/vendorcode/amd/opensil/genoa_poc/opensil
url = ../opensil_genoa_poc.git
url = https://review.coreboot.org/opensil_genoa_poc.git

2
3rdparty/amd_blobs vendored

@ -1 +1 @@
Subproject commit ae5fc7d27720267ceb2ccf2fbef0ab76b023ea26
Subproject commit 26c572974bcf7255930b0e9a51da3144ed0104b5

@ -1 +1 @@
Subproject commit 48f1bc9f52491d51ca92a1d396ccbe6a9d09e780
Subproject commit c5b8de86c8838d08d5d8c9d67c7a432817ee62b8

2
3rdparty/blobs vendored

@ -1 +1 @@
Subproject commit a8db7dfe823def043368857b8fbfbba86f2e9e47
Subproject commit 45f1b757402f9a0ae8a4e021a8f5745318515308

1
3rdparty/chromeec vendored

@ -1 +0,0 @@
Subproject commit e486b388a73f1e19f3142774d0b3ee166e8f41ff

2
3rdparty/fsp vendored

@ -1 +1 @@
Subproject commit cc6399e8c759ad4ed83c2d6ea568fd918fc9bc06
Subproject commit 800c85770b458ee7f7eeb1276b46e904590d3bd7

@ -1 +1 @@
Subproject commit 41af34500598418150aa298bb04e7edacc547897
Subproject commit 2f5650548f37a6fb195e9e423389537a87ac95df

2
3rdparty/vboot vendored

@ -1 +1 @@
Subproject commit 09fcd2184f9c714829503e84b8a7dfe7f2584e00
Subproject commit f1f70f46dc5482bb7c654e53ed58d4001e386df2

View File

@ -31,8 +31,7 @@ livesphinx: $(BUILDDIR)
test:
@echo "Test for logging purposes - Failing tests will not fail the build"
-$(MAKE) -f Makefile.sphinx clean && $(MAKE) -K -f Makefile.sphinx html
-$(MAKE) -f Makefile.sphinx clean && $(MAKE) -K -f Makefile.sphinx doctest
-$(MAKE) -f Makefile.sphinx clean && $(MAKE) -k -f Makefile.sphinx html
help:
@echo "all - Builds all documentation targets"

View File

@ -29,7 +29,7 @@ sealings are sent via encrypted email.
### NovaCustom laptops
[NovaCustom](https://configurelaptop.eu/) sells configurable laptops with
[NovaCustom](https://novacustom.com) sells configurable laptops with
[Dasharo](https://dasharo.com/) coreboot based firmware on board, maintained by
[3mdeb](https://3mdeb.com/). NovaCustom offers full GNU/Linux and Microsoft
Windows compatibility. NovaCustom ensures security updates via fwupd for 5 years

View File

@ -84,8 +84,8 @@ the operating system.
* U-boot, depthcharge, FILO, etc.
Theres [https://doc.coreboot.org/payloads.html](https://doc.coreboot.org/payloads.
html) with a list, although its not complete.
Theres [https://doc.coreboot.org/payloads.html](https://doc.coreboot.org/payloads.html)
with a list, although its not complete.
### What does coreboot leave in memory after it's done initializing the hardware?

View File

@ -200,9 +200,9 @@ values to be set based on other values.
visible in the front end.
## Keywords
### Keywords
### bool
#### bool
The 'bool' keyword assigns a boolean type to a symbol. The allowable values for
a boolean type are 'n' or 'y'. The keyword can be followed by an optional prompt
@ -238,7 +238,7 @@ bool \[prompt\] \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### choice
#### choice
This creates a selection list of one or more boolean symbols. For bools, only
one of the symbols can be selected, and one will be be forced to be selected,
@ -301,7 +301,7 @@ choice \[symbol\]
--------------------------------------------------------------------------------
### comment
#### comment
This keyword defines a line of text that is displayed to the user in the
configuration frontend and is additionally written to the output files.
@ -326,7 +326,7 @@ comment &lt;prompt&gt;
--------------------------------------------------------------------------------
### config
#### config
This is the keyword that starts a block defining a Kconfig symbol. The symbol
modifiers follow the 'config' statement.
@ -363,7 +363,7 @@ config &lt;symbol&gt;
--------------------------------------------------------------------------------
### default
#### default
The default keyword assigns a value to a symbol in the case where no preset
value exists, i.e. the symbol is not present and assigned in .config. If there
@ -403,7 +403,7 @@ default &lt;expr&gt; \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### def_bool
#### def_bool
def_bool is similar to the 'bool' keyword in that it sets a symbols type to
boolean. It lets you set the type and default value at the same time, instead
@ -437,7 +437,7 @@ def_bool &lt;expr&gt; \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### depends on
#### depends on
This defines a dependency for a menu entry, including symbols and comments. It
behaves the same as surrounding the menu entry with an if/endif block. If the
@ -466,28 +466,28 @@ depends on &lt;expr&gt;
--------------------------------------------------------------------------------
### endchoice
#### endchoice
This ends a choice block. See the 'choice' keyword for more information and an
example.
--------------------------------------------------------------------------------
### endif
#### endif
This ends a block started by the 'if' keyword. See the 'if' keyword for more
information and an example.
--------------------------------------------------------------------------------
### endmenu
#### endmenu
This ends a menu block. See the 'menu' keyword for more information and an
example.
--------------------------------------------------------------------------------
### help
#### help
The 'help' keyword defines the subsequent block of text as help for a config or
choice block. The help block is started by the 'help' keyword on a line by
@ -519,7 +519,7 @@ help &lt;help text&gt;
--------------------------------------------------------------------------------
### hex
#### hex
This is another symbol type specifier, specifying an unsigned integer value
formatted as hexadecimal.
@ -555,7 +555,7 @@ hex &lt;expr&gt; \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### if
#### if
The 'if' keyword is overloaded, used in two different ways. The first definition
enables and disables various other keywords, and follows the other keyword
@ -596,7 +596,7 @@ endif
--------------------------------------------------------------------------------
### int
#### int
A type setting keyword, defines a symbol as an integer, accepting only signed
numeric values. The values can be further restricted with the range keyword.
@ -632,7 +632,7 @@ int &lt;expr&gt; \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### mainmenu
#### mainmenu
The 'mainmenu' keyword sets the title or title bar of the configuration front
end, depending on how the configuration program decides to use it. It can only
@ -652,7 +652,7 @@ mainmenu "coreboot configuration"
--------------------------------------------------------------------------------
### menu
#### menu
The 'menu' and 'endmenu' keywords tell the configuration front end that the
enclosed statements are part of a group of related pieces.
@ -699,7 +699,7 @@ endmenu
--------------------------------------------------------------------------------
### prompt
#### prompt
The 'prompt' keyword sets the text displayed for a config symbol or choice in
configuration front end.
@ -752,7 +752,7 @@ prompt &lt;prompt&gt; \[if &lt;expr&gt;\]
prompt "Prompt value 2"
--------------------------------------------------------------------------------
### range
#### range
This sets the allowable minimum and maximum entries for hex or int type config
symbols.
@ -774,7 +774,7 @@ range &lt;symbol&gt; &lt;symbol&gt; \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### select
#### select
The select keyword is used within a bool type config block. In coreboot (and
other projects that don't use modules), the 'select' keyword can force an
@ -818,7 +818,7 @@ select &lt;symbol&gt; \[if &lt;expr&gt;\]
--------------------------------------------------------------------------------
### source
#### source
The 'source' keyword functions much the same as an 'include' statement in c.
This pulls one or more files into Kconfig at the location of the 'source'
@ -877,7 +877,7 @@ statements that generate a list of all the platform names:
--------------------------------------------------------------------------------
### string
#### string
The last of the symbol type assignment keywords. 'string' allows a text value to
be entered.
@ -923,7 +923,7 @@ keyword later. See the prompt keyword for more notes.
## Keywords not used in coreboot at the time of writing:
### Keywords not used in coreboot at the time of writing:
- allnoconfig_y:
- defconfig_list
@ -948,7 +948,7 @@ statements:
#define SYMBOL NAME XXX
##### Symbol types:
#### Symbol types:
- bool, int, and hex types - Every symbol of one of these types created in the
Kconfig tree is defined. It doesnt matter whether theyre in an if/endif
block, or have a depends on statement - they ALL end up being defined in
@ -1168,19 +1168,19 @@ saved .config file. As always, a 'select' statement overrides any specified
## Kconfig Editor Highlighting
#### vim:
### vim:
vim has syntax highlighting for Kconfig built in (or at least as a part of
vim-common), but most editors do not.
#### ultraedit:
### ultraedit:
https://github.com/martinlroth/wordfiles/blob/master/kconfig.uew
#### atom:
### atom:
https://github.com/martinlroth/language-kconfig

View File

@ -99,7 +99,7 @@ To reference documents use the TOC tree or inline RST code.
Under Sphinx markdown tables are not supported. Therefore you can use following
code block to write tables in reStructuredText and embed them into the markdown:
```eval_rst
```{eval-rst}
+------------+------------+-----------+
| Header 1 | Header 2 | Header 3 |
+============+============+===========+
@ -144,7 +144,7 @@ you'll see the following warning:
You can import CSV files and let sphinx automatically convert them to human
readable tables, using the following reStructuredText snipped:
```eval_rst
```{eval-rst}
.. csv-table::
:header: "Key", "Value"
:file: keyvalues.csv

View File

@ -139,6 +139,45 @@ Every now and then, coreboot is present in one way or another at
[conferences](community/conferences.md). If you're around, come and
say hello!
## Blob policy in the coreboot project
The goal of the coreboot project is to provide a FOSS firmware solution across
multiple CPU architectures, such as ARM, x86, and RISC-V. While fully open
source implementations for these architectures are encouraged and preferred,
we understand that a fully open implementation whereby every firmware component
is available as source code for modern platforms is not always feasible.
Different reasons inhibit the availability of fully open implementations,
including limited development resources, 3rd party license constraints of
IP blocks, or a legacy mindset of the silicon vendors.
It is important for the coreboot project to have support for modern CPU
platforms in order to provide a viable alternative for proprietary firmware
implementations. We do not have direct control over how hardware vendors design
their products, however we can provide an attractive alternative to the
expensive and complicated proprietary firmware model that exists today.
For modern platforms, we are largely dependent on the silicon
vendor to provide additional information on how to properly initialize the
hardware, as the required datasheets are often only available with an NDA.
Therefore, one possible way to have coreboot support for the latest platforms
is binary code (aka, a blob) provided by the silicon vendor. While we do
discourage this solution, it can be a door opener for coreboots support of a
given platform and thus keep coreboot functional on modern platforms. It is
clearly not the goal of the project to accept every blob a silicon vendor wishes
to use without question. On the contrary, each new blob needs to be examined
critically by the community, evaluating the need, risk, and alternative options.
Wherever possible, introducing new blobs should be avoided. That said, there
can be situations where a piece of code provided as a blob will enable the rest
of the fully open source firmware stack on a brand new platform. If blocking
this blob would lead to no support at all for the platform in question in
coreboot, this situation needs to be examined carefully. While these kinds
of discussion will be coordinated closely with the community (e.g. on the
mailing list or dedicated meetings), ultimately it is up to the leadership to
decide if there is no agreement between the community and the vendor pushing for
the new blob. This decision will be communicated on the mailing list.
Please see additionally
[coreboot binary policy](https://github.com/coreboot/blobs/blob/master/README.md).
## Getting the source code
coreboot is primarily developed in the

View File

@ -0,0 +1,83 @@
# Dell Latitude E7240
This page is about the notebook [Dell Latitude E7240].
## Release status
Dell Latitude E7240 was released in 2013 and is now end of life.
It can be bought from a secondhand market like Taobao or eBay.
## Required proprietary blobs
The following blobs are required to operate the hardware:
1. mrc.bin
2. Intel ME firmware
Memory reference code in mrc.bin is used to initialize the Haswell platform.
You need this blob to build a working coreboot image. Please read
[mrc.bin](../../northbridge/intel/haswell/mrc.bin) for instructions on
retrieving and using it.
Intel ME firmware is in the flash chip. It is not needed when building coreboot.
It can be extracted from the OEM firmware. You can also flash only the BIOS
region to leave Intel ME firmware untouched.
## Programming
The laptop can be flashed internally under OEM firmware using [dell-flash-unlock].
To flash with an external programmer, you need to remove the battery and the base cover.
![Dell Latitude E7240 mainboard](e7240.webp)
For more details have a look at the general [flashing tutorial].
It is also possible to flash internally under coreboot.
## Debugging
The board can be debugged with EHCI debug. The EHCI debug port is next to the miniDP port.
There's a serial port on dock, but it's not yet supported in coreboot.
Schematic of this laptop can be found online. The board name is Compal LA-9431P.
## Test status
### Not working
- EC ACPI
- SD/MMC card reader (kernel reports "Timeout waiting for hardware cmd interrupt.")
- No internal display before booting to OS when connected with a dock
### Working
- Integrated graphics init with libgfxinit
- mSATA
- WLAN
- USB
- Keyboard
- Touchpad and the buttons on it
- Dock: all USB ports, DisplayPort, eSATA
- Internal flashing
## Technology
```{eval-rst}
+------------------+-----------------------------+
| CPU | Intel Haswell-ULT |
+------------------+-----------------------------+
| PCH | Intel Lynx Point Low Power |
+------------------+-----------------------------+
| EC | SMSC MEC5075 |
+------------------+-----------------------------+
| Super I/O | SMSC ECE5048 |
+------------------+-----------------------------+
| Coprocessor | Intel Management Engine |
+------------------+-----------------------------+
```
[Dell Latitude E7240]: https://www.dell.com/support/home/en-us/product-support/product/latitude-e7240-ultrabook/docs
[dell-flash-unlock]: https://github.com/nic3-14159/dell-flash-unlock
[flashing tutorial]: ../../tutorial/flashing_firmware/ext_power.md

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -0,0 +1,42 @@
# QEMU SBSA emulator
This page describes how to build and run ```coreboot``` for QEMU's sbsa-ref machine.
The qemu-sbsa ```coreboot``` image acts as BL-3.3 for Arm Trusted Firmware (```TF-A```) and
mainly takes care of setting up SMBIOS and ACPI tables, hence, in order to boot,
you also need to supply a ```TF-A``` image.
## Building TF-A
You can build ```TF-A``` from source by fetching
```
https://github.com/ARM-software/arm-trusted-firmware
```
and building the qemu-sbsa platform
```
PLAT=qemu_sbsa
```
Upon entry, ```coreboot``` expects a FDT pointer in x0, so make sure to compile ```TF-A``` with
```
ARM_LINUX_KERNEL_AS_BL33=1
```
This will force ```TF-A``` to pass a pointer to the FDT in x0.
## Building coreboot
Simply select the qemu-sbsa board and, optionally, configure a payload. We recommend
the ```leanefi``` payload. ```leanefi``` will setup a minimal set of UEFI services, just enough
to boot into a linux kernel.
## Running coreboot in QEMU
Once you have obtained ```TF-A``` and ```coreboot``` images, launch qemu via
```bash
qemu-system-aarch64 -nographic -m 1024 -M sbsa-ref -pflash <path/to/TFA.fd> \
-pflash <path/to/coreboot.rom>
```
## LBBR bootflow
arm and 9elements worked together in order to create a LBBR compliant bootflow
consisting of ```TF-A```, ```coreboot```, ```leanefi``` and ```LinuxBoot```. A proof of concept
can be found here https://gitlab.arm.com/systemready/firmware-build/linuxboot/lbbr-coreboot-poc

View File

@ -0,0 +1,80 @@
# HP EliteBook 8560w
This page describes how to run coreboot on the [HP EliteBook 8560w].
## Required proprietary blobs
- Intel Firmware Descriptor, ME and GbE firmware
- EC: please read [HP Laptops with KBC1126 Embedded Controller](hp_kbc1126_laptops)
## Flashing instructions
When running vendor firmware, external flashing is needed.
HP EliteBook 8560w has an 8MiB SOIC-8 flash chip on the bottom of the
mainboard. You just need to remove the service cover, and use an SOIC-8
clip to read and flash the chip.
![8560w_chip_location](8560w_flash.webp)
```{eval-rst}
+---------------------+------------+
| Type | Value |
+=====================+============+
| Socketed flash | no |
+---------------------+------------+
| Model | MX25L6406E |
+---------------------+------------+
| Size | 8 MiB |
+---------------------+------------+
| Package | SOIC-8 |
+---------------------+------------+
| Write protection | no |
+---------------------+------------+
| Dual BIOS feature | no |
+---------------------+------------+
| In circuit flashing | yes |
+---------------------+------------+
| Internal flashing | yes |
+---------------------+------------+
```
## Working
- i7-2720QM, 8G+8G
- Arch Linux boot from SeaBIOS payload
- EHCI debug: the port is beside the eSATA port
- SATA
- eSATA
- USB2 and USB3
- keyboard
- Gigabit Ethernet
- WLAN
- WWAN
- VGA and DisplayPort
- audio
- EC ACPI
- Using `me_cleaner`
- dock: PS/2 keyboard, USB, DisplayPort
- TPM
- S3 suspend/resume
## Technology
```{eval-rst}
+------------------+--------------------------------------------------+
| Northbridge | :doc:`../../northbridge/intel/sandybridge/index` |
+------------------+--------------------------------------------------+
| Southbridge | bd82x6x |
+------------------+--------------------------------------------------+
| CPU | model_206ax |
+------------------+--------------------------------------------------+
| Super I/O | SMSC LPC47n217 |
+------------------+--------------------------------------------------+
| EC | SMSC KBC1126 |
+------------------+--------------------------------------------------+
| Coprocessor | Intel Management Engine |
+------------------+--------------------------------------------------+
```
[HP EliteBook 8560w]: https://support.hp.com/us-en/product/hp-elitebook-8560w-mobile-workstation/5071171

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -14,7 +14,7 @@ therefore the automatic fan control will not increase the fan speed.
## Flashing coreboot
```{eval_rst}
```{eval-rst}
+---------------------+-------------------------+
| Type | Value |
+=====================+=========================+
@ -82,7 +82,7 @@ until cleanly power cycled.
## Technology
```{eval_rst}
```{eval-rst}
+------------------+--------------------------------------------------+
| Northbridge | :doc:`../../northbridge/intel/sandybridge/index` |
+------------------+--------------------------------------------------+

View File

@ -76,6 +76,7 @@ N130WU / N131WU <clevo/n130wu/index.md>
```{toctree}
:maxdepth: 1
Latitude E7240 <dell/e7240.md>
OptiPlex 9010 SFF <dell/optiplex_9010.md>
```
@ -89,6 +90,7 @@ The boards in this section are not real mainboards, but emulators.
Spike RISC-V emulator <emulation/spike-riscv.md>
QEMU RISC-V emulator <emulation/qemu-riscv.md>
QEMU AArch64 emulator <emulation/qemu-aarch64.md>
QEMU SBSA emulator <emulation/qemu-sbsa.md>
QEMU x86 Q35 <emulation/qemu-q35.md>
QEMU x86 PC <emulation/qemu-i440fx.md>
QEMU POWER9 <emulation/qemu-power9.md>
@ -140,6 +142,7 @@ HP Laptops with KBC1126 EC <hp/hp_kbc1126_laptops.md>
HP Sure Start <hp/hp_sure_start.md>
EliteBook 2170p <hp/2170p.md>
EliteBook 2560p <hp/2560p.md>
EliteBook 8560w <hp/8560w.md>
EliteBook 8760w <hp/8760w.md>
EliteBook Folio 9480m <hp/folio_9480m.md>
EliteBook 820 G2 <hp/elitebook_820_g2.md>
@ -327,6 +330,7 @@ LabTop Mk III <starlabs/labtop_kbl.md>
LabTop Mk IV <starlabs/labtop_cml.md>
StarLite Mk III <starlabs/lite_glk.md>
StarLite Mk IV <starlabs/lite_glkr.md>
StarLite Mk V <starlabs/lite_adl.md>
StarBook Mk V <starlabs/starbook_tgl.md>
StarBook Mk VI <starlabs/starbook_adl.md>
Flashing devices <starlabs/common/flashing.md>

View File

@ -82,7 +82,7 @@ It is possible to reduce the Intel ME firmware size to free additional
space for the `bios` region. This is usually referred to as *cleaning the ME* or
*stripping the ME*.
After reducing the Intel ME firmware size you must modify the original IFD,
[split the resulting coreboot ROM](#splitting-the-coreboot-rom) and then write
[split the resulting coreboot ROM](#splitting-the-corebootrom) and then write
each ROM using an [external programmer].
Have a look at [me_cleaner] for more information.

View File

@ -46,7 +46,7 @@ Now you need to patch the flash descriptor. You can either [modify the one from
your backup with **ifdtool**](#modifying-flash-descriptor-using-ifdtool), or
[use one from the coreboot repository](#using-checked-in-flash-descriptor-via-bincfg).
#### Modifying flash descriptor using ifdtool
### Modifying flash descriptor using ifdtool
Pick the layout according to your chip size from the table below and save it to
the `new_layout.txt` file:
@ -88,7 +88,7 @@ $ mv flashregion_0_flashdescriptor.bin.new.new flashregion_0_flashdescriptor.bin
Continue to the [Configuring coreboot](#configuring-coreboot) section.
#### Using checked-in flash descriptor via bincfg
### Using checked-in flash descriptor via bincfg
There is a copy of an X200's flash descriptor checked into the coreboot
repository. It is supposed to work for the T400/T500 as well. The descriptor
@ -119,7 +119,7 @@ $ make gen-ifd-x200
It will be saved to the `flashregion_0_fd.bin` file.
#### Configuring coreboot
### Configuring coreboot
Now configure coreboot. You need to select correct chip size and specify paths
to flash descriptor and gbe dump.

View File

@ -49,6 +49,6 @@ The board features:
## Extra links
[flashrom]: https://flashrom.org/Flashrom
[flashing tutorial]: ../../../../tutorial/flashing_firmware/ext_power.md
[Intel FSP2.0]: ../../../../soc/intel/fsp/index.md
[flashing tutorial]: ../../tutorial/flashing_firmware/ext_power.md
[Intel FSP2.0]: ../../soc/intel/fsp/index.md
[AST2500]: https://www.aspeedtech.com/products.php?fPath=20&rId=440

View File

@ -1,15 +1,15 @@
## Building coreboot
# Building coreboot
### Preliminaries
## Preliminaries
Prior to building coreboot the following files are required:
#### StarBook series:
### StarBook series:
* Intel Flash Descriptor file (descriptor.bin)
* Intel Management Engine firmware (me.bin)
* ITE Embedded Controller firmware (ec.bin)
#### StarLite series:
### StarLite series:
* Intel Flash Descriptor file (descriptor.bin)
* IFWI Image (ifwi.rom)
@ -18,7 +18,7 @@ The files listed below are optional:
These files exist in the correct location in the [StarLabsLtd/blobs](https://github.com/StarLabsLtd/blobs) repo on GitHub which is used in place of the standard 3rdparty/blobs repo.
### Build
## Build
The following commands will build a working image, where the last two words represent the
series and processor i.e. `lite_glkr`:

View File

@ -1,6 +1,6 @@
# Flashing with fwupd
#### **Requirements:**
## **Requirements:**
* fwupd version 1.5.6 or later
* The battery must be charged to at least 30%
@ -44,7 +44,7 @@ BIOS Lock must be disabled when switching from the standard AMI (American Megatr
4\. Next, press the `F10` key to **Save & Exit** and then `Enter` to confirm.
#### **Switching Branch**
## **Switching Branch**
Switching branch refers to changing from AMI firmware to coreboot, or vice versa.

View File

@ -0,0 +1,82 @@
# StarBook Mk V
## Specs
- CPU (full processor specs available at https://ark.intel.com)
- Intel N200 (Alder Lake)
- EC
- ITE IT5570E
- USB-C PD Charger
- Suspend / resume
- GPU
- Intel® Iris® Xe Graphics
- GOP driver is recommended, VBT is provided
- eDP 12.5-inch 2880x1920 or 2160x1440 LCD
- 2 x USB-C DisplayPort video
- Memory
- 16GB on-board
- Networking
- 9560 CNVi WiFi / Bluetooth
- Sound
- Realtek ALC269-VB6
- Internal speakers
- Internal microphone
- Combined headphone / microphone 3.5-mm jack
- HDMI audio
- USB-C DisplayPort audio
- Storage
- M.2 PCIe SSD
- RTS5129 MicroSD card reader
- USB
- 2 x 5MP CCD Camera
- 2 x USB 3.1 Gen 2 Type-C (right)
## Building coreboot
Please follow the [Star Labs build instructions](common/building.md) to build coreboot, using `config.starlabs_starbook_adl` as config file.
### Preliminaries
Prior to building coreboot the following files are required:
* Intel Flash Descriptor file (descriptor.bin)
* Intel Management Engine firmware (me.bin)
* ITE Embedded Controller firmware (ec.bin)
The files listed below are optional:
- Splash screen image in Windows 3.1 BMP format (Logo.bmp)
These files exist in the correct location in the StarLabsLtd/blobs repo on GitHub which is used in place of the standard 3rdparty/blobs repo.
### Build
The following commands will build a working image:
```bash
make distclean
make defconfig KBUILD_DEFCONFIG=configs/config.starlabs_byte_adl
make
```
## Flashing coreboot
```{eval-rst}
+---------------------+------------+
| Type | Value |
+=====================+============+
| Socketed flash | no |
+---------------------+------------+
| Vendor | Winbond |
+---------------------+------------+
| Model | W25Q256.V |
+---------------------+------------+
| Size | 32 MiB |
+---------------------+------------+
| Package | SOIC-8 |
+---------------------+------------+
| Internal flashing | yes |
+---------------------+------------+
| External flashing | yes |
+---------------------+------------+
```
Please see [here](common/flashing.md) for instructions on how to flash with fwupd.

View File

@ -61,6 +61,6 @@ These issues apply to all boards. Have a look at the board-specific issues, too.
[Supermicro X11 LGA1151 series]: https://www.supermicro.com/products/motherboard/Xeon3000/#1151
[OpenBMC]: https://www.openbmc.org/
[flashrom]: https://flashrom.org/Flashrom
[flashing tutorial]: ../../../../tutorial/flashing_firmware/ext_power.md
[Intel FSP2.0]: ../../../../soc/intel/fsp/index.md
[flashing tutorial]: ../../../tutorial/flashing_firmware/ext_power.md
[Intel FSP2.0]: ../../../soc/intel/fsp/index.md
[AST2400]: https://www.aspeedtech.com/products.php?fPath=20&rId=376

View File

@ -160,7 +160,7 @@ As you can see, by using DIMMs with different maximum DRAM frequencies, the
slowest DIMMs' frequency will be selected, to prevent over-clocking it.
The selected frequency gives the PLL multiplier to operate at. In case the PLL
locks (see Take me to [Hard fuses](#hard_fuses)) the frequency will be used for
locks (see Take me to [Hard fuses](#hard-fuses)) the frequency will be used for
all DIMMs. At this point it's not possible to change the multiplier again,
until the system has been powered off. In case the PLL doesn't lock, the next
smaller multiplier will be used until a working multiplier will be found.

View File

@ -66,13 +66,23 @@ delayed, the next release will still be 3 months after the last release.
## Checklist
### ~2 weeks prior to release
### ~6 weeks prior to release
- [ ] Announce upcoming release to mailing list, ask people to test and
to update release notes.
- [ ] Start marking patches that should to go into the release with a
tag "coreboot_release_X.yy"
tag "coreboot_release_X.yy".
### ~4 weeks prior to release
- [ ] Freeze toolchain state. Only relevant fixes are allowed from this point on.
- [ ] Schedule release meetings.
### ~2 weeks prior to release
- [ ] Meet with release team.
- [ ] Send reminder email to mailing list, ask for people to test, and to update the release notes.
- [ ] Update the topic in the IRC channel with the date of the upcoming release.
### ~1 week prior to release
- [ ] Meet with release team.
- [ ] Send reminder email to mailing list, ask for people to test,
and to update the release notes.
- [ ] Update the topic in the IRC channel with the date of the upcoming
@ -80,21 +90,22 @@ delayed, the next release will still be 3 months after the last release.
- [ ] If there are any deprecations announced for the following release,
make sure that a list of currently affected boards and chipsets is
part of the release notes.
- [ ] Finalize release notes as much as possible
- [ ] Prepare release notes template for following release
- [ ] Update `Documentation/releases/index.md`
- [ ] Finalize release notes as much as possible.
- [ ] Prepare release notes template for following release.
- [ ] Update `Documentation/releases/index.md.
- [ ] Check which branches need to be released. Any branch with changes
should get a new release. Announce these branch releases and
prepare release notes.
### Day before release
### Day before release tag
- [ ] Make sure patches with tags for the release are merged.
- [ ] Announce to IRC that the release will be tomorrow and ask for
testing.
- [ ] Run `util/vboot_list/vboot_list.sh` script to update the list of
boards supported by vboot.
### Day of release
### Day of release tag
- [ ] Meet with release team.
- [ ] Review the full documentation about doing the release below.
- [ ] Select a commit ID to base the release upon.
- [ ] Test the commit selected for release.
@ -120,11 +131,24 @@ delayed, the next release will still be 3 months after the last release.
can be used as release builders.
### Week following the release
- [ ] Do the final release notes - Fill in the release date, remove "Upcoming release"
and other filler from the current release notes.
- [ ] ADMIN: Upload release files & toolchain tarballs to the web server.
- [ ] ADMIN: Upload the final release notes to the web server.
- [ ] ADMIN: Upload crossgcc sources to the web server.
- [ ] Create coreboot-sdk and coreboot-jenkins-node docker images based on the release ID
and push them to dockerhub. These can be used as release builders.
- [ ] Update download page to point to files, push to repo.
- [ ] Write and publish blog post with release final notes. Branch
releases notes should be included in the same post.
- [ ] Remove code that was announced it was going to be removed.
- [ ] Update `Documentation/releases/boards_supported_on_branches.md`
- [ ] Update AUTHORS file with any new authors.
- [ ] Update Documentation/releases/boards_supported_on_branches.md.
### 7 days after release tag
- [ ] Meet with release team.
- [ ] Write and publish blog post with release final notes. Branch releases notes (if any)
should be included in the same post.
- [ ] Set up for next release.
### Creating a branch
- [ ] Branches are named 4.xx_branch to differentiate from the tags.
@ -230,6 +254,7 @@ commit db508565d2483394b709654c57533e55eebace51 (HEAD, tag: 4.6, origin/master,
...
````
## Push the signed tag
When you used the script to generate the release, a signed tag was
generated in the tree that was downloaded. From the coreboot-X.Y tree,
just run: `git push origin X.Y`. In case you pushed the wrong tag

View File

@ -12,7 +12,7 @@ optimization.
The next release is scheduled for mid-May.
### Release number format update
## Release number format update
The previous release was the last to use the incrementing 4.xx release
name scheme. For this and future releases, coreboot has switched to a
@ -22,7 +22,7 @@ of 00 implied. If we need to do a fix or incremental release, we'll
append the values .01, .02 and so on to the initial release value.
### The master branch is being deleted
## The master branch is being deleted
The coreboot project changed from master to main roughly 6 months ago,
and has been keeping the two branches in sync since then to ease the
@ -197,8 +197,7 @@ Significant Known and Open Issues
the version of verstage used in coreboot 24.02.
## Issues from the coreboot bugtracker: https://ticket.coreboot.org/
Issues from the coreboot bugtracker: https://ticket.coreboot.org/
### coreboot-wide or architecture-wide issues

View File

@ -1,37 +1,223 @@
Upcoming release - coreboot 24.08
========================================================================
The 24.08 release is scheduled for Mid Aug, 2024
We are pleased to announce the release of coreboot 24.08, another significant
milestone in our ongoing commitment to delivering open-source firmware
solutions. This release includes over 900 commits, contributed by more than 130
dedicated individuals from our global community. The updates in 24.08 bring
various enhancements, optimizations, and new features that further improve the
reliability and performance of coreboot across supported platforms.
Update this document with changes that should be in the release notes.
* Please use Markdown.
* See the past few release notes for the general format.
* The chip and board additions and removals will be updated right
before the release, so those do not need to be added.
* Note that all changes before the release are done are marked upcoming.
A final version of the notes are done after the release.
We extend our sincere thanks to the patch authors, reviewers, and everyone
involved in the coreboot community for their hard work and dedication. Your
contributions continue to advance and refine coreboot with each release. As
always, thank you for your support and collaboration in driving the future of
open-source firmware. The next coreboot release, 24.11 is planned for mid
November.
Significant or interesting changes
----------------------------------
* Add changes that need a full description here
### Introduce region_create() functions
* This section should have full descriptions and can or should have
a link to the referenced commits.
We introduce two new functions to create region objects. They allow us to check
for integer overflows (`region_create_untrusted()`) or assert their absence
(`region_create()`).
This fixes potential overflows in `region_overlap()` checks in SMI handlers, where
we would wrongfully report MMIO as *not* overlapping SMRAM.
Also, two cases of `strtol()` in `parse_region()` (cbfstool), where the results were
implicitly converted to `size_t`, are replaced with the unsigned `strtoul()`.
FIT payload support is left out, as it doesn't use the region API (only the
struct).
Ticket: <https://ticket.coreboot.org/issues/522> \
Review: <https://review.coreboot.org/79905>
### lib/device_tree: Add some FDT helper functions
This adds some helper functions for FDT (Flattened Device Tree) , since more and
more mainboards seem to need FDT nowadays. For example our QEMU boards need it
in order to know how much RAM is available. Also all RISC-V boards in our tree
need FDT.
This also adds some tests in order to test said functions.
Review: <https://review.coreboot.org/c/coreboot/+/81081>
### device_tree: Add function to get top of memory from a FDT blob
coreboot needs to figure out top of memory to place CBMEM data. On some non-x86
QEMU virtual machines, this is achieved by probing the RAM space to find where
the VM starts discarding data since it's not backed by actual RAM. This behavior
seems to have changed on the QEMU side since then, VMs using the "virt" model
have started raising exceptions/errors instead of silently discarding data
(likely [1] for example) which has previously broken coreboot on these emulation
boards.
The qemu-aarch64 and qemu-riscv mainboards are intended for the "virt" models
and had this issue, which was mostly fixed by using exception handlers in the
RAM detection process [2][3]. But on 32-bit RISC-V we fail to initialize CBMEM
if we have 2048 MiB or more of RAM, and on 64-bit RISC-V we had to limit probing
to 16383 MiB because it can run into MMIO regions otherwise.
The qemu-armv7 mainboard code is intended for the "vexpress-a9" model VM which
doesn't appear to suffer from this issue. Still, the issue can be observed on
the ARMv7 "virt" model via a port based on qemu-aarch64.
QEMU docs for ARM and RISC-V "virt" models [4][5] recommend reading the device
tree blob it provides for device information (incl. RAM size). Implement
functions that parse the device tree blob to find described memory regions and
calculate the top of memory in order to use it in mainboard code as an
alternative to probing RAM space. ARM64 code initializes CBMEM in romstage where
malloc isn't available, so take care to do parsing without unflattening the blob
and make the code available in romstage as well.
[1] <https://lore.kernel.org/qemu-devel/1504626814-23124-1-git-send-email-peter.maydell@linaro.org/T/#u> \
[2] <https://review.coreboot.org/c/coreboot/+/34774> \
[3] <https://review.coreboot.org/c/coreboot/+/36486> \
[4] <https://qemu-project.gitlab.io/qemu/system/arm/virt.html> \
[5] <https://qemu-project.gitlab.io/qemu/system/riscv/virt.html>
Review: <https://review.coreboot.org/c/coreboot/+/80322>
### drivers/wifi: Support Bluetooth Regulator Domain Settings
The 'Bluetooth Increased Power Mode - SAR Limitation' feature provides ability
to utilize increased device Transmit power capability for Bluetooth applications
in coordination with Wi-Fi adhering to product SAR (Specific Absorption Rate)
limit when Bluetooth and Wi-Fi run together.
This commit introduces a `bluetooth_companion' field to the generic Wi-Fi
drivers chip data. This field can be set in the board design device tree to
supply the bluetooth device for which the BRDS function must be created.
The implementation follows document 559910 Intel Connectivity Platforms BIOS
Guideline revision 8.3 specification.
Review: <https://review.coreboot.org/c/coreboot/+/83200>
### acpigen_ps2_keybd: Support Do Not Disturb & Accessibility Keys
These commits add support for a Do Not Disturb key and an Accessibility key.
HUTRR94 added support for a new usage titled "System Do Not Disturb" which
toggles a system-wide Do Not Disturb setting.
HUTRR116 added support for a new usage titled "System Accessibility Binding"
which toggles a system-wide bound accessibility UI or command.
HUTRR94: <https://www.usb.org/sites/default/files/hutrr94_-_system_do_not_disturb.pdf> \
HUTRR116: <https://www.usb.org/sites/default/files/hutrr116-systemaccessbilitybinding_2.pdf>
Review: <https://review.coreboot.org/c/coreboot/+/82997> \
Review: <https://review.coreboot.org/c/coreboot/+/82996>
### superio/ite/common: Add common driver for GPIO and LED configuration
Add a generic driver to configure GPIOs and LEDs on common ITE SuperIOs. The
driver supports most ITE SuperIOs, except Embedded Controllers. The driver
allows configuring every GPIO property with pin granularity.
Verified against datasheets of all ITE SIOs currently supported by coreboot,
except IT8721F (assumed to be the same as IT8720F), IT8623E and IT8629E.
Review: <https://review.coreboot.org/c/coreboot/+/83355>
### util/cbfstool: Fix linux_trampoline.c generation
linux_trampoline.c generation is broken with latest crossgcc-i386 toolchain. Fix
the issue to enable the building.
```
../cbfstool/linux_trampoline.S: Assembler messages:
../cbfstool/linux_trampoline.S:100: Error: no instruction mnemonic
suffix given and no register operands; can't size instruction
<builtin>: recipe for target '../cbfstool/linux_trampoline.o' failed
```
Review: <https://review.coreboot.org/c/coreboot/+/82704>
### Add LeanEFI payload
This adds another external payload to coreboot. The payload has been heavily
based on u-boots UEFI implementation.
The LeanEFI payload is basically a translator from coreboot to UEFI. It takes
the coreboot tables and transforms them into UEFI interfaces. Although it can
potentially load any efi application that can handle the minimized interface
that LeanEFI provides, it has only been tested with LinuxBoot (v6.3.5) as a
payload. It has been optimized to support only those interfaces that Linux
requires to start.
Among other LeanEFI does not support:
- efi capsule update (also efi system resource table)
- efi variables
- efi text input protocol (it can only output)
- most boot services. mostly memory services are left (e.g. alloc/free)
- all runtime services (although there is still a very small runtime
footprint that is planned to be removed in the near future)
- TCG2/TPM (although that is mostly because of laziness)
The README.md currently provides more details on why.
The payload currently only supports arm64 and has only been tested on
emulation/simulator targets. The original motivation was to get ACPI on arm64
published to the OS without using EDK2. It is however also possible to supply
the LeanEFI with a FDT that is published to the OS. At that point one would
however probably use coreboot only instead of this shim layer on top. It would
be way nicer to have Linux support something other than UEFI to propagate the
ACPI tables, but it requires getting the Linux maintainer/community on board. So
for now this shim layer circumvents that.
LBBR Test:
1. dump FDT from QEMU like mentioned in aarch64 coreboot doc
2. compile u-root however you like (aarch64)
3. compile Linux (embed u-root initramfs via Kconfig)
4. copy Linux kernel to payloads/leanefi/Image
5. copy following coreboot defconfig to configs/defconfig:
```
CONFIG_BOARD_EMULATION_QEMU_AARCH64=y
CONFIG_PAYLOAD_NONE=n
CONFIG_PAYLOAD_LEANEFI=y
CONFIG_LEANEFI_PAYLOAD=y
CONFIG_LEANEFI_PAYLOAD_PATH="[path-to-linux]/arch/arm64/boot/Image"
CONFIG_LEANEFI_FDT=y
CONFIG_LEANEFI_FDT_PATH="[path-to-dumped-DTB]"
```
6. compile coreboot \
`make defconfig` \
`make -j$(nproc)`
7. run qemu like mentioned in coreboot doc (no FIT)
8. say hello to u-root and optionally kexec into the next kernel
Review: <https://review.coreboot.org/c/coreboot/+/78913>
Additional coreboot changes
---------------------------
The following are changes across a number of patches, or changes worth
noting, but not needing a full description.
* Changes that only need a line or two of description go here.
* Dropped ChromeEC as a submodule.
* Numerous updates to autoport tool, including Haswell support.
* Upgrade to Wuffs 0.4.0-alpha.8
* Add x86_64 (64-bit) support to LibPayload
* Add hda-decoder utility that dumps decoded HDA default configuration registers
* Add SBMIOS tables for arm64 platforms
* cpu/x86/lapic: Always have LAPIC enabled
* arch/arm64: Support calling a trusted monitor
* drivers/wifi: Support Wi-Fi 7 11be Enablement
* drivers/wifi: Support Radio Frequency Interference Mitigation
@ -40,61 +226,188 @@ Changes to external resources
### Toolchain updates
* Upgrade ACPICA from 20230628 to 20240321
* Upgrade CMake from 3.28.3 to 3.29.3
* Upgrade nasm from 2.16.01 to 2.16.03
* Upgrade LLVM from 17.0.6 to 18.1.6
* Upgrade GCC from 13.2 to 14.1.0
### Git submodule pointers
### External payloads
* /3rdparty/amd_blobs: Update from commit ae5fc7d277 to 26c572974b (2 commits)
* /3rdparty/arm-trusted-firmware: Update from commit 48f1bc9f52 to c5b8de86c8 (430 commits)
* /3rdparty/fsp: Update from commit cc6399e8c7 to 800c85770b (23 commits)
* /3rdparty/intel-microcode: Update from commit 41af345005 to 5278dfcf98 (2 commits)
* /3rdparty/libgfxinit: Update from commit a4be8a21b0 to 17cfc92f40 (5 commits)
* /3rdparty/vboot: Update from commit 09fcd2184f to f1f70f46dc (69 commits)
Platform Updates
----------------
### Added mainboards:
* To be filled in immediately before the release by the release team
### New mainboards:
* Acer Q45T-AM
* AOOSTAR WTR R1
* ASROCK Fatal1ty Z87 Professional
* ASROCK Z87E-ITX
* ASROCK Z87M OC Formula
* ASROCK Z97E-ITX/ac
* CWWK CW-ADL-4L-V1.0
* Dell Inc. Latitude E6430
* Dell Inc. Latitude E7240
* Dell Inc. XPS 8300
* Emulation QEMU sbsa
* GIGABYTE GA-H61M-S2P-R3
* Google Awasuki
* Google Brox TI PDC
* Google Domika
* Google Fatcat
* Google Jubilant
* Google Orisa
* Google Rauru
* Google Rex 64
* Google Teliks
* Google Tereid
* HP EliteBook 8560w
* Intel Avenue City CRB
* Intel Beechnut City CRB
* Protectli VP6630/VP6650/VP6670
* Star Labs Star Labs Lite Mk V (N200)
* System76 addw4
* System76 darp10
* System76 darp10-b
* System76 oryp12
### Removed Mainboards
* To be filled in immediately before the release by the release team
### Updated SoCs & socket definitions
### Updated SoCs
* To be filled in immediately before the release by the release team
Plans to move platform support to a branch
------------------------------------------
* To be filled in immediately before the release by the release team
* Added src/cpu/intel/socket_LGA1700
* Added src/cpu/intel/socket_LGA3647_1
* Added src/cpu/intel/socket_LGA4189
* Added src/cpu/intel/socket_LGA4677
* Added src/soc/intel/pantherlake
* Added src/soc/mediatek/mt8196
Statistics from the 24.05 to the 24.08 release
--------------------------------------------
* To be filled in immediately before the release by the release team
----------------------------------------------
* Total Commits: 883
* Average Commits per day: 8.78
* Total lines added: 105457
* Average lines added per commit: 119.43
* Number of patches adding more than 100 lines: 98
* Average lines added per small commit: 37.67
* Total lines removed: 18689
* Average lines removed per commit: 21.17
* Total difference between added and removed: 86768
* Total authors: 136
* New authors: 33
Significant Known and Open Issues
---------------------------------
Issues from the coreboot bugtracker: https://ticket.coreboot.org/
* To be filled in immediately before the release by the release team
### coreboot-wide or architecture-wide issues
```{eval-rst}
+-----+-----------------------------------------------------------------+
| # | Subject |
+=====+=================================================================+
| 519 | make gconfig - could not find glade file |
+-----+-----------------------------------------------------------------+
| 518 | make xconfig - g++: fatal error: no input files |
+-----+-----------------------------------------------------------------+
```
### Payload-specific issues
```{eval-rst}
+-----+-----------------------------------------------------------------+
| # | Subject |
+=====+=================================================================+
| 552 | X201 not booting with edk2 payload |
+-----+-----------------------------------------------------------------+
| 549 | SeaBIOS Windows 10/11 BSOD "ACPI BIOS ERROR" (Thinkpad W530) |
+-----+-----------------------------------------------------------------+
| 499 | edk2 boot fails with RESOURCE_ALLOCATION_TOP_DOWN enabled |
+-----+-----------------------------------------------------------------+
| 496 | Missing malloc check in libpayload |
+-----+-----------------------------------------------------------------+
| 484 | No USB keyboard support with secondary payloads |
+-----+-----------------------------------------------------------------+
| 414 | X9SAE-V: No USB keyboard init on SeaBIOS using Radeon RX 6800XT |
+-----+-----------------------------------------------------------------+
```
### Platform-specific issues
```{eval-rst}
+-----+-----------------------------------------------------------------+
| # | Subject |
+=====+=================================================================+
| 548 | Lenovo X201 Fails To Recognize Upgraded WiFi Card |
+-----+-----------------------------------------------------------------+
| 538 | x230: Dock Causes Internal Display to "Permanently" Malfunction |
+-----+-----------------------------------------------------------------+
| 535 | T420: Power light stays off after reboot |
+-----+-----------------------------------------------------------------+
| 528 | Building qemu-i440fx with CONFIG_CBFS_VERIFICATION fails |
+-----+-----------------------------------------------------------------+
| 524 | X2APIC Options cause Linux to crash on emulation/qemu-i440fx |
+-----+-----------------------------------------------------------------+
| 517 | lenovo x230 boot stuck with connected external monitor |
+-----+-----------------------------------------------------------------+
| 509 | SD Card hotplug not working on Apollo Lake |
+-----+-----------------------------------------------------------------+
| 507 | Windows GPU driver fails on Google guybrush & skyrim boards |
+-----+-----------------------------------------------------------------+
| 506 | APL/GML don't boot OS when CPU microcode included "from tree" |
+-----+-----------------------------------------------------------------+
| 505 | Harcuvar CRB - 15 of 16 cores present in the operating system |
+-----+-----------------------------------------------------------------+
| 499 | T440p - EDK2 fails with RESOURCE_ALLOCATION_TOP_DOWN enabled |
+-----+-----------------------------------------------------------------+
| 495 | Stoney Chromebooks not booting PSPSecureOS |
+-----+-----------------------------------------------------------------+
| 478 | X200 booting Linux takes a long time with TSC |
+-----+-----------------------------------------------------------------+
| 474 | X200s crashes after graphic init with 8GB RAM |
+-----+-----------------------------------------------------------------+
| 457 | Haswell (t440p): CAR mem region conflicts with CBFS_SIZE > 8mb |
+-----+-----------------------------------------------------------------+
| 453 | Intel HDMI / DP Audio not present in Windows after libgfxinit |
+-----+-----------------------------------------------------------------+
| 449 | ThinkPad T440p fail to start, continuous beeping & LED blinking |
+-----+-----------------------------------------------------------------+
| 448 | Thinkpad T440P ACPI Battery Value Issues |
+-----+-----------------------------------------------------------------+
| 446 | Optiplex 9010 No Post |
+-----+-----------------------------------------------------------------+
| 439 | Lenovo X201 Turbo Boost not working (stuck on 2,4GHz) |
+-----+-----------------------------------------------------------------+
| 427 | x200: Two battery charging issues |
+-----+-----------------------------------------------------------------+
| 412 | x230 reboots on suspend |
+-----+-----------------------------------------------------------------+
| 393 | T500 restarts rather than waking up from suspend |
+-----+-----------------------------------------------------------------+
| 350 | I225 PCIe device not detected on Harcuvar |
+-----+-----------------------------------------------------------------+
```
coreboot Links and Contact Information
--------------------------------------
* Main Web site: https://www.coreboot.org
* Downloads: https://coreboot.org/downloads.html
* Source control: https://review.coreboot.org
* Documentation: https://doc.coreboot.org
* Issue tracker: https://ticket.coreboot.org/projects/coreboot
* Donations: https://coreboot.org/donate.html
* Main Web site: <https://www.coreboot.org>
* Downloads: <https://coreboot.org/downloads.html>
* Source control: <https://review.coreboot.org>
* Documentation: <https://doc.coreboot.org>
* Issue tracker: <https://ticket.coreboot.org/projects/coreboot>
* Donations: <https://coreboot.org/donate.html>

View File

@ -0,0 +1,95 @@
Upcoming release - coreboot 24.11
========================================================================
The 24.11 release is scheduled for Mid November, 2024
Update this document with changes that should be in the release notes.
* Please use Markdown.
* See the past few release notes for the general format.
* The chip and board additions and removals will be updated right
before the release, so those do not need to be added.
* Note that all changes before the release are done are marked upcoming.
A final version of the notes are done after the release.
Significant or interesting changes
----------------------------------
* Add changes that need a full description here
* This section should have full descriptions and can or should have
a link to the referenced commits.
Additional coreboot changes
---------------------------
The following are changes across a number of patches, or changes worth
noting, but not needing a full description.
* Changes that only need a line or two of description go here.
Changes to external resources
-----------------------------
### Toolchain updates
### Git submodule pointers
### External payloads
Platform Updates
----------------
### Added mainboards:
* To be filled in immediately before the release by the release team
### Removed Mainboards
* To be filled in immediately before the release by the release team
### Updated SoCs
* To be filled in immediately before the release by the release team
Plans to move platform support to a branch
------------------------------------------
* To be filled in immediately before the release by the release team
Statistics from the 24.08 to the 24.11 release
--------------------------------------------
* To be filled in immediately before the release by the release team
Significant Known and Open Issues
---------------------------------
Issues from the coreboot bugtracker: https://ticket.coreboot.org/
* To be filled in immediately before the release by the release team
coreboot Links and Contact Information
--------------------------------------
* Main Web site: https://www.coreboot.org
* Downloads: https://coreboot.org/downloads.html
* Source control: https://review.coreboot.org
* Documentation: https://doc.coreboot.org
* Issue tracker: https://ticket.coreboot.org/projects/coreboot
* Donations: https://coreboot.org/donate.html

View File

@ -214,7 +214,7 @@ Deprecations
In order to minimize the usage of PCI bus mastering, the options we introduced in
this release will be dropped in a future release again. For more details, please
see [Preparations to minimize enabling PCI bus mastering](#preparations-to-minimize-enabling-pci-bus-mastering-in-coreboot).
see [Preparations to minimize enabling PCI bus mastering](#preparations-to-minimize-enabling-pci-bus-mastering).
### Resource allocator v3

View File

@ -13,7 +13,7 @@ about the coreboot project. There have been a number of new companies
starting to use coreboot recently, and we appreciate all of the
contributions and support.
### Upcoming switch from master branch to main branch
## Upcoming switch from master branch to main branch
Historically, the initial branch that was created in a new git
repository was named master. In line with many other projects,

View File

@ -11,7 +11,7 @@ releases, this one reflects a commitment to open source innovation,
security enhancements, and expanding hardware support.
### 4.22.01 release
## 4.22.01 release
The week between tagging a release and announcing it publicly is used
to test the tagged version and make sure everything is working as we
@ -22,7 +22,7 @@ For the 4.22 release cycle we found an uninitialized variable error on
the sandybridge/ivybridge platforms and rolled that into the 4.22.01
release package.
### coreboot version naming update
## coreboot version naming update
This release is the last release to use the incrementing 4.xx release
name scheme. For future releases, coreboot is switching to a
@ -33,7 +33,7 @@ the 24.02 release, we'll append the values .01, .02 and so on to the
initial release value.
### coreboot default branch update
## coreboot default branch update
Immediately after the 4.21 release, the coreboot project changed the
default git branch from 'master' to 'main'. For the first couple of

View File

@ -6,7 +6,7 @@ Please add to the release notes as changes are added:
```{toctree}
:maxdepth: 1
24.08 - August 2024 <coreboot-24.08-relnotes.md>
24.11 - November 2024 <coreboot-24.11-relnotes.md>
```
The [checklist] contains instructions to ensure that a release covers all
@ -22,6 +22,7 @@ important is taken care of.
```{toctree}
:maxdepth: 1
24.08 - August 2024 <coreboot-24.08-relnotes.md>
24.05 - May 2024 <coreboot-24.05-relnotes.md>
24.02 - February 2024 <coreboot-24.02-relnotes.md>
4.22 - November 2023 <coreboot-4.22-relnotes.md>

View File

@ -38,8 +38,10 @@
- Zako (HP Chromebox G1)
- Brox
- Brox EC ISH
- Lotso
- Brox TI PDC
- Greenbayupoc
- Jubilant
- Lotso
- Agah
- Anahera
- Anahera4ES
@ -53,6 +55,7 @@
- Constitution
- Crota
- Dochi
- Domika
- Felwinter
- Gaelin
- Gimble
@ -86,6 +89,8 @@
- Taeko
- Taeko4ES
- Taniks
- Teliks
- Tereid
- Tivviks
- Trulo
- Uldren
@ -101,6 +106,7 @@
- Yavista
- Sundance
- Pujjoga
- Orisa
- Butterfly (HP Pavilion Chromebook 14)
- Cherry
- Dojo
@ -132,6 +138,7 @@
- Wizpig
- Drallion
- Eve (Google Pixelbook)
- Fatcat
- Fizz
- Karma
- Endeavour
@ -235,6 +242,7 @@
- Puff
- Scout
- Wyvern (CTL Chromebox CBx2)
- Rauru
- Reef/Electro (Acer Chromebook Spin 11 R751T)
- Pyro (Lenovo Thinkpad (Yoga) 11e Chromebook)
- Sand (Acer Chromebook 15 CB515-1HT/1H)
@ -250,6 +258,7 @@
- Rex EC ISH
- Rex4ES
- Rex4ES EC ISH
- Rex 64
- Screebo
- Screebo4ES
- Arcada (Latitude 5300 2-in-1 Chromebook Enterprise)
@ -317,6 +326,7 @@
- Woomax (ASUS Chromebook Flip CM5)
## HP
- Compaq Elite 8300 USDT
- Z220 CMT Workstation
- Z220 SFF Workstation
@ -395,8 +405,8 @@
- Elgon (GBCv2)
## Protectli
- VP4630/VP4650
- VP4670
- VP6630/VP6650/VP6670
- VP4630/VP4650/VP4670
- VP2420
## SAMSUNG
@ -420,6 +430,7 @@
- Star Labs StarBook Mk V (i3-1115G4 and i7-1165G7)
- Star Labs StarBook Mk VI (i3-1220P and i7-1260P)
- Star Labs StarBook Mk VI (i3-1315U and i7-1360P)
- Star Labs Lite Mk V (N200)
## Supermicro
- X11SSH-TF

View File

@ -1,4 +1,4 @@
CSE FW update mechanism for devices in field
# CSE FW update mechanism for devices in field
## Introduction

View File

@ -78,7 +78,7 @@ Looks like a WDT.
### LDN8
Custom HWM space. It exposes 256 byte of IO config space.
See [HWM](#HWM) for more details.
See [HWM](#hwm) for more details.
## HWM

View File

@ -30,7 +30,7 @@ Download, configure, and build coreboot
Debian based distros:
`sudo apt-get install -y bison build-essential curl flex git gnat
libncurses5-dev libssl-dev m4 zlib1g-dev pkg-config`
libncurses-dev libssl-dev zlib1g-dev pkgconf`
Arch based distros:
`sudo pacman -S base-devel curl git gcc-ada ncurses zlib`
@ -86,7 +86,7 @@ make -C payloads/coreinfo
### Step 5 - Configure the build
##### Configure your mainboard
#### Configure your mainboard
```Bash
make menuconfig
@ -104,7 +104,7 @@ select < Exit >
These should be the default selections, so if anything else was set, run
`make distclean` to remove your old config file and start over.
##### Optionally use your system toolchain (Again, not recommended)
#### Optionally use your system toolchain (Again, not recommended)
```Text
select 'General Setup' menu
@ -112,7 +112,7 @@ select 'Allow building with any toolchain'
select < Exit >
```
##### Select the payload
#### Select the payload
```Text
select 'Payload' menu
@ -125,7 +125,7 @@ select < Exit >
select < Yes >
```
##### Check your configuration (optional step):
#### Check your configuration (optional step):
```Bash
make savedefconfig
@ -149,7 +149,7 @@ CONFIG_PAYLOAD_FILE="payloads/coreinfo/build/coreinfo.elf"
Note that this may differ depending on the revision of the coreboot
source you are building from and should not be taken as the required
contents of defconfig.
contents of defconfig.
### Step 6 - Build coreboot
@ -202,11 +202,11 @@ of the installed packages:
* `build-essential` or `base-devel` are the basic tools for building software.
* `git` is needed to download coreboot from the coreboot git repository.
* `libncurses5-dev` or `ncurses` is needed to build the menu for 'make menuconfig'
* `libncurses-dev` or `ncurses` is needed to build the menu for 'make menuconfig'
* `m4, bison, curl, flex, zlib1g-dev, gcc, gnat` and `g++` or `clang`
are needed to build the coreboot toolchain. `gcc` and `gnat` have to be
of the same version.
* `libssl-dev, pkg-config` are needed to build coreboot image (Step 6).
* `libssl-dev, pkgconf` are needed to build coreboot image (Step 6).
In particular, `libcrypto` provided by `libssl-dev` package.
If you started with a different distribution or package management

View File

@ -14,7 +14,7 @@ to make sure your patch compiles cleanly for all.
Note that abuild is a tool to do a simple build test, and binaries it
produces may well not boot if flashed to a system.
### Basic usage
## Basic usage
abuild needs to be run from the coreboot directory. If you cd into the
coreboot/util/abuild directory and try to run it from there, it will
@ -30,7 +30,7 @@ example, to build the Lenovo X230 target, run:
$ util/abuild/abuild -t lenovo/x230
```
### Where builds and logs are stored
## Where builds and logs are stored
The resulting images and logs are stored in directory coreboot-builds/
under your current directory. This can be overridden with --outdir:
@ -53,7 +53,7 @@ coreboot-builds/passing_boards and coreboot-builds/failing_boards.
**These logs are overwritten with each abuild run.** Save them elsewhere
if you feel a need to reference the results later.
### Payloads
## Payloads
You can also specify a payload directory with -p:
@ -81,7 +81,7 @@ You can also tell abuild not to use a payload:
util/abuild/abuild -t lenovo/x230 -p none
```
### Build non-default configurations
## Build non-default configurations
Sometimes you do need to build test a custom, non-default configuration.
This can be accomplished by placing a config file in configs/.
@ -142,7 +142,7 @@ a file named `myconfig` with this line:
and run `abuild -K myconfig` to build everything with a silent postcar
stage.
### Selectively build certain targets only (also config file naming caveats)
## Selectively build certain targets only (also config file naming caveats)
The P8Z77-M PRO example above would fail for P8Z77-M, because the
config file name is ambiguous. `abuild` would pick up this config when
@ -166,7 +166,7 @@ util/abuild/abuild --skip_unset USE_NATIVE_RAMINIT
This example skips building configs not using (Sandy/Ivy Bridge) native
RAM init.
### Additional Examples
## Additional Examples
Many boards have multiple variants. You can build for a specific
variant of a board:
@ -203,7 +203,7 @@ Of course, the real power of abuild is in testing multiple boards.
util/abuild/abuild -B -y -c 8 -p none
```
### Full options list
## Full options list
```text
coreboot autobuild v0.11.01 (Feb 3, 2023)

View File

@ -11,7 +11,7 @@ make
./intelp2m -file /path/to/inteltool.log
```
### Platforms
## Platforms
It is possible to use templates for parsing inteltool.log files.
To specify such a pattern, use the option `-t <template number>`.
@ -51,13 +51,13 @@ platform type is set using the -p option (Sunrise by default):
./intelp2m -p <platform> -file path/to/inteltool.log
```
### Packages
## Packages
![][pckgs]
[pckgs]: gopackages.png
### Bit fields in macros
## Bit fields in macros
Use the `-fld=cb` option to only generate a sequence of bit fields in
a new macro:
@ -71,7 +71,7 @@ _PAD_CFG_STRUCT(GPIO_37, PAD_FUNC(NF1) | PAD_TRIG(OFF) | PAD_TRIG(OFF), \
PAD_PULL(DN_20K)), /* LPSS_UART0_TXD */
```
### Raw DW0, DW1 register value
## Raw DW0, DW1 register value
To generate the gpio.c with raw PAD_CFG_DW0 and PAD_CFG_DW1 register
values you need to use the -fld=raw option:
@ -96,7 +96,7 @@ _PAD_CFG_STRUCT(GPP_A10, 0x44000500, 0x00000000),
_PAD_CFG_STRUCT(GPP_A10, 0x44000500, 0x00000000),
```
### Macro Check
## Macro Check
After generating the macro, the utility checks all used
fields of the configuration registers. If some field has been
@ -115,7 +115,7 @@ PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_38, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),
PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_39, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD),
```
### Information level
## Information level
The utility can generate additional information about the bit
fields of the DW0 and DW1 configuration registers. Using the
@ -158,7 +158,7 @@ PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_39, UP_20K, DEEP, NF1, TxLASTRxE, \
DISPUPD),
```
### Ignoring Fields
## Ignoring Fields
Utilities can generate the _PAD_CFG_STRUCT macro and exclude fields
from it that are not in the corresponding PAD_CFG_*() macro:
@ -177,7 +177,7 @@ _PAD_CFG_STRUCT(GPIO_39, PAD_FUNC(NF1) | PAD_RESET(DEEP), \
PAD_PULL(UP_20K) | PAD_IOSTERM(DISPUPD)),
```
### FSP-style macro
## FSP-style macro
The utility allows one to generate macros that include fsp/edk2-platform
style bitfields:
@ -205,6 +205,6 @@ style bitfields:
GpioPadConfigLock },
```
### Supported Chipsets
## Supported Chipsets
Sunrise PCH, Lewisburg PCH, Apollo Lake SoC, CannonLake-LP SoCs

View File

@ -263,11 +263,12 @@ DELL MAINBOARDS
S: Orphan
F: src/mainboard/dell/
DELL E6400 MAINBOARD
DELL LATITUDE MAINBOARDS
M: Nicholas Chin <nic.c3.14@gmail.com>
S: Maintained
F: src/mainboard/dell/e6400/
F: src/mainboard/dell/snb_ivb_latitude/
F: src/mainboard/dell/e7240/
EMULATION MAINBOARDS
@ -336,9 +337,16 @@ M: Nick Vaccaro <nvaccaro@chromium.org>
M: Eric Lai <ericllai@google.com>
M: Kapil Porwal <kapilporwal@google.com>
M: Dinesh Gehlot <digehlot@google.com>
M: Rishika Raj <rishikaraj@google.com>
M: Jayvik Desai <jayvik@google.com>
S: Maintained
F: src/mainboard/google/brya/
GOOGLE FATCAT MAINBOARDS
M: Subrata Banik <subratabanik@google.com>
M: Pranava Y N <pranavayn@google.com>
F: src/mainboard/google/fatcat/
GOOGLE HATCH MAINBOARDS
M: Subrata Banik <subratabanik@google.com>
M: Nick Vaccaro <nvaccaro@chromium.org>
@ -596,7 +604,8 @@ F: src/mainboard/siemens/mc_ehl/
SIFIVE MAINBOARDS
S: Orphan
M: Maximilian Brune <maximilian.brune@9elements.com>
S: Maintained
F: src/mainboard/sifive/
@ -657,6 +666,7 @@ F: src/mainboard/emulation/qemu-power8/
RISC-V ARCHITECTURE
M: Ronald Minnich <rminnich@gmail.com>
M: Maximilian Brune <maximilian.brune@9elements.com>
R: Philipp Hug <philipp@hug.cx>
S: Maintained
F: src/arch/riscv/
@ -779,6 +789,11 @@ M: Ronak Kanabar <ronak.kanabar@intel.com>
S: Maintained
F: src/drivers/intel/fsp2_0/
INTEL DPTF
M: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
S: Maintained
F: src/drivers/intel/dptf/
################################################################################
# Systems on a Chip
################################################################################
@ -851,6 +866,8 @@ M: Subrata Banik <subratabanik@google.com>
M: Nick Vaccaro <nvaccaro@chromium.org>
M: Kapil Porwal <kapilporwal@google.com>
M: Dinesh Gehlot <digehlot@google.com>
M: Rishika Raj <rishikaraj@google.com>
M: Jayvik Desai <jayvik@google.com>
S: Maintained
F: src/soc/intel/alderlake/
@ -893,6 +910,13 @@ M: Dinesh Gehlot <digehlot@google.com>
S: Maintained
F: src/soc/intel/meteorlake/
INTEL PANTHERLAKE SOC
M: Subrata Banik <subratabanik@google.com>
M: Kapil Porwal <kapilporwal@google.com>
M: Pranava Y N <pranavayn@google.com>
S: Maintained
F: src/soc/intel/pantherlake/
INTEL TIGERLAKE SOC
M: Subrata Banik <subratabanik@google.com>
M: Nick Vaccaro <nvaccaro@chromium.org>

View File

@ -94,10 +94,15 @@ help_coreboot help::
@echo ' sphinx - Build sphinx documentation for coreboot'
@echo ' sphinx-lint - Build sphinx documentation for coreboot with warnings as errors'
@echo ' filelist - Show files used in current build'
@echo ' printall - print makefile info for debugging'
@echo ' gitconfig - set up git to submit patches to coreboot'
@echo ' ctags / ctags-project - make ctags file for all of coreboot or current board'
@echo ' cscope / cscope-project - make cscope.out file for coreboot or current board'
@echo ' printall - Print makefile info for debugging'
@echo ' gitconfig - Set up git to submit patches to coreboot'
@echo ' ctags / ctags-project - Make ctags file for all of coreboot or current board'
@echo ' cscope / cscope-project - Make cscope.out file for coreboot or current board'
@echo
@echo '*** site-local related targets ***'
@echo ' symlink - Create symbolic links from site-local into coreboot tree'
@echo ' clean-symlink - Remove symbolic links created by "make symlink"'
@echo ' cleanall-symlink - Remove all symbolic links in the coreboot tree'
@echo
# This include must come _before_ the pattern rules below!
@ -217,8 +222,7 @@ endif
# The primary target needs to be here before we include the
# other files
real-all: real-target
real-all: site-local-target real-target
# must come rather early
.SECONDARY:
@ -487,27 +491,77 @@ sphinx:
sphinx-lint:
$(MAKE) SPHINXOPTS=-W -C Documentation sphinx
# Look at all of the files in the SYMLINK_LIST and create the symbolic links
# into the coreboot tree. Each symlink.txt file in site-local should be in the
# directory linked from and have a single line with the path to the location to
# link to. The path must be relative to the top of the coreboot directory.
symlink:
@echo "Creating Symbolic Links.."; \
if [ -z "$(SYMLINK_LIST)" ]; then \
echo "No site-local symbolic links to create."; \
exit 0; \
fi; \
echo "Creating symbolic links.."; \
for link in $(SYMLINK_LIST); do \
SYMLINK=`cat $$link`; \
REALPATH=`realpath $$link`; \
if [ -L "$$SYMLINK" ]; then \
LINKTO="$(top)/$$(head -n 1 "$${link}")"; \
LINKFROM=$$(dirname "$$(realpath "$${link}")"); \
if [ -L "$${LINKTO}" ]; then \
echo " $${LINKTO} exists - skipping"; \
continue; \
elif [ ! -e "$$SYMLINK" ]; then \
echo -e "\tLINK $$SYMLINK -> $$(dirname $$REALPATH)"; \
ln -s $$(dirname $$REALPATH) $$SYMLINK; \
fi; \
LINKTO="$$(realpath -m "$${LINKTO}")" 2>/dev/null; \
if [ "$${LINKTO}" = "$$(echo "$${LINKTO}" | sed "s|^$(top)||" )" ]; then \
echo " FAILED: $${LINKTO} is outside of current directory." >&2; \
continue; \
fi; \
if [ ! -e "$${LINKTO}" ]; then \
echo " LINK $${LINKTO} -> $${LINKFROM}"; \
ln -s "$${LINKFROM}" "$${LINKTO}" || \
echo "FAILED: Could not create link." >&2; \
else \
echo -e "\tFAILED: $$SYMLINK exists"; \
fi \
echo " FAILED: $${LINKTO} exists as a file or directory." >&2; \
fi; \
done
clean-symlink:
@echo "Deleting symbolic link";\
EXISTING_SYMLINKS=`find -L ./src -xtype l | grep -v 3rdparty`; \
for link in $$EXISTING_SYMLINKS; do \
echo -e "\tUNLINK $$link"; \
rm "$$link"; \
if [ -z "$(SYMLINK_LIST)" ]; then \
echo "No site-local symbolic links to clean."; \
exit 0; \
fi; \
echo "Removing site-local symbolic links from tree.."; \
for link in $(SYMLINK_LIST); do \
SYMLINK="$(top)/$$(head -n 1 "$${link}")"; \
if [ "$${SYMLINK}" = "$$(echo "$${SYMLINK}" | sed "s|^$(top)||")" ]; then \
echo " FAILED: $${SYMLINK} is outside of current directory." >&2; \
continue; \
elif [ ! -L "$${SYMLINK}" ]; then \
echo " $${SYMLINK} does not exist - skipping"; \
continue; \
fi; \
if [ -L "$${SYMLINK}" ]; then \
REALDIR="$$(realpath "$${link}")"; \
echo " UNLINK $${link} (linked from $${REALDIR})"; \
rm "$${SYMLINK}"; \
fi; \
done; \
EXISTING_SYMLINKS="$$(find $(top) -type l | grep -v "3rdparty\|crossgcc" )"; \
if [ -z "$${EXISTING_SYMLINKS}" ]; then \
echo " No remaining symbolic links found in tree."; \
else \
echo " Remaining symbolic links found:"; \
for link in $${EXISTING_SYMLINKS}; do \
echo " $${link}"; \
done; \
fi
cleanall-symlink:
echo "Deleting all symbolic links in the coreboot tree (excluding 3rdparty & crossgcc)"; \
EXISTING_SYMLINKS="$$(find $(top) -type l | grep -v "3rdparty\|crossgcc" )"; \
for link in $${EXISTING_SYMLINKS}; do \
if [ -L "$${link}" ]; then \
REALDIR="$$(realpath "$${link}")"; \
echo " UNLINK $${link} (linked from $${REALDIR})"; \
rm "$${link}"; \
fi; \
done
clean-for-update:
@ -537,4 +591,5 @@ distclean: clean clean-ctags clean-cscope distclean-payloads distclean-utils
rm -f abuild*.xml junit.xml* util/lint/junit.xml
.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean sphinx sphinx-lint
.PHONY: ctags-project cscope-project clean-ctags symlink clean-symlink
.PHONY: ctags-project cscope-project clean-ctags
.PHONY: symlink clean-symlink cleanall-symlink

View File

@ -90,13 +90,23 @@ show_coreboot: | files_added
.PHONY: show_notices
show_notices:: | show_coreboot
# This rule allows the site-local makefile to run before starting the actual
# coreboot build. It should not be used in the regular coreboot makefiles.
# Note: This gets run after the immediate makefile code like updating the
# submodules, but before any other targets.
.PHONY: site-local-target
site-local-target::
#######################################################################
# our phony targets
PHONY+= clean-abuild coreboot check-style build_complete
#######################################################################
# root source directories of coreboot
subdirs-y := src/lib src/commonlib/ src/console src/device src/acpi src/superio/common
# site-local Makefile.mk must go first to override default locations (for binaries etc.)
subdirs-y := site-local
subdirs-y += src/lib src/commonlib/ src/console src/device src/acpi src/superio/common
subdirs-$(CONFIG_EC_ACPI) += src/ec/intel
subdirs-y += src/ec/acpi $(wildcard src/ec/*/*) $(wildcard src/southbridge/*/*)
subdirs-y += $(wildcard src/soc/*) $(wildcard src/soc/*/common) $(filter-out $(wildcard src/soc/*/common),$(wildcard src/soc/*/*))
@ -112,8 +122,6 @@ subdirs-y += src/mainboard/$(MAINBOARDDIR)
subdirs-y += src/security
subdirs-y += payloads payloads/external
subdirs-$(CONFIG_SBOM) += src/sbom
subdirs-y += site-local
subdirs-y += util/checklist util/testing
#######################################################################
@ -170,7 +178,7 @@ _int-multiply2=$(shell expr $(call _toint,$1) \* $(call _toint,$2))
int-multiply=$(if $(filter 1,$(words $1)),$(strip $1),$(call int-multiply,$(call _int-multiply2,$(word 1,$1),$(word 2,$1)) $(wordlist 3,$(words $1),$1)))
int-divide=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) / $(call _toint,$(word 2,$1))))
int-remainder=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) % $(call _toint,$(word 2,$1))))
int-shift-left=$(shell echo "$(call _toint,$(word 1, $1)) * (2 ^ $(call _toint,$(word 2, $1)))" | bc)
int-shift-left=$(shell echo -n $$(($(call _toint,$(word 1, $1)) << $(call _toint,$(word 2, $1)))))
int-lt=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) \< $(call _toint,$(word 2,$1))))
int-gt=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) \> $(call _toint,$(word 2,$1))))
int-eq=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) = $(call _toint,$(word 2,$1))))
@ -474,7 +482,11 @@ COREBOOT_EXTRA_VERSION := -$(call strip_quotes,$(CONFIG_LOCALVERSION))
COREBOOT_EXPORTS += COREBOOT_EXTRA_VERSION
endif
CPPFLAGS_common := -Isrc -Isrc/include -Isrc/commonlib/include -Isrc/commonlib/bsd/include -I$(obj)
CPPFLAGS_common := -Isrc
CPPFLAGS_common += -Isrc/include
CPPFLAGS_common += -Isrc/commonlib/include
CPPFLAGS_common += -Isrc/commonlib/bsd/include
CPPFLAGS_common += -I$(obj)
VBOOT_SOURCE ?= 3rdparty/vboot
CPPFLAGS_common += -I$(VBOOT_SOURCE)/firmware/include
CPPFLAGS_common += -include $(src)/include/kconfig.h
@ -492,31 +504,62 @@ ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_YABEL)$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE),y)
CPPFLAGS_ramstage += -Isrc/device/oprom/include
endif
CFLAGS_common += -pipe -g -nostdinc -std=gnu11
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough
CFLAGS_common += -Wshadow -Wdate-time -Wtype-limits -Wvla -Wold-style-definition
CFLAGS_common += -Wdangling-else -Wmissing-include-dirs
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
CFLAGS_common += -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie
CFLAGS_common += -pipe
CFLAGS_common += -g
CFLAGS_common += -nostdinc
CFLAGS_common += -std=gnu11
CFLAGS_common += -nostdlib
CFLAGS_common += -Wall
CFLAGS_common += -Wundef
CFLAGS_common += -Wstrict-prototypes
CFLAGS_common += -Wmissing-prototypes
CFLAGS_common += -Wwrite-strings
CFLAGS_common += -Wredundant-decls
CFLAGS_common += -Wno-trigraphs
CFLAGS_common += -Wimplicit-fallthrough
CFLAGS_common += -Wshadow
CFLAGS_common += -Wdate-time
CFLAGS_common += -Wtype-limits
CFLAGS_common += -Wvla
CFLAGS_common += -Wold-style-definition
CFLAGS_common += -Wdangling-else
CFLAGS_common += -Wmissing-include-dirs
CFLAGS_common += -fno-common
CFLAGS_common += -ffreestanding
CFLAGS_common += -fno-builtin
CFLAGS_common += -fomit-frame-pointer
CFLAGS_common += -fstrict-aliasing
CFLAGS_common += -ffunction-sections
CFLAGS_common += -fdata-sections
CFLAGS_common += -fno-pie
CFLAGS_common += -Wstring-compare
ifeq ($(CONFIG_COMPILER_GCC),y)
CFLAGS_common += -Wold-style-declaration
CFLAGS_common += -Wcast-function-type
# Don't add these GCC specific flags when running scan-build
ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
CFLAGS_common += -Wno-packed-not-aligned
CFLAGS_common += -fconserve-stack
CFLAGS_common += -Wnull-dereference
CFLAGS_common += -Wlogical-op -Wduplicated-cond -Wno-array-compare
CFLAGS_common += -Wlogical-op
CFLAGS_common += -Wduplicated-cond
CFLAGS_common += -Wno-array-compare
endif
endif
ADAFLAGS_common += -gnatp
ADAFLAGS_common += -Wuninitialized -Wall -Werror
ADAFLAGS_common += -pipe -g -nostdinc
ADAFLAGS_common += -Wstrict-aliasing -Wshadow
ADAFLAGS_common += -fno-common -fomit-frame-pointer
ADAFLAGS_common += -ffunction-sections -fdata-sections
ADAFLAGS_common += -Wuninitialized
ADAFLAGS_common += -Wall
ADAFLAGS_common += -Werror
ADAFLAGS_common += -pipe
ADAFLAGS_common += -g
ADAFLAGS_common += -nostdinc
ADAFLAGS_common += -Wstrict-aliasing
ADAFLAGS_common += -Wshadow
ADAFLAGS_common += -fno-common
ADAFLAGS_common += -fomit-frame-pointer
ADAFLAGS_common += -ffunction-sections
ADAFLAGS_common += -fdata-sections
ADAFLAGS_common += -fno-pie
# Ada warning options:
#
@ -556,7 +599,11 @@ ADAFLAGS_common += -gnatwa.eeD.HHTU.U.W.Y
# Disable style checks for now
ADAFLAGS_common += -gnatyN
LDFLAGS_common := --gc-sections -nostdlib --nmagic -static
LDFLAGS_common := --gc-sections
LDFLAGS_common += -nostdlib
LDFLAGS_common += --nmagic
LDFLAGS_common += -static
LDFLAGS_common += -z noexecstack
# Workaround for RISC-V linker bug, merge back into above line when fixed.
# https://sourceware.org/bugzilla/show_bug.cgi?id=27180
@ -1267,6 +1314,15 @@ ifeq ($(CONFIG_CBFS_VERIFICATION),y)
fi
endif # CONFIG_CBFS_VERIFICATION
define link_stage
# $1 stage name
$$(objcbfs)/$(1).debug: $$$$($(1)-libs) $$$$($(1)-objs)
@printf " LINK $$(subst $$(obj)/,,$$(@))\n"
$$(LD_$(1)) $$(LDFLAGS_$(1)) -o $$@ -L$$(obj) $$(COMPILER_RT_FLAGS_$(1)) --whole-archive --start-group $$(filter-out %.ld,$$($(1)-objs)) $$($(1)-libs) --no-whole-archive $$(COMPILER_RT_$(1)) --end-group -T $(call src-to-obj,$(1),$(CONFIG_MEMLAYOUT_LD_FILE))
endef
ifeq ($(CONFIG_SEPARATE_ROMSTAGE),y)
cbfs-files-y += $(CONFIG_CBFS_PREFIX)/romstage
$(CONFIG_CBFS_PREFIX)/romstage-file := $(objcbfs)/romstage.elf
@ -1276,15 +1332,6 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y)
$(CONFIG_CBFS_PREFIX)/romstage-options := -b 0
endif
ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
# Use a 64 byte alignment to provide a minimum alignment
# requirement for the overall romstage. While the first object within
# romstage could have a 4 byte minimum alignment that doesn't mean the linker
# won't decide the entire section should be aligned to a larger value. In the
# future cbfstool should add XIP files proper and honor the alignment
# requirements of the program segment.
#
# Make sure that segment for .car.data is ignored while adding romstage.
$(CONFIG_CBFS_PREFIX)/romstage-align := 64
ifeq ($(CONFIG_NO_XIP_EARLY_STAGES),y)
$(CONFIG_CBFS_PREFIX)/romstage-options := -S ".car.data"
else

View File

@ -0,0 +1,3 @@
CONFIG_VENDOR_SIFIVE=y
CONFIG_BOARD_SIFIVE_HIFIVE_UNLEASHED=y
CONFIG_RISCV_OPENSBI=y

View File

@ -28,6 +28,7 @@ payloads/external/edk2 \
payloads/external/GRUB2 \
payloads/external/LinuxBoot \
payloads/external/skiboot \
payloads/external/leanefi \
payloads/external/coreDOOM \
force-payload:

View File

@ -381,8 +381,7 @@ payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(IPXE_CONFIG_SCRIPT)
CONFIG_HAS_SCRIPT=$(CONFIG_IPXE_ADD_SCRIPT) \
CONFIG_IPXE_NO_PROMPT=$(CONFIG_IPXE_NO_PROMPT) \
CONFIG_IPXE_HAS_HTTPS=$(CONFIG_IPXE_HAS_HTTPS) \
CONFIG_PXE_TRUST_CMD=$(CONFIG_PXE_TRUST_CMD) \
MFLAGS= MAKEFLAGS=
CONFIG_IPXE_TRUST_CMD=$(CONFIG_IPXE_TRUST_CMD)
# LinuxBoot
LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86) = x86_32
@ -436,6 +435,13 @@ payloads/external/skiboot/build/skiboot.elf:
$(MAKE) -C payloads/external/skiboot all \
CONFIG_SKIBOOT_GIT_REPO=$(CONFIG_SKIBOOT_GIT_REPO) \
CONFIG_SKIBOOT_REVISION=$(CONFIG_SKIBOOT_REVISION)
# leanefi
payloads/external/leanefi/leanefi/build/leanefi.elf: FORCE $(DOTCONFIG)
$(MAKE) -C payloads/external/leanefi
FORCE: ;
# COREDOOM
payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf coredoom:

View File

@ -319,7 +319,7 @@ config EDK2_USE_LAPIC_TIMER
config EDK2_CUSTOM_BUILD_PARAMS
string "edk2 additional custom build parameters"
default "-D VARIABLE_SUPPORT=SMMSTORE" if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
default ""
help
edk2 has build options that are not modified by coreboot, and these can be
found in `UefiPayloadPkg/UefiPayloadPkg.dsc`. Forks may also support

View File

@ -69,8 +69,10 @@ endif
ifneq ($(CONFIG_EDK2_SERIAL_SUPPORT),y)
BUILD_STR += -D DISABLE_SERIAL_TERMINAL=TRUE
endif
# VARIABLE_SUPPORT = EMU
# MAX_VARIABLE_SIZE = 0x10000
ifeq ($(CONFIG_SMMSTORE_V2),y)
BUILD_STR += -D VARIABLE_SUPPORT=SMMSTORE
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize=0x8000
endif
# PCIE_BASE_ADDRESS = 0
@ -222,7 +224,7 @@ logo: $(EDK2_PATH)
BMP3:$(EDK2_PATH)/MdeModulePkg/Logo/Logo.bmp;; \
esac \
gop_driver:
gop_driver: $(EDK2_PATH)
if [ -n "$(CONFIG_EDK2_GOP_DRIVER)" ]; then \
echo "Using GOP driver $(CONFIG_EDK2_GOP_FILE)"; \
cp $(top)/$(CONFIG_EDK2_GOP_FILE) $(EDK2_PATH)/UefiPayloadPkg/IntelGopDriver.efi; \

View File

@ -108,7 +108,7 @@ config IPXE_HAS_HTTPS
Enable HTTPS protocol, which allows you to encrypt all communication
with a web server and to verify the server's identity
config PXE_TRUST_CMD
config IPXE_TRUST_CMD
bool "Enable TRUST commands"
default y
help

View File

@ -52,7 +52,7 @@ endif
ifeq ($(CONFIG_IPXE_HAS_HTTPS),y)
sed -i'' 's|.*DOWNLOAD_PROTO_HTTPS|#define DOWNLOAD_PROTO_HTTPS|g' "$(project_dir)/src/config/general.h"
endif
ifeq ($(CONFIG_PXE_TRUST_CMD),y)
ifeq ($(CONFIG_IPXE_TRUST_CMD),y)
sed -i'' 's|.*IMAGE_TRUST_CMD|#define IMAGE_TRUST_CMD|g' "$(project_dir)/src/config/general.h"
endif

60
payloads/external/leanefi/Kconfig vendored Normal file
View File

@ -0,0 +1,60 @@
## SPDX-License-Identifier: GPL-2.0-only
if PAYLOAD_LEANEFI
menu "leanEFI configuration"
config PAYLOAD_FILE
string
default "payloads/external/leanefi/leanefi/build/leanefi.elf"
config LEANEFI_EFI_ECPT
bool
default y if ARCH_ARM64
config LEANEFI_HEAP_SIZE
int "Heap size"
default 131072
help
This is the heap size (malloc'able size) available
to the payload.
If unsure, set to 131072 (128K)
config LEANEFI_STACK_SIZE
int "Stack size"
default 16384
help
This is the stack size available to the payload.
If unsure, set to 16384 (16K)
config LEANEFI_BASE_ADDRESS
hex "Base address"
default 0x62000000 if BOARD_EMULATION_QEMU_AARCH64
#default 0x10023300000 if BOARD_EMULATION_QEMU_SBSA
help
This is the base address for the payload.
config LEANEFI_PAYLOAD
bool "Add a payload"
default y
help
If selected leanEFI will start a payload.
This option should only be unselected for debug purposes.
config LEANEFI_PAYLOAD_PATH
string "path to leanefi payload"
depends on LEANEFI_PAYLOAD
config LEANEFI_FDT
bool "Add an FDT that is propagated as EFI configuration table"
default y if BOARD_EMULATION_QEMU_AARCH64
config LEANEFI_FDT_PATH
string "path to FDT"
depends on LEANEFI_FDT
endmenu
endif

View File

@ -0,0 +1,8 @@
## SPDX-License-Identifier: GPL-2.0-only
config PAYLOAD_LEANEFI
bool "leanefi"
depends on ARCH_ARM64
help
Select this option if you want to build a coreboot image
with an leanefi payload.

23
payloads/external/leanefi/Makefile vendored Normal file
View File

@ -0,0 +1,23 @@
## SPDX-License-Identifier: GPL-2.0-only
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
unexport KCONFIG_DEPENDENCIES
unexport KCONFIG_SPLITCONFIG
unexport KCONFIG_TRISTATE
unexport KCONFIG_NEGATIVES
unexport $(COREBOOT_EXPORTS)
build: leanefi
$(MAKE) -C leanefi
leanefi:
git clone "https://review.coreboot.org/leanefi"
distclean:
rm -rf leanefi
clean:
rm -rf leanefi/build
.PHONY: build clean distclean

View File

@ -41,6 +41,9 @@
mov w10, #0 // w10 = 2 * cache level
mov w8, #1 // w8 = constant 0b1
mrs x12, id_aa64mmfr2_el1 // read ID_AA64MMFR2_EL1
ubfx x12, x12, #20, #4 // [23:20] - CCIDX support
1: //next_level
add w2, w10, w10, lsr #1 // calculate 3 * cache level
lsr w1, w0, w2 // extract 3-bit cache type for this level
@ -52,8 +55,14 @@
mrs x1, ccsidr_el1 // w1 = read ccsidr
and w2, w1, #7 // w2 = log2(linelen_bytes) - 4
add w2, w2, #4 // w2 = log2(linelen_bytes)
ubfx w4, w1, #3, #10 // w4 = associativity - 1 (also
// max way number)
cbz x12, 11f // check FEAT_CCIDX for associativity
// branch to 11 if FEAT_CCIDX is not implemented
ubfx x4, x1, #3, #21 // x4 = associativity CCSIDR_EL1[23:3]
b 12f
11:
ubfx x4, x1, #3, #10 // x4 = associativity CCSIDR_EL1[12:3]
12:
clz w5, w4 // w5 = 32 - log2(ways)
// (bit position of way in DC)
lsl w9, w4, w5 // w9 = max way number
@ -61,7 +70,13 @@
lsl w16, w8, w5 // w16 = amount to decrement (way
// number per iteration)
2: //next_way
ubfx w7, w1, #13, #15 // w7 = max set #, right aligned
cbz x12, 21f // check FEAT_CCIDX for numsets
// branch to 21 if FEAT_CCIDX is not implemented
ubfx x7, x1, #32, #24 // x7(w7) = numsets CCSIDR_EL1[55:32]
b 22f
21:
ubfx w7, w1, #13, #15 // w7 = numsets CCSIDR_EL1[27:13]
22:
lsl w7, w7, w2 // w7 = max set #, DC aligned
lsl w17, w8, w2 // w17 = amount to decrement (set
// number per iteration)

View File

@ -113,13 +113,15 @@ static void dump_stack(uintptr_t addr, size_t bytes)
{
int i, j;
const int line = 8;
uint32_t *ptr = (uint32_t *)(addr & ~(line * sizeof(*ptr) - 1));
uint32_t *ptr = (uint32_t *)((uintptr_t)addr & ~(line * sizeof(*ptr) - 1));
printf("Dumping stack:\n");
for (i = bytes / sizeof(*ptr); i >= 0; i -= line) {
printf("%p: ", ptr + i);
for (j = i; j < i + line; j++)
printf("%08x ", *(ptr + j));
for (j = i; j < i + line; j++) {
if ((uintptr_t)(ptr + j) >= addr && (uintptr_t)(ptr + j) < addr + bytes)
printf("%08x ", *(ptr + j));
}
printf("\n");
}
}
@ -162,12 +164,12 @@ static void dump_exception_state(void)
#if CONFIG(LP_ARCH_X86_64)
printf("REG_R8: 0x%016zx\n", exception_state->regs.reg_r8);
printf("REG_R9: 0x%016zx\n", exception_state->regs.reg_r9);
printf("REG_R10: 0x%016zx\n", exception_state->regs.reg_r10);
printf("REG_R11: 0x%016zx\n", exception_state->regs.reg_r11);
printf("REG_R12: 0x%016zx\n", exception_state->regs.reg_r12);
printf("REG_R13: 0x%016zx\n", exception_state->regs.reg_r13);
printf("REG_R14: 0x%016zx\n", exception_state->regs.reg_r14);
printf("REG_R15: 0x%016zx\n", exception_state->regs.reg_r15);
printf("REG_R10: 0x%016zx\n", exception_state->regs.reg_r10);
printf("REG_R11: 0x%016zx\n", exception_state->regs.reg_r11);
printf("REG_R12: 0x%016zx\n", exception_state->regs.reg_r12);
printf("REG_R13: 0x%016zx\n", exception_state->regs.reg_r13);
printf("REG_R14: 0x%016zx\n", exception_state->regs.reg_r14);
printf("REG_R15: 0x%016zx\n", exception_state->regs.reg_r15);
#endif
printf("CS: 0x%04x\n", exception_state->regs.cs);
printf("DS: 0x%04x\n", exception_state->regs.ds);
@ -213,10 +215,6 @@ success:
void exception_init(void)
{
/* TODO: Add exception init code for x64, currently only supporting 32-bit code */
if (CONFIG(LP_ARCH_X86_64))
return;
exception_stack_end = exception_stack + ARRAY_SIZE(exception_stack);
exception_init_asm();
}

View File

@ -39,10 +39,10 @@ vector:
.quad 0
error_code:
.quad 0
old_rsp:
.quad 0
old_rax:
.quad 0
old_rcx:
.quad 0
.align 16
@ -55,23 +55,23 @@ old_rax:
.macro stub num
exception_stub_\num:
movq $0, error_code
movq $\num, vector
jmp exception_common
movq $0, error_code
movq $\num, vector
jmp exception_common
.endm
.macro stub_err num
exception_stub_\num:
pop error_code
movq $\num, vector
jmp exception_common
pop error_code
movq $\num, vector
jmp exception_common
.endm
.altmacro
.macro user_defined_stubs from, to
stub \from
.if \to-\from
user_defined_stubs %(from+1),\to
.macro user_defined_stubs from, to
stub \from
.if \to-\from
user_defined_stubs %(from+1),\to
.endif
.endm
@ -114,9 +114,117 @@ exception_stub_\num:
user_defined_stubs 192, 255
exception_common:
/*
* At this point, on x86-64, on the stack there is:
* 0(%rsp) rip
* 8(%rsp) cs
* 16(%rsp) rflags
* 24(%rsp) rsp
* 32(%rsp) ss
*
* This section sets up the exception stack.
* It saves the old stack pointer (rsp) to preserve RIP, CS, RFLAGS and SS.
* Then sets up the new stack pointer to point to the exception stack area.
*/
movq %rax, old_rax
movq %rcx, old_rcx
/* Return from the exception. */
iretl
mov %rsp, %rax
movq exception_stack_end, %rsp
/*
* The `exception_state` struct is not 16-byte aligned.
* Push an extra 8 bytes to ensure the stack pointer
* is 16-byte aligned before calling exception_dispatch.
*/
push $0
/*
* Push values onto the top of the exception stack to form an
* exception state structure.
*/
push vector
push error_code
/* push of the gs, fs, es, ds, ss and cs */
mov %gs, %rcx
movl %ecx, -4(%rsp) /* gs */
mov %fs, %rcx
movl %ecx, -8(%rsp) /* fs */
movl $0, -12(%rsp) /* es */
movl $0, -16(%rsp) /* ds */
movq 32(%rax), %rcx
movl %ecx, -20(%rsp) /* ss */
movq 8(%rax), %rcx
movl %ecx, -24(%rsp) /* cs */
sub $24, %rsp
push 16(%rax) /* rflags */
push (%rax) /* rip */
push %r15
push %r14
push %r13
push %r12
push %r11
push %r10
push %r9
push %r8
push 24(%rax) /* rsp */
push %rbp
push %rdi
push %rsi
push %rdx
push old_rcx /* rcx */
push %rbx
push old_rax /* rax */
/*
* Call the C exception handler. It will find the exception state
* using the exception_state global pointer. Not
* passing parameters means we don't have to worry about what ABI
* is being used.
*/
mov %rsp, exception_state
call exception_dispatch
/*
* Restore state from the exception state structure, including any
* changes that might have been made.
*/
pop old_rax
pop %rbx
pop old_rcx
pop %rdx
pop %rsi
pop %rdi
pop %rbp
lea exception_stack, %rax
pop 24(%rax) /* rsp */
pop %r8
pop %r9
pop %r10
pop %r11
pop %r12
pop %r13
pop %r14
pop %r15
pop (%rax) /* rip */
pop 16(%rax) /* rflags */
/* pop of the gs, fs, es, ds, ss and cs */
movl (%rsp), %ecx
movq %rcx, 8(%rax) /* cs */
movl 4(%rsp), %ecx
movq %rcx, 32(%rax) /* ss */
movl 16(%rsp), %ecx
mov %rcx, %fs /* fs */
movl 20(%rsp), %ecx
mov %rcx, %gs /* gs */
mov %rax, %rsp
movq old_rax, %rax
movq old_rcx, %rcx
iretq
/*
* We need segment selectors for the IDT, so we need to know where things are
@ -139,18 +247,18 @@ gdt:
/* selgdt 0x18, flat 4GB data segment */
.word 0xffff, 0x0000
.byte 0x00, 0x92, 0xcf, 0x00
.byte 0x00, 0x92, 0xcf, 0x00
/* selgdt 0x20, flat x64 code segment */
.word 0xffff, 0x0000
.byte 0x00, 0x9b, 0xaf, 0x00
.word 0xffff, 0x0000
.byte 0x00, 0x9b, 0xaf, 0x00
gdt_end:
/* GDT pointer for use with lgdt */
.global gdt_ptr
gdt_ptr:
.word gdt_end - gdt - 1
.quad gdt
.word gdt_end - gdt - 1
.quad gdt
/*
* Record the target and construct the actual entry at init time. This
@ -158,8 +266,11 @@ gdt_ptr:
* for us.
*/
.macro interrupt_gate target
.quad \target
.quad \target
.word 0 /* patchable */
.word 0x20 /* Target code segment selector */
.word 0xee00 /* Present, Type 64-bit Interrupt Gate */
.word 0 /* patchable */
.quad \target /* patchable */
.endm
.altmacro
@ -171,7 +282,7 @@ gdt_ptr:
.endm
.align 16
.global idt
.global idt
idt:
interrupt_gate exception_stub_0
interrupt_gate exception_stub_1
@ -216,6 +327,25 @@ idt_ptr:
.word idt_end - idt - 1
.quad idt
.global exception_init_asm
.section .text.exception_init_asm
.globl exception_init_asm
.type exception_init_asm, @function
exception_init_asm:
/* Set up IDT entries */
mov $idt, %rax
1:
movq 8(%rax), %rdi
movw %di, (%rax) /* procedure entry point offset bits 0..15 */
shr $16, %rdi
movw %di, 6(%rax) /* procedure entry point offset bits 16..31 */
shr $16, %rdi
movl %edi, 8(%rax) /* procedure entry point offset bits 32..63 */
movl $0, 12(%rax) /* reserved */
add $16, %rax
cmp $idt_end, %rax
jne 1b
/* Load the IDT */
lidt idt_ptr
ret

View File

@ -96,6 +96,16 @@ static inline uint32_t be32dec(const void *pp)
(uint32_t)(p[2] << 8) | p[3]);
}
static inline uint64_t be64dec(const void *pp)
{
uint8_t const *p = (uint8_t const *)pp;
return (((uint64_t)p[0] << 56) | ((uint64_t)p[1] << 48) |
((uint64_t)p[2] << 40) | ((uint64_t)p[3] << 32) |
((uint64_t)p[4] << 24) | ((uint64_t)p[5] << 16) |
((uint64_t)p[6] << 8) | p[7]);
}
static inline uint16_t le16dec(const void *pp)
{
uint8_t const *p = (uint8_t const *)pp;
@ -111,6 +121,16 @@ static inline uint32_t le32dec(const void *pp)
(uint32_t)(p[1] << 8) | p[0]);
}
static inline uint64_t le64dec(const void *pp)
{
uint8_t const *p = (uint8_t const *)pp;
return (((uint64_t)p[7] << 56) | ((uint64_t)p[6] << 48) |
((uint64_t)p[5] << 40) | ((uint64_t)p[4] << 32) |
((uint64_t)p[3] << 24) | ((uint64_t)p[2] << 16) |
((uint64_t)p[1] << 8) | p[0]);
}
static inline void bebitenc(void *pp, uint32_t u, uint8_t b)
{
uint8_t *p = (uint8_t *)pp;
@ -130,6 +150,11 @@ static inline void be32enc(void *pp, uint32_t u)
bebitenc(pp, u, 4);
}
static inline void be64enc(void *pp, uint32_t u)
{
bebitenc(pp, u, 8);
}
static inline void lebitenc(void *pp, uint32_t u, uint8_t b)
{
uint8_t *p = (uint8_t *)pp;
@ -149,6 +174,11 @@ static inline void le32enc(void *pp, uint32_t u)
lebitenc(pp, u, 4);
}
static inline void le64enc(void *pp, uint32_t u)
{
lebitenc(pp, u, 8);
}
/* Deprecated names (not in glibc / BSD) */
#define htobew(in) htobe16(in)
#define htobel(in) htobe32(in)

View File

@ -54,4 +54,12 @@ typedef long ptrdiff_t;
#define UINT32_MAX (4294967295U)
#define UINT64_MAX (18446744073709551615ULL)
#ifndef SIZE_MAX
#ifdef __SIZE_MAX__
#define SIZE_MAX __SIZE_MAX__
#else
#define SIZE_MAX (~(size_t)0)
#endif /* __SIZE_MAX__ */
#endif /* SIZE_MAX */
#endif

View File

@ -29,6 +29,7 @@
#ifndef _STRING_H
#define _STRING_H
#include <commonlib/bsd/string.h>
#include <stddef.h>
/**
@ -46,16 +47,12 @@ int memcmp(const void *s1, const void *s2, size_t len);
* @defgroup string String functions
* @{
*/
size_t strnlen(const char *str, size_t maxlen);
size_t strlen(const char *str);
int strcmp(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, size_t maxlen);
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char *s1, const char *s2, size_t maxlen);
char *strncpy(char *d, const char *s, size_t n);
char *strcpy(char *d, const char *s);
char *strncat(char *d, const char *s, size_t n);
char *strcat(char *d, const char *s);
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
char *strdup(const char *s);

View File

@ -114,6 +114,8 @@ struct sysinfo_t {
uintptr_t acpi_cnvs;
uintptr_t acpi_rsdp;
uintptr_t smbios;
uintptr_t cse_bp_info;
uintptr_t cse_info;
#define UNDEFINED_STRAPPING_ID (~0)
#define UNDEFINED_FW_CONFIG ~((uint64_t)0)

View File

@ -33,9 +33,9 @@
static u64 rdtsc(void)
{
u64 val;
__asm__ __volatile__ ("rdtsc" : "=A" (val));
return val;
u32 lo, hi;
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
return (u64)hi << 32 | lo;
}
#endif

View File

@ -47,7 +47,9 @@ ifeq ($(CONFIG_LP_LIBC),y)
libc-srcs += $(coreboottop)/src/commonlib/bsd/elog.c
libc-srcs += $(coreboottop)/src/commonlib/bsd/gcd.c
libc-srcs += $(coreboottop)/src/commonlib/bsd/ipchksum.c
libc-srcs += $(coreboottop)/src/commonlib/bsd/string.c
ifeq ($(CONFIG_LP_GPL),y)
libc-srcs += $(coreboottop)/src/commonlib/device_tree.c
libc-srcs += $(coreboottop)/src/commonlib/list.c
endif
endif

View File

@ -262,6 +262,12 @@ static void cb_parse_cbmem_entry(void *ptr, struct sysinfo_t *info)
case CBMEM_ID_MEM_CHIP_INFO:
info->mem_chip_base = cbmem_entry->address;
break;
case CBMEM_ID_CSE_BP_INFO:
info->cse_bp_info = cbmem_entry->address;
break;
case CBMEM_ID_CSE_INFO:
info->cse_info = cbmem_entry->address;
break;
default:
break;
}

View File

@ -35,50 +35,6 @@
#include <limits.h>
#include <errno.h>
/**
* Calculate the length of a fixed-size string.
*
* @param str The input string.
* @param maxlen Return at most maxlen characters as length of the string.
* @return The length of the string, not including the final NUL character.
* The maximum length returned is maxlen.
*/
size_t strnlen(const char *str, size_t maxlen)
{
size_t len = 0;
/* NULL and empty strings have length 0. */
if (!str)
return 0;
/* Loop until we find a NUL character, or maxlen is reached. */
while ((*str++ != '\0') && (len < maxlen))
len++;
return len;
}
/**
* Calculate the length of a string.
*
* @param str The input string.
* @return The length of the string, not including the final NUL character.
*/
size_t strlen(const char *str)
{
size_t len = 0;
/* NULL and empty strings have length 0. */
if (!str)
return 0;
/* Loop until we find a NUL character. */
while (*str++ != '\0')
len++;
return len;
}
/**
* Compare two strings.
*
@ -196,46 +152,6 @@ char *strcpy(char *d, const char *s)
return strncpy(d, s, strlen(s) + 1);
}
/**
* Concatenates two strings
*
* @param d The destination string.
* @param s The source string.
* @return A pointer to the destination string.
*/
char *strcat(char *d, const char *s)
{
char *p = d + strlen(d);
size_t sl = strlen(s);
for (size_t i = 0; i < sl; i++)
p[i] = s[i];
p[sl] = '\0';
return d;
}
/**
* Concatenates two strings with a maximum length.
*
* @param d The destination string.
* @param s The source string.
* @param n Not more than n characters from s will be appended to d.
* @return A pointer to the destination string.
*/
char *strncat(char *d, const char *s, size_t n)
{
char *p = d + strlen(d);
size_t sl = strlen(s);
size_t max = n > sl ? sl : n;
for (size_t i = 0; i < max; i++)
p[i] = s[i];
p[max] = '\0';
return d;
}
/**
* Concatenates two strings with a maximum length.
*

View File

@ -399,6 +399,18 @@
"ranksPerChannel": 1,
"speedMbps": 4267
}
},
{
"name": "SDVB8D8A34XGCL3N3T",
"attribs": {
"densityPerChannelGb": 8,
"banks": 8,
"channelsPerDie": 2,
"diesPerPackage": 2,
"bitWidthPerChannel": 16,
"ranksPerChannel": 1,
"speedMbps": 4267
}
}
]
}

View File

@ -34,3 +34,4 @@ H54G68CYRBX248,spd-2.hex
K4UCE3Q4AB-MGCL,spd-2.hex
CXDB4ABAM-ML,spd-8.hex
CXDB4CBAM-ML-A,spd-8.hex
SDVB8D8A34XGCL3N3T,spd-1.hex

View File

@ -34,3 +34,4 @@ H54G68CYRBX248,spd-2.hex
K4UCE3Q4AB-MGCL,spd-2.hex
CXDB4ABAM-ML,spd-11.hex
CXDB4CBAM-ML-A,spd-11.hex
SDVB8D8A34XGCL3N3T,spd-5.hex

View File

@ -240,6 +240,28 @@
"speedMbps": 8533,
"lp5x": true
}
},
{
"name": "MT62F1G32D2DS-023 WT:C",
"attribs": {
"densityPerDieGb": 16,
"diesPerPackage": 2,
"bitWidthPerChannel": 16,
"ranksPerChannel": 1,
"speedMbps": 8533,
"lp5x": true
}
},
{
"name": "K3KL8L80DM-MGCU",
"attribs": {
"densityPerDieGb": 16,
"diesPerPackage": 2,
"bitWidthPerChannel": 16,
"ranksPerChannel": 1,
"speedMbps": 8533,
"lp5x": true
}
}
]
}

View File

@ -1,6 +1,7 @@
# Generated by:
# util/spd_tools/bin/spd_gen spd/lp5/memory_parts.json lp5
PTL,set-0
MTL,set-0
ADL,set-0
PHX,set-1

View File

@ -24,3 +24,5 @@ H58G66BK8BX067,spd-10.hex
H58G56BK8BX068,spd-11.hex
MT62F1G32D2DS-023 WT:B,spd-11.hex
MT62F2G32D4DS-023 WT:B,spd-10.hex
MT62F1G32D2DS-023 WT:C,spd-11.hex
K3KL8L80DM-MGCU,spd-11.hex

View File

@ -24,3 +24,5 @@ H58G66BK8BX067,spd-10.hex
H58G56BK8BX068,spd-11.hex
MT62F1G32D2DS-023 WT:B,spd-11.hex
MT62F2G32D4DS-023 WT:B,spd-10.hex
MT62F1G32D2DS-023 WT:C,spd-11.hex
K3KL8L80DM-MGCU,spd-11.hex

View File

@ -74,7 +74,7 @@ config COMPILER_GCC
config COMPILER_LLVM_CLANG
bool "LLVM/clang"
depends on ALLOW_EXPERIMENTAL_CLANG || ARCH_SUPPORTS_CLANG
depends on ALLOW_EXPERIMENTAL_CLANG || !CLANG_UNSUPPORTED
help
Use LLVM/clang to build coreboot. To use this, you must build the
coreboot version of the clang compiler. Run the command
@ -85,15 +85,15 @@ config COMPILER_LLVM_CLANG
endchoice
config ARCH_SUPPORTS_CLANG
config CLANG_UNSUPPORTED
bool
help
Opt-in flag for architectures that generally work well with CLANG.
By default the option would be hidden.
Set this flag on platforms that do not support building with the
clang compiler.
config ALLOW_EXPERIMENTAL_CLANG
bool "Allow experimental LLVM/Clang"
depends on !ARCH_SUPPORTS_CLANG
depends on CLANG_UNSUPPORTED
help
On some architectures CLANG does not work that well.
Use this only to try to get CLANG working.
@ -506,42 +506,38 @@ config BOOTSPLASH_CONVERT_COLORSWAP
If your colors seem all wrong, try this option.
config FW_CONFIG
bool "Firmware Configuration Probing"
default n
bool
help
Enable support for probing devices with fw_config. This is a simple
bitmask broken into fields and options for probing.
Select this option in the Mainboard Kconfig.
config FW_CONFIG_SOURCE_CHROMEEC_CBI
bool "Obtain Firmware Configuration value from Google Chrome EC CBI"
bool
depends on FW_CONFIG && EC_GOOGLE_CHROMEEC
default n
help
This option tells coreboot to read the firmware configuration value
from the Google Chrome Embedded Controller CBI interface. This source
is not tried if FW_CONFIG_SOURCE_CBFS is enabled and the value was
found in CBFS.
Select this option in the Mainboard Kconfig.
config FW_CONFIG_SOURCE_CBFS
bool "Obtain Firmware Configuration value from CBFS"
depends on FW_CONFIG
default n
help
With this option enabled coreboot will look for the 32bit firmware
configuration value in CBFS at the selected prefix with the file name
"fw_config". This option will override other sources and allow the
local image to preempt the mainboard selected source and can be used as
FW_CONFIG_SOURCE_CHROMEEC_CBI fallback option.
"fw_config". This option gets run if no value is found with CBI, so acts
as a FW_CONFIG_SOURCE_CHROMEEC_CBI fallback option.
config FW_CONFIG_SOURCE_VPD
bool "Obtain Firmware Configuration value from VPD"
depends on FW_CONFIG && VPD
default n
help
With this option enabled coreboot will look for the 32bit firmware
configuration value in VPD key name "fw_config". This option will
override other sources and allow the local image to preempt the mainboard
selected source and can be used for other FW_CONFIG_SOURCEs fallback option.
configuration value in VPD key name "fw_config". This option runs if no
FW_CONFIG value is set by either CBI or CBFS.
config HAVE_RAMPAYLOAD
bool

View File

@ -1489,6 +1489,16 @@ unsigned long write_acpi_tables(const unsigned long start)
current = fw;
current = acpi_align_current(current);
if (rsdp->xsdt_address == 0) {
acpi_rsdt_t *existing_rsdt = (acpi_rsdt_t *)(uintptr_t)rsdp->rsdt_address;
/*
* Qemu only provides a smaller ACPI 1.0 RSDP, thus
* allocate a bigger ACPI 2.0 RSDP structure.
*/
rsdp = (acpi_rsdp_t *)current;
current += sizeof(acpi_rsdp_t);
coreboot_rsdp = (uintptr_t)rsdp;
xsdt = (acpi_xsdt_t *)current;
current += sizeof(acpi_xsdt_t);
current = acpi_align_current(current);
@ -1497,7 +1507,6 @@ unsigned long write_acpi_tables(const unsigned long start)
* Qemu only creates an RSDT.
* Add an XSDT based on the existing RSDT entries.
*/
acpi_rsdt_t *existing_rsdt = (acpi_rsdt_t *)(uintptr_t)rsdp->rsdt_address;
acpi_write_rsdp(rsdp, existing_rsdt, xsdt, oem_id);
acpi_write_xsdt(xsdt, oem_id, oem_table_id);
/*
@ -1537,7 +1546,7 @@ unsigned long write_acpi_tables(const unsigned long start)
acpi_add_table(rsdp, ssdt);
return fw;
return current;
}
dsdt_file = cbfs_map(CONFIG_CBFS_PREFIX "/dsdt.aml", &dsdt_size);

View File

@ -2,7 +2,9 @@
#include <acpi/acpi.h>
#include <arch/ioapic.h>
#include <assert.h>
#include <cpu/cpu.h>
#include <lib.h>
#include <version.h>
void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags,
@ -36,9 +38,24 @@ void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags,
header->checksum = acpi_checksum((void *)dmar, header->length);
}
unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
u16 segment, u64 bar)
unsigned long acpi_create_dmar_drhd_4k(unsigned long current, u8 flags,
u16 segment, u64 bar)
{
return acpi_create_dmar_drhd(current, flags, segment, bar, 4 * KiB);
}
unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
u16 segment, u64 bar, size_t size)
{
/*
* Refer to Intel® Virtualization Technology for Directed I/O
* Architecture Specification Revision 4.1,
* size is at least 1 page and max 2^15 pages, 4 KiB each, and the bar
* should be aligned with size.
*/
assert(4 * KiB <= size && size <= (1 << 15) * 4 * KiB && IS_POWER_OF_2(size));
assert(IS_ALIGNED(bar, size));
dmar_entry_t *drhd = (dmar_entry_t *)current;
memset(drhd, 0, sizeof(*drhd));
drhd->type = DMAR_DRHD;
@ -46,6 +63,7 @@ unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
drhd->flags = flags;
drhd->segment = segment;
drhd->bar = bar;
drhd->size = log2_64(size) - 12;
return drhd->length;
}

View File

@ -60,7 +60,7 @@ void pci_domain_fill_ssdt(const struct device *domain)
acpigen_resource_producer_bus_number(domain->downstream->secondary,
domain->downstream->max_subordinate);
if (domain->path.domain.domain == 0) {
if (is_domain0(domain)) {
/* ACPI 6.4.2.5 I/O Port Descriptor */
acpigen_write_io16(PCI_IO_CONFIG_INDEX, PCI_IO_CONFIG_LAST_PORT, 1,
PCI_IO_CONFIG_PORT_COUNT, 1);

View File

@ -57,6 +57,8 @@ static const uint32_t action_keymaps[] = {
[PS2_KEY_KBD_BKLIGHT_TOGGLE] = KEYMAP(0x9e, KEY_KBDILLUMTOGGLE), /* e01e */
[PS2_KEY_MENU] = KEYMAP(0xdd, KEY_CONTROLPANEL), /* e0d5 */
[PS2_KEY_DICTATE] = KEYMAP(0xa7, KEY_DICTATE), /* e027*/
[PS2_KEY_ACCESSIBILITY] = KEYMAP(0xa9, KEY_ACCESSIBILITY), /* e029 */
[PS2_KEY_DO_NOT_DISTURB] = KEYMAP(0xa8, KEY_DO_NOT_DISTURB), /* e028 */
};
/* Keymap for numeric keypad keys */
@ -67,7 +69,6 @@ static uint32_t numeric_keypad_keymaps[] = {
KEYMAP(0xc7, KEY_HOME),
KEYMAP(0xcf, KEY_END),
/* Row-1 */
KEYMAP(0xd3, KEY_DELETE),
KEYMAP(0xb5, KEY_KPSLASH),
KEYMAP(0x37, KEY_KPASTERISK),
KEYMAP(0x4a, KEY_KPMINUS),
@ -97,6 +98,7 @@ static uint32_t numeric_keypad_keymaps[] = {
static uint32_t rest_of_keymaps[] = {
/* Row-0 */
KEYMAP(0x01, KEY_ESC),
KEYMAP(0xd3, KEY_DELETE),
/* Row-1 */
KEYMAP(0x29, KEY_GRAVE),
KEYMAP(0x02, KEY_1),
@ -285,9 +287,10 @@ static void ssdt_generate_keymap(struct acpi_dp *dp, uint8_t num_top_row_keys,
keymap = rest_of_keymaps[i];
acpi_dp_add_integer(dp_array, NULL, keymap);
}
total += ARRAY_SIZE(rest_of_keymaps);
}
total += ARRAY_SIZE(rest_of_keymaps);
printk(BIOS_INFO, "PS2K: Passing %u keymaps to kernel\n", total);
acpi_dp_add_array(dp, dp_array);

View File

@ -43,13 +43,8 @@ bootblock-y += memmove.S
bootblock-y += clock.c
bootblock-y += stages.c
$(objcbfs)/bootblock.debug: $$(bootblock-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) -T $(call src-to-obj,bootblock,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) --end-group
$(objcbfs)/decompressor.debug: $$(decompressor-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) -T $(call src-to-obj,decompressor,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(decompressor-objs)) --end-group
$(eval $(call link_stage,bootblock))
$(eval $(call link_stage,decompressor))
endif # CONFIG_ARCH_BOOTBLOCK_ARM
@ -59,9 +54,7 @@ endif # CONFIG_ARCH_BOOTBLOCK_ARM
ifeq ($(CONFIG_ARCH_VERSTAGE_ARM),y)
$(objcbfs)/verstage.debug: $$(verstage-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_verstage) $(LDFLAGS_verstage) -o $@ -L$(obj) -T $(call src-to-obj,verstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(verstage-objs)) --end-group
$(eval $(call link_stage,verstage))
verstage-y += boot.c
verstage-y += div0.c
@ -92,9 +85,7 @@ rmodules_arm-y += memcpy.S
rmodules_arm-y += memmove.S
rmodules_arm-y += eabi_compat.c
$(objcbfs)/romstage.debug: $$(romstage-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group
$(eval $(call link_stage,romstage))
endif # CONFIG_ARCH_ROMSTAGE_ARM
@ -122,8 +113,6 @@ rmodules_arm-y += memmove.S
rmodules_arm-y += eabi_compat.c
ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
$(objcbfs)/ramstage.debug: $$(ramstage-objs)
@printf " CC $(subst $(obj)/,,$(@))\n"
$(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group
$(eval $(call link_stage,ramstage))
endif # CONFIG_ARCH_RAMSTAGE_ARM

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ARCH_IO_H__
#define __ARCH_IO_H__
#include <arch-generic/io.h>
#endif

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ARCH_IO_H__
#define __ARCH_IO_H__
#include <arch-generic/io.h>
#endif

View File

@ -2,6 +2,7 @@
config ARCH_ARM64
bool
select CLANG_UNSUPPORTED
config ARCH_BOOTBLOCK_ARM64
bool
@ -46,6 +47,15 @@ config ARM64_USE_ARM_TRUSTED_FIRMWARE
default n
depends on ARCH_RAMSTAGE_ARM64 && ARM64_CURRENT_EL = 3
config ARM64_BL31_OPTEE_WITH_SMC
bool "Build OP-TEE dispatcher for BL31 and allow loading via an SMC"
default n
depends on ARM64_USE_ARM_TRUSTED_FIRMWARE
help
This option adds support for building the OP-TEE Secure Payload Dispatcher
(SPD) for BL31, and allows loading the OP-TEE image via a Secure Monitor Call
(SMC).
config ARM64_BL31_EXTERNAL_FILE
string "Path to external BL31.ELF (leave empty to build from source)"
depends on ARM64_USE_ARM_TRUSTED_FIRMWARE

View File

@ -43,13 +43,8 @@ bootblock-y += memmove.S
# Build the bootblock
$(objcbfs)/bootblock.debug: $$(bootblock-objs) $(obj)/config.h
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) --end-group -T $(call src-to-obj,bootblock,$(CONFIG_MEMLAYOUT_LD_FILE))
$(objcbfs)/decompressor.debug: $$(decompressor-objs) $(obj)/config.h
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) --whole-archive --start-group $(filter-out %.ld,$(decompressor-objs)) --end-group -T $(call src-to-obj,decompressor,$(CONFIG_MEMLAYOUT_LD_FILE))
$(eval $(call link_stage,bootblock))
$(eval $(call link_stage,decompressor))
endif # CONFIG_ARCH_BOOTBLOCK_ARM64
@ -59,9 +54,7 @@ endif # CONFIG_ARCH_BOOTBLOCK_ARM64
ifeq ($(CONFIG_ARCH_VERSTAGE_ARM64),y)
$(objcbfs)/verstage.debug: $$(verstage-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_verstage) $(LDFLAGS_verstage) -o $@ -L$(obj) --whole-archive --start-group $(filter-out %.ld,$(verstage-objs)) --end-group -T $(call src-to-obj,verstage,$(CONFIG_MEMLAYOUT_LD_FILE))
$(eval $(call link_stage,verstage))
verstage-y += boot.c
verstage-y += div0.c
@ -103,9 +96,7 @@ rmodules_arm64-y += memcpy.S
rmodules_arm64-y += memmove.S
rmodules_arm64-y += eabi_compat.c
$(objcbfs)/romstage.debug: $$(romstage-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE))
$(eval $(call link_stage,romstage))
endif # CONFIG_ARCH_ROMSTAGE_ARM64
@ -144,9 +135,7 @@ ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
# Build the ramstage
$(objcbfs)/ramstage.debug: $$(ramstage-objs)
@printf " CC $(subst $(obj)/,,$(@))\n"
$(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE))
$(eval $(call link_stage,ramstage))
# Build ARM Trusted Firmware (BL31)
@ -185,6 +174,15 @@ BL31_MAKEARGS += IS_ANYTHING_TO_BUILD=1
# Set a consistent build timestamp: the same coreboot has
BL31_MAKEARGS += BUILD_MESSAGE_TIMESTAMP='"$(shell sed -n 's/^.define COREBOOT_BUILD\>.*"\(.*\)".*/\1/p' $(obj)/build.h)"'
ifeq ($(CONFIG_ARM64_BL31_OPTEE_WITH_SMC),y)
BL31_MAKEARGS += SPD=opteed
BL31_MAKEARGS += OPTEE_ALLOW_SMC_LOAD=1
BL31_MAKEARGS += PLAT_XLAT_TABLES_DYNAMIC=1
ifeq ($(CONFIG_CHROMEOS),y)
BL31_MAKEARGS += CROS_WIDEVINE_SMC=1
endif
endif # CONFIG_ARM64_BL31_OPTEE_WITH_SMC
BL31_CFLAGS := -fno-pic -fno-stack-protector -Wno-deprecated-declarations -Wno-unused-function
BL31_LDFLAGS := -Wl,--emit-relocs

View File

@ -16,6 +16,9 @@
mov w10, #0 // w10 = 2 * cache level
mov w8, #1 // w8 = constant 0b1
mrs x12, id_aa64mmfr2_el1 // read ID_AA64MMFR2_EL1
ubfx x12, x12, #20, #4 // [23:20] - CCIDX support
1: //next_level
add w2, w10, w10, lsr #1 // calculate 3 * cache level
lsr w1, w0, w2 // extract 3-bit cache type for this level
@ -27,8 +30,14 @@
mrs x1, ccsidr_el1 // w1 = read ccsidr
and w2, w1, #7 // w2 = log2(linelen_bytes) - 4
add w2, w2, #4 // w2 = log2(linelen_bytes)
ubfx w4, w1, #3, #10 // w4 = associativity - 1 (also
// max way number)
cbz x12, 11f // check FEAT_CCIDX for associativity
// branch to 11 if FEAT_CCIDX is not implemented
ubfx x4, x1, #3, #21 // x4 = associativity CCSIDR_EL1[23:3]
b 12f
11:
ubfx x4, x1, #3, #10 // x4 = associativity CCSIDR_EL1[12:3]
12:
clz w5, w4 // w5 = 32 - log2(ways)
// (bit position of way in DC)
lsl w9, w4, w5 // w9 = max way number
@ -36,7 +45,13 @@
lsl w16, w8, w5 // w16 = amount to decrement (way
// number per iteration)
2: //next_way
ubfx w7, w1, #13, #15 // w7 = max set #, right aligned
cbz x12, 21f // check FEAT_CCIDX for numsets
// branch to 21 if FEAT_CCIDX is not implemented
ubfx x7, x1, #32, #24 // x7(w7) = numsets CCSIDR_EL1[55:32]
b 22f
21:
ubfx w7, w1, #13, #15 // w7 = numsets CCSIDR_EL1[27:13]
22:
lsl w7, w7, w2 // w7 = max set #, DC aligned
lsl w17, w8, w2 // w17 = amount to decrement (set
// number per iteration)

View File

@ -5,10 +5,14 @@
#include <string.h>
#include <symbols.h>
#include <console/console.h>
#include <arch/mmu.h>
#include <arch/lib_helpers.h>
#include <arch/barrier.h>
#include <arch/cache.h>
#include <arch/lib_helpers.h>
#include <arch/mmu.h>
#include <console/console.h>
/* 12 hex digits (48 bits VA) plus 1 for exclusive upper bound. */
#define ADDR_FMT "0x%013lx"
/* This just caches the next free table slot (okay to do since they fill up from
* bottom to top and can never be freed up again). It will reset to its initial
@ -53,6 +57,25 @@ static uint64_t get_block_attr(unsigned long tag)
return attr;
}
/* Func : table_level_name
* Desc : Get the descriptions table level name from the given size.
*/
static const char *table_level_name(size_t xlat_size)
{
switch (xlat_size) {
case L0_XLAT_SIZE:
return "L0";
case L1_XLAT_SIZE:
return "L1";
case L2_XLAT_SIZE:
return "L2";
case L3_XLAT_SIZE:
return "L3";
default:
return "";
}
}
/* Func : setup_new_table
* Desc : Get next free table from TTB and set it up to match old parent entry.
*/
@ -65,9 +88,12 @@ static uint64_t *setup_new_table(uint64_t desc, size_t xlat_size)
}
void *frame_base = (void *)(desc & XLAT_ADDR_MASK);
printk(BIOS_DEBUG, "Backing address range [%p:%p) with new page"
" table @%p\n", frame_base, frame_base +
(xlat_size << BITS_RESOLVED_PER_LVL), next_free_table);
const char *level_name = table_level_name(xlat_size);
printk(BIOS_DEBUG,
"Backing address range [" ADDR_FMT ":" ADDR_FMT ") with new %s table @%p\n",
(uintptr_t)frame_base,
(uintptr_t)frame_base + (xlat_size << BITS_RESOLVED_PER_LVL),
level_name, next_free_table);
if (!desc) {
memset(next_free_table, 0, GRANULE_SIZE);
@ -212,8 +238,8 @@ void mmu_config_range(void *start, size_t size, uint64_t tag)
uint64_t base_addr = (uintptr_t)start;
uint64_t temp_size = size;
printk(BIOS_INFO, "Mapping address range [%p:%p) as ",
start, start + size);
printk(BIOS_INFO, "Mapping address range [" ADDR_FMT ":" ADDR_FMT ") as ",
(uintptr_t)start, (uintptr_t)start + size);
print_tag(BIOS_INFO, tag);
sanity_check(base_addr, temp_size);

View File

@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <stdlib.h>
int dma_coherent(const void *ptr)

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ARCH_IO_H__
#define __ARCH_IO_H__
#include <arch-generic/io.h>
#endif

View File

@ -3,7 +3,6 @@
#include <arch/cache.h>
#include <arch/lib_helpers.h>
#include <arch/smc.h>
#include <console/console.h>
#include <smbios.h>
#include <stdio.h>

View File

@ -2,7 +2,6 @@
config ARCH_PPC64
bool
select ARCH_SUPPORTS_CLANG
config ARCH_BOOTBLOCK_PPC64
bool

View File

@ -21,11 +21,7 @@ bootblock-y += \
bootblock-generic-ccopts += $(ppc64_flags)
$(objcbfs)/bootblock.debug: $$(bootblock-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) \
-T $(call src-to-obj,bootblock,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) \
$(LIBGCC_FILE_NAME_bootblock) --end-group $(COMPILER_RT_bootblock)
$(eval $(call link_stage,bootblock))
endif
@ -48,9 +44,7 @@ romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
# Build the romstage
$(objcbfs)/romstage.debug: $$(romstage-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group $(COMPILER_RT_romstage)
$(eval $(call link_stage,romstage))
romstage-c-ccopts += $(ppc64_flags)
romstage-S-ccopts += $(ppc64_asm_flags)
@ -81,9 +75,7 @@ ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c
# Build the ramstage
$(objcbfs)/ramstage.debug: $$(ramstage-objs)
@printf " CC $(subst $(obj)/,,$(@))\n"
$(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group $(COMPILER_RT_ramstage)
$(eval $(call link_stage,ramstage))
ramstage-c-ccopts += $(ppc64_flags)
ramstage-S-ccopts += $(ppc64_asm_flags)

View File

@ -10,7 +10,6 @@ config ARCH_RISCV_RV32
config ARCH_RISCV
bool
select ARCH_SUPPORTS_CLANG
if ARCH_RISCV

View File

@ -75,11 +75,7 @@ ifeq ($(CONFIG_ARCH_BOOTBLOCK_RISCV),y)
bootblock-y = bootblock.S
$(objcbfs)/bootblock.debug: $$(bootblock-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) \
-T $(call src-to-obj,bootblock,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) \
$(LIBGCC_FILE_NAME_bootblock) --end-group $(COMPILER_RT_bootblock)
$(eval $(call link_stage,bootblock))
bootblock-c-ccopts += $(riscv_flags)
bootblock-S-ccopts += $(riscv_asm_flags)
@ -96,13 +92,10 @@ endif #CONFIG_ARCH_BOOTBLOCK_RISCV
ifeq ($(CONFIG_ARCH_ROMSTAGE_RISCV),y)
romstage-$(CONFIG_SEPARATE_ROMSTAGE) += romstage.S
romstage-y += ramdetect.c
# Build the romstage
$(objcbfs)/romstage.debug: $$(romstage-objs)
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group $(COMPILER_RT_romstage)
$(eval $(call link_stage,romstage))
romstage-c-ccopts += $(riscv_flags)
romstage-S-ccopts += $(riscv_asm_flags)
@ -120,7 +113,6 @@ ifeq ($(CONFIG_ARCH_RAMSTAGE_RISCV),y)
ramstage-y =
ramstage-y += ramstage.S
ramstage-y += ramdetect.c
ramstage-y += tables.c
ramstage-y += payload.c
ramstage-y += fit_payload.c
@ -131,9 +123,7 @@ ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c
# Build the ramstage
$(objcbfs)/ramstage.debug: $$(ramstage-objs)
@printf " CC $(subst $(obj)/,,$(@))\n"
$(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group $(COMPILER_RT_ramstage)
$(eval $(call link_stage,ramstage))
ramstage-c-ccopts += $(riscv_flags)
ramstage-S-ccopts += $(riscv_asm_flags)
@ -180,7 +170,6 @@ cbfs-files-y += $(OPENSBI_CBFS)
check-ramstage-overlap-files += $(OPENSBI_CBFS)
CPPFLAGS_common += -I$(OPENSBI_SOURCE)/include
ramstage-y += opensbi.c
endif #CONFIG_RISCV_OPENSBI

View File

@ -26,7 +26,7 @@ static inline void exception_init(void)
}
void redirect_trap(void);
void default_trap_handler(struct trapframe *tf);
void trap_handler(struct trapframe *tf);
void handle_supervisor_call(struct trapframe *tf);
#endif

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ARCH_IO_H__
#define __ARCH_IO_H__
#include <arch-generic/io.h>
#endif

View File

@ -11,6 +11,8 @@
*/
int pmp_entries_num(void);
void print_pmp_regions(void);
/* reset PMP setting */
void reset_pmp(void);

View File

@ -1,13 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* OpenSBI wants to make its own definitions for some of our compiler.h macros. */
#undef __packed
#undef __noreturn
#undef __aligned
#include <sbi/fw_dynamic.h>
#include <arch/boot.h>
/* DO NOT INCLUDE COREBOOT HEADERS HERE */
#include <arch/encoding.h>
#include <stdint.h>
#include <stddef.h>
#define FW_DYNAMIC_INFO_VERSION_2 2
#define FW_DYNAMIC_INFO_MAGIC_VALUE 0x4942534f // "OSBI"
/*
* structure passed to OpenSBI as 3rd argument
* NOTE: This structure may need to be updated when the OpenSBI submodule is updated.
*/
static struct __packed fw_dynamic_info {
unsigned long magic; // magic value "OSBI"
unsigned long version; // version number (2)
unsigned long next_addr; // Next booting stage address (payload address)
unsigned long next_mode; // Next booting stage mode (usually supervisor mode)
unsigned long options; // options for OpenSBI library
unsigned long boot_hart; // usually CONFIG_RISCV_WORKING_HARTID
} info;
void run_opensbi(const int hart_id,
const void *fdt,
@ -15,21 +27,21 @@ void run_opensbi(const int hart_id,
const void *payload,
const int payload_mode)
{
struct fw_dynamic_info info = {
.magic = FW_DYNAMIC_INFO_MAGIC_VALUE,
.version = FW_DYNAMIC_INFO_VERSION_MAX,
.next_mode = payload_mode,
.next_addr = (uintptr_t)payload,
.options = 0,
.boot_hart = CONFIG_OPENSBI_FW_DYNAMIC_BOOT_HART,
};
info.magic = FW_DYNAMIC_INFO_MAGIC_VALUE,
info.version = FW_DYNAMIC_INFO_VERSION_2,
info.next_mode = payload_mode,
info.next_addr = (uintptr_t)payload,
info.options = 0,
info.boot_hart = CONFIG_OPENSBI_FW_DYNAMIC_BOOT_HART,
csr_write(mepc, opensbi);
write_csr(mepc, opensbi); // set program counter to OpenSBI (jumped to with mret)
asm volatile (
"mv a0, %0\n\t"
"mv a1, %1\n\t"
"mv a2, %2\n\t"
"mret" :
: "r"(hart_id), "r"(fdt), "r"(&info)
: "a0", "a1", "a2");
"mv a0, %0\n\t"
"mv a1, %1\n\t"
"mv a2, %2\n\t"
"mret"
:
: "r"(hart_id), "r"(fdt), "r"(&info)
: "a0", "a1", "a2"
);
}

View File

@ -314,6 +314,52 @@ static void mask_pmp_entry_used(int idx)
pmp_entry_used_mask |= 1 << idx;
}
/* prints the pmp regions by reading the PMP address and configuration registers */
void print_pmp_regions(void)
{
uintptr_t prev_pmpaddr = 0;
uintptr_t base = 0;
uintptr_t size = 0;
const char *mode;
for (int i = 0; i < pmp_entries_num(); i++) {
uintptr_t pmpcfg = read_pmpcfg(i);
uintptr_t pmpaddr = read_pmpaddr(i);
if ((pmpcfg & PMP_A) == 0) {
continue; // PMP entry is disabled
} else if (pmpcfg & PMP_NA4) {
base = pmpaddr << PMP_SHIFT;
size = 4;
mode = "NA4";
} else if (pmpcfg & PMP_NAPOT) {
unsigned int count_trailing_ones = 0;
base = pmpaddr;
while (base) {
if ((base & 1) == 0)
break; // we got a zero
count_trailing_ones++;
base >>= 1;
}
size = 8 << count_trailing_ones;
base = (pmpaddr & ~((2 << count_trailing_ones) - 1)) >> PMP_SHIFT;
mode = "NAPOT";
} else if (pmpcfg & PMP_TOR) {
base = pmpaddr;
size = pmpaddr - prev_pmpaddr;
mode = "TOR";
}
printk(BIOS_DEBUG, "base: 0x%lx, size: 0x%lx, perm: %c%c%c, mode: %s, locked: %d\n",
base, size,
(pmpcfg & PMP_R) ? 'r' : ' ',
(pmpcfg & PMP_W) ? 'w' : ' ',
(pmpcfg & PMP_X) ? 'x' : ' ',
mode,
(pmpcfg & PMP_L) ? 1 : 0);
prev_pmpaddr = pmpaddr;
}
}
/* reset PMP setting */
void reset_pmp(void)
{

View File

@ -1,61 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <arch/exception.h>
#include <types.h>
#include <console/console.h>
#include <device/mmio.h>
#include <ramdetect.h>
#include <arch/smp/spinlock.h>
#include <vm.h>
static enum {
ABORT_CHECKER_NOT_TRIGGERED,
ABORT_CHECKER_TRIGGERED,
} abort_state = ABORT_CHECKER_NOT_TRIGGERED;
extern void (*trap_handler)(struct trapframe *tf);
static int get_instruction_len(uintptr_t addr)
{
uint16_t ins = read16p(addr);
/*
* 16-bit or 32-bit instructions supported
*/
if ((ins & 0x3) != 3) {
return 2;
} else if ((ins & 0x1f) != 0x1f) {
return 4;
}
die("Not a 16bit or 32bit instruction 0x%x\n", ins);
}
static void ramcheck_trap_handler(struct trapframe *tf)
{
abort_state = ABORT_CHECKER_TRIGGERED;
/*
* skip read instruction.
*/
int insn_size = get_instruction_len(tf->epc);
write_csr(mepc, read_csr(mepc) + insn_size);
}
int probe_mb(const uintptr_t dram_start, const uintptr_t size)
{
uintptr_t addr = dram_start + (size * MiB) - sizeof(uint32_t);
void *ptr = (void *)addr;
abort_state = ABORT_CHECKER_NOT_TRIGGERED;
trap_handler = ramcheck_trap_handler;
barrier();
read32(ptr);
trap_handler = default_trap_handler;
barrier();
printk(BIOS_DEBUG, "%lx is %s DRAM\n", dram_start + size * MiB,
abort_state == ABORT_CHECKER_NOT_TRIGGERED ? "" : "not");
return abort_state == ABORT_CHECKER_NOT_TRIGGERED;
}

View File

@ -109,9 +109,7 @@ static void interrupt_handler(struct trapframe *tf)
}
}
void (*trap_handler)(struct trapframe *tf) = default_trap_handler;
void default_trap_handler(struct trapframe *tf)
void trap_handler(struct trapframe *tf)
{
if (tf->cause & 0x8000000000000000ULL) {
interrupt_handler(tf);

Some files were not shown because too many files have changed in this diff Show More