Commit Graph

49851 Commits

Author SHA1 Message Date
Elyes Haouas d6317e738e mb/getac/p470: Use 'enum cb_err'
Change-Id: I9650fc672a94343472b44037f8a664d7d15aaf15
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-10-28 17:29:36 +00:00
Elyes Haouas 1733983d55 mb/getac/p470: Remove unused 'ec_oem_write()'
Change-Id: Ia955d8736f9b1835ad33ce43dfbbcd9b6a0a9db4
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68373
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-10-28 17:29:16 +00:00
Elyes Haouas 15ad9dd1b7 mb/getac/p470: Remove unused 'send_ec_oem_data_nowait()'
Change-Id: If68629f22803ebd61cd00b76b9e61822178325f9
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68372
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-10-28 17:29:10 +00:00
Michael Niewöhner 8eb7b35010 lint/checkpatch: consider leading + in the line length limit check
The line length limit in coreboot's coding style guidelines applies to
the final file, while checkpatch currently checks the patch line length.
Since patches´ lines start with a `+` (only added content is checked),
the line length being checked is one character longer than the actual
content.

Increase max_line_length by 1 to take this into account.

Change-Id: I8da45bb0d5fbe7d0e12c8b181cf01e5685186bf6
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68869
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
2022-10-28 15:57:06 +00:00
EricKY Cheng 8bed7ff2d9 mb/google/skyrim/var/winterhold:Generate RAM IDs for new memory parts
Update H58G56BK7BX068 and H58G66BK7BX067 support

BRANCH=None
BUG=b:243337816
TEST=emerge-skyrim coreboot

Signed-off-by: EricKY Cheng <ericky_cheng@compal.corp-partner.google.com>
Change-Id: I2aa6169c6e824318e738878f8cd19e76fcfd5713
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68642
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
2022-10-28 12:27:01 +00:00
Raihow Shi d825e479bd mb/google/brask/variants/moli: keep SAGV disable
Since there is not too many low power requirement for moli and it is doing FSI firmware qual, so it is not critical to enable the SAGV and keep SAGV disable.

BUG=b:254600066
TEST=emerge-brask coreboot

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I4115b35fed35b74a307b08f7a10ebced2309297f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68898
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-10-28 12:26:44 +00:00
EricKY Cheng 3a15fd1621 spd/lp5: Re-generate the SPD data
Re-generate Hynix H58G66BK7BX067 and H58G56BK7BX068 data
with current spd_tools.

BUG=b:243337816
BRANCH=None
TEST=util/spd_tools/bin/spd_gen spd/lp5/memory_parts.json lp5

Signed-off-by: EricKY Cheng <ericky_cheng@compal.corp-partner.google.com>
Change-Id: I19ae0477dea64f2cdd37b6aa51eadd6957c54059
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68873
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
2022-10-28 12:06:29 +00:00
Sridhar Siricilla 6552b99fc9 cpu/intel/common: Fix typecasting issue
The patch fixes the typecasting issue, that is conversion from 'int' to
'unsigned long long int'. This changes value from '0x8000 0000' to
'0xFFFF FFFF 8000 0000'.

During unit testing, the argument is getting changed to an unexpected
number which is resulting to an exception when IA32_HWP_REQUEST MSR is
updated. In this update, the MSR's reserved bits are getting updated, so
this causes exception.

TEST= Verified the code on the Gimble.
No exception is seen after the fix.

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I35d382c792b9df260381b7696f3bbff43d6c4dc2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68899
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-28 01:38:21 +00:00
Martin Roth 75a4a6a40e vc/amd/fsp: Add Glinda directory
Copied from Morgana - Needs to be updated.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Id3175e6e6b5c7210b7c29f30e21e5a66f234c52a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68867
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-27 22:22:16 +00:00
Paz Zcharya 64b502fab5 mb/google/brya: Update Crota's ELAN touchscreen delay to 150 ms
ELAN updated the datasheet of component 4599 (qualification 10511)
to version 0.6 (upload date: Oct 24, 2022), decreasing i2c delay
during power-on sequence from 300 ms to 150 ms.

BUG=b:232893949
TEST=Manually checked touchscreen works after reboot and suspend
(on kernel v5.10)

