Commit Graph

54916 Commits

Author SHA1 Message Date
Martin Roth c7139f9d46 util/lint/kconfig_lint: Ignore C preprocessor macros in code
To see which Kconfig symbols are actually used, and to verify that
they're used correctly, kconfig_lint scans the C code. It gives an error
if it sees a CONFIG(symbol) where the symbol doesn't exist.

This creates a problem when a C preprocessor macro is created to match
multiple Kconfig symbols. The simple solution here is to just ignore
those C preprocessor macro definitions as beyond the scope of this
linter.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I5a20e8bb5a3e19e380802cba712d6dd3ff2f4dc0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78681
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-11-13 14:13:24 +00:00
Felix Held 6ac6f6a6d0 acpi/acpigen: point out what acpigen_write_len_f does
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibaf2f54f2f428f4438ef22b7f9d205db10e144db
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79001
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-11-13 14:10:33 +00:00
Varshit Pandya 291a14223a MAINTAINERS: Add Felix, Martin, Varshit for soc/amd/genoa
Change-Id: Ia368f390901424ef427eaefaa57acf2b6ae5d703
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78989
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-13 12:49:18 +00:00
Varshit Pandya 7927d03eaf MAINTAINERS: sort AMD SoC alphabetically
Change-Id: I0eaf94f7fb91a4b11dab2731a0b5d08aa85fd41e
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78988
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-13 12:49:02 +00:00
Varshit Pandya 06e0ca3a26 MAINTAINERS: Add Felix, Martin, Varshit for mb/amd/onyx
1. Split AMD mainboard between AMD server and AMD non-server SoC
2. Add maintainers for onyx mainboard

Change-Id: I94814da1c06d57cc63c9b968866570a812346fde
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78987
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-13 12:48:44 +00:00
Nico Huber 043f3397a9 tests/acpigen: Patch to allow moving buffers
When a package length needs to be written, we used to always
write three bytes for it, even when the length would fit into
one or two bytes. To allow such compact package lengths, we
have to move the written buffer data in case the length is
smaller. This makes tracking the start of nested buffers
harder, as they may be moved entirely later when a package
length is written. So instead of tracking start addresses in
test_acpigen_nested_ifs(), let's work with the generated AML
alone. In this lucky case, we can simply search for the `if`
operations.

Change-Id: Id8557dd5d1be3878713ee0b6106c3e0975665e97
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79008
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-13 12:48:15 +00:00
Maximilian Brune bd06a297d5 arch/riscv/ramstage.S: Add comments for passed arguments
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ib1af1359249008d9eba351271637748a7edcec26
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78966
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-13 11:09:39 +00:00
Yunlong Jia 7698ebe162 mb/google/nissa/var/gothrax: Add GPIO configuration
Add variant of LTE and WFC support on gothrax board.
We base decisions on the values within the firmware configuration
CBI field.
In fw_config settings, if the board move LTE and WFC modules,
the hardware GPP_A8/GPP_E13/GPP_F12/GPP_H19/GPP_H23/GPP_R6/GPP_R7
pins need to be deasserted.

BUG=b:303526071
TEST=emerge-nissa coreboot & \
Check against schematic.
Whether it works as expected under different SKUs.

Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
Change-Id: Ia8041bdc599509911bde95d6294314036e75b227
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78916
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-11-13 06:21:41 +00:00
Daniel Peng 9a01263952 spd/lp4x: Add SPD for CXDB4CBAM-ML-A in parts_spd_manifest.generated.txt
Generate initial SPD matched for CXMT CXDB4CBAM-ML-A.

BUG=b:304932936
TEST=make -C util/spd_tools
     util/spd_tools/bin/spd_gen spd/lp4x/memory_parts.json lp4x

Change-Id: Ia33a94a1784f865b4776ad9107e25e87420f944f
Signed-off-by: Daniel Peng <Daniel_Peng@pegatron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78891
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>
2023-11-13 06:16:55 +00:00
Martin Roth 162b6484ff util/docker/jenkins-node: Install pip modules into virtual env
Instead of installing the pip modules system-wide, and possibly causing
conflicts, install them into a virtual environment for the coreboot
user.

If we wanted to, in the future, we could install different versions of
the modules into different virtual environment directories to allow
for testing or anything else we needed.

