Commit Graph

41792 Commits

Author SHA1 Message Date
Ian Feng 801f4cd951 mb/google/nissa/var/xivu: Add DPTF parameters for Xivu
The DPTF parameters were verified by the thermal team.

BUG=b:249446156
TEST=emerge-nissa coreboot chromeos-bootimage

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: Ic7e0c73815dd02b97d89f94fab09a241b6279830
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67944
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-10-02 22:03:19 +00:00
Kevin Chiu 5b4a914fdf mb/google/brya: Create lisbon variant
Create the lisbon variant of the brask reference board by copying
the template files to a new directory named for the variant.

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

BUG=b:246657849
BRANCH=None
TEST=util/abuild/abuild -p none -t google/brya -x -a
make sure the build includes GOOGLE_LISBON

Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Change-Id: Ia31752765657054b28ea16b046b63c38a72f95bf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67900
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
2022-10-02 22:02:50 +00:00
Sergii Dmytruk ef7dd5d54d drivers/ipmi: prepare for adding more interfaces
De-duplicate common initialization code (self-test and device
identification) and put it in a new ipmi_if.c unit, which is
supposed to work with any underlying IPMI interface.

Change-Id: Ia99da6fb63adb7bf556d3d6f7964b34831be8a2f
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2022-10-02 22:01:50 +00:00
Julius Werner 36d7f82d98 mrc_cache: Update metadata signature
CB:67670 recently changed the format of the MRC metadata header, but
left the signature the same. That kinda defeats the purpose of having a
signature which is to make a data structure recognizable (because now
the same signature can refer to two different structures that cannot be
otherwise distinguished). While we don't know of any use case where
anything other than coreboot currently parses this data structure (other
than a ChromeOS-internal utility that's about to be removed), it's
probably better to still switch to a different signature for the new
header format just to stay on the safe side (e.g. if we ever need to
start parsing this somewhere else in the future).

CB:67670 only landed a week ago so hopefully the old signature + new
format variant hasn't had much time to escape into the wild yet.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ic08b23862720db832a08dc4c6818894492f43cc3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68012
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-01 00:45:25 +00:00
Elyes Haouas cdf99a9b3e soc/rockchip/rk3288/clock.c: Remove trailing semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I0d03bd43b33570ee50f145ea6fd716c4072a11d9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67965
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-30 23:12:15 +00:00
Elyes Haouas fb0a751c76 soc/nvidia/tegra210: Remove trailing semicolons
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ibdbd9ae90aa9683f0381d1a2458f6918ce4c0faa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67967
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-30 23:12:01 +00:00
Elyes Haouas 7d030c7772 soc/nvidia/tegra124/sor.c: Remove trailing semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I9563a7f6d37937a4951c5053dcfee140579098e8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67968
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-30 23:11:40 +00:00
Elyes Haouas c9cacc0565 mb/google/oak/bootblock.c: Replace comma with semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I4721d24aecd53c51c66c7d448b7c331d50a09712
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67972
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-30 23:11:15 +00:00
Elyes Haouas 53ead5514f mb/google/gru/mainboard.c: Replace comma with semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ibc257c2306351614669bd25ac83c24475f80fc6b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67973
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-30 23:11:04 +00:00
Matt DeVillier 7fd9fed908 mb/google/skyrim: move EC switch selection from ChromeOS to Vboot
This is a vboot feature, not a ChromeOS one, and unless selected by
vboot, compilation will fail in the non-ChromeOS + vboot build case.

TEST=build/boot skyrim w/vboot, w/o ChromeOS

Change-Id: If9a5343907457bf3319f045262fdddf7eae2f1cb
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67995
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-30 22:12:35 +00:00
Matt DeVillier 6cd5595bba mb/google/guybrush: move EC switch selection from ChromeOS to Vboot
This is a vboot feature, not a ChromeOS one, and unless selected by
vboot, compilation will fail in the non-ChromeOS + vboot build case.

TEST=build/boot guybrush w/vboot, w/o ChromeOS

Change-Id: I3108bcc8dfeacd99c9f5d36bd915d590292fef00
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67994
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-30 22:12:25 +00:00
Himanshu Sahdev 542ac2f3f8 guybrush: mark RO_GSCVD area unused
This area relates to storing of AP RO verification information.
CONFIG_VBOOT_GSCVD is enabled by default for TPM_GOOGLE_TI50 and
guybrush is using TPM_GOOGLE_CR50.

Signed PSP verstage has the FMAP embedded. Since CB:67376 shifted the
RO section up by 8K, they were misaligned. Hence marking this area as
unused instead of removing the same to work around ChromeOS
infrastructure shortcoming.

Signed-off-by: Himanshu Sahdev <himanshu.sahdev@intel.com>
Change-Id: Id852e5b5c1f777992a96a75143757f4df8d975b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67901
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-30 17:58:47 +00:00
Lean Sheng Tan 2ddcf409c3 mb/prodrive/atlas: Add Kconfig option to enable SaGv
It turns out that one can use Kconfig options to specify values for
devicetree options, as long as the resulting expression is a compile
time constant. Use this to configure SaGv for Atlas: enable it by
default, but allow SaGv to be disabled manually for convenience when
testing. Enabling SaGv makes MRC train the RAM multiple times, which
takes a significant amount of time.

For further info on SAGV on ADL, please refer to Intel Doc 655258
(Alder Lake Datasheet) section 5.1.3.2.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Change-Id: I3c6ac25d414122c408f2348d12dba8dce909e567
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-30 16:51:00 +00:00
Lean Sheng Tan 1ec8f97782 soc/intel/adl: Add config option to enable FSP-S SATA test mode
For further info on SATA test mode, please refer to this doc:
https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/sata-mqst-setup-paper.pdf

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I6ef79fc5723348d5fd10b2ac0847191fa4f37f41
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67410
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-30 16:50:38 +00:00
Felix Held 2e785705f2 soc/amd/common/psp_verstage/fch: use [read,write]8p to avoid typecasts
Also add missing device/mmio.h include.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I03af0772c735cdc7a4e221770dc528724baa7523
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67983
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:50:03 +00:00
Felix Held b7a4a430c0 soc/amd/common/block/smbus/smbus: use [read,write]8p to avoid typecasts
Also add missing device/mmio.h include.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0f3f7ea36896c8e55c62acd93fe8fc4fb7c74b8a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67982
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:49:49 +00:00
Felix Held 51f60578bb soc/amd/common/block/spi/fch_spi_util: use [read,write][8,16,32]p
Also include arch/mmio via device/mmio.h and not directly to have the
[read,write][8,16,32]p helper functions available.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id8573217d3db5c9d9b042bf1a015366713d508c5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67981
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:49:43 +00:00
Felix Held 6f9e817bbf soc/amd/common/block/lpc/espi_util: use [read,write][8,16,32]p
Also include arch/mmio via device/mmio.h and not directly to have the
[read,write][8,16,32]p helper functions available.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I51c6f5c73b41546b304f16994d517ed15dbb555f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67980
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:49:33 +00:00
Felix Held 25866fe893 soc/amd/cezanne,mendocino,picasso/uart: use write16p to avoid typecasts
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6e743068dfcf9d393096f775759181af1a1c470d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67979
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:49:25 +00:00
Felix Held f69cb29c20 soc/amd/picasso/fch: use [read,write]8p to avoid typecasts
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8445f209e43366b43b9c4750bc5f074f6d4144aa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67978
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:49:18 +00:00
Felix Held 78ba98a797 soc/amd/stoneyridge/fch: use read[16,32]p to avoid typecasts
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6372741284ad5f0453f0d4dfd8ebaddd7385f8ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67977
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-30 14:49:07 +00:00
Tim Van Patten 73a0d0af64 mb/google/skyrim/Kconfig: Enable DPTC and No Battery Mode
Enable DPTC and No Battery Mode for Skyrim. This allows Skyrim to boot
without a battery or with a critically low battery.

DPTC remains disabled for the Winterhold and Morthal variants until it
can be tested on those boards.

BRANCH=none
BUG=b:217911928
TEST=Boot skyrim with low & no battery

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Icc4084476916cc8e142908d8e58baf7124568b8b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67211
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-30 13:19:43 +00:00
Reka Norman d9cb72559f mb/google/nissa: Change TPM I2C freqeuncy to 1 MHz
Change the TPM I2C freqeuncy to 1 MHz for nivviks and nereid, and in
the baseboard. Other nissa devices will be changed after verification.

This saves 11 ms of boot time on nivviks and nereid.

400 kHz:
504:finished TPM initialization                       272,304 (35,730)
...
512:finished TPM PCR extend                           526,250 (23,729)
513:starting locking TPM                              526,250 (0)
514:finished locking TPM                              535,106 (8,855)
  6:end of verified boot                              543,927 (8,821)

1 MHz:
504:finished TPM initialization                       266,293 (30,747)
...
512:finished TPM PCR extend                           513,711 (20,108)
513:starting locking TPM                              513,711 (0)
514:finished locking TPM                              521,311 (7,599)
  6:end of verified boot                              528,893 (7,581)

BUG=b:249201598
TEST=On nivviks and nereid, all timing requirements in the spec are met.
Frequencies:
nivviks - 972.01 kHz
nereid  - 968.99 kHz

Change-Id: I9dd783527d4215ed7d79d69853a1f321ea2d8a28
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67942
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-09-30 13:19:05 +00:00
V Sowmya a88d5e3bca mb/intel/adlrvp_n: Disable the External 1.05v VR in S0
Disable the external 1.05v VR in S0 as a fix for the
display flicker issue in ADL-N.
Please refer the Doc with ID 742988 for more details.

BUG=b:248249033, b:245970842
TEST=Verified that the display flicker issue is fixed.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: If9f40e6c37e80caceb726a8e5f4d4b14dc479858
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67654
Reviewed-by: Vidya Gopalakrishnan <vidya.gopalakrishnan@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-09-30 13:16:13 +00:00
V Sowmya 662bbcfe72 mb/google/nissa: Disable the External 1.05v VR in S0
Disable the external 1.05v VR in S0 as a fix for the
Display flicker issue in ADL-N.
Please refer the Doc with ID 742988 for more details.

BUG=b:248249033, b:245970842
TEST=Verified that the display flicker issue is fixed.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: Iaa53bfd99a550b2cffcdaee640ee3a429e93aef7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Vidya Gopalakrishnan <vidya.gopalakrishnan@intel.com>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-30 13:15:59 +00:00
Matt DeVillier fcfa4addd1 mb/google/guybrush: enable display backlight in ramstage
Commit c7204b5a4 [mb/google/guybrush: Enable backlight in the OS]
disabled the GPIO for the display backlight in favor of using ACPI
to enable it, but this breaks display output for payloads which do
not/can not enable the backlight GPIO themselves (edk2, grub, SeaBIOS).

Re-enable the GPIO for display backlight so that payloads other than
depthcharge work properly.

TEST=build/boot google/dewatt with Tianocore payload, verify payload
display visible.

Change-Id: I2519d779954ed89486045aa7de0b18f1c31a4374
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-09-30 13:15:22 +00:00
Michał Żygowski 283e5876b5 drivers/crb: Add SMBIOS hook to generate type 43 TPM Device
Example for Alder Lake PTT:

Handle 0x004C, DMI type 43, 31 bytes
TPM Device
	Vendor ID: INTC
	Specification Version: 2.0
	Firmware Revision: 600.18
	Description: Intel iTPM
	Characteristics:
		TPM Device characteristics not supported
	OEM-specific Information: 0x00000000

TEST=Execute dmidecode and see the type 43 is populated with PTT
on MSI PRO Z690-A WIFI DDR4

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I05289f98969bd431017aff1aa77be5806d6f1838
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-09-30 08:21:01 +00:00
Michał Żygowski e779523193 smbios: Add API to generate SMBIOS type 43 TPM Device
Based on DMTF SMBIOS Specification 3.1.0.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ia2db29f8bc4cfbc6648bb2cabad074d9ea583ca9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64048
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-09-30 08:20:23 +00:00
Elyes Haouas 7ac796c7b2 mb/ocp/{deltalake,tiogapass}: Replace comma with semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ie564d080955097b416943e772de6c62708ce5764
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67971
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-09-30 06:17:38 +00:00
Fabio Aiuto 45aae7f10f treewide: use is_enabled_cpu() on cycles over device list
use is_enabled_cpu() on cycles over device list to check
whether the current device is enabled cpu.

TEST: compile test and qemu run successfully with coreinfo
payload

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Change-Id: If64bd18f006b6f5fecef4f606c1df7d3a4d42883
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67797
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-29 16:47:04 +00:00
Fabio Aiuto c5573d62b7 include/device/path.h: use functions for enabled cpu selection
Add function defs and prototypes of functions checking whether
a device is {a cpu,an enabled cpu}

TEST: compile test and qemu executed successfully with
coreinfo payload

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Change-Id: Iabc0e59d604ae4572921518a8dad47dc3d149f81
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-29 16:46:41 +00:00
Elyes Haouas 712c70b357 nb/intel/i945/raminit.c: Use read32p()
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ic0361e5d928c24cfe7dc0a8b0385fbe73d906b15
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62365
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Petr Cvek <petrcvekcz@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-29 13:41:46 +00:00
Elyes HAOUAS 3cd00dbb3e arch/x86/idt.S: Use 'iretq' for ENV_X86_64
Fix the warning below when building GA-945GCM-S2L with 64-bit:
src/arch/x86/idt.S:216: Warning: no instruction mnemonic suffix given and no register operands; using default for `iret'

Change-Id: Ibbc106714e25293951a71d84fea0a660f41f9c02
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61336
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-29 13:41:06 +00:00
Subrata Banik 0d3e3f54c5 mb/google/rex: Enable EC SW Sync
This patch de-selects EC software sync config and enable early
EC Software Sync.

BUG=b:248775521
TEST=Able to perform EC sync on Google/Rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I6bf8018e8a3fd06bb98c82a27d12883fc8d3a5db
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67817
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-29 13:40:10 +00:00
Matt DeVillier cfec5ddc16 mb/google/skyrim: Rename pcie_gpio_table to romstage_gpio_table
Rename so table more indicative of when GPIOs are set, and so it can
be used for more than just setting PCIe GPIOs.

Rename the getter function to match.

Change-Id: I285602209072247895c2cb0830f3faf675328757
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67810
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-28 21:29:59 +00:00
Matt DeVillier 4236e2a23a mb/google/skyrim: rename baseboard GPIO table getter for clarity
Rename variant_base_gpio_table() to baseboard_gpio_table(), since the
GPIO table comes from the baseboard, and is overridden by a separate
table from the variant.

Drop the __weak qualifier as this function is not overridden.

Change-Id: Icebf7e11736929389227063039575a4c5ecf3840
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67809
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-28 21:28:59 +00:00
Daniel Kang 84656e15c9 mb/google/rex: Set up MIPI cameras via ACPI
This patch adds ACPI configurations of 8MP YHUX and 2MP CJFKF28-1
as world- and user-facing cameras of Rex.

BUG=b:246413264
TEST=Verified world- and user-facing cameras using Chrome Camera App on
Google/rex device.

Signed-off-by: Daniel Kang <daniel.h.kang@intel.com>
Change-Id: Iaaa16e491a66500606b3a9eb1d87f396641778e0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67085
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-28 16:13:26 +00:00
Elyes Haouas bdef1cdebd include/reg_script.h: Remove trailing semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ib2c1738b7b6a6db1fa57ea34fb50588388140a51
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67911
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-28 16:12:24 +00:00
Elyes Haouas 5899b0d2b9 include/memrange.h: Remove trailing semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ia0c4fd6d20c92caea379ef02e020ab9294ed0ffe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67910
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-28 16:12:04 +00:00
Shon Wang e30695dbe1 mb/google/brya/vell: Add PS1/PS2 cutoff point
According intel Doc#634254 and Doc#608715
PS2/PS1 cross point = 5
PS1/PS0 cross point = 10
PS2 cutoff = 1.4*(PS2/PS1 cross point) = 7

1.3 is better magnification, it obtain by test
PS1 cutoff = 1.3*(PS1/PS0 cross point) = 13

BUG=b:241850120
BRANCH=brya
TEST='FW_NAME=vell emerge-brya coreboot'

Change-Id: I83e9682004e2c3644ad4a5565e6ab85be48ba22f
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67394
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-09-28 15:10:00 +00:00
Ian Feng 738a385b66 mb/google/nissa/var/xivu: Disable CNVi WLAN/BT
Xivu uses PCIE WLAN, so disable the CNVi WLAN/BT.

BUG=b:247120749
TEST=Boot to OS on xivu and check that WLAN/BT still works.

Change-Id: I968d383278bd50268d899cff82067ceb7c3ba5ed
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67829
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Ben Kao <ben.kao@intel.com>
2022-09-28 15:09:46 +00:00
Matt DeVillier 52a22fa7e6 mb/google/octopus: rename baseboard GPIO table getter for clarity
Rename variant_base_gpio_table() to baseboard_gpio_table(), since the
GPIO table comes from the baseboard, and is overridden by a separate
table from the variant.

Drop the __weak qualifier as this function is not overridden.

Change-Id: I17db734784ce96cdf5e0486dc2ad057d73bfb15f
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67804
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-09-28 15:09:29 +00:00
Matt DeVillier bbf2706fb4 mb/google/octopus/ampton: Use variant_override_gpio_table
Rather than duplicating the entire set of GPIOs from the baseboard, use
the variant_override_gpio_table() method like all other octopus
variants do.

TEST=build/boot ampton, dump GPIOs and verify unchanged.

Change-Id: I36aa25bbee7c21a51d9fdd40405f492082455d9c
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67803
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-28 15:09:15 +00:00
Venkat Thogaru 209efccba6 sc7180: Update correct path of reset.h header file
Updated reset.h header file path and sorted alphabetically

BUG=b:236990316
TEST=Validated on qualcomm sc7180 development board.

Signed-off-by: Venkat Thogaru <quic_thogaru@quicinc.com>
Change-Id: Ibf92df160a6f8ba588310508812a5601e68a887e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67835
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Shelley Chen <shchen@google.com>
2022-09-27 23:13:27 +00:00
Nick Vaccaro 9bf8f6bd90 mb/google/brya/variant/brya0: Add two new memory parts
Add support for the following two new memory parts to support a new
SKU that has two memory options that brya0 does not have:
  MT53E2G32D4NQ-046 WT:C
  MT53E512M32D1NP-046 WT:B

BUG=b:248126749
TEST="emerge-brya coreboot chromeos-bootimage", flash a skolas with
an image-brya0.serial.bin and verify it boots successfully to kernel.

Change-Id: I28667918e5a183339febdc054465effeac8bddbe
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67879
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-27 21:52:41 +00:00
Angel Pons c6df44b959 ec/lenovo/h8: Add Kconfig option for Fn-Ctrl swap
Having to use a runtime configurable option backend like CMOS just to
specify the value of the "fn_ctrl_swap" option is annoying. Introduce
a new Kconfig option to allow specifying the fallback value, which is
only used when the option backend cannot provide a value.

Change-Id: I00bb3cd60c443fc0c8adb82e8e0c436dfc5de24b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67836
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-27 16:19:09 +00:00
Matt DeVillier acc91c335b mb/google/dedede: rename baseboard GPIO table getter for clarity
Rename variant_base_gpio_table() to baseboard_gpio_table(), since the
GPIO table comes from the baseboard, and is overridden by a separate
table from the variant.

Drop the __weak qualifier as this function is not overridden.

Change-Id: I11814016d654bc2c2e6d24b3d18fb30d5b843fe9
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67805
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-27 15:16:49 +00:00
Matt DeVillier 6b8728f3ad mb/google/volteer: rename baseboard GPIO table getter for clarity
Rename variant_base_gpio_table() to baseboard_gpio_table(), since the
GPIO table comes from the baseboard, and is overridden by a separate
table from the variant.

Drop the __weak qualifier as this function is not overridden.

Change-Id: Id1e1a67608454466dc65bf4c4985cf4eba84c97d
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67807
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-27 15:16:15 +00:00
Matt DeVillier 2f4b31f5a0 mb/google/guybrush: rename baseboard GPIO table getter for clarity
Rename variant_base_gpio_table() to baseboard_gpio_table(), since the
GPIO table comes from the baseboard, and is overridden by a separate
table from the variant.

Drop the __weak qualifier as this function is not overridden.

Change-Id: Ib8439e664defeafd2d08cffb74c997ab69230231
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67806
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-27 15:15:51 +00:00
Matt DeVillier 4a16be91dd mb/google/zork: rename baseboard GPIO table getter for clarity
Rename variant_base_gpio_table() to baseboard_gpio_table(), since the
GPIO table comes from the baseboard, and is overridden by a separate
table from the variant.

Drop the __weak qualifier as this function is not overridden.

Change-Id: Iaa3c9404919fd6c43596d7b27cfab43a1a5b0b21
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67808
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-27 15:15:39 +00:00
Fabio Aiuto fdcf698a89 acpi/acpi_pm.c: refactor acpi_pm_state_for_* functions
Use just one function to get the chipset powerstate and add an argument
to specify the powerstate claimer {RTC,ELOG,WAKE} and adjust the
failure log accordingly.

TEST: compile tested and qemu emulation successfully run

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Change-Id: I8addc0b05f9e360afc52091c4bb731341d7213cf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67618
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-27 14:19:01 +00:00
V Sowmya e6d6d3620e drivers/intel/mipi_camera: Remove IPU ES support entry for ADL-N
The current IPU ES entry value is always set to true for ADL-N and
kernel picks the ES version of the main IPU FW even for the production
bootloader but loading is not successful due to the authentication
failure.

Alderlake-N silicon has the same CPU id for all the SKU's and
also the production binaries are backward compatible with ES parts.
This change removes the IPU ES support ACPI entry since the
kernel needs to load the production IPU main firmware on both the
ES/QS parts.

BUG=b:248249032
TEST=Verify the Camera functionality by enabling the IPU secure mode
on ADL-N variants with both ES/QS silicon.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: I75b222e6f2b1ccdc5b6c448eb60afff3c1da3a8b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67813
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-09-27 14:18:27 +00:00
zhaojohn ff69f5cb3f mb/google/rex: Allocate resources for PCIe TBT root port
This patch selects the SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES to allocate
TBT/USB4 root port resources for PCIe tunneling.

BUG=b:248328015
TEST=Built image and verified TBT/USB4 tunneling functions on Rex.

Change-Id: I69f4d26bb7b3d74dbda068add284a69f1bbeff40
Signed-off-by: zhaojohn <john.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67781
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-09-26 14:23:09 +00:00
Tim Wawrzynczak 72bae5b9bd mb/google/brya/var/agah: Explicitly program GPP_H13 in ramstage
In order that GPP_H13 not use the GPIO override programming from its
baseboard (brya), explicitly program GPP_H13 to a output HIGH instead
of relying on the 20K pullup from the baseboard.

BUG=b:240617195
TEST=SSD still functional

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Iddedebe2d5cfc0123932b14980d1268bcb147703
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-26 14:21:37 +00:00
Tim Wawrzynczak 25cc4a210d mb/google/brya/var/agah: Update PEXVDD enable GPIO for next board rev
The next rev of this board will move the dGPU PEXVDD enable pin from
GPP_E10 to GPP_F12. This patch handles both the old and newer revisions
by using an ACPI Name to hold the GPIO # for PEXVDD enable. It also
cleans up the GPIO handling a little bit between board revs.

BUG=b:242752623
TEST=dGPU is functional and power sequencing tests still pass on board
rev 2

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Icc7968777f86ab07561b0a861b7d22ec714d1c34
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67765
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-26 14:21:18 +00:00
Ricardo Ribalda e7b54bfc36 mb/google/brya/var/banshee: Remove privacy_gpio
On Banshee, when the privacy switch is toggled the camera is
disconnected. Which means that we will never be able to tell the user
that the privacy switch is enabled when the camera is on, making the
virtual control unusable.

Remove the description.

BUG=b:248219472
BRANCH=firmware-brya-14505.B
TEST=none

Change-Id: I1a241bd889c0c1aae039510a0620748b2f7a6806
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67773
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-26 14:19:51 +00:00
EricKY Cheng 849d57a8e6 mb/google/skyrim/var/winterhold: Bug fix, modify GXTP7863 irq setting
Modify GXTP7863 generic.irq to generic.irq_gpio.

BUG=b:245082617
TEST=emerge-skyrim coreboot

Signed-off-by: EricKY Cheng <ericky_cheng@compal.corp-partner.google.com>
Change-Id: Iaf6cc6010132d5b33b06909ceb1069115a911b48
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67771
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-09-26 14:19:06 +00:00
Selma Bensaid eb1725971a vendorcode/intel/fsp: Add Raptor Lake FSP headers for FSP v3361_03
The headers added are generated as per FSP v3361.03

In the future, when Alder Lake and Raptor Lake fsp align, Raptor Lake
fsp headers can be deleted and Raptor Lake soc will also use headers
from alderlake/ folder.

BUG=b:247855492
BRANCH=firmware-brya-14505.B
TEST=Boot to OS

Signed-off-by: Selma Bensaid <selma.bensaid@intel.com>
Change-Id: I267a0aefca18492bcbcfbf7acbe271887f0a39cf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67748
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2022-09-26 14:18:31 +00:00
Runyang Chen ff7ac271c0 soc/mediatek/mt8186: Allow SCP to access H264 encoder
Issue:
Camera APP is not functional after CB:67434 applied.

Root cause and solution:
SCP hardware needs to access H264 encoder registers, so we need to
remove the DEVAPC protection of H264 encoder for SCP.

BUG=b:247743696
TEST=camera APP is functional.

Signed-off-by: Runyang Chen <runyang.chen@mediatek.corp-partner.google.com>
Change-Id: I95946346018bff6a8f2dc02b1ff3e24ad079fc90
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67787
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-09-26 14:18:18 +00:00
Subrata Banik 9122d67a24 Revert "mb/google/rex: Create 64MB AP Firmware binary for Proto 0"
This reverts commit 1a8eb6c021.

Reason for revert: migrating to the 32MB AP Firmware hence, need to
revert this CL.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ibea1ad0cff008f9391cbda9e51899557b1e9c979
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67282
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2022-09-26 05:32:54 +00:00
Felix Held 4e04776a1b cpu/x86/smm/smihandler: use lapicid()
Replace nodeid() function in cpu/x86/smm/smihandler.c with calling
lapicid() from include/cpu/x86/lapic.h.

TEST=Timeless build for lenovo/g505s which includes this file in the
build results in identical firmware image.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I336ca9888e24e4d6f10a81cc4f3760c9d7c8f4bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-24 19:39:26 +00:00
Felix Held a0405b84ca cpu/x86/mp_init: drop unused MAX_APIC_IDS define
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I599e26a40ab584232614440612e95c91a698df27
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67775
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-24 19:39:05 +00:00
Felix Held 9b2d1d8f61 include/cpu/x86/mtrr: define NUM_FIXED_MTRRS once in mtrr.h
Instead of defining NUM_FIXED_MTRRS in both cpu/x86/mp_init.h and
cpu/x86/mtrr/mtrr.c in two different ways that will evaluate to the same
value, define it once in include/cpu/x86/mtrr.h which is included in
both C files.

TEST=Timeless build for amd/mandolin results in identical firmware image

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I71cec61e22f5ce76baef21344c7427be29f193f8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67774
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-24 19:38:44 +00:00
Reka Norman ee63b44c47 drivers/mrc_cache: Compare hashes instead of full data
The current MRC cache update process is slow (28 ms on nissa), because
cbmem is not cached in romstage. Specifically, the new MRC data returned
by the FSP is stored in the FSP reserved memory in cbmem, so operations
on the new data (computing the checksum, comparing to the old data) are
slow.

Replace the data checksum in the MRC header with a hash, and compare
hashes instead of comparing the full data. This has two benefits:
1. The xxhash function is faster than computing an IP checksum (4 ms vs
   14 ms on uncached data on nissa).
2. There's no need to memcmp() the full MRC data, which takes 14 ms on
   nissa.

Before:
550:starting to load ChromeOS VPD                     867,930 (4,664)
  3:after RAM initialization                          896,020 (28,090)
  4:end of romstage                                   906,274 (10,254)

After:
550:starting to load ChromeOS VPD                     864,820 (4,649)
  3:after RAM initialization                          869,652 (4,831)
  4:end of romstage                                   879,909 (10,257)

BUG=b:242667207
TEST=Check that MRC caching still works as expected on nissa. Corrupt
the MRC cache and check that memory is retrained.

Change-Id: I1b7848d1d05e555b61e0f1cb605550dfe3449c6d
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67670
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-24 01:23:09 +00:00
Eddie Vas 1df1cf994a commonlib/fsp_relocate: add PE32 section support
Recently published Intel CedarIslandFSP binary contains PE images in
FSP-M and FSP-S. This causes coreboot boot hang on DeltaLake servers.
PI spec PI_Spec_1_7_final_Jan_2019 on uefi.org talks about FV files
requiring to support SECTION_PE32 sections and FSP specification
states that FSP images are created in alignment with PI specification.

FSP images are relocated at build time and run time using the func
fsp_component_relocate. That code only supported TE image relocation
so far.

The change required to add support for pe_relocate in fsp-relocate.c
I had to move a few functions to top of file as they need to be used
by pe_relocate but were placed below the te_relocate function. I chose
to place pe_relocate function next to te_relocate.
The code supports PE32 format, not PE32+, at this time.

Links for PE and FSP specs are provided below for reference.

Link= https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/fsp-architecture-spec-v2.pdf
Link= https://uefi.org/sites/default/files/resources/PI_Spec_1_7_final_Jan_2019.pdf

TESTED=
This code is tested with FSP version 33A for DeltaLake boot which has
FSP-M and FSP-S as PE32 sections. This FSP version does not boot on
DeltaLake without this change.

Change-Id: I01e2c123d74f735a647b994aa66419c9796f193e
Signed-off-by: Eddie Sharma <aeddiesharma@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66819
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nathaniel L Desimone <nathaniel.l.desimone@intel.com>
2022-09-24 01:19:13 +00:00
Felix Held 1f5c5da812 cpu/x86/smm/smihandler: use existing LAPIC ID register definition
Instead of redefining the register address in smihandler.c, use the
existing definitions from include/cpu/x86/lapic_def.h.

TEST=Timeless build for lenovo/g505s which includes this file in the
build results in identical firmware image.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id22f9b5ce53c7bced6bbcc3f5026d4c793b34f78
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67776
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-23 20:25:31 +00:00
Fred Reitberger 3c705fa35d lib/timer_queue.c: Fix function signature
The timer_sched_callback function signature was changed in timer.h as
part of commit d522f38c7b (timer: Change
timer util functions to 64-bit) but the implementation was not updated
to match.

TEST=Enable timer queue and build

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: Ie00b027790131f42bd79fbc6ea400a056e67949b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67767
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-23 17:34:30 +00:00
Jon Murphy 70daaf4be0 src/mb/skyrim: Rename Sabrina to Mendocino
'Mendocino' was an embargoed name and could previously not be used.
Update references for consistency with the correct naming convention.

BUG=b:245727030
TEST=builds and boots to kernel

Cq-Depend: chrome-internal:4878294
Cq-Depend: chromium:3763392
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: Ic0248a872dfc92486658aa9bd92bed755dbf59d4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67750
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-09-23 16:58:54 +00:00
Karthikeyan Ramasubramanian 35aa4355c4 soc/amd/mendocino: Add svc_set_fw_hash_table
Add new PSP svc call to pass psp firmware hash table to the PSP.
psp_verstage will verify hash table and then pass them to the PSP.
The PSP will check if signed firmware contents match these hashes.
This will prevent anyone replacing signed firmware in the RW region.

BUG=b:203597980
TEST=Build and boot to OS in Skyrim.

Change-Id: I512d359967eae925098973e90250111d6f59dd39
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67259
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-23 14:55:21 +00:00
Elyes Haouas aae7d4d5c8 mb/{google,intel}/*/ec: Decrease loglevel of init messages to BIOS_INFO
BIOS_ERR is inappropriate since the init message is informational.
Use BIOS_INFO instead.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I6fc15291a6d177a1b9e258d08e165224e5e10b32
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67733
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-23 14:38:38 +00:00
Raihow Shi 8993fc82ff mb/google/brask/variants/moli: update emmc_rtd3 enable gpio pin
EN_PP3300_EMMC has be changed to GPP_A21 for DP++ and it based on Moli GPIO Table_20220803.xlsx, so update enable_gpio for emmc_rtd3 by board_ver.

BUG=b:241370405
TEST=emerge-brask coreboot

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I129706861fd1fcf061371ce94352331ef44359d9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67736
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-23 14:37:41 +00:00
Jan Samek 1bff742c12 mb/siemens/mc_apl7: Enable libgfxinit for the board
Add the gma-mainboard.ads for display output definition and enable the
libgfxinit usage in mainboard Kconfig.

Change-Id: I7e7a44736a8136b5320821e744134c7d64c7f1b4
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67683
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 18:36:13 +00:00
Sean Rhodes 9a3e9a495c soc/common/lockdown: Guard sa_lock_pam
Guard sa_lock_pam with PAM0_REGISTER so it doesn't run on platforms
that don't select this.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I5055d09c634851e9f869ab0b67a7bcab130f928c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66492
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 18:35:31 +00:00
Sean Rhodes 026f00476e soc/intel/common/pch: Add a block specific to Apollo Lake
Add SOC_INTEL_COMMON_PCH_CLIENT which is specific to Apollo
Lake. This is used to select the options that Apollo Lake
requires, without the ones specific to a PCH as Apollo Lake
doesn't have a PCH.

This change also enables SOC_INTEL_COMMON_PCH_LOCKDOWN for
Apollo Lake.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I084a05f904a19f3b7e9a071636659670aa45bf3c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-22 18:34:33 +00:00
Ritul Guru 80503e3c54 soc/amd/picasso: Add support for PSP NVRAM base addr and size
Signed-off-by: Ritul Guru <ritul.bits@gmail.com>
Change-Id: I07d5aaac9c05986e8a952c7e670d002d864e18d7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67170
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 17:11:13 +00:00
Tim Wawrzynczak 6f95cb50c5 mb/google/brya/var/agah: Explictly program the dGPU's PCI IRQ
Currently the `pch_pirq_init()` function in lpc_lib.c will program
PIRQ IRQs for all PCI devices discovered during enumeration. This
may not be correct for all devices, and causes strange behavior
with the Nvidia dGPU; it will start out with IRQ 11 and then after
a suspend/resume cycle, it will get programmed back to 16, so the
Linux kernel must be doing some IRQ sanitization at some point.
To fix this anomaly, explicitly program the IRQ to 16 (which we
know is what IRQ it will eventually take).

BUG=b:243972575
TEST=`lspci -vvv -s1:00.0|grep IRQ` shows IRQ 16 is programmed
at boot and stays consistent after suspend/resume.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I66ca3701c4c2fe5359621023b1fd45f8afd3b745
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67746
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 15:54:17 +00:00
Tim Wawrzynczak 0eba73228f mb/google/brya/acpi: Don't clear GC6 flag after GC6 entry
According to Nvidia, the GC6 flag (DFEN) should not get cleared after
a successful GC6 entry; the kernel driver will not re-inform ACPI
that the exit should be GC6 exit as well.

BUG=b:243888246
BRANCH=brya
TEST=tested by Nvidia

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I220795928d03f269de48278ea0ab57de7253fad5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67745
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 15:54:00 +00:00
Matt DeVillier 45b1da33c8 mb/google/hatch: split up hatch and puff baseboards
The hatch and puff baseboards have diverged enough to where it makes
more sense to split them into separate boards. Copy the mb/google/hatch
directory into a new dir 'puff' and strip out all boards and items
related to the hatch baseboard. Remove all puff-related items from the
original hatch directory. Clean up and alphabetize Kconfig selections.

Test: build and boot akemi hatch variant and wyvern puff variant.

Change-Id: I8c7350f3afcff3ddefc6fa14054a3f9257568cd3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62970
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 15:35:19 +00:00
Werner Zeh 826b45b69b common/block/fast_spi: Add extended BIOS window as reserved region
The fast SPI driver reports the BIOS window as reserved so that the OS
is aware of this region. Now that platforms which supports an extended
BIOS window are added to this driver, add the extended range as reserved
as well if it is enabled. And since this is now handled in the SPI
driver itself, remove the extended BIOS region reporting from
common systemagent code.

Change-Id: Ib5c735bffcb389be07c876d7b5b2d88c545a0b03
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67529
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-09-22 15:34:29 +00:00
Werner Zeh 777099046f soc/intel/spi: Move BIOS flash SPI controllers to fast SPI driver
There are two classes of SPI controllers on Intel chipsets:
 * generic usable SPI controllers
 * SPI controller hosting the BIOS flash (fast SPI controller)

While the first class can be used for generic peripheral attachment the
second class mostly controls the BIOS flash and a TPM device (if
enabled). The generic SPI driver is not fully applicable to the fast SPI
controller. In addition, the fast SPI controller reports the reserved
MMIO range used for the BIOS flash mapping so that the OS is aware of
this range.

This patch moves the fast SPI controller of all known SoCs to the
fast SPI driver in common code. In addition, the PCI device for the
fast SPI controller is removed from the function 'spi_soc_devfn_to_bus'
as this is a callback of the generic SPI driver.

Change-Id: Ia881c1d274acdcf7f042dd8284048a7dd018a84b
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67173
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-22 15:34:24 +00:00
Srinidhi N Kaushik 3083f359c8 vc/intel/fsp/mtl: Update header files from 2304_01 to 2344_00
Update header files for FSP for Meteor Lake platform to
version 2344_00, previous version being 2304_01.

FSPM:
1. Address offset changes

FSPS:
1. Deprecated CstateLatencyControlTimeUnit UPDs
2. Deprecated HybridStorageMode
3.Address offset changes

BUG=b:245167089
TEST=emerge-rex intel-mtlfsp

Signed-off-by: Srinidhi N Kaushik <srinidhi.n.kaushik@intel.com>
Change-Id: Iaee5c66811c340d12921ff9247461df36de4739a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67429
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-09-22 15:15:37 +00:00
Jan Samek 9c7c6baeb7 mb/siemens/mc_apl7/Kconfig: Enable PTN3460 early init
Enable early initialization of the PTN3460 DP-to-LVDS bridge on this
board in order to allow showing the bootsplash screen at coreboot
runtime.

Change-Id: Ib1b727cef5fb8bea2d6d6c9896ad0107caeea51a
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67682
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 15:15:08 +00:00
Jan Samek 669184434a drivers/i2c/ptn3460: Add early init option
Create Kconfig options and boot state machine callback in ramstage for
an early initialization of the PTN3460 DP-to-LVDS bridge. This allows
showing the bootsplash screen on mainboards utilizing this chip during
the PCI device enumeration.

BUG=none
TEST=Select PTN3460_EARLY_INIT config switch in mainboard Kconfig and
check the log for "Attempting PTN3460 early init" message. If the
board (e.g. siemens/mc_apl7 in this case) is also configured for
showing the bootsplash logo, it should be now visible.

Change-Id: I5424d062b3fb63c78cfced3971376353be11c504
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67681
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 15:14:57 +00:00
Yu-Ping Wu 514277f746 mb/google/cherry: Initialize PCIe by SKU encoding
All cherry boards (tomato, dojo) share the same SKU ID encoding, in the
sense that a device has NVMe storage if and only if the BIT(1) of SKU ID
is set (otherwise eMMC). Therefore, instead of hard coding the list of
NVMe (PCIe) SKU IDs, we check the BIT(1) to decide whether to initialize
PCIe.

In addition, in preparation for UFS devices coming in the future,
reserve BIT(3) (which is unset for all of current SKUs) for them.

BUG=b:237953117, b:233327674
TEST=emerge-cherry coreboot
BRANCH=cherry

Change-Id: I9b30338645a87f29f96a249808b90f1ec16f82df
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66580
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2022-09-22 15:14:40 +00:00
Eugene Myers a19ff6dea3 cpu/x86/smm/smm_module_loader.c: Fix STM setup
CB:63475 inadvertently disabled the STM by moving its load point
off of the MSEG boundry, which is a hardware requirement. In
addition, the BIOS resource list cannot be located within the
MSEG.  This patch fixes the issue by moving the STM load point
to the MSEG boundry and placing the bios resource list just below
the MSEG where the STM setup functions can find it.

Fixes: commit 5747f6c (cpu/x86/smm_module_loader.c Rewrite setup)
Signed-off-by: Eugene Myers <edmyers@tycho.nsa.gov>
Change-Id: I7359939063bb1a172fcb701551c099edebfbedd5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67665
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Eugene Myers <cedarhouse1@comcast.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 15:14:30 +00:00
Liju-Clr Chen a8172c329f soc/mediatek/mt8188: Allow CPUfreq hardware to access MCUPM registers
This patch fixes AP hanging issue caused by the handshaking between
MCUPM and CPUfreq driver.

CPUfreq hardware failed to read MCUPM registers due to DEVAPC
permission. Therefore, update the DEVAPC settings to fix this issue.

BUG=none
TEST=CPUfreq in kernel test pass.

Change-Id: I6b30b01fc0be052182599709cbcc9139e6d09742
Signed-off-by: Liju-Clr Chen <liju-clr.chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67724
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-22 08:04:48 +00:00
Johnny Li 93e8f80434 mb/google/brya/var/crota: set tcc_offset value to 1 ℃
Set tcc_offset value to 1℃  in devicetree for Thermal Control Circuit
(TCC) activation feature. This value is suggested by Thermal team.

BUG=b:246913963
TEST=USE="project_crota project_brya" emerge-brya coreboot

Signed-off-by: Johnny Li <johnny_li@wistron.corp-partner.google.com>
Change-Id: Ie2f60bed34fbd6fa3624be60138511a22b199a8d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67708
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-09-21 15:33:24 +00:00
zhaojohn 88a496a9c8 soc/intel/meteorlake: Skip the TCSS D3 cold entry sequence
This patch provides a workaround which skips requesting IOM for D3 cold
entry sequence.

BUG=b:244082753
TEST=Verified MUX configuration after hot plugging Type-C devices on
Rex and MTL RVP boards.

Change-Id: I17bcde75360c4b2b40885d355702e3e5f45d770a
Signed-off-by: zhaojohn <john.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67560
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-09-21 15:33:13 +00:00
Tim Wawrzynczak b525ea726b Revert "soc/intel/apollolake: Configure FSP UPDs to allow coreboot to lockdown"
This reverts commit 7ef5376123.

Reason for revert: It was merged before its dependencies so now master is broken.

Change-Id: Ia270efaed4f5c9d0c7b9761ae22dec55f57f74cf
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67285
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-20 22:00:53 +00:00
Martin L Roth 19491c526d Revert "Kconfig: Allow x86 to compress pre-ram stages if not run XIP"
This reverts commit 6317aff5b3.

Reason for revert: fix broken tot master

Change-Id: Ie8075cf6c80448bfc957a1e1183f0283d2011b1b
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67287
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-20 21:44:35 +00:00
Angel Pons f37146de32 Revert "mb/prodrive/hermes: Add part numbers to SMBIOS"
This reverts commit d669562663.

Reason for revert: Was submitted out-of-order and with an unresolved
TODO in the commit message.

Change-Id: Id5a8770226afbfcdf63d451157e4586b6cdd5189
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67284
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-20 10:41:36 +00:00
Sean Rhodes e36205daf8 mb/starlabs/starbook/kbl: Correct USB port for Bluetooth
Previously, the Bluetooth interface worked when port 9 was enabled.

Now, it works with port 5 enabled, which matches the schematic.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: If783e60c8120adcd6522676cb3343ed46bf39d78
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67205
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-09-20 08:08:26 +00:00
Ivan Chen a657b1f7ce mb/google/dedede: Resume from suspend on critical battery
This patch makes dedede EC wake up AP from s0ix when the state of
charge drops to low_battery_shutdown_percent.

Demonstrated as follows:

1. Boot OS.
2. Run powerd_dbus_suspend.
3. On EC, run battfake 4.
4. System resumes.

BUG=b:244253629
TEST=Verified on dedede

Change-Id: I39234d2b9e739383b5f96be49077f8c9831fa0fa
Signed-off-by: Ivan Chen <yulunchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67320
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-09-20 08:07:42 +00:00
Jeremy Compostella 92d3899790 soc/intel/alderlake: Explicitly disable Energy Efficiency Turbo
FSP silicon 3347 changed the default value of the EnergyEfficientTurbo
Updateable Product Data (UPD), enabling the Energy Efficient Turbo
feature by default. This feature prevents the cores from entering
Turbo frequency under heavy load.

As a result of this FSP change, coreboot explicitly disables this
feature to stay consistent with commit `caa5f59279e Revert
"soc/intel/alderlake: Enable energy efficiency turbo mode"'.

BRANCH=firmware-brya-14505.B
BUG=b:246831841
TEST=verify that bit 19 of MSR 0x1fc is set. 'iotools rdmsr 0 0x1fc'

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: I7498f87eb4be666b34cfccd0449a2b67a92eb9db
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-09-20 08:06:50 +00:00
Zhixing Ma c9933b2c27 mb/intel/adlrvp: enable ECT for LP5 memory
On ADLRVP with LP5  memory, MRC team recommends enabling ECT(Early
Command Training) to avoid hang during boot process.

BRANCH=firmware-brya-14505.B
TEST=Booted to OS on ADLRVP with LP5 memory.

Signed-off-by: Zhixing Ma <zhixing.ma@intel.com>
Change-Id: I2472707825bbbdd8e5c12a714e0d40ea0b458838
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67651
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-09-20 08:05:41 +00:00
Sumeet Pawnikar 69b00c6f1b mb/google/brya/variants/skolas: Set power limit values
Skolas board is based on Raptor Lake SoC, not Alder Lake. The code
change sets CPU power limit values as performance configuration based
on various Raptor Lake SoC SKUs as per the document #686872.

BUG=b:242869605
BRANCH=None
TEST=Built and tested on skolas board

Change-Id: Ieb3ca4ff77039412ef56da49e1b438f5e0b9db02
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67375
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-09-20 08:03:55 +00:00
Vinod Polimera 25f6db4d2d qualcomm/sc7280: initialize tu struct with zeros
Coverity is throwing a bunch of "maybe uninitialized" errors for tu
struct. Initialize the tu struct with zero.

BUG=b:182963902,b:216687885
TEST=Validated on qualcomm sc7280 development board.
Monitor name: LQ140M1JW49

Change-Id: Ie249ad4f53abc91376445420712364a28618a15a
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67671
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2022-09-20 08:02:19 +00:00
Raihow Shi 15d03094cb mb/google/brask/variants/moli: enable ddc on DDI_PORT_2
Enable ddc on DDI_PORT_2 for support DP++.

BUG=b:240382609
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I475e3c0278cfa92ab40ad84f6da580b4cded9933
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67663
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-20 08:01:12 +00:00
Gaggery Tsai 517c5a8c54 soc/intel/alderlake: Add power state thresholds
This patch adds power state 1/2/3 threshold setting interfaces
and pass the settings to FSP.

BUG=b:229803757
BRANCH=None
TEST=Add psi1threshold and psi2threshold to overridetree.cb and
     enable FSP log to ensure the settings are incorrect.

Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Change-Id: I0330ede4394ebc2d3d32e4b78297c3cb328660d6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-09-20 08:00:18 +00:00
Karthikeyan Ramasubramanian 7125318ac4 mb/google/dedede/var/boten: Turn off camera during S0ix
Add a variant specific S0ix hook to fill the SSDT table to disable and
enable camera during suspend and resume respectively.

BUG=b:206911455
TEST=Build Boten BIOS image. Ensure that camera is disabled during
suspend and enabled during resume.

Change-Id: I3229b22b8d8651bf2d9df25b10ce6749efde7cf6
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67388
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
Reviewed-by: Maulik Vaghela <maulikvaghela@google.com>
2022-09-20 07:58:10 +00:00
Ivy Jian 61e5816b26 mb/google/rex: Add WWAN ACPI support
Add FM350GL 5G WWAN support using drivers/wwan/fm and additional PM
features from RTD3.

BUG=b:244077118
TEST=check cbmem -c
\_SB.PCI0.RP06: Enable RTD3 for PCI: 00:1c.5 (Intel PCIe Runtime D3)
\_SB.PCI0.RP06: Enable WWAN for PCI: 00:1c.5 (Fibocom FM-350-GL)

check PXSX Device is generated in ssdt.

Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Change-Id: I6114c589769d2eca882cf1a5255cf4c5937121a6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67336
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-09-20 07:56:22 +00:00
Ian Feng d4eb998fc1 mb/google/nissa/var/xivu: Add supported new memory part
Add new ram_id:3 (0011) for memory part K3LKCKC0BM-MGCP.

DRAM Part Name                 ID to assign
K3LKCKC0BM-MGCP                3 (0011)

BUG=b:247039096
TEST=Use part_id_gen to generate related settings and
emerge-nissa coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: I78d2e501b9d8d801a3d149002f638125bf4275f5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-09-20 07:54:55 +00:00
Angel Pons 082d822861 cpu/intel/haswell: Update Broadwell ULT µcode updates
The µcode updates for Broadwell come from coreboot's blobs submodule
and have not been updated in at least 7 years. Use the µcode updates
available in the intel-microcode submodule. This change forgoes some
µcode updates for old Broadwell ULT/ULX steppings with CPUID 0x306d2
and 0x306d3, as well as an old µcode update for Haswell ULT/ULX CPUs
with CPUID 0x40651 in favor of a newer intel-microcode revision that
was already being used: when the µcode updates are concatenated into
one file, the newer µcode update revision would be placed before the
older revision, so the latter would never be used.

Change-Id: I67f8a58552bd211095c183e6f7a219d60e3be162
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67526
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-09-20 07:53:57 +00:00
Angel Pons 84d0fe5113 cpu/intel/haswell: Hook up Crystal Well µcode updates
Commit 27126f135d (cpu/intel/haswell: add
Crystal Well CPU IDs) introduced new Haswell CPUIDs but did not include
any µcode updates for them. It is unknown how this could have worked as
the initial µcode inside the CPU can be quite unstable. Intel CPUs with
support for FIT (Firmware Interface Table) can have their µcode updated
before the x86 reset vector is executed.

The µcode updates for Crystal Well CPUID 0x40661 can be found inside the
intel-microcode submodule. There are no publicly available µcode updates
for Crystal Well CPUID 0x40660 as it is a pre-production stepping, which
is not meant to be used anymore. Hook up the available µcode updates for
Crystal Well CPUs.

Change-Id: If5264f333e681171a2ca4a68be155ffd40a1043b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67525
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-20 07:52:59 +00:00
Angel Pons 1caa279325 cpu/intel/haswell: Do not include useless µcode updates
There are two types of Haswell/Broadwell platforms: Trad(itional) with
separate CPU and PCH packages, and ULT/ULX where the CPU and PCH share
one package. Mainboards can specify which platform type they are using
the `INTEL_LYNXPOINT_LP` Kconfig option. There are so many differences
between Trad and ULT/ULX that it's not worth doing runtime detection.

The CPUIDs are different for Trad and ULT/ULX platforms, and so are the
µcode updates. So, including Trad µcode updates in a coreboot image for
an ULT/ULX mainboard makes no sense, and vice versa.

Adapt the Makefile so that only relevant µcode updates are added. Also,
add a few comments to indicate which updates correspond to which CPUs.

TEST=Run binwalk on coreboot.rom to verify included µcode updates for:
     - Asrock B85M Pro4 (Haswell Trad)
     - HP Folio 9480M (Haswell ULT/ULX)
     - Purism Librem BDW (Broadwell ULT/ULX)

Change-Id: I6dc9e94ce9fede15cbcbe6be577c48c197a9212a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67524
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-09-20 07:51:20 +00:00
Tim Wawrzynczak 0d3606b2df mb/intel/mtlrvp: Add board_info.txt
Builds are failing on upstream master branch because there is no
board_info.txt for the Intel Meteor Lake RVP mainboard; this patch
adds a basic one so the tree will build.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I3356ad65132dc4aaebd5e7d959a2bdb9ab1316b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67711
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Tested-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-09-19 20:29:40 +00:00
AlanKY Lee 23b68fe78d mb/google/brya/var/skolas: Add MIPI WFC support
Modify config settings based on new module KBAE350 spec

BUG=b:245640845
BRANCH=None
TEST=Build and boot on skolas

Signed-off-by: AlanKY Lee <alanky_lee@compal.corp-partner.google.com>
Change-Id: I8a9bee9bb79bda4e3f1d259716844b42a7fce397
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jimmy Su <jimmy.su@intel.corp-partner.google.com>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
2022-09-19 18:59:27 +00:00
Arthur Heymans e247435c6b soc/intel/apollolake: LZ4 Compress FSP-M
FSP-M is not run XIP so it can be compressed. This more than halves
the binary size. 364544 bytes -> 168616 bytes.

On the up/squared this also results in a 83ms speedup.

TESTED: up/squared boots.

Change-Id: Ic76b51f0f3007b59ccb9f76b6a57bb9265dab833
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2022-09-19 14:57:30 +00:00
Arthur Heymans 6317aff5b3 Kconfig: Allow x86 to compress pre-ram stages if not run XIP
On the intel/glkrvp
compressed:
- romstage: 29659
- verstage: 31303
non compressed:
- romstage: 46244
- verstage: 47012

On qemu (with some additional patch to not run XIP)
compressed:
- romstage: 11203
non compressed:
- romstage: 13924

Even with a small romstage the size improvements are substantial,
which should result in a speedup when loading the stage. On the
up/squared loading romstage is sped up by 9ms.

TESTED: successfully boot the up/squared & google/vilboz.

Change-Id: Iac24d243c4bd4cb8c1db14a8e9fc43f508c2cd5d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36613
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2022-09-19 14:57:12 +00:00
Jamie Ryu b6cce33b18 mb/intel/mtlrvp: Add flashmap descriptor
This adds 32MB flashmap descriptor as below:

Descriptor Region: 0x0 - 0x3fff (~16KB)
Intel EC Region: 0x4000 - 0x83fff (~512KB)
ME Region: 0x84000 - 0x8fffff (~8.5MB)
BIOS Region: 0x900000 - 0x01ffffff (~23MB)

BUG=b:224325352
TEST=util/abuild/abuild -p none -t intel/mtlrvp -a -c max

Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Change-Id: Ifb572efe56eb7400b8328ba797892738f5927158
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66098
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 14:56:11 +00:00
Sean Rhodes 9f44a8cc39 soc/intel/apollolake: Add bits of GEN_PMCON2 register
The values in this patch were found in the following datasheets:
* 334819 (APL)
* 336561 (GLK)

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ie7d40395d754b2abdf9079d6ee5e8ab8c536d449
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67661
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 14:55:29 +00:00
Sean Rhodes 7ef5376123 soc/intel/apollolake: Configure FSP UPDs to allow coreboot to lockdown
Configure FSP S UPDs to allow coreboot to handle the lockdown.

The main change here is setting `Write Protection Support` to 0,
as the default is Enabled, which shouldn't allow writes (even though
it seems to).