Signed-off-by: Paz Zcharya <pazz@google.com>
Change-Id: I17e1f7d419637f6dff4049484ce1836ad98017ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68868
Reviewed-by: Eran Mitrani <mitrani@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-10-27 21:01:04 +00:00
Kevin Chiu 8f585cef9b mb/google/brya/var/lisbon: use i2c1 for TPM for lisbon
This change sets DRIVER_TPM_I2C_BUS to the i2c 1 bus for TPM for the
lisbon variant.

BUG=b:246657849
TEST=FW_NAME=lisbon emerge-brask coreboot

Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Change-Id: I16be50258db2111d22f7465458873e92f44c7dac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68887
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-10-27 15:50:32 +00:00
Kevin Chiu e63049fc15 mb/google/brya: Update devicetree setting for lisbon
update devicetree setting per the schematic

BUG=b:246657849
TEST=emerge-brask coreboot

Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Change-Id: I4268a5b43690a22bb703337fed84b83c45da4ad2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68165
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-10-27 15:48:01 +00:00
Kevin Chiu 1be4bbc57a mb/google/brask/var/lisbon: Update gpio table
Based on latest schematic to update the gpio table.

BUG=b:246657849
TEST=FW_NAME=lisbon emerge-brask coreboot

Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Change-Id: I531f9ca9f6902d3318e99dadb58a811a4686a6e9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68280
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-10-27 15:47:19 +00:00
Zheng Bao acd3788bb8 mb/google/skyrim: Expand cbmem console buffer
Expand the size of cbmem console buffer from default value 0x20000 to
0x80000. Verified by running "cbmem -l" in Chromium OS shell.

localhost ~ # cbmem -l
CBMEM table of contents:
    NAME          ID           START      LENGTH
 0. FSP MEMORY  46535052  b97fe000   01000000
 1. CONSOLE     434f4e53  b977e000   00080000
 2. RW MCACHE   574d5346  b977d000   00000360
 3. RO MCACHE   524d5346  b977c000   00000f20
 4. FMAP        464d4150  b977b000   0000047c
 5. TIME STAMP  54494d45  b977a000   00000910
 6. VBOOT WORK  78007343  b9766000   00014000
 7. RAMSTAGE    9a357a9e  b9700000   00066000
 8. ACPI BERT   42455254  b96fc000   00004000
 9. CHROMEOS NVS        434e5653  b96fb000   00000f00
10. REFCODE     04efc0de  b96ab000   00050000
11. MEM INFO    494d454d  b96aa000   00000768
12. RAMOOPS     05430095  b95aa000   00100000
13. COREBOOT    43425442  b95a2000   00008000
14. ACPI        41435049  b957e000   00024000
15. TPM2 TCGLOG 54504d32  b956e000   00010000
16. SMBIOS      534d4254  b9566000   00008000
17. FSP RUNTIME 52505346  ba7febe0   00000004
18. POWER STATE 50535454  ba7feb80   00000060
19. ROMSTAGE    47545352  ba7feb60   00000004
20. EARLY DRAM USAGE    4544524d  ba7feb40   00000008
21. ACPI GNVS   474e5653  ba7feb20   00000020

BUG=246268888
TEST=Skyrim

Change-Id: I79205f31b4cc3276c1c213a171a6bf7e18d73a1c
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-27 15:46:59 +00:00
Elyes Haouas 1bb4f84202 console/post.c: Sort includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I3faa1baf41ff8f0447d18b131a9c9c225e9fc8a4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68202
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-27 15:46:39 +00:00
Jonathan Zhang 3b1eac5c04 cpu/x86/mp_init: adjust timeout for final SIPI
Adjust timeout for final SIPI to satisfy some to-be-launched
server processors.

Add a spew print to display how long it takes for the APs
to be ready. This is intended to facilitate only troubleshooting
and trend analysis.

Change-Id: Id958f18bdcb34d76df8aa443161123252524328e
Signed-off-by: Jonathan Zhang <jonzhang@meta.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68262
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-27 14:15:11 +00:00
Yu-Ping Wu b9a9dcd8d6 mb/lenovo/haswell: Enable VBOOT_VBNV_FLASH
To deprecate VBOOT_VBNV_CMOS [1], replace VBOOT_VBNV_CMOS with
VBOOT_VBNV_FLASH for Haswell.

