Commit Graph

54128 Commits

Author SHA1 Message Date
Felix Held b8b0c66cff soc/amd/common/acpi/ivrs: probe IOAPIC device on domain device
This reverts commit e33d253793 ("soc/amd/common/block/acpi/ivrs: fix
missing IOAPIC[1] error").

Now that the per PCI root domain IOAPIC MMIO resource is reported on the
domain device, we can again probe the resource on the domain device
instead of the northbridge PCI device in that domain. This will make the
IVRS code compatible again with the work in progress Genoa SoC support.

TEST=Linux doesn't complain about the IOAPIC[1] missing in the IVRS on
Mandolin.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib861b19d798fc8ee6603e8803d8d1939be08d275
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76659
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2023-07-25 13:34:12 +00:00
Felix Held 32169720bb soc/amd/common/data_fabric/domain: report non-PCI MMIO resources
Call read_non_pci_resources from amd_pci_domain_read_resources to tell
the resource allocator about the non-PCI MMIO regions within the data
fabric MMIO regions so that the allocator won't place any PCI MMIO in
the same areas.

TEST=On Mandolin 3 new non-PCI resources get reported to the allocator:
avoid_fixed_resources: DOMAIN: 0000 04 base fd100000 limit fd1fffff mem (fixed)
avoid_fixed_resources: DOMAIN: 0000 05 base fd000000 limit fd0fffff mem (fixed)
avoid_fixed_resources: DOMAIN: 0000 20000120 base fec01000 limit fec01fff mem (fixed)

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7f69b86e376e3368d4f156ccf93791cc00886489
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76599
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-07-25 13:33:57 +00:00
Felix Held c1be66ee60 soc/amd/glinda/root_complex: add non-PCI MMIO registers
Add the SoC-specific non-PCI MMIO register list. PPR #57254 Rev 1.52 was
used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I29b4ef947776ab8a6c215c1a5204769a9f61e6fe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76598
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-07-25 13:33:43 +00:00
Felix Held e0850ad6a0 soc/amd/phoenix/root_complex: add non-PCI MMIO registers
Add the SoC-specific non-PCI MMIO register list. PPR #57019 Rev 3.05 was
used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6f57df6ca09f1583409f6c4e68177b05b9f31def
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76597
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-25 13:33:34 +00:00
Felix Held 81c81e396f soc/amd/mendocino/root_complex: add non-PCI MMIO registers
Add the SoC-specific non-PCI MMIO register list. PPR #57243 Rev 3.02 was
used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I2c5173e596f3f3f1c63165871178dbbd0e9641be
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76596
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-07-25 13:33:09 +00:00
Felix Held 3b3d8025e7 soc/amd/cezanne/root_complex: add non-PCI MMIO registers
Add the SoC-specific non-PCI MMIO register list. PPR #56569 Rev 3.04 was
used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id99c64c172481984306814980a1ddf0b2d535413
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-07-25 13:32:58 +00:00
Felix Held 43662b53cb soc/amd/picasso/root_complex: add non-PCI MMIO registers
Add the SoC-specific non-PCI MMIO register list. PPR #55570 Rev 3.18 was
used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If7bfcdd9b70b71fe6aedcab3694698967d48e18e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2023-07-25 13:32:48 +00:00
Felix Held d8bbc6c8e4 soc/amd/common/root_complex: add function to report non-PCI resources
Introduce the common read_non_pci_resources function to read the base
address of the non-PCI resources within the MMIO regions configured in
the data fabric registers and pass that info to the resource allocator.
Each SoC will need to provide implementations for get_iohc_misc_smn_base
and get_iohc_non_pci_mmio_regs in order for read_non_pci_resources to
know the SoC-specific base addresses, register offsets and MMIO region
sizes. In case of SoCs with only one PCI root domain, the domain
parameter of get_iohc_misc_smn_base will be unused, but in the case of
SoCs with more than one PCI root domains, this parameter will be used by
the SoC-specific code.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If9aca67fa0f5a0d504371367aaae5908bcb17dd9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-07-25 13:32:33 +00:00
Patrick Rudolph 5ca756fb19 mb/ibm/sbp1: Improve SMBIOS type 17 entries
Add bank locator and slot existance to the mainboard code.

TEST: Verified on Linux that all slots show in dmidecode -t 17.

Change-Id: I4ced36e26368d3f99a7341cb55a8deb118b2d1a4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76677
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-07-25 13:26:32 +00:00
Elyes Haouas 2f872e9675 soc/intel/meteorlake: Remove dummy CPU_SPECIFIC_OPTIONS
Change-Id: I0f9299d4b7417efac0d5fba39d40b97d6c3a1926
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76684
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-07-25 13:23:54 +00:00
Naresh Solanki 0a12d2bdc8 soc/intel/xeon/spr: Improve RMT configuration
Set AllowedSocketsInParallel to 1 for RMT builds.
This help in associating any failures encountered during RMT run
with the corresponding Socket/MC/DIMM.

Intel recommended setting EnforcePopulationPor to 1 for RMT runs
for debugging failures if any.

Change-Id: Ie2301368e9470cc23171c3c4eca9fe978e1513d4
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76679
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-07-25 13:21:16 +00:00
Patrick Rudolph 6e0de5d9cc mb/ibm/sbp1: Drop SuperIO code
The SuperIO is not used so don't enable decoding of 0xE2 and
drop all code using it. It's not even required for the virtual
UART on 0x3f8 to work.

Add the virtual UART on 0x3f8 as ACPI device.

TEST: Verified on SBP1 that serial still works.

Change-Id: I8e431a0c8417435cc6e3ba16f97ff080e1656a7b
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-07-25 13:20:40 +00:00
Leo Chou ef4f2cd38e mb/google/nissa/var/pujjo: Generate SPD ID for new supported memory part
Add pujjo new supported memory parts in mem_parts_used.txt, generate
SPD id for this part.

1. Hynix         H58G56BK7BX068
2. Samsung	 K3KL6L60GM-MGCT, K3KL8L80CM-MGCT
3. Micron        MT62F1G32D2DS-026 WT:B

BUG=b:292452868
TEST=Use part_id_gen to generate related settings

Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Change-Id: Ia123a1cfd93a5e08ab0ba65f1d9be240d60ff356
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76672
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-25 10:26:49 +00:00
Subrata Banik 59a220b914 mb/google/rex: Create screebo4es variant
This patch creates a new variant screebo4es.

The new variant will support only ESx samples. The existing rex
variant will support the QS samples.

BUG=b:292280656
TEST=Able to build google/screebo4es board and boot on target
hardware.

Change-Id: If77b4a773bee3633008d39c1886b61869c9618de
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76668
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-07-25 04:58:40 +00:00
Subrata Banik ab5ced7de5 mb/google/rex: Use specific mainboard part name for each rex variants
BUG=b:290894460
TEST=`emerge-rex coreboot chromeos-bootimage`
     then check variant name with image*.bin.

Signed-off-by: YH Lin <yueherngl@google.com>
Change-Id: I8f739485dbaab074f57eaa4dacc9f228a3f4aa14
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76667
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-25 04:58:33 +00:00
Maximilian Brune 6dce55ea7d payloads/external/Linuxboot/Makefile: Guard u-root Makefile
The u-root.mk makefile needs to be guarded, because it introduces a
dependency on the go tooling.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ia89e4e7b9a1f73a7b622eeaa8d6148d99f9b327a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marvin Drees <marvin.drees@9elements.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-07-24 17:06:13 +00:00
Arthur Heymans 93aa0903a0 amdfwtool: Add early vga BIOS ID to enum
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ife8c166350030cb89d794ac42834d79ec933f278
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76467
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-07-24 15:13:12 +00:00
Fred Reitberger 2a1fc73fdf soc/amd/*/Makefile.inc: Do not add APOB NV entry when disabled
Do not add type 0x63 entry to amdfw.rom when APOB_NV cache is disabled.

BUG=b:290763369
TEST=boot birman multiple times with/without APOB_NV cache enabled

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: Iefe6f56d7dbedd289680f25a5f372eaa12e967b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76568
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-24 11:20:10 +00:00
Fred Reitberger c53ab57017 mb/google/myst: Disable APOB NV
Disable the APOB cache for only Myst, and re-enable APOB for other
Phoenix SOC mainboards.

BUG=b:290763369
TEST=verify APOB cache is disabled

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: Ie611e0b84611b2f50c989c75612fc2186b2dbfdf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76567
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2023-07-24 11:19:53 +00:00
Fred Reitberger 7bb960d7df soc/amd/common/block/apob: Add Kconfig option to disable APOB NV
Add Kconfig option to disable the non-volatile APOB cache for a
mainboard using an SOC that supports APOB.

BUG=b:290763369
TEST=verify APOB cache is disabled when selected

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: I0170355bbf29ea6386fa69a318e61f057b9a9a3f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76566
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-07-24 11:19:37 +00:00
Fred Reitberger 5f5e73cddd soc/amd/phoenix/Makefile.inc: Enable amdfw manifest
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: Ic030f91bbfd7226d7adbbe83a2f9e7930af46207
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76569
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-07-24 11:18:25 +00:00
Daniel_Peng ed7a474db5 mb/google/dedede: Add ALC5650 to AUDIO_AMP in devicetree
Mapping to the fw_config of AUDIO_AMP in dedede,
and set new AUDIO_AMP configuration of ALC5650 as value 4.

BUG=b:284060672
BRANCH=dedede
TEST=build pass

Change-Id: Ic3dccd09d3ba1619cce2ac0d5f123badbeeaccdc
Signed-off-by: Daniel_Peng <Daniel_Peng@pegatron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76602
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Daniel Peng <daniel_peng@pegatron.corp-partner.google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-07-24 03:57:33 +00:00
Nico Huber b37c51d3b6 toolchain.inc: Set CCACHE_COMPILERCHECK=mtime
From ccache(1):

mtime
  Hash the compiler’s mtime and size, which is fast. This is the default.

Hashing the compiler binary's content would only be necessary when we
expect different binaries of the same size with the same path (e.g.
during a compiler bootstrap) and wrong modification timestamps (might
happen when checking an older version out of a (package) repository).
Neither should be the case during our builds. And even if everything
fails at once, chances are additionally low that a wrong cache hit
would cause a problem.

tl;dr we're building and testing firmware, not toolchains.

Change-Id: I264a72c628559384fcc2060d777c52af927d5e14
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76561
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-07-23 22:39:53 +00:00
Martin Roth baf82808ae util/docker: Update libncurses5-dev to libncurses-dev package
The libncurses5-dev package no longer seems to be available in debian
sid. It's been marked as a transitional package, pointing to
libncurses-dev (ncurses 6) for since 2018, so this patch updates the
package to the new name.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I81e1a174ab25f573a7d7711eeeb26ef22fd3854b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76705
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-07-23 20:59:19 +00:00
Arthur Heymans 2e3cb63925 acpi.c: Add functions to create GTDT
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ica6b2d79d61558706998edbbaee185125ff5b36c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76296
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-07-23 18:26:13 +00:00
Maximilian Brune c202be793f payloads/external/LinuxBoot: Clean up
There were some issues with the current Linuxboot Makefiles.
- multithreaded compilation didn't work, because some prerequisites
  were missing
- initramfs wasn't added for x86 qemu boot.
- riscv support was incomplete

It began with separate patches, but resulted in a clean up patch, that
is hard to separate. The most important changes are the following:
- Instead of phony targets, actual files are now used as prerequisites
- riscv can now be used as target
- initramfs works now also for x86
- instead of querying the most recent version from the internet, I set a
  known working version (because I tested it) that can be customized
  and/or upgraded in the future. The reasons:
      - querying the version from the internet requires a constant
        connection to the internet even after linux kernel is already
        build (aka subsequent builds).
      - one usually wants to use a known working version, but optionally
        still have the posibillity to choose a custom one. This patch
        introduces this possibility in its most simple form.
- I removed as much ifeq statements as possible and moved that
  responsibility to Kconfig, because they tend to make the
  Makefile less readable.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I25e757108e0dd473969fe5a192ad0733f1fe6286
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76150
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-23 18:24:39 +00:00
Subrata Banik 449c6d981c mb/google/rex/var/screebo: Reduce TCC from 90°C to 80°C
This patch increases the `tcc_offset` to reduce the TCC
(Thermal Control Circuit) activation temperature to avoid running
into abrupt power off during power cycle tests.

On Intel processors, the core frequency can be by an HW agent when
the current temperature reaches the TCC activation temperature.

The default TCC activation temperature is specified by MSR_IA32_TEMPERATURE_TARGET (which is 90°C for google/rex variants).

However, this patch adjusted the TCC by specifying an offset in
degrees C (i.e., using `tcc_offset` from variant override device tree).

Note: The bigger the TCC offset is, the lower the effective TCC activation temperature would be, to ensure that processors can be throttled earlier before the system critical overheats.

BUG=b:283008762
TEST=Able to perform power cycle on google/screebo w/o any crash/shutdown.

Change-Id: Ib19703877dbbfc26b2d9f538dda4f10c27cf872d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76658
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-07-22 17:50:50 +00:00
Bora Guvendik 4a58d14506 soc/intel/alderlake: Hook up UPD PchHdaSdiEnable
Hook the PchHdaSdiEnable UPD so that mainboard can change the
settings via devicetree. PchHdaSdiEnable UPD enable HDA SDI lanes.

BUG=b:268546941
TEST=Verified the settings on google/brya using debug FSP logs.

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I82bbfa5442936aefa53f8826e395b7ce75c895a3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76449
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2023-07-21 19:17:41 +00:00
Rob Barnes 0572d557ac mb/google/volteer: Add EC_HOST_EVENT_PANIC to SCI mask
Adding EC_HOST_EVENT_PANIC to SCI mask allows the EC to interrupt the
Kernel when an EC panic occurs. If system safe mode is also enabled
on the EC, the kernel will have a short period to extract and save info
about the EC panic.

BUG=b:290985698
BRANCH=firmware-volteer-13672.B
TEST=Observe kernel ec panic handler run when ec panics

Change-Id: I87173f93d0e47baa816d15dad0777007342b4fdb
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76610
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-07-21 13:52:15 +00:00
Subrata Banik f9419eadf1 mb/google/rex: Use BOARD_GOOGLE_MODEL_REX instead variant name
Choose BOARD_GOOGLE_MODEL_REX while setting up the default config value
for variants created using google/rex model.

TEST=Able to build and boot google/rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I107f4e375b5c9e9c0fb80c4d396164c10c1fc1e7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76657
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-07-21 07:58:25 +00:00
Dinesh Gehlot 648ad8c5b1 mb/google/rex: Create rex4es variant
This patch creates a new variant rex4es. The new variant will support ESx samples. The existing rex variant will support the QS samples.

BUG=b:290732344
TEST=Able to build google/rex4es board and boot on target hardware.

Change-Id: I25dd1f42ee812f47289da0c2ef7aa79d6f340d48
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76605
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-07-21 07:57:59 +00:00
Subrata Banik ecb2a84690 mb/google/rex: Create a `rex` model for easier variant integration
This patch creates  a rex model so that other variants developed using
`rex` baseboard are easy to land without duplicating the config
selection.

So far, `rex0` and `rex_ec_ish` are developed using the `rex` model.
The plan is to extend the support for `rex4es` and `rex4es_ec_ish`
variants.

TEST=Able to build and boot google/rex.

Change-Id: Id4e8d1162da93b7266ee1108f870e89b6d884ab9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76608
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-07-21 07:57:53 +00:00
Arthur Heymans 92a3b67eae acpi/acpi.c: Split of ACPI table generation into separate files
acpi.c contains architectural specific things like IOAPIC, legacy IRQ,
DMAR, HPET, ... all which require the presence of architectural headers.

Instead of littering the code with #if ENV_X86 move the functions to
different compilation units.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I5083b26c0d4cc6764b4e3cb0ff586797cae7e3af
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76008
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-07-21 07:33:37 +00:00
Arthur Heymans 9c1f78d3e5 acpi/acpigen.c: Ignore compiler warning about stack overflowing
With arm64 -Wstack-usage= is enabled which is triggered on any use of
alloca(). Since this function basically works on x86 without wrecking
things and causing massive stack consumption it's unlikely to cause
problems on arm64.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I5d445d151db5e6cc7b6e13bf74ce81007d819f1d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76007
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-07-21 07:33:06 +00:00
Konrad Adamczyk 86dfcb80ce vendorcode/amd/fsp/common: Refactor dmi_info.h
SoC family is able to provide SoC-specific information
via amd/fsp/<soc_family>/soc_dmi_info.h.

Use common amd/fsp/common/dmi_info.h for all AMD platforms.
This way, duplicated dmi_info.h files in
vendorcode/amd/fsp/<soc_family>/ can be removed.

BUG=b:288520486
TEST=Dump `dmidecode -t 17`.

Change-Id: I5e0109af51b78360f7038b20a2975aceb721a7d5
Signed-off-by: Konrad Adamczyk <konrada@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76107
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-21 07:30:08 +00:00
Matt DeVillier 0a96a1ca06 soc/amd/common/pi: Ensure AGESA S3 resume called before SMM lock
AGESA S3 restore needs to occur before SMM finalization/locking,
but it's a crapshoot as to which runs first since both use the same
BS_OS_RESUME/BS_ON_ENTRY boot state callback, and there's no way
to prioritize/force ordering.

To work around this, move the AGESA S3 resume call to the preceding
boot state (BS_OS_RESUME_CHECK) to ensure it runs first, and guard it
to ensure it only runs on the S3 resume path.

BUG=none
TEST=build/boot google/liara, verify S3 resume successful.

Change-Id: I765db140c6708a0b129f79fb7d3dc8a4ab3095bd
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76592
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2023-07-20 20:33:12 +00:00
Wentao Qin cecb7a75b8 mb/google/rex/var/screebo: Change GPIO of WIFI module
Follow baseboard Rex to make GPIO changes

BUG=b:286187821
TEST=Ability to enable and disable WIFI function in OS.

Change-Id: I805ce859c42c7c0a9d117418a80555658f844e09
Signed-off-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76551
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
2023-07-20 15:01:04 +00:00
Felix Held c3529dd804 soc/amd/common/smn/Kconfig: expand SMN acronym
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icce4092f1e09d492e0faf4b5e85525871614d73d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76607
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-07-20 14:24:53 +00:00
Felix Held ed7b1c4ba0 soc/amd/common/block/smn: add smn_read64
Add smn_read64 which calls smn_read32 twice to read two adjacent 32 bit
SMN registers and merges the results into a 64 bit value which it then
returns.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib2d58ec9818559cbefd7b819ae311ad02fafa18f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-07-20 14:24:07 +00:00
CoolStar 545d9992dc mb/google/link: rework TP/TS ACPI for new Windows I2C driver
This supports a brand new I2C driver that is designed specifically
for the Pixel 2013 chromebook (LINK). The GMBus interface on the IGPU
is an i2c-compatible interface, but AFAIK only Link has touch devices
attached in this way.

On Windows, the PCIe device for the IGP is owned by the Intel
proprietary driver, hence a separate ACPI device has to be added for
the I2C driver arbitrator to attach to. The MMIO method is used instead
of _CRS so that Windows does not try to assign ownership of the
resource to our device (even though we're using the MMIO registers at
the same time as the IGP driver).

Even though in theory 2 drivers accessing the same MMIO may cause
problems, in testing, there has been no issues with
sleep/wake/hibernate, updating/installing/uninstalling the IGP driver,
or changing display resolutions with the i2c driver attached.

The arbitrator is necessary as well, since even though there are
multiple i2c buses, the MMIO registers are shared. Hence a shared lock
is required for i2c access across the buses.

The original Sleep Button devices are preserved for Linux due to the
completely custom and non-standard implementation of the Windows driver
in order to work around the non-standard nature of Link's hardware.

Change-Id: If7ee05d15bc17d335cf8c1a8e80bea62800de475
Signed-off-by: CoolStar <coolstarorganization@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76159
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-07-20 13:11:16 +00:00
Felix Held 97439ecc01 soc/intel/xeon_sp: use VGA_MMIO_* defines from arch/vga.h
Now that we have x86 architecture specific VGA_MMIO_* defines in
arch/vga.h, use those instead of having SoC-specific defines for this.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I77b914d563bdc83e7fad7d7fccd5cf7777cb4918
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75669
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-07-20 13:10:41 +00:00
Arthur Heymans 8193eabd8d acpi: Add GTDT structs
Copied from Linux kernel.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I09f84e63346a270f1c7b77e8088b114800ff4864
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75923
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-20 10:39:53 +00:00
Arthur Heymans a9a92ac961 acpi: Move ECAM resource below PNP0C02 device in a common place
From the Linux documentation (Documentation/PCI/acpi-info.rst):
[6] PCI Firmware 3.2, sec 4.1.2:
    If the operating system does not natively comprehend reserving the
    MMCFG region, the MMCFG region must be reserved by firmware.  The
    address range reported in the MCFG table or by _CBA method (see Section
    4.1.3) must be reserved by declaring a motherboard resource.  For most
    systems, the motherboard resource would appear at the root of the ACPI
    namespace (under \_SB) in a node with a _HID of EISAID (PNP0C02), and
    the resources in this case should not be claimed in the root PCI bus’s
    _CRS.  The resources can optionally be returned in Int15 E820 or
    EFIGetMemoryMap as reserved memory but must always be reported through
    ACPI as a motherboard resource.

So in order for the OS to use ECAM MMCONF over legacy PCI IO
configuration, a PNP0C02 HID device needs to reserve this region.

As no AMD platform has this defined in DSDT this fixes Linux using
legacy PCI IO configuration over MMCONF. Tianocore messes with e820
table in such a way that it prevents Linux from using PCIe ECAM. This
change fixes that problem.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I852e393726a1b086cf582f4d2d707e7cde05cbf4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75729
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-20 10:38:42 +00:00
Annie Chen d31cbc74d1 mb/inventec: Add Intel SPR server board Inventec Transformers
CPU:
- 2 SPR sockets
- 64 total PCIe 5.0 lanes with up to 64 lanes of Flex Bus/CXL per CPU
- Up to 32 DDR5 DIMM
- 1 Gbase-T NIC port
- 1 USB3.0 type A, 1 USB2.0 connector
- 1 VGA connector

BMC:
- ASPEED AST2600 BMC
- 1 DDR4 8Gb memory
- 1 8GB eMMC

Test:
The board boots to Linux 4.19.6 with all 192 cores available.

Change-Id: Ic9d99c3aadaa9f69e6d14d4b1a6c5157f5590684
Signed-off-by: Annie Chen <Chen.AnnieET@inventec.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75598
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Wei Chen <Chen.HW@inventec.com>
Reviewed-by: Annie Chen <chen.annieet@inventec.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-07-20 10:11:07 +00:00
Dtrain Hsu 77b71cf9d7 mb/google/nissa/var/uldren: Decrease GT7996F stop_delay_ms to 200ms
In order to reduce S0ix resume time, decrease stop_delay_ms from
300ms to 200ms for Goodix GT7996F. The value source is from
https://partnerissuetracker.corp.google.com/issues/285999032#comment16.

BUG=b:285999032
BRANCH=firmware-nissa-15217.B
TEST=boot uldren to ChromeOS and touchscreen is workable.

Change-Id: I2f0adadbd3d0774da03338cc0abd1639104876d9
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76577
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-07-20 05:20:28 +00:00
Cong Yang bb0c68ff9e drivers/mipi: Modify INX_P110ZZD_DF0 panel initialization code
There is a problem of screen shake on the old panel[1]. So increase the
panel GOP component pull-down circuit size in hardware, and update the
initialization code at the same time. The new initialization code is
mainly adjusted for GOP timing. When Display sleep in, raise all GOP
signals to VGHO and then drop to GND. In order to be consistent with
the current panel model, let's rename this file.

[1]: INX old panel product number is HJ110IZ-01A-B1, and the new
panel product number is HJ110IZ-01A-B2. We have recalled the shipment
old panel.

BUG=b:270276344
BRANCH=trogdor
TEST= test firmware display pass

Change-Id: I2b2534afee1ed700c39d3c360aafd685b63ccbfb
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74973
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-07-20 00:36:59 +00:00
Subrata Banik d0eeba38de mb/google/rex/var/ovis: Update the Type-C USB2/3 port mapping
This patch updates the Type-C USB2/3 port mapping to reflect the mux
connection change as mentioned in previous patch
commit ee3f796200 (mb/google/rex/var/ovis: Fix mux
change as per schematics).

Here is the correct port mapping after considering the mux swap:

+--------------------------------+-------------+---------------+
| TCSS-USB Mapping |  Port C0    |    Port C1  |   Port C2     |
+------------------+-------------+-------------+---------------+
|  USB2-Port       |     2       |      3      |      1        |
|  USB3-Port       |     0       |      2      |      1        |
+------------------+-------------+-------------+---------------+

BUG=b:289300284
TEST=Able to build and boot google/ovis to get display over Type-C1
and Type-C2 port.

Change-Id: I460004842dd8fcdc03fca6639d03e422259380ca
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76464
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-19 13:24:22 +00:00
Subrata Banik 5259568bda soc/intel/alderlake: Use 1MB CBMEM console buffer with FSP debug
Patch to increase CONSOLE_CBMEM_BUFFER_SIZE to contain FSP debug serial log.

The existing implementation uses larger cbmem size irrespective of FSP debug is enabled or
not. Ideally. larger cbmem size is required only if FSP debug is enabled.

Bug=b:284124701
TEST=Able to build and boot google/marasov.

Change-Id: I9a9e660f2738813808e0dd65d2783424b49f9a5e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76541
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-07-19 13:02:09 +00:00
Subrata Banik 9d78308194 soc/intel/{adl, mtl}: Reduce CAR usage while using FSP debug binaries
Reduces the CAR (Cache-as-RAM) variable usage while using FSP debug binaries, which can prevent the CAR from becoming too full and unable
to integrate other CAR global variables.

This change has the following downsides:

- FSP debug output into the cbmem buffer will be partial.

To test this change, you can:

Build and boot google/rex without any function impact with non-serial
and serial FSP debug image (unless what has been documented here).

Bug=b:284124701
TEST=Able to build and boot google/rex.

Change-Id: I16a1aa25fd32327d03a37381a696c86c95014ba0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76540
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-07-19 13:01:57 +00:00
Kun Liu 5f8f05b1b5 mb/google/rex/var/screebo: Change SD_CLKREQ_ODL from GPP_D19 to GPP_D18
Change SD_CLKREQ_ODL from GPP_D19 to GPP_D18

BUG=b:291051683
BRANCH=none
TEST=emerge-rex coreboot

Change-Id: Ic102e42482328580c5334e6ff036b774f5002e00
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76565
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-07-19 07:50:34 +00:00