The UPDs are identical on APL and GLK, but all ones configured
in this patch have been there since their initial releases.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I35185b498315511f3236758caebfe2f9c28fd04a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65039
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 14:55:23 +00:00
Angel Pons d669562663 mb/prodrive/hermes: Add part numbers to SMBIOS
Adjust the EEPROM layout to account for two new fields: board part
number and product part number. In addition, put them in a Type 11
SMBIOS table (OEM Strings).

TODO: This currently stores the "raw" part numbers, should we add a
prefix to the SMBIOS strings?

Change-Id: I85fb9dc75f231004ccce2a55ebd9d7a4867fcb93
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67276
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 14:53:01 +00:00
Tim Van Patten 1075fef445 amd/mendocino/root_complex: Throttle SOC during low/no battery
Use dynamic power and thermal configuration (DPTC) via ACPI ALIB calls
to throttle the SOC when there is no battery or critically low battery,
to enable the SOC to boot without overwhelming the AC charger and
browning out.

DPTC is not enabled for low/no battery mode with this CL. It will be
enabled for Skyrim in a following CL.

BRANCH=none
BUG=b:217911928
TEST=Boot skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Ifeddb99e97af93b40a5aad960d760e4c101cf086
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67189
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 10:00:51 +00:00
Tim Van Patten d8210d6ee1 amd/mendocino/acpi/soc: Add DPTC Support
Add support for DPTC by calling SB.DPTC() as part of PNOT().