Currently BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES is selected for
CPU_INTEL_HASWELL (see [2]). However, there seems to be no
particular reason on those platforms. Flashconsole works on Broadwell,
at least, and it writes to flash as early as bootblock. Therefore,
remove BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES, so that VBOOT_VBNV_FLASH
can be enabled.

[1] https://issuetracker.google.com/issues/235293589
[2] commit 6c2568f4f5 (CB:45740)
    drivers/spi: Add BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES config

BUG=b:235293589
TEST=./util/abuild/abuild -t LENOVO_THINKPAD_T440P -a (with VBOOT)

Change-Id: If1430ffd6115a0bc151cbe0632cda7fc5f6c26a6
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67540
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-10-27 13:39:08 +00:00
Subrata Banik 6526e78967 soc/intel/alderlake: Select X86_INIT_NEED_1_SIPI Kconfig for RPL
This patch helps to save 10.200ms of booting time without any issue
seen during MP Init. All cores are out from reset and alive.

Additionally, no performance degradation is observed while running
benchmarks.

Refer to Intel Technical White Paper number:751003 for more details.

BUG=b:211770003
TEST=Able to boot to ChromeOS with all cores are enabled.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I1886bc5e60c2f6bc1e2f9d3c8d9c11799d2b53c5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68901
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
2022-10-27 08:50:57 +00:00
Arthur Heymans 2f5025efed Revert "soc/intel/systemagent.c: Fix memory type reporting"
This reverts commit 9c2f3cc9d9.

This broke the smihandler for no clear reason on some platforms.

Change-Id: I72da99c019241b627ce8b543937364a53a5fe97b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68879
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2022-10-27 08:41:26 +00:00
Jan Samek 1ed0908282 mb/siemens/mc_apl2: Enable early POST through NC_FPGA
Enable early POST code output for this mainboard, using
the NC FPGA device on PCIe.

This requires the parent PCI bridge to be initialized early.

BUG=none
TEST=boot on siemens/mc_apl2 and observe whether the POST
codes coming from before FSP-M init are visible

Change-Id: Ice5fe26e11d0513e6bb0a20f1d8f0483d7b3dc6a
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68743
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-10-27 08:41:16 +00:00
Raymond Chung 40d3409dab mb/google/brya/gaelin: Change DDR4 from interleave to non-interleave
The brask DDR4 is set to interleave, due to the limited number of
gaelin PCB layers and the traces need to be smooth,
we will use non-interleave for gaelin DDR4.

BUG=b:255399229, b:249000573
BRANCH=firmware-brya-14505.B
TEST=Build "emerge-brask coreboot" and pass MRC memory training

Change-Id: I34413343e3f7c283f49fbbdd277d9da39c09f9f8
Signed-off-by: Raymond Chung <raymondchung@ami.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68806
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
2022-10-27 08:41:00 +00:00
Jakub Czapiga 7ec4671f81 Update vboot submodule to upstream main
Updating from commit id b827ddb9:
2022-09-01 06:37:33 +0000 - (tests: Ensure auxfw sync runs after EC sync)

to commit id 148e5b83:
2022-10-25 09:36:59 +0000 - (Makefile: Fix and simplify the RUNTEST test wrapper)

