Commit Graph

55586 Commits

Author SHA1 Message Date
Arthur Heymans a2bc2540c2 Allow to build romstage sources inside the bootblock
Having a separate romstage is only desirable:
 - with advanced setups like vboot or normal/fallback
 - boot medium is slow at startup (some ARM SOCs)
 - bootblock is limited in size (Intel APL 32K)

When this is not the case there is no need for the extra complexity
that romstage brings. Including the romstage sources inside the
bootblock substantially reduces the total code footprint. Often the
resulting code is 10-20k smaller.

This is controlled via a Kconfig option.

TESTED: works on qemu x86, arm and aarch64 with and without VBOOT.

Change-Id: Id68390edc1ba228b121cca89b80c64a92553e284
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55068
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-09 13:20:18 +00:00
Martin Roth 4ce52f622e soc/amd: Remove unnecessary choice symbol name from PSP Kconfig
There's no reason to name this choice block. Remove the name.

Change-Id: Iebf8b1e7af928b988ab514d9dd85d2e70bf00c09
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78917
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-09 13:18:36 +00:00
Yunlong Jia d130c0ff7c mb/google/nissa/var/gothrax: Add FW_CONFIG probe about DB/WFC
Add FW_CONFIG probe to separate WFC settings.
  WFC_PRESENT/WFC_ABSENT
Add FW_CONFIG probe for new DB_USB sku.
  DB_C_A_LTE/DB_A

BUG=b:303526071
TEST=emerge-nissa coreboot

Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
Change-Id: I93e0bce4b8be37e259efe0d7b0185035b3e88785
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78963
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-09 11:52:32 +00:00
Eran Mitrani 0c9bff68d5 mb/google/rex/variants/deku: Add display configuration
Enable DDI on ports 1 to 4 for Type-C DisplayPort.

BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I3acaff4a9306f2d058ce9542e8956ee0acba94cf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78498
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-09 04:50:21 +00:00
Felix Singer d517c8daa9 3rdparty/arm-trusted-firmware: Update submodule to upstream master
Updating from commit id 37366af8d:
2023-07-28 17:04:54 +0200 - (Merge "fix(cpus): fix minor issue seen with a9 cpu" into integration)

to commit id 88b2d8134:
2023-09-06 11:26:32 +0200 - (Merge "fix(scmi): add parameter for plat_scmi_clock_rates_array" into integration)

This brings in 225 new commits.

Change-Id: I97147fbec5c0a91daab67524027f57962f61d0a1
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78886
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-11-09 04:36:45 +00:00
YH Lin 045e431ca4 mb/google/rex: split TOUCHSCREEN_I2C_SPI definition
As TOUCHSCREEN_I2C_SPI will be used for two different configurations,
splitting it to TOUCHSCREEN_GSPI and TOUCHSCREEN_THC, and re-order
the FW_CONFIG bits by moving VPU to different bit position.

BUG=b:307774932
TEST=build and boot rex

Signed-off-by: YH Lin <yueherngl@google.com>
Change-Id: Ied4d732ef7993e95edbb7eb281842b9392e72820
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78939
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-08 19:28:46 +00:00
Shelley Chen 17e1c895dd mb/google/brox: Configure early GPIOs in bootblock
Some GPIOs (like WP and GSC) need to be configured in bootblock.
Making sure that they get configured earlier for this.

BUG=b:300690448
BRANCH=None
TEST=emerge-brox coreboot

Change-Id: I8dd4853bc05b954f47d858d87ea2aed48e4b8074
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78943
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-08 17:32:42 +00:00
Shelley Chen f931d620f6 mb/google/brox: Correcting GPIOs based on latest schematics
There are some inaccuracies in arbitrage.  This is the first pass at
correcting the incorrectly generated configs.  I also tried to update
the "No heuristic was found useful" comment generated by arbitrage
into something more useful (ie: the appropriate NFs).

BUG=b:300690448
BRANCH=None
TEST=emerge-brox coreboot