BRANCH=none
BUG=b:217911928
TEST=Boot skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Ifc332bfc4d273031c93b77673224b4f3c2871fb1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67694
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:57:12 +00:00
Tim Van Patten 7a6451bd3e skyrim/overridetree: Add "Throttle" DPTC values
Add the Low/No Battery Mode DPTC values for Skyrim.

These values were generated by AMD.

BRANCH=none
BUG=b:217911928
TEST=Build skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I5f277761cb7379b4344492f95010d8d5ddd689fb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67693
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:56:34 +00:00
Tim Van Patten 1cf0acdc1c soc/amd/mendocino: Add low/no battery VRM limit registers
Add DPTC Low/No battery VRM limit registers to throttle the SOC.

BRANCH=none
BUG=b:217911928
TEST=Build skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I9c4ed227b54efbab9f03d6acf64b1160ad73f460
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67692
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:56:06 +00:00
Tim Van Patten 11ca995500 amd/mendocino/root_complex: Set DPTC VRM limit values
Set the DPTC VRM limit values for normal mode.

BRANCH=none
BUG=b:217911928
TEST=Boot skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I2041a713323f039dcfdacdfa43e74cf450c3c0d1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67691
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:55:20 +00:00
Tim Van Patten cf9e0a08f5 mb/google/skyrim: Add "Normal" DPTC values
Add the Normal Mode DPTC values for Skyrim.

