Commit Graph

55732 Commits

Author SHA1 Message Date
Matt DeVillier 5eb6e55257 mb/google/drallion: Use name 'LCD0' for internal panel output
The GMA driver generates the brightness controls expecting the name
LCD0, so we need to use it here as well so that the DSDT and SSDT parts
match.

TEST=build/boot Win11 on google/drallion, verify brightness controls are
functional.

Change-Id: I6fbdd0c5606ec8f2c497e85bf46d388957f15fa5
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80175
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-02-13 19:02:48 +00:00
Matt DeVillier 4f86e1da81 mb/google/puff: Hide LSPCON device from Windows
Puff-based Chromeboxes use a LSPCON for HDMI 2.0 output, but no driver
exists or is needed for Windows. Use the devicetree hidden keyword to
set the ACPI status to hidden for these devices, to prevent unknown
devices from being listed in Windows Device Manager.

TEST=build/boot Win11 on google/wyvern, verify no unknown devices in
Windows Device Manager for either LSPCON device.

Change-Id: Ib646e01a337b8d7baf20a886c49a8cb64d6408f3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78040
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-02-13 19:01:59 +00:00
Matt DeVillier 83956aa2d6 mb/google/volteer/drobit: Add a board-specific VBT file
Add a board-specific VBT file compatible with the latest FSP release
(requires VBT version 250).

TODO: Update all other volteer VBTs to v250 from v240.

TEST=build/boot google/volteer (drobit) with edk2 payload

Change-Id: Ie25a77be5204dfc8b888082492a285973843037c
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80183
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-02-13 19:00:53 +00:00
Subrata Banik 9083f1c501 soc/intel/alderlake: Leverage IA common code for range calculations
Improves code maintainability and potentially reduces redundancy by
using the IA common implementation.

Additionally, drop the unused macros from SoC local.

TEST=Build and boot successful on google/marasov.

Change-Id: I290fea99f04cfc9f18e5f1435ed07de42995869f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80403
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-13 09:52:46 +00:00
Subrata Banik 3e4395a8e8 soc/intel/meteorlake: Leverage IA common code for range calculations
Improves code maintainability and potentially reduces redundancy by
using the IA common implementation.

Additionally, drop the unused macros from SoC local.

TEST=Build and boot successful on google/screebo.

Change-Id: Ie0baae1d3b0093389649dee3531902c5e86c02fe
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80404
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-02-13 09:52:33 +00:00
Subrata Banik 8b53204d80 soc/intel/cmn/sa: Add APIs into System Agent (SA) common code
This commit streamlines code and strengthens common code robustness
by moving the following SoC-layer functions to the common layer:

- sa_get_mmcfg_size: Retrieves the MMIO (Memory-Mapped I/O)
                     configuration space size by reading offset
                     0x60 of the PCI Host Bridge (D0:F0).
- sa_get_dsm_size: Calculates the size of the DSM (Device Stolen
                   Memory) by reading offset 0x50 of the PCI
                   Host Bridge (D0:F0) to determine pre-allocated
                   memory for the IGD (Integrated Graphics Device).
- sa_get_gsm_size: Calculates the size of the GSM (Graphics Stolen
                   Memory) by reading offset 0x52 of the PCI Host
                   Bridge (D0:F0).
- sa_get_dpr_size: Determines the size of the DMA Protection
                   Range (DPR) by reading offset 0x5C of the PCI
                   Host Bridge (D0:F0).

TEST= Build and boot successful on google/screebo.

Change-Id: Ic00e001563ec6f0d737a445964c716b45db43327
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-02-13 09:52:25 +00:00
Keith Hui 23d8611d17 mb/asus/p8z77-m/hda_verb.c: Use existing defines for NC pins
Goal is to use existing defines for all pins to make the file
self-documenting, but it would make lines too long, so I'll just
start with the NC pins.

TEST=Timeless binary did not change.

Change-Id: I6da02d7bc4c87cc8477d687b238e6e6c9aec62cd
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79733
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-12 14:02:05 +00:00
Varshit Pandya a2acdce8d1 soc/amd/picasso: Use gpp_clk_setup_common function
In follow up to CB:80285 use gpp_clk_setup_common for picasso as well.