This brings in 28 new commits:
148e5b83 Makefile: Fix and simplify the RUNTEST test wrapper
a9c47c41 futility/cmd_show: set uninitialized variable
e18a6cda gscvd: presume GBB flags are zero when hashing the RO space contents
0b0aee9c gscvd: refactor discovering GBB in the image
ff1749cb futility: add option to save ro_gscvd section in a blob
84c65cd3 vboot_reference: Check OS/firmware mismatch and report to UMA
9a1be550 cmd_update: avoid variable name aliasing
d0f7fdf6 treewide: Fix copyrights and extra new lines at end of file
0ca75fd1 tpm_lite: Fix copyrights, line endings, extra new lines at end of file
4ca43a34 crossystem: arm: Retry if we fail to read a GPIO
f1a7efc0 futility: updater: Scan patch files for the signer_config manifest
64803227 futility: updater: Support patching GSCVD
2aa69d0c futility: Remove validate_rec_mrc command
0ca7a9e4 firmware: host: futility: Add CBFS metadata hash support
aaeb307f futility: Use ccd update mode for suzyq ti50
aa44b7cf vboot: gbb_flags_common should treat ccd_ti50 like ccd_cr50
ff8bb2d9 futility: Address double free
6a33a0fc treewide: Fix license headers to conform with linter
b2b4f767 DIR_METADATA: Add V2 Test Plans.
5346938c futility gscvd: add option to print out root key hash
5790c0aa gscvd: add support for reading ranges from the image
499e5743 gbb_flags_common.sh: Restore tmpfile cleanup trap
f3f9d2a6 scripts/OWNERS: Fix engeg email chromium -> google
ce620761 tests: Remove --allow-multiple-definition linker option
956c2efb futility: Skip picking apart an x86 kernel if has the EFI stub
9f2e9804 Avoid build failures on recent distros
62cc7885 subprocess: Log subprocess arguments when running
3bd35108 2api: Add a new entry point for only loading and verifying the kernel

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I9a16d6e02cee34140ec375ed6166f47560459140
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68540
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-27 04:34:25 +00:00
Meera Ravindranath 9e4488ab06 soc/intel/{adl,cmn}: Add/Remove LTR disqualification for UFS
a) Add LTR disqualification in D3 to ensure PMC ignores LTR
from UFS IP as it is infinite.
b) Remove LTR disqualification in _PS0 to ensure PMC stops
ignoring LTR from UFS IP during D3 exit.
c) Add Kconfig (SOC_INTEL_UFS_LTR_DISQUALIFY) check to apply
this LTR WA.

BUG=b:252975357
TEST=build and boot nirwen and see no issues in PLT runs

Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Change-Id: I88772b0b7dde1fca0130472a38628e72dfd6c26c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68251
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-10-27 00:34:35 +00:00
Subrata Banik a00db94270 soc/intel/{adl, cmn}: Allow config to select the OCP workaround
This patch introduces a config option for SoC code to choose
the applicable SoC workaround.

For now, we have introduced `SOC_INTEL_UFS_OCP_TIMER_DISABLE`
to apply UFS OCP timeout disable workaround.

At present ADL SoC only selects so, and in future MTL and others
should check with Intel prior selecting this kconfig.

It's the placeholder to add more workaround in required going forward.

BUG=none
TEST=Able to build and boot Google/Brya.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ia2364d2de9725256dfa2269f2feb3d892c52086a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68309
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-10-27 00:33:42 +00:00
Jason Glenesk bd12700be8 3rdparty/amd_blobs:Advance submodule pointer
This picks up the following changes:
  4ed38e55 glinda: add placeholder blobs
  6de2d3c2 mendocino: Add all blobs from PI 1.0.0.3

Change-Id: Ic2d024f9e5dcd73abed9123b6a6255fe0c28fd4a
Signed-off-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68870
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-27 00:04:05 +00:00
Felix Held df14a021d5 mb/google/guybrush,skyrim,zork: rework FCH IRQ mapping table generation
This ports the changes to the way the fch_pic_routing and
fch_apic_routing arrays get populated from Mandolin to Guybrush, Skyrim
and Zork. This is a preparation to move the init_tables implementation
to the common AMD SoC code in a later patch.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ie550238dfa0d4c7cebe849966d40fa0b1984a0f6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68850
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 23:57:04 +00:00
Felix Held 166932c5c0 mb/amd/bilby,birman,chausie,majolica: rework FCH IRQ mapping generation
This ports the changes to the way the fch_pic_routing and
fch_apic_routing arrays get populated from Mandolin to Bilby, Birman,
Chausie and Majolica. This is a preparation to move the init_tables
implementation to the common AMD SoC code in a later patch.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia957056b60dafbc52a9809a4563a348ad7443376
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68849
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 23:56:53 +00:00
Felix Held ec69bdcd2f mb/amd/mandolin: handle invalid intr_index values in init_tables
Make sure that the intr_index is valid to avoid out-of-bounds writes to
the fch_pic_routing and fch_apic_routing arrays.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I45ab115f3814b212243c4f6cf706daf77b6ff3b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68848
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 22:09:39 +00:00
Felix Held 3ad216be1d mb/amd/mandolin: introduce mb_get_fch_irq_mapping
Introduce mb_get_fch_irq_mapping to access the FCH IRQ routing mapping
information and use it in init_tables to get the mapping instead of
directly accessing the array's contents. This is a preparation to move
the init_tables implementation to the common AMD SoC code in a later
patch.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I9c39ea9de5ebbf70d2c5a87bfdfe270796548c5c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 22:09:27 +00:00
Felix Held 067f703329 mb/amd,google: unify fch_irq_routing struct instance name
Use the same fch_irq_map name in all mainboards using the Picasso,
Cezanne, Mendocino and Morgana instead of using a mainboard-specific
name.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I035cffb9c6c8afd6bd115831e8eed4a395e2a7fc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68846
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 22:09:07 +00:00
Felix Held ce934056df mb/google/guybrush,skyrim: add missing string.h include
string.h defines the memset function.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I286557d6ad83990bc101eaa930bde04345859c0b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68845
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 22:08:40 +00:00
Felix Held 711c0e5a54 mb/amd/bilby,mandolin: add missing string.h include
string.h defines the memset function.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I242a0382e7020681b6c3a25f75a2a91cbccbe815
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68844
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-10-26 22:08:24 +00:00
Robert Zieba b3b27f7dea soc/amd/mendocino: Enable GPP clk req disabling for disabled devices
Enable GPP clk req disabling for disabled PCIe devices. If a clk req
line is enabled for a PCIe device that is not actually present and
enabled then the L1SS could get confused and cause issues with
suspending the SoC.