These values were generated by AMD.

BRANCH=none
BUG=b:217911928
TEST=Build skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I1e1f55b941f3e70aad33d55a90fb012eac3ba12d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67690
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:54:40 +00:00
Tim Van Patten b06873f77c soc/amd/mendocino: Add VRM limit DPTC registers
Add VRM DPTC limit registers. These are required when throttling the SOC
for low/no battery mode to prevent the SOC from overwhelming the
charger.

b/245942343 is tracking passing these additional fields to the FSP and
having the FSP configure them.

BRANCH=none
BUG=b:217911928
TEST=Build skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Ie62129d967192f9a9cf654b1854d7dbe4324802a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67378
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:54:00 +00:00
Tim Van Patten a90aebbf2a soc/amd/acpi: Add low/no battery mode to DPTC
Update acpigen_write_alib_dptc() to support "low/no battery mode",
which throttles the SOC when there is no battery connected or the
battery charge is critically low.

This is in preparation for enabling this functionality for Mendocino.

BUG=b:217911928
TEST=Build zork
TEST=Boot nipperkin
TEST=Boot skyrim

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Icea10a3876a29744ad8485be1557e184bcbfa397
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66804
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:53:17 +00:00
Jan Dabros 2d9e96a5ab soc/amd/mendocino/acpi: Add support for shared TPM_I2C controller
There are platforms equipped with AMD SoC where I2C3 controller
connected to TPM device is shared between X86 and PSP. In order to
handle this, PSP acts as an I2C-arbitrator, where x86 (kernel) sends
acquire and release requests to be accepted by PSP.