Change-Id: I836565e09a3e0b25746b3e2f9ed6610eaacf7e97
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78942
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-08 17:32:36 +00:00
Sean Rhodes 52125c7212 payloads/edk2: Remove the warning about edk2/master not working
Since #c4fdec0a83d69bd0399b1b4351fa9c3af3c6fd65, edk2/master will
work with coreboot without modification.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I8350f5114445d2608861ef6e807f958e598dfe07
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78636
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-11-08 14:39:07 +00:00
wuweimin 5bd3de26ad mb/google/brya/var/anraggar: Initialise overridetree
Initialise overridetree based on the schematics revision 20231020A.
Added data.vbt just only for running abuild completed.
Real vbt define by CONFIG_INTEL_GMA_VBT_FILE in chromium:4936896.

BUG=b:304920262
TEST=abuild -v -a -x -c max -p none -t google/brya -b anraggar

Change-Id: I232bde990747be80e1ab62c3f0d010d5fc854cb5
Signed-off-by: wuweimin <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78456
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-08 11:44:14 +00:00
wuweimin b0b9bbc41c mb/google/brya/var/anraggar: Add initial GPIOs config
Configure GPIOs according to schematics revision 20231025G.

BUG=b:304920262
TEST=abuild -v -a -x -c max -p none -t google/brya -b anraggar

Change-Id: I7be6829fc27ee20e014c372d704333ebfd4967b8
Signed-off-by: wuweimin <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-11-08 11:39:36 +00:00
Arthur Heymans 0a0945c6a2 sio/nuvoton/npcd378: Use acpi_device_path_join
This achieves the same without the strconcat & free dance.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I4d8e9bae6085a6e05847b01497fb4b51041ca7b8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-08 11:23:41 +00:00
Arthur Heymans 9eb0b19861 drivers/i2c/lenovo_serials: Use buildtime constants
The coreboot_version global variable just gets filled with the
COREBOOT_VERSION macro so there is no reason to use a runtime strconcat.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I3a2be7293d07ac591855ebd784bba350cdffa70f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78945
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-08 11:23:16 +00:00
Iru Cai 0fd61e67a0 mb/hp/elitebook_820_g2: do not set EC SLPT on S5
Setting EC SLPT bit in S5 will make HP EliteBook 820 G2
fail to reboot under Linux 6.1 and later kernel versions.

Change-Id: I48f5a35cd78db3b32d9f76cb8e266c738da34e7c
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78907
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-08 04:37:11 +00:00
Julius Werner c7120e38e7 Kconfig.cbfs_verification: Update TOCTOU_SAFETY combination with VBOOT
Now that VBOOT_CBFS_INTEGRATION exists, it is possible to use
TOCTOU_SAFETY with VBOOT.

Change-Id: I9f84574f611ec397060404c61e71312009d92ba7
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78915
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-11-07 22:30:20 +00:00
Julius Werner ca71588620 fmap: Eliminate some impossible code paths
When the FMAP cache is enabled, it cannot fail in pre-RAM stages unless
flash I/O in general doesn't work. Therefore, it is unnecessary and a
waste of binary size to also link a fallback path for this case.
Similarly, once the cache is written to CAR/SRAM/CBMEM there should be
no way for it to become magically corrupted between boot stages. Many
other parts of coreboot blindly assume that persistent memory stays
valid between stages so there is no reason why this code should link in
extra fallback paths in case it doesn't.

This saves a little over 200 bytes per affected (uncompressed) stage on
aarch64.

Change-Id: I7b8251dd6b34fe4f63865ebc44b9a8a103f32a57
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78904
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 22:30:12 +00:00
Julius Werner 682cb3b564 fmap: Die immediately on verification failure
A recent security audit has exposed a TOCTOU risk in the FMAP
verification code: if the flash returns a tampered FMAP during the first
setup_preram_cache(), we will abort generating the cache but only after
already filling the persistent CAR/SRAM region with the tampered
version. Then we will fall back into the direct access path, which could
succeed if the flash now returns the original valid FMAP. In later
stages, we will just use the data from the persistent CAR/SRAM region as
long as it looks like an FMAP without verifying the hash again (because
the hash is only linked into the initial stage).