BUG=b:250009974
TEST=Ran on skyrim proto device, verified that clk reqs are set
appropriately

Change-Id: I6c840f2fa3f9358f58c0386134d23511ff880248
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68139
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-10-26 22:02:32 +00:00
Robert Zieba 956432cbb7 soc/amd/cezanne: Update GPP clk req code to use ARRAY_SIZE
Currently the GPP clk req configuration code assumes that the size of
the config array is `GPP_CLK_OUTPUT_COUNT`. This commit changes that
code to use the `ARRAY_SIZE` macro instead.

BRANCH=guybrush
BUG=b:250009974
TEST=Ran on nipperkin device, verified that clk req settings are
correct.

Change-Id: I3ff555843c6f5aa38acd8300e0dc2da4e33fb4b7
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68866
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-10-26 22:01:47 +00:00
Robert Zieba 5a040d6662 soc/amd/cezanne: Factor out common GPP clk req code
Factor out the `gpp_dxio_update_clk_req_config` function as it will be
useful for other AMD SoCs.

BUG=b:250009974
TEST=Ran on nipperkin device, verified clk req settings match enabled
devices

Change-Id: I9a4c72d8e980993c76a1b128f17b65b0db972a03
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68138
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-10-26 22:01:21 +00:00
Felix Held bf26485d36 soc/amd/common/include: introduce and use FCH_IRQ_ROUTING_ENTRIES
Instead of using magic constants for the fch_pic_routing and
fch_apic_routing array sizes, define FCH_IRQ_ROUTING_ENTRIES in the
common code headers and use this definition. This also allows to drop
the static assert for the array sizes. In the Stoneyridge mainboard code
the equivalent arrays are named mainboard_picr_data and
mainboard_intr_data; also use FCH_IRQ_ROUTING_ENTRIES as fixed array
size there.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I2d7ee46bd013ce413189398a144e46ceac0c2a10
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68818
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-26 17:44:47 +00:00
Felix Held 886c1ffc65 mb/amd,google: move fch_irq_routing struct definition to soc/amd
Define the fch_irq_routing struct once in a common header file instead
of in every mainboard's code.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I11d9000b6ed7529e4afd7f6e8a7332c390da6dab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68817
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-26 17:44:33 +00:00
Karthikeyan Ramasubramanian a7b86c3362 mb/google/skyrim: Enable CBFS Verification
Enable RO verification by GSC and CBFS verification.

BUG=b:227809919
TEST=Build and boot to OS in Skyrim with CBFS verification enabled using
x86 verstage and PSP verstage.

Change-Id: Idd22a521a913705af0d2aca17acd1aa069a77f29
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66948
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-26 17:20:11 +00:00
Karthikeyan Ramasubramanian c672a72135 cbfs_verification: Remove dependency on VBOOT_STARTS_BEFORE_BOOTBLOCK
CBFS verification on boards where VBOOT starts before bootblock eg. PSP
verstage has been accommodated by keeping metadata hash outside the
bootblock. Hence the dependency can be removed.