Change-Id: I68d498d08d5975037086c84ff2f7fdb265ee84d9
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80414
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-12 13:58:50 +00:00
Varshit Pandya ef513773ab soc/amd/picasso: Use pcie_gpp_dxio_update_clk_req_config
This function turns off gpp_clk for the devices which are disabled, and
adds the code to fix up the clock configuration depending on dxio
descriptors. Also this brings picasso in line with cezanne, mendocino
and phoenix. This also prepares picasso to use the common function
gpp_clk_setup_common.

Change-Id: Ice2e3a5a78359da9a438434c7d4aa1eca878d396
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80413
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-02-12 13:58:32 +00:00
Varshit Pandya ddd002010f vc/amd/fsp/picasso: Bring picasso inline with other AMD SoC
In preparation to using gpp_clk_setup_common for picasso, bring enum
defined in picasso more in line with other AMD SoC.

Change-Id: I9753acdff15921c84516ec873c925f36afdd2aa3
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80412
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-02-12 13:58:10 +00:00
Evgeny Sorokin d48d72c9ce ec/lenovo/h8/acpi: Support pulsing LEDLOGO on Haswell ThinkPads
The name LEDLOGO comes from schematics. It's the red indicator, embedded
in the dot of the 'i' of the ThinkPad logo on laptop's lid.

In vendor firmware, this led starts fading in-and-out, or, in other
words, pulsing, when laptop is put to S3. It helps to determine whether
the laptop is in S3 just by taking a look at the logo.

As of now, coreboot doesn't do anything with this particular indicator,
it's always in enabled (on) state, which is not very convenient.

This patch fixes it.

Tested on T440p.

Change-Id: I85fb69c8c1bed8635a1b31e9b8385c7036bb46dd
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80437
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-12 13:03:32 +00:00
Nicholas Sudsgaard 60a68295b8 util/intelmetool: Add Intel Union Point support
The device IDs were taken from the 200 series datasheet (page 24).

Change-Id: I34b5cb61dd7b561778cc8506858cd436e6f04f9a
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80419
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-12 04:47:24 +00:00
Stefan Reinauer a295ac1d44 crossgcc: Add buildgcc support for Apple M1/M2 devices
GMP and IASL don't compile with the default compiler and linker flags:
- GMP's check for the MacOS architecture hard coded x86_64 but it also
  needs to know about arm64.
- iasl does some trickery on pointer alignment to save space(?), so we
  need to tell clang about it.

Change-Id: If4cca9d3e55051a6121d992e5320bee1df17af9f
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80435
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-12 04:45:03 +00:00
Subrata Banik e9fd562a83 soc/intel/cmn/sa: Refactor SA common code
Leverages common SA header definitions for Host Bridge registers.
Renames DSM_BASE_ADDR_REG to BDSM and DPR_REG to DPR for brevity.

Additionally, made some minor code alignment corrections while
adding newer macros in the header file.

TEST= Build and boot successful on google/screebo.

Change-Id: I476f213d75a0978336b3749a5ba1499107eb2238
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80361
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: sridhar siricilla <siricillasridhar@gmail.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-02-12 04:13:23 +00:00
Maximilian Brune a2eca49d83 drivers/uart/sifive.c: Fix divisor calculation
The divisor is calculated using the following formula:
div = (frequency / baudrate) - 1;

The current implementation however essentially calculates:
div = (frequency / baudrate);

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I8a0898ce9016a70c0f91dc8a99fc1cf9e46d20c4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79951
Reviewed-by: ron minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-02-10 17:29:45 +00:00
Maximilian Brune 2d26e9bdce arch/riscv/boot.c: Comment OpenSBI Supervisor mode switch
It simply adds a comment to indicate to the reader that the
RISCV_PAYLOAD_MODE_S parameter causes OpenSBI to switch to Supervisor
mode. Otherwise it could be interpreted that coreboot switches to
Supervisor mode before starting OpenSBI (which is not the case)

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ib62be0c2ff59361200df4c65f9aca5f7456a0ada
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79949
Reviewed-by: ron minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Hug <philipp@hug.cx>
2024-02-10 17:28:47 +00:00
Varshit Pandya 0452d0939e soc/amd: Factor out gpp_clk_setup function
gpp_clk_setup code in most AMD SoC is similar and it can moved to common
code. The only thing which is SoC dependent in this function is the SoC
config, hence keep it in SoC code and move everything else in new
gpp_clk_setup_common function which is in soc/amd/common. Picasso and
Glinda don't have pcie_gpp_dxio_update_clk_req_config fixup function so
they are addressed in later patches.