This patch fixes the issue by just calling die() immediately if FMAP
hash verification fails. When the verification fails, there's no
recourse anyway -- if we're not dying here we would be dying in
cbfs_get_boot_device() instead. There is no legitimate scenario where
it would still be possible to continue booting after this hash
verification fails.

Change-Id: I59ec91c3e5a59fdd960b0ba54ae5f15ddb850480
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78903
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 22:30:02 +00:00
Julius Werner 5bc5b1d024 fmap: Map full FMAP for verification in fallback path
The rarely-used fallback path for accessing the FMAP without a cache
currently only maps the FMAP header for the initial verify_fmap() call.
This used to be fine when we were just checking the magic number, but
with CBFS verification we may need to hash the entire FMAP.

Since this path is so rarely used anyway and the size difference only
has a practical impact on a few platforms, lets keep things simple and
just always map the whole FMAP.

Change-Id: Ie780a3662bf89637de93a36ce6e23f77fed86265
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78914
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 22:29:55 +00:00
Eran Mitrani f976470746 mb/google/rex/variants/deku: Add USB configuration
+-------------+----------------+------------+
| USB 2.0     | Connector Type | OC Mapping |
+-------------+----------------+------------+
|      1      |     Type-C     |    OC_0    |
+-------------+----------------+------------+
|      2      |     Type-C     |    OC_0    |
+-------------+----------------+------------+
|      3      |     Type-C     |    OC-0    |
+-------------+----------------+------------+
|      4      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      5      |     Type-C     |    OC_0    |
+-------------+----------------+------------+
|      6      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      7      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      8      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      9      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      10     |       BT       |     NA     |
+-------------+----------------+------------+

+---------------------+-------------------+------------+
| USB 3.2 Gen 2x1     | Connector Details | OC Mapping |
+---------------------+-------------------+------------+
|          1          |       Type-A      |    OC_3    |
+---------------------+-------------------+------------+
|          2          |       Type-A      |    OC_3    |
+---------------------+-------------------+------------+

+------+-------------------+------------+
| TCPx | Connector Details | OC Mapping |
+------+-------------------+------------+
|   1  |   Type C port 0   |    OC_0    |
+------+-------------------+------------+
|   2  |   Type C port 1   |    OC_0    |
+------+-------------------+------------+
|   3  |   Type C port 2   |    OC_0    |
+------+-------------------+------------+
|   4  |   Type C port 3   |    OC_0    |
+------+-------------------+------------+

BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I743fd82f088a57e906b8b9d0fe2e012d9c5f9567
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78497
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 20:17:41 +00:00
Eran Mitrani b09edd37a9 mb/google/rex/variants/deku: Add SSD card config
BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Change-Id: I167a02bf2219c6ef8e0093956a649305c8e8f76b
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-07 20:16:17 +00:00
Eran Mitrani 36991b2217 mb/google/rex/variants/deku: Add I2C config
Add I2C config based on Deku schematics.
TPM is connected to I2C 4

BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Change-Id: I496e236531b2b59b320c77c36f542f4fa80a51a1
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78449
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 20:15:31 +00:00
Eran Mitrani c2c8519ae9 mb/google/rex/variants/deku: Add RAM id for MT62F2G32D4DS-026
Add RAM id for:
MT62F2G32D4DS-026 WT:B (Micron)

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

Change-Id: If2ed2bdcee44f6dbbda51a3ff484edaf3df4830d
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78445
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-07 20:14:43 +00:00
Yidi Lin eabdd0252a libpayload/libc/time: Fix possible overflow in multiplication
The value from raw_read_cntfrq_el0() could be large enough to cause
overflow when multiplied by USECS_PER_SEC. To prevent this, both
USECS_PER_SEC and hz can be reduced by dividing them by their GCD.

This patch also modifies the return type of `timer_hz()` from
`uint64_t` to `uint32_t`, assuming that in practice the timestamp
counter should never be that fast.

BUG=b:307790895
TEST=boot to kernel and check the timestamps from `cbmem`