Introduce new CONFIG for Mendocino SoCs similar to what we have for
Cezanne.

BUG=b:241878652
BRANCH=none

Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: I015a24715271d2b26c0bd3c9425e20fb2987a954
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67674
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-09-19 09:52:25 +00:00
Subrata Banik e8097f7a28 mb/google/rex: Add ELAN6918 touchscreen
ELAN6918 Power Sequencing seems not perfectly matching
with the previous platforms and setting GPP_C06 to high prior
to the power sequencing is actually makes it work.

Ideally Power Sequencing should be as below for ELAN6918 (in ACPI)
`POWER enabled -> RESET deasserted -> Report EN enabled`

But below sequence is only working currently:
`Report EN enabled (ramstage) -> POWER enabled (ACPI) -> RESET
 deasserted (ACPI)`

BUG=b:247029304
TEST=Verified ELAN touch panel is working as expected after booting
Google/rex device to ChromeOS.

Change-Id: Ideaeb0faa882b8e603534bbface51ea76923d436
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66990
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-19 09:50:58 +00:00
Nick Vaccaro dbe4fe2c88 mb/google/brya/var/brya4es: deprecate brya4es
The brya4es variant is no longer needed, removing code for brya4es.

BUG=b:246611270
TEST=None

Change-Id: I9b222f89fe766c63158518713be19d7959451721
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-19 09:49:06 +00:00
Werner Zeh 57ed348b20 mb/siemens/mc_apl1: Do not wait for legacy devices on mc_apl7
Since there are no legacy devices on the variant mc_apl7 do not wait
for them on mc_apl7.