BUG=b:227809919
TEST=Build and boot to OS in skyrim with CBFS verification enabled using
both x86 verstage and PSP verstage.

Change-Id: I0a3254728a51a8ee7d7782afcea15ea06d93da7d
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66947
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-26 17:19:22 +00:00
Karthikeyan Ramasubramanian 26aa7503a7 soc/amd/common/psp_verstage: Pass SRAM buffer to Crypto Engine
Crypto engine prefers the buffer from SRAM. CBFS verification may pass
the mapped address of a CBFS file from SPI flash. This causes PSP crypto
engine to return invalid address. Hence if the buffer is from SRAM, pass
it directly to crypto engine. Else copy into a temporary buffer before
passing it to crypto engine.

BUG=b🅱️227809919
TEST=Build and boot to OS in skyrim with CBFS verification enabled using
both x86 verstage and PSP verstage.

Change-Id: Ie9bc9e786f302e7938969c8093d5405b5a85b711
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68184
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-26 17:19:08 +00:00
Elyes Haouas 69451f17a1 src/drivers: Clean up includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ia40678019b2a54deb246dbfbf33ec37a8c3839e4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68206
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-26 16:38:45 +00:00
Elyes Haouas 04c3b5a016 src/device: Clean up includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Idd78271f2158bdc29ce9ac8d81f46ad8cbe84c5e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68205
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-26 16:38:11 +00:00
Elyes Haouas 45d3205ba5 cpu/x86: Clean up includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I01c6651079333686cb0eb68e89e56d7907868124
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-26 16:37:34 +00:00
Elyes Haouas deb5645644 cpu/intel: Clean up includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ie760711916c49d275ca49d94b9597fd24b5e7628
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-26 16:27:41 +00:00
Elyes Haouas 6a9ae29c05 src/commonlib: Clean up includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ieba5a5291209e50dc8b3816efb25bb5b2515fa6a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68201
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-26 16:27:10 +00:00
Elyes Haouas ae1ca82e87 arch/x86: Clean up includes
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Id2db229dec2ed44333faaa8c53f3a2f9d66d52e0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68200
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-10-26 16:26:31 +00:00
Karthikeyan Ramasubramanian d1130b7ec0 soc/amd/mendocino: Add GSVCD range
Add region/range of SPI ROM to be verified by Google Security Chip
(GSC).

BUG=b:227809919
TEST=Build and boot to OS in Skyrim with CBFS verification enabled.

Change-Id: If8a766d9a7ef26f94e3ab002a9384ba9d444dd1f
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-26 16:00:54 +00:00
Karthikeyan Ramasubramanian 0a0e7514bb soc/amd/mendocino: Update build rules for PSP BIOS image
Do not compress PSP BIOS image when CBFS verification is enabled.
Otherwise when a file is added to CBFS, cbfstool is not able to find the
metadata hash anchor magic in the compressed PSP BIOS image.

BUG=b:227809919
TEST=Build and boot to OS in Skyrim with CBFS verification enabled for
both x86 and PSP verstage.

Change-Id: Iaed888b81d14ede77132ff48abcfbeb138c01ce4
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-26 16:00:45 +00:00
Karthikeyan Ramasubramanian e30e4f5450 soc/amd/mendocino: Reserve more space for metadata
With CBFS verification enabled, CBFS file header + file name + metadata
consumes more than 64 bytes. Hence reserve additional space aligned to
the next 64 bytes.

BUG=b:227809919
TEST=Build and boot to OS in Skyrim with CBFS verification enabled.

Change-Id: I2b7346e2150835443425179048415f3b27d89d89
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66944
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-26 16:00:32 +00:00
Karthikeyan Ramasubramanian 8d66fb1a70 soc/amd: Add amdfw.rom in coreboot.pre
This change ensures that amdfw.rom binary containing metadata hash
anchor is added before any file is added to CBFS. This will allow to
verify all the CBFS files that are not excluded from verification.

BUG=b:227809919
TEST=Build and boot to OS in Skyrim with CBFS verification enabled using
x86 and PSP verstages.

Change-Id: Id4d1a2d8b145cbbbf2da27aa73b296c9c8a65209
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66943
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-10-26 16:00:10 +00:00