Change-Id: Ia55532490651fcf47128b83a8554751f050bcc89
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78888
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 19:25:23 +00:00
Felix Held e91785dfd8 soc/amd/common,stoneyridge: drop invalid hda_soc_ssdt_quirks
Drop the hda_soc_ssdt_quirks function since it doesn't apply for any of
the SoCs supported by the Stoneyridge code which was the only SoC
implementing it. This code was added when commit 91a7abf25c
("soc/amd/hda: Move HDA PCI device from DSDT to SSDT") rewrote the code
originally added in commit 1587dc8a2b ("soc/amd/stoneyridge: Add
northbridge support") as a copy from northbridge/amd/pi/00670F00. This
code was moved around in commit 6580408a7e ("amd/pi/hudson: Move audio
to northbridge"), since the HDA controller was moved from the FCH to the
northbridge complex. When the controller was moved, the PCI config space
interface also changed, so those bits are no longer the DisableNoSnoop,
DisableNoSnoopOverride, and EnableNoSnoopRequest bits of the Misc
Control register of the HDA controller, but some bits within the
ClassCodeW field of the ACGAZ Mirrot Reg Ctrl 0 register.

BKDG #55072 Rev 3.04 (Stoneyridge), BKDG #50742 Rev 3.08 (family 15h
model 60h-6fh / 00670F00), and BKDG #52740 Rev 3.05 (family 16h model
30h-3fh) were used as a reference. Only the SoC with BKDG #52740 still
has the HDA controller in the FCH; the other two have it in the
northbridge.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I77fc76752b1c7de62ba8a196f15c198f55be3074
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78940
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 19:20:18 +00:00
Martin Roth a49e7b974d util/abuild: Add all builds to junit.xml files
The builds from the configs directory were not being saved in the
junit.xml files that Jenkins uses to determine pass vs fail of the
individual builds.

This also fixes the path to a log file that I noticed while testing.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I37dbee676cc9e507e612ce66994a04aba062757a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78863
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 18:03:31 +00:00
Patrick Georgi acbc491237 Revert "Kconfig: Bring HEAP_SIZE to a common, large value"
This reverts commit 44a48ce7a4.

Reason for revert: It breaks wakeup from suspend on a bunch of boards.

While this approach of eyeballing "correct" values by chipset _should_
be fixed, it should also be accompanied by compile time verification
that the memory map works out.

Since nobody seems to care enough, let's just revert this, instead of
keeping the tree broken for a bunch of configurations.

Change-Id: I3cd73b6ce8b15f06d3480a03ab472dcd444d7ccc
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78850
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-07 17:35:39 +00:00
Arthur Heymans ab5a9f9378 mb/google/rambi: Fix assumption that vboot runs after romstage
Now VBOOT is always assumed to run after romstage and be linked inside
romstage. This currently is the case but for flexibility reasons (e.g.
linking romstage into bootblock or having a verstage before romstage)
this could be more precise.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I361731c930a35e12245153920df1b6884d47064c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78938
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-07 17:26:30 +00:00
Arthur Heymans e8ce421069 mainboard/google/poppy: Use initialized data
A .data section now exists.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ic1510221582aca91c814d43f522a8fb6cba05921
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78937
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 17:23:51 +00:00
Arthur Heymans 2fba476a6e console.c: Enable gdb support in bootblock
This code was written in a romcc bootblock time. There is no reason why
it would not work in bootblock now.

Untested but expected to work.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I34812fbcd1222eceeb9870b9cbb7431ead63ce6a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78936
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-07 17:23:32 +00:00
Arthur Heymans d0cb97ef2e console/spkmodem: Make it work for bootblock
This code was written in a romcc bootblock time. There is no reason why
it would not work in bootblock now.

Untested but expected to work.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I4113dc3208fe15305d1132136dd33417dd086bfb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78935
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-07 17:23:02 +00:00
Arthur Heymans 91e6117c09 drivers/net/ne2k: Make it work for bootblock
This code was written in a romcc bootblock time. There is no reason why
it would not work in bootblock now.

Untested but expected to work.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I708e8a3b503eb3a7fdf6063803d666529096f651
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78934
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-07 17:22:33 +00:00
Martin Roth f9bc2c4699 vc/amd/opensil/genoa_poc/openSIL: Add openSIL code as submodule
This is a RW mirror of AMD's openSIL for Genoa with additions from
Arthur Heymans.