Change-Id: Ia4e6c0fb495a347be51bd6604a1d9b73098fb7b6
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67684
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19 09:48:27 +00:00
Patrick Georgi f0d5f67e46 riscv: Enable the newfangled way of selecting instruction sets
gcc12+ will require riscv architecture selection to come not only with
featurei suffixd charactersa, it also comes with feature_ful suffix_ed
words_mith. Much creative, very appreciate.

To accommodate for this madness, enable the already existing (but off by
default) support for that in our gcc11 build, support using by detecting
the compiler's behavior in xcompile and pass that knowledge along to our
build system.

Then cross our fingers and hope for the best!

Change-Id: I5dfeed766626e78d4f8378d9d857b7a4d61510fd
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67457
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-17 05:56:34 +00:00
Miriam Polzer 2c38933a0e security/vboot: Add rollback NVRAM space for TPM 2
Create an NVRAM space in TPM 2.0 that survives owner clear and can be
read and written without authorization. This space allows to seal data
with the TPM that can only be unsealed before the space was cleared.
It will be used during ChromeOS enterprise rollback to securely
carry data across a TPM clear.

Public documentation on the rollback feature:
https://source.chromium.org/chromium/chromiumos/platform2/+/main:oobe_config/README.md

BUG=b/233746744

Signed-off-by: Miriam Polzer <mpolzer@google.com>
Change-Id: I59ca0783b41a6f9ecd5b72f07de6fb403baf2820
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66623
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-17 01:42:11 +00:00
Husni Faiz f634aed758 console: attach smbus console driver
This patch attaches the smbus console functions to the high
level console interface.

Change-Id: I3a9bf64e59d529253bfdcdfa565bb2bb92975728
Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67341
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-16 17:03:49 +00:00
Husni Faiz f571ce5c67 bd82x6x/early_pch: enable smbus in bootblock stage
SMBus is typically enabled in the ROMSTAGE. To get the
BOOTBLOCK console message, the SMBus should be enabled
in the BOOTBLOCK stage.

Change-Id: I97d0afb013ede428383acaa0aa97ab04fe80e2a4
Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67340
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-16 17:02:39 +00:00
Husni Faiz 67300f88cd drivers/smbus: add smbus console driver
This patch adds a new smbus console driver and Kconfig
options to enable the driver.

Change-Id: Ife77fb2c3e1cc77678a4972701317d50624ceb95
Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67339
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-16 17:01:17 +00:00
Jeremy Soller c5d0761dea soc/intel/cnl: Add Cometlake-H/S Q0 (10+2) CPU ID
The Q0 stepping has a different ID than P1.