Change-Id: I7d7da4bfe079f07e31212247dbf3acd14daa6447
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80285
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-10 16:53:22 +00:00
Shelley Chen 9f297080aa mb/google/brox: Initialize TCHSCR_RST_L to 0
TCHSCR_RST_L signal was originally being configured to 1 in gpio.c but
this was causing some leakage.  Configuring it to 0 initially in
romstage fixes this.  Also, make sure that EN_PP3300_TCHSCR is
initialized in romstage as well.

BUG=b:322249892
BRANCH=None
TEST=Make brox boots and touchscreen is still working

Change-Id: I5bf1901a3a40a38237b950abcb758f96aebcc1cf
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80300
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-09 17:56:02 +00:00
Patrick Rudolph 344ebf1f81 acpi/acpi: Pass struct device to acpi_create_srat_gia_pci
Instead of S:B:D:F numbers pass the struct device to
acpi_create_srat_gia_pci and let it extract the information needed.

This also adds support for PCI multi segment groups.

Change-Id: Iafe32e98f0c85f14347695ccaa0225e43fad99e7
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80258
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-09 13:47:00 +00:00
Patrick Rudolph f25d58c9a5 soc/intel/xeon_sp/numa: Store pointer to device
Instead of a BDF number store a pointer to the device itself.

Change-Id: I3fef93c5e54c8af792102bcd25364c43b554a5f0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80257
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-02-09 13:44:45 +00:00
Weimin Wu bb41e69588 mb/google/nissa: Skip GPP_F15 GPIO locking to avoid IRQ storm
There is an existing issue for nissa where wake up from RTC wake is not working during suspend_stress_test.

The phenomenon of the issue is that after pulling out the stylus, can see an interrupt storm occurs, checking through:
"cat /proc/interrupts | grep acpi".

When the counter of interrupt is greater than a certain value, "Disabling IRQ #9" will occur, so RTC wake is not working.

Reference: https://review.coreboot.org/c/coreboot/+/65086

This patch skips the locking for GPP_F15 to allow kernel to
configure it later. The interrupt storm of acpi disappears.

BUG=b:321348117
TEST=1. cat /proc/interrupts | grep acpi
there isn't interrupt storm of acpi when pulling out stylus.
2. The stylus tools panel will pop up when pulling out it.
3. Inserts stylus can wakeup DUT after powerd_dbus_suspend.
4. Passed:
   suspend_stress_test -c 2500 --suspend_min=15 --suspend_max=20

Change-Id: Ie143c43e0555d17d8a290f17637b537fba806144
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80316
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-09 13:43:33 +00:00
Weimin Wu 0740d96e7e mb/google/nissa/var/anraggar: Config DP AUX BIAS according to fw_config
EVT mini-build changes redriver IC from PS8745 to ANX7493, the ANX7493 not support DP AUX BIAS, so connects DP AUX BIAS of DB to SOC directly. Add DB_AUX_BIAS bit field to fw_config for compatibility.

BUG=b:320235566
TEST=DP function of MB and DB workable

Change-Id: I53974ec7444912a63d0fe0a9303c9e5d6941f68d
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80259
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-09 13:42:21 +00:00
Alper Nebi Yasak 8a505902c0 drivers/qemu: Drop redundant vga_io addition to ramstage
While introducing driver support for QEMU Cirrus display device, commit
7905f9254e ("qemu: cirrus native video init") also explicitly adds
VGA I/O functions into ramstage class when Bochs display driver support
is enabled.