- origin/openSIL/main from
https://github.com/openSIL/openSIL.git

- origin/ArthurHeymans/64b_public from
https://github.com/ArthurHeymans/openSIL.git

The current main branch starts with Arthur's branch and adds 5 commits
from the AMD's openSIL repo.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I8917edf3a6a8493ffa9230902cafcc6234d3d571
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78187
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-07 08:37:42 +00:00
Shuo Liu b34b4bf0dd doc/soc/intel/xeon_sp: Add Xeon-SP coreboot community preview guide
The community preview branch for coreboot on latest Xeon Scalable
processor is opensource at:
https://review.coreboot.org/plugins/gitiles/intel-dev-pub/.

Change-Id: Ie2ffc1722a4a26d6039b6642efa95bf072d896ad
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78787
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2023-11-07 04:36:33 +00:00
Felix Held 49509473c7 soc/amd/genoa/chipset.dt: add UART device ops
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I9fc155fe76c05fefd4ce31ae6b96dcc4527b6abc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78901
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2023-11-06 19:06:43 +00:00
Felix Held 3eff900386 soc/amd/*/iomap: drop unused I2C_MASTER_START_INDEX definitions
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0eae9e4d246bd07f43b1d77e5ad7649c010d0efe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78899
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2023-11-06 19:06:28 +00:00
Felix Held 7881698338 soc/amd/common/block/i2c: add pre-processor guards for ACPI
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8dc93b12b81abee41f6f225f41d1f9953d1d93e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-11-06 10:50:10 +00:00
Felix Held 8585fd0872 soc/amd/genoa/include/iomap: add missing I2C and I3C MMIO bases
All base addresses of MMIO devices in the devicetree should also have
corresponding defines in iomap.h. PPR #55901 Rev 0.26 was used as a
reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0444e6cc0587b484a4a1ff49fa4b1540a24c8e80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78897
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-06 10:49:45 +00:00
Felix Held 7bd043eda5 soc/amd/genoa/devicetree: fix MMIO base addresses
The base addresses of I2C 5 and I3C 3 were wrong and all I3C controllers
should use the base address of the 4kiB block where all registers of
that I3C controller are located in. PPR #55901 Rev 0.26 was used as a
reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1c983d4a709000ef7963b96228322603b98728aa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78896
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-11-06 10:49:24 +00:00
Felix Singer 0fcdfcd7cb payloads/ipxe/Makefile: Use sed more properly
Instead of redirecting the output of sed into a temporary file and
copying it to its target then, just tell sed to do the replacements
in-place and don't let it create a backup of the original file. The
overhead is not needed.

Change-Id: I442616cd78098b653af5bd49bc7a4f021c99e081
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78924
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-06 02:58:33 +00:00
Matt DeVillier 66e346cad3 mb/google/poppy/var/nami: Fix SMBIOS name for Akali360
Remove space to improve compatibility with OS drivers and various
tools, and to be consistent with other device names with the 360
suffix.

TEST=build/boot Windows/Linux on Akali360, verify audio functional.

Change-Id: Ib9b909dba939f726e6fbe71f5b4956b432086029
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78876
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-04 17:11:41 +00:00
Yidi Lin 0285d67ae3 libpayload/libc/getopt_long: Use common GCD
TEST=emerge-geralt libpayload

Change-Id: Ib9dd1d2f658d4411c36d0198774819690686a393
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78887
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-04 17:09:36 +00:00
Yidi Lin 85d7809e0c arch/arm64/arch_timer: Fix possible overflow in multiplication
The value from raw_read_cntfrq_el0() could be large enough to cause
overflow when multiplied by USECS_PER_SEC. To prevent this, both
USECS_PER_SEC and tfreq can be reduced by dividing them by their GCD.

BUG=b:307790895
TEST=emerge-geralt coreboot
TEST=boot to kernel and check the timestamps from `cbmem`

Change-Id: I366667de05392913150414f0fa9058725be71c52
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78800
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-04 17:09:00 +00:00
Yidi Lin da1a0e891b soc/qualcomm/sc7280: Enlarge BOOTBLOCK to 44K
After CB:78800 applied, the bootblock increases 2128 bytes and exceeded
its allotted size (40K). Therefore, we enlarge BOOTBLOCK to 44K to solve
the compilation error. This patch also increases PRERAM_CBFS_CACHE to
103K to fill the empty space (1K) between TIMESTAMP and TTB.

BRANCH=none
BUG=none
TEST=./util/abuild/abuild -p none -t GOOGLE_HEROBRINE -x -a -B

Change-Id: Iae9d44939b29098e823508dd3965a1bae7a69041
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-11-04 17:07:57 +00:00
Yidi Lin 2751d2922f Use common GCD function
Change-Id: I30e4b02a9ca6a15c9bc4edcf4143ffa13a21a732
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78799
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-11-04 17:06:42 +00:00
Yidi Lin 909c317b2d commonlib: Add GCD function
Implement a simple GCD function.

BUG=b:307790895
TEST=emerge-geralt coreboot
TEST=make tests/commonlib/bsd/gcd-test

Change-Id: I21819cda4299b3809b8ca7a95cbdc6a87e4b3481
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78798
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-04 17:05:28 +00:00
Daniel Peng ed62dbaf67 mb/google/brya/var/marasov: Enable Wi-Fi sar table for Intel module
1.In contrast to the MediaTek Wi-Fi module, the Intel Wi-Fi module needs to load a SAR table.

2.Describe the FW_CONFIG probe for the settings on marasov.
- WIFI_SAR_ID_0 for MTK Wi-Fi module MT7921L
- WIFI_SAR_ID_1 for Intel Wi-Fi module AX211NGW

BUG=b:300045956
BRANCH=firmware-brya-14505.B
TEST=emerge-brya coreboot chromeos-bootimage

Change-Id: I5b5c6bea6c2c916fb682044218ec7b3a5d2659f6
Signed-off-by: Daniel Peng <Daniel_Peng@pegatron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77789
Reviewed-by: Daniel Peng <daniel_peng@pegatron.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-04 16:57:42 +00:00
Kane Chen 429c304725 soc/intel/meteorlake: Consolidate settings for enabling tracehub
To get tracehub working, it requires few settings such as
SOC_INTEL_METEORLAKE_DEBUG_CONSENT=2 and enable tracehub device in
dev tree. This commit binds all tracehub related settings to Kconfig,
so that users only need to enable SOC_INTEL_COMMON_BLOCK_TRACEHUB

TEST=boot on screebo and test tracehub device exists and working

Change-Id: Ie830fe2fd38e3456497bea37fe42ca60d26ca305
Signed-off-by: Kane Chen <kane.chen@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78648
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-04 16:56:48 +00:00
Yu-Ping Wu 22e0ffabeb mb/google/corsola: Enable FW_CONFIG and FW_CONFIG_SOURCE_CHROMEEC_CBI
Enable FW_CONFIG for corsola so that the information can be passed to
payloads via coreboot tables.

BUG=b:157692450
TEST=emerge-corsola coreboot
BRANCH=none

Change-Id: I6c12041d3666907c884f5a50a12c1433c2085961
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2023-11-04 04:29:34 +00:00
Matt DeVillier 277f36fc23 soc/intel/alderlake: Add missing min sleep state for DPTF device
Add an entry in the min_pci_sleep_states array for SA_DEVFN_DPTF,
to correct warning in cbmem log:
[WARN] unknown min d_state for PCI device 00:04.0

TEST=build/boot google/brya (banshee), verify warning not present in
cbmem log, verify entry for DPTF device in ACPI LPI constraint list.

Change-Id: I2a9976b065f08e4acd31c3deca13c5278f031a90
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78877
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>
2023-11-04 03:29:21 +00:00
Karthikeyan Ramasubramanian 93cf2f1344 soc/amd/mendocino: Conditionally select HAVE_FSP_LOGO_SUPPORT
Indicate FSP has support to display logo when graphics initialization is
done in FSP.

BUG=b:294055390
TEST=Build and boot to OS in Skyrim with and without passing the BMP
logo buffer from coreboot.

Change-Id: I6112c03723dcbc34cb0f57c400f831c765b95115
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78882
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-03 21:33:27 +00:00