Reference: CML EDS Volume 1 (Intel doc #606599)
Change-Id: Id1da42aa93ab3440ae743d943a00713b7df3f453
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66159
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-16 16:17:36 +00:00
Jeremy Soller 9601b1e273 soc/intel/alderlake: Set FSP-S GnaEnable based on devicetree
Change-Id: Ifd25416c55c4dba1709f74cdedc0c58e881d6266
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-16 16:17:19 +00:00
Arthur Heymans 5d8fe86db2 drivers/usb/hub/acpi.c: Don't use heap for ACPI name
Using malloc would increase the heap use each time this function is
called. Instead allocate a per struct device buffer inside the
chip_info struct.

Found by coverity scan, CID 1488815.

Change-Id: Ie24870b34338624b3bf3a6f420debdd24a68ffbd
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64338
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-09-16 13:05:19 +00:00
Eric Lai 4d9748f87c mb/google/nissa/var/nivviks: Enable nau8825 ADCOUT
Enable nau8825 ADCOUT to make I2S signal meet spec.

BUG=b:234789689
TEST=I2S waveform can meet spec timing.

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: I7ea472ac4e4add4e790b9b3fbb6becd40665eb1a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67660
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-09-16 12:08:19 +00:00
Eric Lai 82a9f865fd drivers/i2c/nau8825: Add ADCOUT IO drive strength control
Add a property to control the driving of ADCOUT.

BUG=b:234789689
TEST= build passed.

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: Ibbedd5838a795ee645a5458b960062c5530ff3b5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67659
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-09-16 12:08:09 +00:00
Sridhar Siricilla 90a439384b soc/intel/common: Update comment on HFSTS1.spi_protection_mode
The patch updates comment on HFSTS1.spi_protection_mode.
The spi_protection_mode indicates SPI protection status as well as EOM
status (in a single staged EOM flow). Starting from TGL platform, staged
EOM flow is introduced. In this flow, spi_protection_mode alone doesn't
indicate the EOM status.

For information on EOM status, please refer secton# 3.6.1 in doc#
612229.

TEST=Build code for Gimble

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I19df5cfaa6d49963bbfb3f8bc692d847e58c4420
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67533
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-16 12:07:06 +00:00
Subrata Banik a3acac15ee Revert "drivers/wifi: Move MTL Magnetar CNVi DIDs from SoC to generic driver"
This reverts commit 510a55d4ee.

Reason for revert: Observed `missing read resource` issue for
cnvi device

BUG=b:244687646
TEST=No error seen in AP log while booting Google/rex

Without this patch:
[SPEW ]  PCI: 00:14.3 read_resources bus 0 link: 0
[ERROR]  GENERIC: 0.0 missing read_resources
[SPEW ]  PCI: 00:14.3 read_resources bus 0 link: 0 done

With this patch:
[SPEW ]  PCI: 00:14.3 read_resources bus 0 link: 0
[SPEW ]  PCI: 00:14.3 read_resources bus 0 link: 0 done

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I1e881313729f1088cffa7c161722ee79bb9acc49
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67566
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
2022-09-16 05:37:05 +00:00
Subrata Banik 00b682e6a4 soc/intel/meteorlake: Enable `SOC_INTEL_COMMON_BLOCK_CNVI` config
TEST=Able to build and boot Google/rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I64aab8391f89414754785cea47671f3350324297
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67652
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@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-09-16 05:36:34 +00:00
Subrata Banik fa317d574e mb/google/rex: Enable `DRIVERS_WIFI_GENERIC` config
TEST=Able to build and boot the Google/rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Iae5317b24856ef2cbd2f36cc28f645826536c21a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67641
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@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-09-16 05:36:26 +00:00
Tim Van Patten 53ba14de1e amd/mendocino: Control DPTC with only Kconfig
SOC_AMD_COMMON_BLOCK_ACPI_DPTC can be enabled conditionally for any
skyrim boards, similar to mainboard/google/zork/Kconfig. This makes the
value dptc_tablet_mode_enable redundant.

This CL removes dptc_tablet_mode_enable so DPTC is controlled entirely
with the Kconfig value SOC_AMD_COMMON_BLOCK_ACPI_DPTC. This means DPTC
is only included for boards that actually enable it.

BRANCH=none
BUG=b:217911928
TEST=emerge-skyrim coreboot

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I73fca5a16826313219247f452d37fb526ad4f4df
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-15 17:58:50 +00:00
Tim Van Patten 9eac097205 amd/cezanne: Control DPTC with only Kconfig
SOC_AMD_COMMON_BLOCK_ACPI_DPTC can be enabled conditionally for any
guybrush boards, similar to .mainboard/google/zork/Kconfig This makes
the value dptc_tablet_mode_enable redundant.

This CL removes dptc_tablet_mode_enable so DPTC is controlled entirely
with the Kconfig value SOC_AMD_COMMON_BLOCK_ACPI_DPTC. This means DPTC
is only included for boards that actually enable it.

BRANCH=none
BUG=b:217911928
TEST=emerge-guybrush coreboot

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I07f1266fa80a6c9ee4ec3b3ba970a70c6c72fb54
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-15 17:58:31 +00:00
Tim Van Patten 54ce4aa98c zork: Control DPTC with only Kconfig
Moving the config value SOC_AMD_COMMON_BLOCK_ACPI_DPTC to
soc/amd/picasso/Kconfig and conditionally enabling it for only Morphius
boards makes the value dptc_tablet_mode_enable redundant.

This CL removes dptc_tablet_mode_enable so DPTC is controlled entirely
with the Kconfig value SOC_AMD_COMMON_BLOCK_ACPI_DPTC. This means DPTC
is only included for boards that actually enable it.

BRANCH=none
BUG=b:217911928
TEST=Build zork

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Ic54a9bb491234088be8184bec8b09e2e31ffa298
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67635
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-15 17:58:07 +00:00
Arthur Heymans 56776a1ab3 soc/amd: Do SMM relocation via MSR
AMD CPUs have a convenient MSR that allows to set the SMBASE in the save
state without ever entering SMM (e.g. at the default 0x30000 address).
This has been a feature in all AMD CPUs since at least AMD K8. This
allows to do relocation in parallel in ramstage and without setting up a
relocation handler, which likely results in a speedup. The more cores
the higher the speedup as relocation was happening sequentially. On a 4
core AMD picasso system this results in 33ms boot speedup.

TESTED on google/vilboz (Picasso) with CONFIG_SMI_DEBUG: verify that SMM
is correctly relocated with the BSP correctly entering the smihandler.

Change-Id: I9729fb94ed5c18cfd57b8098c838c08a04490e4b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-15 14:47:52 +00:00
Nico Huber 576861994e soc/intel/skylake: Assign device ops in chipset devicetree
Some PCI IDs were missing, and at least one (SPT's fast SPI
device in a generic SPI driver) was wrong. Hence, this patch
actually changes behavior depending on the devices actually
present in a machine.

In this patch the Skylake devicetree is written in a single-line
style. Alternative, the device operations could be put on a separate
line, e.g.
    device pci 00.0 alias system_agent on
            ops systemagent_ops
    end

Tested on Kontron/bSL6. Notable in the log diff is that the
CSE and SATA drivers are hooked up now.

Change-Id: I8635fc53ca617b029d6fe1845eaef6c5c749db82
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-09-15 13:07:11 +00:00
Elyes Haouas f1ba7d6c8f soc/intel/xeon_sp: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I664f5b7d354b0d9a7144c25604ae4efbdd9ba9a9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67593
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2022-09-15 13:03:28 +00:00
Elyes Haouas 3de1253318 mb/ocp: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ie5fc0a8230cdcc24ad1d2d94cc6d019ff10aac48
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2022-09-15 13:03:08 +00:00
Elyes Haouas 6a8029c2c9 soc/intel/meteorlake: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ia2508abe62a194f2921d5535937ba82a60967ca3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67612
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-09-15 13:02:53 +00:00
Elyes Haouas aebccac7e1 src/security: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I3def65c016015d8213824e6b8561d8a67b6d5cf0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-09-15 13:02:33 +00:00
Elyes Haouas a6b41f2fd0 mb/google/mistral/verstage.c: Change loglevel prefix
BIOS_ERR is inappropriate since the message is informational.
Use BIOS_INFO instead.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I91be3f47ae93c8262e430a06cacec3d2c29ebd58
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-09-15 13:01:59 +00:00
Jeremy Compostella 2c021383c0 cpu/intel/haswell: Allow up to six microcodes in the FIT table
Haswell and Broadwell platforms usually stitch six microcode
patches. It has worked so far with the default value of four thanks a
bug which is being fixed by `util/ifittool: Error out if microcodes do
not fit the FIT table' commit.

BUG=b:245380705
TEST=Jenkins build without failing on the FIT table size

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: I23bf79a3e8918499f6c51e6ef829312d5872181a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67466
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-15 13:01:13 +00:00
Tim Van Patten 3ed3138eeb zork/Kconfig: Move SOC_AMD_COMMON_BLOCK_ACPI_DPTC
Move enabling SOC_AMD_COMMON_BLOCK_ACPI_DPTC from
soc/amd/picasso/Kconfig to mainboard/google/zork/Kconfig and
conditionally enable it only for Morphius boards.

This reduces which boards/variants have DPTC enabled to only those that
actually use it.

BRANCH=none
BUG=b:217911928
TEST=Build zork

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: Iddebcf5dbadae135c8110e2afd9ad76ef7dcc09d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67637
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 22:12:40 +00:00
Tim Van Patten 9b3112c875 acpi/soc: Conditionally include dptc.asl
Conditionally include dptc.asl based on the Kconfig value
SOC_AMD_COMMON_BLOCK_ACPI_DPTC.

BRANCH=none
BUG=b:217911928
TEST=Build zork
TEST=Build guybrush
TEST=Build skyrim
TEST=Build majolica

Change-Id: Idd94af8e8b2d7973abc0fb939e4600189e21656a
Signed-off-by: Tim Van Patten <timvp@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67620
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 22:12:10 +00:00
Felix Held 44e4bf26a1 soc/amd/cezanne/Kconfig: add defaults for FSP_M_FILE and FSP_S_FILE
Now that the FSP binary check logic is fixed to only check the FSP files
if ADD_FSP_BINARIES is selected, the default paths for the not yet
published Cezanne FSP binaries can be added without breaking abuild.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I9950a1fe7bd1b21109cca9631de1a8f1d265d9b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-09-14 22:11:25 +00:00
Felix Held 4371bb96d4 soc/amd/common/fsp: only check FSP_M size if ADD_FSP_BINARIES selected
Only check if the FSP_M size is small enough to fit inside the memory
region reserved for it if ADD_FSP_BINARIES selected.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Nico Huber <nico.h@gmx.de>
Change-Id: I6a115412c113eb0d02b8d4dfc2bb347305f97809
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-09-14 22:09:59 +00:00
Felix Held badea79500 mb/amd/gardenia: deselect HAVE_PIRQ_TABLE and drop incorrect irq_tables
This file isn't correct, since the Stoneyridge SoC doesn't have a legacy
PCI bridge on bus 0 bridge 0x14 function 4. Google/Kahlee doesn't select
HAVE_PIRQ_TABLE, so it's likely safe to also not select it for this
board.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibaf470b9ff7823019772d43af98ebc47af395728
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67634
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-14 20:41:10 +00:00
Felix Held e74da16741 mb/google/kahlee: drop unused and incorrect irq_tables.c
This file is neither included in the build nor correct, since the
Stoneyridge SoC doesn't have a legacy PCI bridge on bus 0 bridge 0x14
function 4.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0daed891984faed9fbc36f0215edfc56e0ae14a7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-14 20:40:44 +00:00
Matt DeVillier 3ee2420514 mb/google/skyrim/winterhold: Use 'detect' vs 'probed' for touchpads
As of commit 2cf52d80a6 ("mb/*/{device,override}tree: Set touchpads to
use detect (vs probed) flag") all touchpads in the tree have been
switched from using the 'probed' flag to 'detect.' Winterhold was added
in between the time that patch was pushed and merged, so switch these
instances over too.

Change-Id: I34e1265ecd6409f720ae486926c5078f626fc693
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67487
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 20:32:52 +00:00
Arthur Heymans 43ed5d2534 cpu/amd: Move locking SMM as part of SMM init
Locking SMM as part of the AP init avoids the need for
CONFIG_PARALLEL_MP_AP_WORK to lock it down.

Change-Id: Ibcdfc0f9ae211644cf0911790b0b0c5d1b0b7dc9
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64871
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 20:29:59 +00:00
Arthur Heymans e48dcb708c cpu/amd/smm: Move MP & SMM init in a common place
Change-Id: I7c457ab69581f8c29f2d79c054ca3bc7e58a896e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64870
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 20:29:17 +00:00
Arthur Heymans 44807acaef soc/amd/common: Add common function to get cpu count
This is the same for all supported AMD hardware.

Change-Id: Ic6b954308dbb4c5a2050f1eb8f15acb41d0b81bd
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67617
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-14 20:28:37 +00:00
Zheng Bao 62cd5e8603 soc/amd: Recalculate the field power in PSS table entry
Being divided by 1000 causes data loss and the loss is expand by
muliplication.

So we just set a lower divisor before muliplication.

BUG=b:185922528

Change-Id: Ib43103cc62c18debea3fd2c23d9c30fb0ecd781b
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67050
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-14 20:24:00 +00:00
Patrick Georgi 41a8043bdf 3rdparty/opensbi: Update to latest ToT
That's 3 years of development, including adapting to new, shiny,
Cascade of Attention-Deficit Teenagers[0] induced incompatible
assembler syntaxes.

Signed-off-by: Patrick Georgi <patrick@coreboot.org>

[0] https://web.archive.org/web/20220824045741/https://www.jwz.org/doc/cadt.html

Change-Id: I8606700149ca74e93b85d78546a29df2916d39b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67456
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-14 20:12:56 +00:00
Felix Held 40a38cc8f0 soc/amd/mendocino: Add support for separate RW A/B partition SPL file
Add support for having different Security Patch Level (SPL) table files
in the read-only and the read-write A/B partitions. This allows the SPL
table file in the main or RO FMAP partition to only cover the embedded
firmware binaries in that partition and have a separate SPL file in the
RW A and B partitions that covers the embedded firmware binaries in the
RW partitions.

BUG=b:243470283

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1ba8c370ce14f7ec88e7ef2f9d0b64d6bb4fa176
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-14 18:04:49 +00:00
Tony Huang c3e36ea20b mb/google/dedede/variants/shotzo: Turn off LAN power in S0ix
Turn off the LAN power which is controlled by GPP_A10 in S0ix states.
For an USB device, the S0ix hook is needed for the on/off operationas
to take place.

BUG=b:245426120
BRANCH=firmware-dedede-13606.B
TEST=emerge-shotzo coreboot
     check LAN LED off in S0ix states
     check LAN function ok after suspending 500 loops
     check SSDT table has MS0X entry
     Scope (\_SB)
    {
        Method (MS0X, 1, Serialized)
        {
            If ((Arg0 == One))
            {
                \_SB.PCI0.CTXS (0x41)
            }
            Else
            {
                \_SB.PCI0.STXS (0x41)
            }
        }
    }

Change-Id: I3fcab4a73239b4f006839c0c81e9b4cc74047b77
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-09-14 17:48:32 +00:00
Angel Pons c3aa659286 soc/intel/cannonlake: Read HPR_CAUSE0 register
Log the Host Partition Reset Causes (HPR_CAUSE0) register, as done on
newer platforms.

Change-Id: I35261cefae67649fb7824e5ef3d7eb10add36a53
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67482
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-14 14:07:43 +00:00
Elyes Haouas 23f272994f console/vtxprintf.c: Use | operator for bit operation instead of +
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I478265dcd070dcf3fb2cf2c535b6ca1d86b9a3f2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67564
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-14 14:06:34 +00:00
Elyes Haouas 0f1fb8a868 soc/mediatek: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I9cf4097518034fa4c3ae1899840ae3a276936f80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67581
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 12:49:44 +00:00
Elyes Haouas 5e6b0f0cac nb/intel: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I6d0d945011fa046b974c6f4554cb9fb15e523afb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67578
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 12:01:24 +00:00
Garmin Chang 1fac2e20b8 soc/mediatek/mt8188: Set PLLs to hardware default values
Some PLLs are not used in firmware, so we should keep them as hardware
default values. If their modules want to set them, the corresponding
drivers should set them in the kernel stage.

BUG=b:233720142
TEST=build pass.

Signed-off-by: Garmin Chang <Garmin.Chang@mediatek.com>
Change-Id: I9bee18005ffed7fc1785c7fd3c0370c8293064ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67547
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 12:00:50 +00:00
Garmin.Chang f189249eb6 soc/mediatek/mt8188: Fix indention in pll.c
BUG=b:233720142
TEST=build pass.

Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com>
Change-Id: I567d1ded1c3b5e36a25026cec697d43d92d5524c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67546
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 12:00:24 +00:00
Garmin Chang c7b549ec99 soc/mediatek/mt8188: Change vpp_sel default mux for 4k support
vpp_sel and ethdr_sel are vdosys clock source select mux.

Steps to change to support 4K source:
1. Change vpp_sel source to mainpll_d6 to run at 416MHz.
2. Change ethdr_sel source to univpll_d6 to run at 416MHz.

BUG=b:233720142
TEST=build pass.

Signed-off-by: Garmin Chang <Garmin.Chang@mediatek.com>
Change-Id: I24f133b9b383fd019983cb29a213b47717148e97
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67545
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 12:00:06 +00:00
Rex-BC Chen 5f9395cbc1 mb/google/geralt: Raise little core CPU frequency from 500MHz to 2GHz
To improve boot time, raise little CPU from 500MHz to 2GHz at romstage
(before DRAM calibration).

FW logs:
Check CPU freq: 1999968 KHz, cci: 1600012 KHz

TEST=cpu freq and cci freq run correctly.
BUG=b:244251006

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Ic1bed53669baa15f797c9a952455376a39d29cf3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67544
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 11:56:27 +00:00
Garmin Chang d9b1dfe968 soc/mediatek/mt8188: Fix some wrong settings for PLLs
The observed CPU big core frequency is double compared with the current
PLL setting. Therefore fix the wrong setting for PLL register
APMIXED_ARMPLL_BL.

Moreover, we also fix some wrong settings for other PLLs.

TEST=CPU frequency of big core CPU is correct and bootup correctly.
BUG=b:244215537

Signed-off-by: Garmin Chang <Garmin.Chang@mediatek.com>
Change-Id: I9126f439d7a5136b2fb8d66f103ef427a0b08a99
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67543
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 11:56:03 +00:00
Rob Barnes d522f38c7b timer: Change timer util functions to 64-bit
Since mono_time is now 64-bit, the utility functions interfacing with
mono_time should also be 64-bit so precision isn't lost.

Fixed build errors related to printing the now int64_t result of
stopwatch_duration_[m|u]secs in various places.

BUG=b:237082996
BRANCH=All
TEST=Boot dewatt

Change-Id: I169588f5e14285557f2d03270f58f4c07c0154d5
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66170
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-09-14 11:55:39 +00:00
Eran Mitrani 51249d6bed mb/google/rex: Add audio parts ALC5682I-VS and MAX98357
BUG=b:232573696
TEST=Able to verify audio playback on Google/Rex with this change.

Change-Id: Ia8dfc79e7e4d27828726145156c870733d716899
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66919
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-14 05:30:08 +00:00
Kapil Porwal 715c17a750 soc/intel/mtl: Fix GPIO group pad base for ACPI
This patch fixes MeteorLake GPIO PINCTRL entries as per 5.15
kernel pintrl driver:
https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/kernel/v5.15/drivers/pinctrl/intel/pinctrl-meteorlake.c

In order to support using ACPI GPIOs it is necessary for coreboot
to be compatible with this implementation.  The GPIO groups that
are usable by the  OS are declared with a pad base which is then
used to compute the number for ACPI GPIOs.

BUG=b:232573696
TEST=Tested on Google Rex board. After this change, driver rt5682s
is able to claim pinctrl IRQ 358 corresponding to GPP_B06.

Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: Icabbe9e125ee9efaf0eef4c4cdc8be9f734aa703
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67565
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-14 05:29:42 +00:00
Ivy Jian 64c77dc299 soc/intel/meteorlake/retimer: Change loglevel prefix
This message is not really an error message, so BIOS_ERR is 
inappropriate. Since the message is informational, switch to 
BIOS_INFO instead.

BUG=b:244687646
TEST=emerge-rex coreboot
before
[ERROR]  USB Type-C 0 mapped to EC port 0
after
[INFO]  USB Type-C 0 mapped to EC port 0

Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Change-Id: Ia08fd45dd484c79d81527ea46cfaaa5a01a410c2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67536
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-14 05:29:30 +00:00
Ivy Jian 4257e8c132 soc/intel/meteorlake: Enable TcssDma1En
Adding support enables/disables TcssDma1En by usb4_params.

BUG=b:244687646
TEST= TcssDma1En is enabled as expected.
before patch
[SPEW ]  PCI: 00:0d.2 [8086/0000] bus ops
[DEBUG]  PCI: 00:0d.2 [8086/7ec2] enabled
[INFO ]  PCI: Static device PCI: 00:0d.3 not found, disabling it.
after patch
[SPEW ]  PCI: 00:0d.2 [8086/0000] bus ops
[DEBUG]  PCI: 00:0d.2 [8086/7ec2] enabled
[SPEW ]  PCI: 00:0d.3 [8086/0000] bus ops
[DEBUG]  PCI: 00:0d.3 [8086/7ec3] enabled

Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Change-Id: I9cd8fc3819f533e9581fea19d4da48283888cc04
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67534
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-14 05:29:23 +00:00
Ivy Jian 78c4d0f6a6 soc/intel/meteorlake: Enable tbtPcie2/3
Adding support enables/disables tbtPcie2/3 by usb4_params.

BUG=b:244687646
TEST= TRP2/3 are enabled as expected.
before patch
[INFO ]  PCI: Static device PCI: 00:07.2 not found, disabling it.
[INFO ]  PCI: Static device PCI: 00:07.3 not found, disabling it.
after patch
[DEBUG]  PCI: 00:07.2 subordinate bus PCI Express
[DEBUG]  PCI: 00:07.2 [8086/7ec6] enabled
[DEBUG]  PCI: 00:07.3 subordinate bus PCI Express
[DEBUG]  PCI: 00:07.3 [8086/7ec7] enabled

Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Change-Id: Ia1bdc9b5c0533bdddae67b8039103162a57fdc39
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67530
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-09-14 05:29:16 +00:00
Tony Huang e5c547c2d7 mb/google/dedede: Generate MS0X entry and provide variant hook
BUG=b:245426120
BRANCH=firmware-dedede-13606.B
TEST=emerge-dedede coreboot
     check SSDT table has MS0X entry
     Scope (\_SB)
    {
        Method (MS0X, 1, Serialized)
        {
            If ((Arg0 == One)) {}
            Else
            {
            }
        }
    }

Change-Id: Id01089531503e62231c5ab19e4cd8056198b9acb
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67373
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-09-13 16:36:04 +00:00
Matt DeVillier 20e1dc27e9 mb/google/poppy/nami: Add 'detect' flag for Elan touchpad
Add the 'detect' flag to the Elan touchpad, so coreboot can determine
which touchpad type is present at runtime and generate the correct
ACPI entry for it (the Synaptics touchpad already has the flag).

Test: build/boot google/nami, verify touchpad works under Linux/Windows

Change-Id: I437d1d470552d55496dfe611f441331127c64250
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-13 16:08:43 +00:00
Sean Rhodes 8fb4c9d956 mb/starlabs/starbook/tgl: Tidy up the layout
Tidy up the layout to remove unnecessary sizes. This change also makes
the flash start at 0x0 and increases the size of the FMAP to 0x1000.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I46663003857eb50271c6ad1da6c4e56c8f4bb6c3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67542
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-13 15:21:42 +00:00
Lean Sheng Tan 9b9a763ca9 mb/prodrive/atlas: Enable legacy S3 support
Enable S3 support as Prodrive doesn't need s0ix for now.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I7625c8ac860e1afc60c94b3c51e996531a1f2b15
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67414
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-09-13 14:21:25 +00:00
Victor Ding 787b46673b mb/intel/adlrvp: Correct HWIDs for ChromeOS devices
The current HWIDs for ADL RVP are reported as invalid by Chrome on
ChromeOS; fix it by generating new valid HWIDs with the following
commands:

```
./util/chromeos/gen_test_hwid.sh ADLRVPM
./util/chromeos/gen_test_hwid.sh ADLRVPN
./util/chromeos/gen_test_hwid.sh ADLRVPP
```

BUG=b:243899466

Change-Id: Iad6f47e67c2d35363b042aabec8b3317d5bfc111
Signed-off-by: Victor Ding <victording@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67532
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-13 13:09:02 +00:00
Elyes Haouas d0033e363f src/console: Reformat code
Most of these changes are suggested by clang-format(13.0-54) tool on
Debian testing.

Change-Id: I68a288b3f7e911331e7324bf13cf9bde259a29de
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64781
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-13 13:06:33 +00:00
Elyes Haouas c705ecd2eb device/dram: Reformat code
Most of these changes are suggested by clang-format(13.0-54) tool on
Debian testing.

Change-Id: I9bf5f516db4f12ffe1e9a714c7a8ae179c12b149
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64780
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-13 13:06:05 +00:00
Venkat Thogaru fec9abc697 sc7180: Fix DDR training failure during warm reset with OTA
Problem: OTA is triggering warmboot, where DDR is
in self-refresh mode. Due to which DDR training
is not going well.

Change: Verify reboot type in case of OTA. If it is warmboot, will
force for cold boot inorder to trigger DDR training

BUG=b:236990316
TEST=Validated on qualcomm sc7180 development board.

Test observation: Cold boot is triggered forcefully,
if current reboot is warmboot in case of OTA

Signed-off-by: Venkat Thogaru <quic_thogaru@quicinc.com>
Change-Id: I908370662292d9f768d1ac89452775178e07fc78
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67406
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-13 13:05:46 +00:00
Fred Reitberger bec412156a mb/google/skyrim: Enable ASPM
Enable Kconfig options for ASPM.

TEST=Verify ASPM is enabled with `lspci -vvv`, `suspend_stress_test -c
10` passed all 10 times
BUG=b:243771794

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: I54071d9c9607da4561d745d152924d56904c0fee
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-12 18:41:28 +00:00
Fred Reitberger ef79e77c58 mb/google/skyrim/port_descriptors.c: Update ASPM configuration
Update ASPM configuration, disabling ASPM for the SSD due to s0i3
issues.  Bug b:245550573 created to track the SSD issue.

TEST=Boot to OS and verify suspend via `suspend_stress_test -c 10`
BUG=b:243771794

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: I45a290c8ceddd39f65c6fe1390e3a753cad99899
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67304
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-09-12 18:40:46 +00:00
Elyes Haouas b366bcbd29 mb/amd/*/irq_tables.c: Reformat code
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: If6cdf02c56778da67b56afbb71f9f01107f23d2e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67519
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:32:36 +00:00
Elyes Haouas b40e185b9c mb/google/kahlee/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I4ccdd370d3e9aef938fae4c4690ec0bf4c53c500
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67517
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:31:14 +00:00
Elyes Haouas 7322384ca5 mb/lenovo/g505s/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ia4212e4a911a13a3288985bb3577cda771b600a7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67516
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:31:01 +00:00
Elyes Haouas b3bb646b7b mb/msi/ms7721/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ia34f758a6208d20a47b8fb28420ebd4c585d3699
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:30:43 +00:00
Elyes Haouas 1335f4bb81 mb/jetway/nf81-t56n-lf/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I86d664c7ebdd8ff8b47b498da7c861c11a80892c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:30:19 +00:00
Elyes Haouas caefe5c366 mb/lippert/frontrunner-af/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I2c1499a95c0d1d60a58506a043691e32ca8973de
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:29:54 +00:00
Elyes Haouas dceb2ff95e mb/elmex/pcm205400/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ibd155f6ec39cd6b4e5faee2eb63264eb90e70294
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67512
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:29:36 +00:00
Elyes Haouas 9a657e2b9d mb/biostar/a68n_5200/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I1ac0cc79f8cb13ea11fb32236ed5c9f0a4ab8586
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67511
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:29:20 +00:00
Elyes Haouas 53529b2698 mb/bap/ode_e20XX/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: If069604de6e24e0d591e84d54ae4d39bd14e21fb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67510
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:28:57 +00:00
Elyes Haouas f3f56a2567 mb/hp/*/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I3ba6a8dfb966038d63cfdeceb1e37eeb1a37343b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:28:41 +00:00
Elyes Haouas 135ab119a2 mb/gizmosphere/*/irq_tables.c: Use ALIGN_UP macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I19412b595b3a1d2026fce5a84ddbd6356abe5a3f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-09-12 15:28:17 +00:00