Later, commit db7d04d1b7 ("qemu: Support textmode gfx init.") makes
the related config option select CONFIG_VGA, which also adds the same
file into ramstage class (among other things) in another Makefile.

Doing this twice is unnecessary. Remove the addition based on the Bochs
display driver's config option. Adding it based on CONFIG_VGA is
clearer, and future patches will try to support a Bochs display without
legacy VGA support on non-x86 architectures.

Change-Id: Ib31344e242689682d74d8a83c97b6e8027641926
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80374
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-02-09 13:41:26 +00:00
Matt DeVillier 8facfa84ac mb/google/puff/var/*: Clean up SerialIO/I2C config in overridetree
Ensure that the SerialIoDevMode config and common_soc_config registers
for each variant are programmed consistently with the devices'
enabled status in that variant's overridetree; remove and disable
extraneous devices as appropriate.

TEST=build/boot several puff variants, verify all components working
as expected, nothing missing from cbmem, lspci, etc.

Change-Id: Ib9d0cf48e405be7c00c553646651fc6f28c4e3f0
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80164
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-08 23:16:22 +00:00
Matt DeVillier 3f4c830bf6 mb/google/puff/var/*: Drop redundant device entries in overridetree
Now that the puff baseboard uses chipset devicetree references, remove
all references whose value is identical to the chipset devicetree
default or the baseboard default, since they are pointless clutter.

TEST=tested with rest of patch train

Change-Id: Iada32111367fdc964d6126ee43e261c1feb123cf
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80163
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-02-08 23:16:11 +00:00
Matt DeVillier 14a9f3e1d6 mb/google/puff: Delegate I2C device configuration to overridetree
Don't enable the i2c controllers, since the variants will enable the
ones they need individually in their overrridetrees.
Disable gspi1 since all variants disable it in their overridetrees.

TEST=tested with rest of patch train

Change-Id: Ia9c67a8e05923a080e31d04721ecae4c810e82e8
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80142
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-02-08 23:16:03 +00:00
Matt DeVillier 37601980fb mb/google/puff: Drop devicetree entries identical to chipset.cb
Now that puff uses chipset devicetree references, remove all references
whose value is identical to the chipset devicetree default, since
they are pointless clutter.

TEST=tested with rest of patch train

Change-Id: I3a515f13df1252ed2b769a535da22a523c95c359
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80141
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-08 23:15:54 +00:00
Felix Singer d571ea2eac mb/google/puff: Use chipset dt reference names
Use the references from the chipset devicetree as this makes the
comments superfluous.

Change-Id: I06a3acca0a72ff158a0143acc87d9479b2deb0d5
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80017
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-02-08 23:15:48 +00:00
Felix Held e04ee222d5 soc/amd/common/data_fabric/domain: drop unneeded parenthesis
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I84a7b7b1b2c45b773c6f10b39e7813db3f96546e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80408
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-08 21:26:38 +00:00
Felix Held bf76998c96 soc/amd/common/data_fabric/domain: don't report DRAM as MMIO producer
In commit 30f36c35e7 ("soc/amd: rework DRAM and fixed resource
reporting") the reporting of the DRAM resources was moved from the
northbridge PCI device to the domain device. amd_pci_domain_fill_ssdt
didn't skip those DRAM resources when generation the resource producer
ranges which made Windows 10 very unhappy when it tried to evaluating
the ACPI tables causing it to reboot in a loop. To fix this, add a check
to also skip the resources that have the IORESOURCE_STORED flag set when
generating the resource producer ranges for the PCI root.

TEST=Windows 10 now successfully boots and reboots again on Mandolin

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7b6d3fd8c7f89aa4364de7963d745aef8d6b6f42
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80407
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>
2024-02-08 21:26:15 +00:00
Julius Werner 5ec3deac6b libpayload: timer: Revert timer_hz() return type to 64-bits
It seems that reducing the return type of timer_hz() to uint32_t in
CB:78888 was a bad idea... some Intel platforms actually use their raw
CPU clock for the timestamp counter which can be higher than 4GHz. This
patch reverts it back to uint64_t.

Also remove the redundant assertion in timer/generic.c since timer_us()
itself already does that check.

Cq-Depend: chromium:5274555
Change-Id: I471c7de7a28aec5bb965b23525ed579481ac8361
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80320
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-02-08 21:07:13 +00:00
David Ruth ddc5260e3b mb/google/nissa/var/yaviks: Enable USE_MTCL and DRIVERS_MTK_WIFI
This patch selects the DRIVERS_MTK_WIFI and USE_MTCL configs for google/yaviks as
the first platform that provides a country list to the Linux kernel via an
ACPI function (MTCL) in SSDT for MediaTek WiFi chipsets that are capable of
operating on the 6GHz band.

BUG=b:295544553
TEST=Build on similar model (PUJJO) that I have access to and verify the
flag and feature work as intended.
TEST=Add wifi_mtcls.bin blob to cbfs
TEST=Build coreboot for pujjo `emerge-nissa coreboot chromeos-bootimage`
TEST=Verify that MTCL defined in the file is present:
TEST=`acpidump -b`
TEST=`iasl ssdt.dat`
TEST=`less ssdt.dsl`
TEST=Search for MTCL

Change-Id: Iec54fc582d68b443665fceda47187c28f1a9216c
Signed-off-by: David Ruth <druth@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80305
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-02-08 13:14:21 +00:00
Julius Werner b506020076 commonlib: Change GCD function to always use 64 bits
It seems that we have some applications where we need to calculate a GCD
in 64 bits. Now, we could instantiate the algorithm multiple times for
different bit width combinations to be able to use the most efficient
one for each problem... but considering that the function usually only
gets called once per callsite per stage, and that software emulation of
64-bit division on 32-bit systems doesn't take *that* long either, we
would probably usually be paying more time loading the second instance
of the function than we save with faster divisions. So let's just make
things easy and always do it in 64-bit and then nobody has to spend time
thinking on which version to call.

Change-Id: I028361444c4048a0d76ba4f80c7334a9d9983c87
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80319
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-02-08 13:13:58 +00:00
Arthur Heymans 3edf840ad1 cpu/x86/64bit: Turn jumping to long mode into a macro
This makes it easier to reuse, e.g. if you want to do it twice in one
assembly file.

Change-Id: Ida861338004187e4e714be41e17c8447fa4cf935
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79261
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-02-08 13:11:59 +00:00
Arthur Heymans cdea508a02 cpu/qemu-x86/cache_as_ram: Move guard
Although entry64.inc does guard against ENV_X86_64, it's more aesthetic
to have it with the other 64bit code below a guard just like other
platforms.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: If3ef19dd6654cd2fa0be3c68dee4a472e7a7935d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-02-08 13:11:50 +00:00
Yi Chou a90a44c1b5 soc/mediatek/mt8188: Enable CROS_WIDEVINE_SMC
BUG=b:248612503
TEST=Test with crrev.com/c/4756330
BRANCH=none

Signed-off-by: Yi Chou <yich@google.com>
Change-Id: I3dded9042abd85a948598f98475c21a1af9b4d80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80315
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-02-08 13:04:10 +00:00
Ashish Kumar Mishra ecbc243a45 cpu/x86: Add 1GiB pages for memory access up to 512GiB
Current pagetable implementation allows memory access up to 4GiB using
2MiB pages. If user wants to access more than 4GiB with a 2MiB page it
will require more pagetable entries. By using a 1GiB page table, users
can access more than 4GiB of memory while reducing the number of
pagetable entries. This patch enables memory access up to 512GiB through
1GiB pages by selecting USE_1G_PAGES_TLB in Kconfig.

TEST: Verified in 64bit mode boot and access above 4GiB

Change-Id: Id569ae5b50abf5b72e4db33b5e4cd802399e76ec
Signed-off-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80088
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-02-08 13:02:34 +00:00
Ashish Kumar Mishra 32ebaef73c mb/google/brox: Handle GPI_INT pin lower to GPI_WAKE
In case where PAD_CFG_GPI_INT() is initialized with a pin value
lower to PAD_CFG_GPI_IRQ_WAKE() for same GPIO community
the set_ioapic_used() is only called for the PAD_CFG_GPI_IRQ_WAKE() pin.
Due to this the IRQ associated with PAD_CFG_GPI_INT() is found free by
find_free_unique_irq() during IRQ assignment and assigned to other pins
which causes IRQ conflicts

BUG=b:322984217
BRANCH=None
TEST=Boot test on brox, check if correct IRQ assigned to EC

Change-Id: I8c3d557e888b8d0ceac203f49b702910fba26d6d
Signed-off-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80334
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-08 06:02:54 +00:00
Maximilian Brune 33659d246e arch/arm64/armv8: Add exception output without printk
In case printk does not work the current exception handler will print a
simple "!" to notify the developer that coreboot is actually there but
something went wrong.

The "!" can be quite confusing when it actually happens that printk does
not work. Since "!" doesn't really say much (if you don't know the
exception arm64 code) the developer (like me) can easily assume that
something went wrong while configuring clocks or baud rate of UART,
since the output seemingly does not seem to make sense.

This adds a little bit more output to assure the developer that what was
printed was actually intended to be printed. Therefore it prints
"EXCEPT" which assures the developer that this was intended output.
It also adds a comment above so that developer can more easily grep
for this message.

It has intentionally not been written as:
```
const char *msg = "\r\n!EXCPT!";
while (*msg)
  __uart_tx_byte(*msg++);
```
because in this case the compiler will generate code that will place
`msg` somewhere in bootblock and the code will try to access this using
a memory address. In rare cases (if you link bootblock at the wrong
address) this memory address can be wrong and coreboot will not print
the message. Using individual calls to `__uart_tx_byte` ensures that the
compiler will generate code which directly puts the character bytes into
the argument register without referencing a variable in bootblock.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I2f858730469fff3cae120fd7c32fec53b3d309ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80184
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-07 22:16:08 +00:00
Felix Held 769af20640 soc/amd/genoa_poc/chip: print data fabric MMIO decoding configuration
Printing the data fabric MMIO decode window configuration might be
useful and it also aligns this SoC more with the other AMD family 17h+
SoCs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I52f6655a5c63e31165549dcb6f5f95d4e74bad3d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-02-07 20:36:52 +00:00
Felix Held 737c8c2c1c soc/amd: drop unneeded data_fabric_set_mmio_np
Drop the unneeded data_fabric_set_mmio_np function and the corresponding
SOC_AMD_COMMON_BLOCK_DATA_FABRIC_NP_REGION Kconfig symbol. In systems
with only one FCH, its MMIO region will be subtractively decoded and
there's no need to add a non-posted data fabric MMIO region after the
FSP/openSIL has already configured the data fabric decode windows. In
systems with more than one FCH, openSIL will already take care of
initializing everything for the additional FCH, so we also won't need to
do anything in that case. Since dropping this function also removes both
data_fabric_print_mmio_conf calls before and after adding the unneeded
non-posted MMIO region, replace the data_fabric_set_mmio_np call with a
data_fabric_print_mmio_conf call to still print the data fabric MMIO
decode regions set up by the FSP/openSIL.

TEST=Mandolin still boots successfully

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I474b6e066060abb3fe5b78505521c7782cc192ee
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-02-07 20:36:43 +00:00
Felix Held 9c25a03fc3 arch/x86/mpspec: reduce scope of smp_write_ioapic
smp_write_ioapic is only called from smp_write_ioapic_from_hw within the
same compilation unit, so reduce its scope by making it a static
function.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6a1bbfd50ae9d6c8ab18f478ae9bae3f8bf5e10d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80357
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-02-07 20:32:40 +00:00
Sergii Dmytruk 7608699a9e drivers/pc80/tpm: probe for TPM family of a device
At the moment this is to handle the situation when device ID is the
same for TPM1 and TPM2 versions of a device.  Later this TPM family will
be returned to the caller.

Change-Id: I23b85e6da0e02999704f3ec30412db0bdce2dd8a
Ticket: https://ticket.coreboot.org/issues/433
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76955
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-02-07 12:20:25 +00:00
Maximilian Brune a122041be1 arch/riscv: Add OPENSBI_FW_DYNAMIC_BOOT_HART option
This adds another option to tell OpenSBI which hart to use for booting.

Test: Start hifive-unmatched board and see that Hart 1 (instead of 0) is
used for running OpenSBI.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Id58bd6ae3b55a5ef3f1a5c97dfa07c79aa4c78d0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79948
Reviewed-by: Philipp Hug <philipp@hug.cx>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-02-07 12:17:47 +00:00
Yidi Lin f6a7809de8 Update arm-trusted-firmware submodule to upstream master
Updating from commit id 23d6774ab:
2024-01-16 09:47:43 +0100 - (Merge "feat(qemu-sbsa): mpidr needs to be present" into integration)

to commit id 17bef2248:
2024-02-05 23:33:50 +0100 - (Merge "feat(fvp): delegate FFH RAS handling to SP" into integration)

This brings in 142 new commits.

Change-Id: If89a3f0d32180ff7ae0a6b447687b9749dfab2ea
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80352
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-02-07 10:32:07 +00:00
Seunghwan Kim 6b76edc4f4 mb/google/brya/var/xol: Update GPIO configurations
Upload initial GPIO configuration for xol based on proto schematics.

BUG=b:319506033
BRANCH=firmware-brya-14505.B
TEST=FW_NAME=xol emerge-brya coreboot chromeos-bootimage
     xol proto board can boot to ChromeOS

Change-Id: I224e58628e44571c07ce034136d690587e62be08
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80325
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-07 10:29:06 +00:00
Seunghwan Kim 49d9b18f4d mb/google/brya/var/xol: Update Kconfig and devicetree
Upload the initial devicetree and update Kconfig for xol following
proto schematics.

BUG=b:319506033
BRANCH=firmware-brya-14505.B
TEST=FW_NAME=xol emerge-brya coreboot

Change-Id: I411932eb4872d77993394a290e8afdd1a0038faf
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80324
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-02-07 10:28:46 +00:00
Felix Held 10942bfb21 sb/intel/i82371eb/isa: make IOAPIC ID const
Since the local IOAPIC ID variable is initialized as 2 and never changed
afterwards, so make it const to make this more obvious.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1f19cc43b44a938758a43346f4fa75f8ed39ddea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80349
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-02-06 16:28:49 +00:00
Felix Held b5d244ccf2 arch/x86/ioapic: always write IOAPIC ID in set_ioapic_id
Back in the days of the APIC bus, the IOAPIC IDs mustn't overlap with
the LAPIC IDs (0 to CONFIG_MAX_CPUS - 1), but since the IOAPIC and LAPIC
nowadays talk to each other via the system bus, an IOAPIC ID of 0 is
valid. When set_ioapic_id gets called with an IOAPIC ID of 0, it skipped
writing the IOAPIC ID to the corresponding IOAPIC register, so the code
was relying of the register having the expected default value of the
IOAPIC IO 0 for things to work as expected. The case of the IOAPIC ID
being 0 is the most common case in coreboot, since that's what
register_new_ioapic_gsi0 will end up doing. Fix this issue by not making
the io_apic_write call conditional on ioapic_id being non-zero. The only
southbridge that doesn't call register_new_ioapic_gsi0, calls
set_ioapic_id with the IOAPIC ID 2 for which this won't cause any
changes in behavior.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic8538f82a6b10f16eeb228669db197dc8e326ffd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80330
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-02-06 16:28:42 +00:00
Patrick Rudolph 7a593ab0bb soc/intel/xeon_sp/smihandler: Lock SMM_FEATURE_CONTROL on all sockets
Remove hardcoded B:D:F numbers for the first socket and pass the PCI
addresses to be locked within SMM by using the smm_pci_resource_store.

This allows to lock down SMM on all sockets without knowing the actual
bus topology or PCI segment group at compile time where the UBOX devices
reside on.

Tested: SMM is locked on all 4 sockets instead of just one.

Change-Id: Ica694911384005681662d3d7bed354a60bf08911
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80247
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-02-06 08:21:05 +00:00