Change-Id: I49c749a13a698bfb7af29bf07e42ac14b67b2ae7
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79006
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-12 04:53:44 +00:00
Martin Roth dbc33f9376 util/docker: change main branch back to master for encapsulate
The branch for the encapsulate tool accidentally got caught up in the
switch from master to main. The default branch for this tool has not
changed, so still needs to be referenced as master.

Change-Id: I0ff47308dcbf30888e4e88637bab63f20467307a
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79005
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-12 04:53:37 +00:00
Nico Huber 173922fc88 mainboards: Drop stale comment about enumerate_buses()
There is no enumerate_buses() today and also no trace of it in our
repository. Also, in current terms, mainboard_enable() is called
as the very first thing in our enumeration so the comment seems
misleading.

Change-Id: Iae620f83c8166c1cfc8b9fb9ef4a7025987bf1be
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79003
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-12 04:52:40 +00:00
Julius Werner 2a87ef1eca rockchip/rk3288: Reshuffle memlayout to make a bit more verstage space
RK3288 is bursting at the seams again. This patch reshuffles two more
kilobytes to verstage to make things fit a little better.

Change-Id: I5e7667061dce3d02441be83c0b8fb81500a1b1a3
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78970
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-11 16:26:14 +00:00
Matt DeVillier d4d40c64e1 acpi/acpigen: Fix buffer length in acpigen_write_name_unicode()
The buffer length is in bytes, and since we are converting from ASCII
to UTF-16, the value written needs to be 2x the string length + null
terminator.

TEST=build/boot google skyrim (frostflow), dump acpi and check bytecode
for correct buffer length preceding unicode strings.

Change-Id: Id322e3ff457ca1c92c55125224ca6cfab8762a84
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78977
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-11 15:12:21 +00:00
Felix Singer 238ff1e9c7 payloads/ipxe: Prefix iPXE options with "IPXE" instead "PXE"
Change-Id: Ieef433e9d6745c6243b4823c9a7f250d3c53ebcb
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78926
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-11 01:26:09 +00:00
Felix Singer 596c6f3a2e payloads/ipxe/Kconfig: Properly guard iPXE options
Guard multiple options depending on another with an if-block. It's not
needed to repeat the condition for every option.

This also cleans up the ordering of the options and groups all options
related to iPXE.

Change-Id: I9e74ab567f619a2d5c20c6c0282b37193d9ac01b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78925
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-11 01:25:57 +00:00
Felix Singer 8fa27fa693 mb/clevo/kbl-u: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: I51b3bca2421b64f73d4d3c0d9346a1416bf15f35
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78976
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-11 01:13:34 +00:00
Felix Singer 35a30de7af mb/amd/birman: Use common option for variant configuration
When a variant setup is used, checking for each variant in order to do
the mainboard configuration is quite painful. Thus, move the selects
from BOARD_SPECIFIC_OPTIONS, which is enabled by default when a variant
is chosen, out to a common option, which is disabled by default but
selected by the variants.

So in order to enter that config block, it's only needed to check if
that common option is enabled and not for each variant. It's also a very
common scheme now.

Change-Id: I4ed889ce78a0d7cd088e05d0f4b7fbbc89153860
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78975
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-11 01:13:25 +00:00
Felix Singer 3a36daf873 mb/amd/birman: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: I836c35e6bbfa77d536065a4237ef85a170df9fdb
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-11 01:13:20 +00:00
Michał Żygowski 628becd684 mainboard/msi/ms7e06: Remove FSP_TYPE_IOT
MSI PRO Z790-P is not an IoT platform. FSP_TYPE_IOT was selected only
temporarily to allow builds from public components. Now that Client FSP
is available, switch to it.

TEST=Build and boot MSI PRO Z790-P

Change-Id: Ic5d84e48d58c3454b83b9df5eb93076d2ebde000
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
2023-11-10 15:30:29 +00:00
Michał Żygowski 82d2d4f113 soc/intel/alderlake: Allow using FSP repo for all RPL-S platforms
The Client FSP for Raptor Lake-S is present on the Intel FSP repository,
so there is no need to restrict Raptor Lake-S FSP binary repository to
IoT only.

TEST=Build and boot MSI PRO Z790-P

Change-Id: I77aecd6e2d753732bf6358afe2c7ea0491348387
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78411
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-11-10 15:30:05 +00:00
Michał Żygowski 50014613d0 soc/alderlake: Fix order of defaults in FSP_HEADER_PATH
The combination of SOC_INTEL_RAPTORLAKE_PCH_S and FSP_TYPE_IOT is
currently broken. By default, e.g. for MSI PRO Z790-P, the
FSP_HEADER_PATH does not match the default FSP_FD_PATH. For headers
the client FSP is selected, while for the FD file, IoT FSP binary
is chosen. The order of default for both headers and FD file must be
the same to match the headers and binaries.

TEST=Build default MSI PRO Z790-P config and see that FSP_HEADER_PATH
matches FSP_FD_PATH FSP variant-wise.

Change-Id: I8db5ea10c2986ff8d3fa7d616b3f1617d05f0260
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78410
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-10 15:29:30 +00:00
Jeremy Compostella 47cb8b17ab soc/intel/meteorlake: Set DTT PCI device IRQ to INT_A/PIRQ_A
The Dynamic Tuning Technology (DTT) device IRQ is not programmable and
is INT_A/PIRQ_A (IRQ 16).

Reference: Meteor Lake U/H and U Type4 External Design Specification
External Design Document (657165)

TEST=Linux driver successfully uses IRQ 16 on rex. Without this patch
     it was binding IRQ 18 but interrupts were going to IRQ 16.

Change-Id: I2cbb9dd41f27c40a29346be325bb9c46d1061afb
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78953
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-10 15:28:47 +00:00
Mario Scheithauer 7c90cb72c1 mb/siemens/{mc_ehl3,mc_ehl5}: Fix GPIO settings for latest HW revision
With the latest hardware revision of both mainboards, native function
two of GPIO B23 (PCHHOT_N) is used for diagnostic purposes.

BUG=none
TEST=Checked output verbose GPIO debug messages

Change-Id: Ibe130b5d4c74576294183221765c5f4db9b5ec2a
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78962
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-10 15:28:20 +00:00
Felix Held bc6a690455 device/Kconfig: rename AZALIA_PLUGIN_SUPPORT to AZALIA_HDA_CODEC_SUPPORT
Rename AZALIA_PLUGIN_SUPPORT to AZALIA_HDA_CODEC_SUPPORT and add a help
text to this Kconfig option to clarify what this option is about.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I71e36869c6ebf77f43ca78f5e451aebfb59f1c74
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78986
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-11-10 15:27:58 +00:00
Martin Roth 6fd7f11225 src: Remove unnecessary semicolons from the end of macros
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ia005915a05d02725f77b52ccd7acebefaf25d058
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78964
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>
2023-11-10 15:27:45 +00:00
Eugene D. Myers d205cf7e4e cpu/x86/smm: Fix get_save_state calculation
When the SMI transfer monitor (STM) is configured, get_save_state
returns an incorrect pointer to the cpu save state because the size
(rounded up to 0x100) of the processor System Management Mode (SMM)
descriptor needs to be subtracted out in this case.

This patch addresses the issue identified in CB:76601, which means
that SMMSTOREv2 now works with the STM.

Thanks to Jeremy Compostella for suggesting this version of the patch.

Resolves: https://ticket.coreboot.org/issues/511

Change-Id: I0233c6d13bdffb3853845ac6ef25c066deaab747
Signed-off-by: Eugene D. Myers <edmyers@cyberpackventures.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78889
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-11-10 15:27:13 +00:00
zhourui 42f1fef5a6 mb/google/rex/var/screebo: Update DFP port
Update DFP port setting for retimer power GPIO

BUG=b:302428013
BRANCH=none
TEST=Retimer enumaration in NDA works.

Change-Id: Idc1a728ec4cbb66e776c2700025db41d85801c60
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78910
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-10 08:08:32 +00:00
Felix Singer 2954bd7941 mb/google/brya/Kconfig.name: Remove duplicate select
That select is duplicate to the ones in the Kconfig file, and it
shouldn't be there anyway. Remove it.

Change-Id: I1a940f034a69f72280d15ab9a0c9d83f8111910e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78973
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-10 06:16:56 +00:00
Shelley Chen b14b08790f mb/google/brox: Remove use of EC_IN_RW_OD GPIO
Later GSCs don't need a EC_IN_RW GPIO anymore, so removing the use of
this for get_ec_is_trusted().

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

Change-Id: I29f94969e9f2c1f239d9f9655f39b8410296f695
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78950
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2023-11-09 16:36:38 +00:00
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