Commit Graph

45017 Commits

Author SHA1 Message Date
Felix Held ad68b07d45 util/amdfwtool: rename PSP related embedded_firmware struct elements
The element at offset 0x14 in the embedded_firmware struct is the
pointer to the combo PSP directory header, so rename it from comboable
to combo_psp_directory to clarify that this is not a flag, but a pointer
to a data structure. Also rename psp_entry to psp_directory since it
points to the PSP directory table.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic6149c17ae813f4dcea71c308054849a1a2e4394
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58419
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2021-10-19 12:35:08 +00:00
Felix Held 35360a9e66 soc/amd/common/block/include/psp_efs: rename embedded_firmware elements
The element at offset 0x14 in the embedded_firmware struct is the
pointer to the combo PSP directory header, so rename it from comboable
to combo_psp_directory to clarify that this is not a flag, but a pointer
to a data structure. Also rename psp_entry to psp_directory since it
points to the PSP directory table.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia70e97f10f4fa0ac63cc65a33ecdc956538482b3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58418
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2021-10-19 12:34:58 +00:00
Kenneth Chan 768cb760e1 mb/google/guybrush/dewatt: update DRAM table
Samsung LPDDR4X 4266 2G K4U6E3S4AB-MGCL
Hynix  LPDDR4X 4266 2G H54G46CYRBX267
Micron LPDDR4X 4266 2G MT53E512M32D1NP-046 WT:B
Micron LPDDR4X 4266 4G MT53E1G32D2NP-046 WT:B

BUG=b:203014978
BRANCH=guybrush
TEST=emerge-guybrush coreboot chromeos-bootimage

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I31ec5b84b5ad2e8d0aedf41ceb56f9e5f7fa538a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58313
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-19 12:30:46 +00:00
Furquan Shaikh 2bfef8d856 cbfstool: Add helper function `buffer_from_file_aligned_size`
This change adds a helper function `buffer_from_file_aligned_size`
that loads a file into memory buffer by creating a memory buffer of
size rounded up to the provided `size_granularity` parameter.

BUG=b:189177186,b:189167923

Change-Id: Iad3430d476abcdad850505ac50e36cd5d5deecb4
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55989
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-10-18 21:15:41 +00:00
Nico Huber 967730f565 kconfig_lint: Drop overly restrictive rule about choice configs
This rule was creating trouble:
* A symbol may only be declared inside or outside a choice.

The linter treats every occurence of a `config` entry as a symbol
declaration, even when it's just setting a default or adding selects.
This is not easy to fix as the symbol objects are not created first
and then added to the $symbols array when we know what kind of decla-
ration we have, but are created incrementally inside this global
list.

Change-Id: I48a17f6403470251be6b6d44bb82a8bdcbefe9f6
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56410
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-18 19:33:57 +00:00
Ravi Kumar Bokka dcb26139ca sc7280: Add GSI FW download support
Add GSI Firmware download support for QUP wrappers.

BUG=b:182963902
TEST=Validated on qualcomm sc7280 development board

Signed-off-by: Rajesh Patil <rajpat@codeaurora.org>
Change-Id: I68c106c942acadc752351f03843d93612cf9c19f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56590
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2021-10-18 18:28:53 +00:00
Patrick Georgi 1e1078d699 build system: immediately report what users are supposed to look into
Instead of just logging "Check out that file over there for this type
of values", why not emit them directly?

Change-Id: I54630afce4011ab9ee3eda415e95d5b7d5812e6b
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-10-18 16:39:25 +00:00
Kyösti Mälkki b54388df63 ACPI: Have common acpi_fill_mcfg()
As long as there is only one PCI segment we do not need
more complicated MCFG generation.

Change-Id: Ic2a8e84383883039bb7f994227e2e425366f9e13
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50666
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-18 14:20:28 +00:00
Raul E Rangel 9ae922abf7 cpu/x86/cpu_info.S: Remove ebx save/restore
The push/pop of %ebx was only added because smm_stub saves the canary
value in it. Now that we no longer use cpu_info in smm, we no longer
need to save the register.

BUG=b:179699789
TEST=Boot guybrush to the OS

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I554dbe016db8b1c61246c8ffc7fa252b2542ba92
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58205
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-10-18 12:38:12 +00:00
Raul E Rangel db3e4b943a cpu/x86/smm/smm_stub: Remove cpu_info
Now that cpu_info() is no longer used by COOP_MULTITASKING, we no
longer need to set up cpu_info in SMM. When using CPU_INFO_V2, if
something does manage to call cpu_info() while executing in SMM mode,
the %gs segment is disabled, so it will generate an exception.

BUG=b:179699789
TEST=Boot guybrush to OS with threads enabled

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Id64f32cc63082880a92dab6deb473431b2238cd0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-10-18 12:37:35 +00:00
Raul E Rangel 8e9db4eed5 arch/x86/assembly_entry: Remove cpu_info
Since cpu_info() is no longer required to use threads, we no longer need
to initialize it in romstage or earlier. This code was also incomplete
since it didn't initialize the %gs segment.

BUG=b:179699789
TEST=Boot guybrush to OS

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I615b718e9f035ca68ecca9f57d7f4121db0c83b0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-10-18 12:36:57 +00:00
Raul E Rangel c2c38f5fde arch/x86,cpu/x86,lib/thread: Remove usage of cpu_info from lib/thread
We only ever start and execute threads on the BSP. By explicitly
checking to see if the CPU is the BSP we can remove the dependency on
cpu_info. With this change we can in theory enable threads in all
stages.

BUG=b:194391185, b:179699789
TEST=Boot guybrush to OS and verify coop multithreading still works

Suggested-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Iea4622d52c36d529e100b7ea55f32c334acfdf3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58199
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-18 12:36:30 +00:00
Jakub Czapiga 12ae850dfc libpayload: Add unit-tests framework and first test case
This commit adds a unit-tests framework ported from coreboot, and test
for drivers/speaker. Usage of the unit-tests framework is same as for
the coreboot one.

Change-Id: Iaa94ee4dcdc3f74af830113813df0e8fb0b31e4f
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58242
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2021-10-18 12:33:49 +00:00
Sean Rhodes e8b6b07bfc intel/tigerlake: Add missing IRQ for CNVi
Add CNVi (14.3) to IRQ Table to stop dmesg error:
iwlwifi 0000:00:14.3: can't derive routing for PCI INT F
iwlwifi 0000:00:14.3: PCI INT F: not connected

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I5b793997f9ea954217871eb4656dacf6abe77e74
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58342
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-10-18 12:33:17 +00:00
Sean Rhodes 66c8062a00 soc/skylake: Make VT-d controllable from CMOS option
Make VT-d enable or disable based on CMOS value "vtd"
1 = Enable
0 = Disable

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1aea14968e08ee6af822bd259ca1d462f8926994
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56252
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-18 12:32:43 +00:00
Bernardo Perez Priego bc89bc6680 mb/intel/adlrvp_m: Enable retimer force power gpio
Retimer FORCE_PWR GPIO is a debug GPIO, that has to be set LOW, to allow Retimer LC Domain
to toggle during a switch from DP Alt to TBT Alt modes.
Contrary to DS specifying it may be left unconfigured, hence floating, there are instances
seen during boot, where it stays HIGH (adlmrvp) or LOW (adlprvp).
Hence configure it to LOW.

Branch=none
Bug=none
Test=Boot to OS, connect TBT dock which enumerates in DP Alt,
     Login, TBT dock enumerates in TBT Alt

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I0ff58823785a31c70535ad9c913c06a653884a2c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58113
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2021-10-18 12:31:57 +00:00
Kyösti Mälkki 5791123356 cpu/intel/hyperthreading: Use initial LAPIC IDs
For older CPU models where CPUID leaf 0xb is not supported, use
initial LAPIC ID from CPUID instead of LAPIC register space to
to detect if logical CPU is a hyperthreading sibling. The one
in LAPIC space is more complex to read, and might not reflect
CPU topology as it can be modified in XAPIC mode.

Change-Id: I8c458824db1ea66948126622a3e0d0604e391e4b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58385
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-10-18 12:31:15 +00:00
Kyösti Mälkki a000922e07 cpu/intel/hyperthreading: Use cpuid_get_max_func()
Change-Id: I4b69b1d20b5a768c269d85f0ea23f79e02391a71
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58384
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-10-18 12:29:24 +00:00
Kyösti Mälkki 5f4ae427ed cpu/intel/hyperthreading: Use CPUID leaf 0xb without X2APIC
It is not a requirement to have X2APIC mode enabled to use
CPUID leaf 0xb EDX to detect logical CPU is a hyperthreading
sibling.

Change-Id: I288f2df5a392c396f92bb6d18908df35de55915d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58383
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-10-18 12:28:53 +00:00
Kyösti Mälkki b31b033ccc cpu/x86/lapic: Drop xapic_write_atomic()
Remove code, which was only needed for B and C2 stepping
of P54C. The linux kernel source has commentary on X86_BUG_11AP:

 * See if we have a good local APIC by checking for buggy Pentia,
 * i.e. all B steppings and the C2 stepping of P54C when using their
 * integrated APIC (see 11AP erratum in "Pentium Processor
 * Specification Update")

Change-Id: Iec10335f603674bcef2e7494831cf11200795d38
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55199
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-10-18 04:50:43 +00:00
Kyösti Mälkki 253c356c2b sb/amd/cimx/sb800: Clear IOAPIC vectors only once
Change-Id: I640d17cdee2bdaa4fe7049ce66a327b58924bc6f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55288
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2021-10-17 18:09:57 +00:00
Kyösti Mälkki 6644d7c508 drivers/generic/ioapic: Drop enable_virtual_wire
All boards with DRIVERS_GENERIC_IOAPIC select it.

Presumably the related configuration of routing IRQ0 when
IOAPIC is enabled should be always done to provide i8259
legacy compatibility for payloads.

Change-Id: Ie87816271fa63bba892c8615aa5e72ee68f6ba93
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55287
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 18:09:01 +00:00
Michael Niewöhner f6611a2ea8 soc/intel/skylake: switch to common ACPI code
Use the common ACPI code to reduce code duplication.

After this change, `PSS_MAX_ENTRIES` is honored correctly in P-state
table generation (as of commit c2540a9) and the number reduces from 10
to 7 entries.

Also, remnants of P_BLK support missed in CB:58096 will vanish.

Tested on google/fizz: no errors in dmesg, ACPI tables remain the same
(except PSS, as mentioned above).

Change-Id: I1ec804ae4006a2d9b69c0d93a658eb3b84d60b40
Tested-by: Matt DeVillier <matt.devillier@gmail.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44138
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2021-10-17 17:27:43 +00:00
Michael Niewöhner c9a12f2402 soc/intel/{common,apl,glk}: guard PM Timer option on SoCs w/o PM Timer
Apollo Lake and Gemini Lake do not have a hardware PM ACPI timer but
only uCode PM Timer emulation. Add a Kconfig `NO_PM_ACPI_TIMER` denoting
SoCs without PM Timer and make it mutually exclusive with the Kconfig
`USE_PM_ACPI_TIMER`.

This is partly redundant to `PM_ACPI_TIMER_OPTIONAL`, which will be
dropped in the follow-up change, though.

Change-Id: Ic323bbfb7089c53a6f22724910a0ff3df8904ebd
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57931
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 14:00:10 +00:00
Michael Niewöhner 413810e55f soc/intel/*: only enable PM Timer emulation if the PM Timer is disabled
uCode PM Timer emulation is only needed when the hardware PM ACPI timer
is disabled. Also, since it redirects any register accesses to uCode,
it overrides the hardware PM Timer. Thus, only enable emulation
when required.

Change-Id: I60a775bd6eb4206750f606ce8a8777d2e2dfb579
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57930
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 13:59:26 +00:00
Michael Niewöhner 0e905801f8 soc/intel: transition full control over PM Timer from FSP to coreboot
Set `EnableTcoTimer=1` in order to keep FSP from
 1) enabling ACPI Timer emulation in uCode.
 2) disabling the PM ACPI Timer.

Both actions are now done in coreboot.

`EnableTcoTimer=1` makes FSP skip these steps in any possible case
including `SkipMpInit=0`, `SkipMpInit=1`, use of the MP PPI or FSP
Multiphase Init. This way full control is left to coreboot.

Change-Id: I8005daed732c031980ccc379375ff5b09df8dac1
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57933
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Lance Zhao
2021-10-17 13:59:04 +00:00
Michael Niewöhner 68bacc2109 soc/intel/{skl,cnl,dnv}: disable PM ACPI timer if chosen
Disable the PM ACPI timer during PMC init, when `USE_PM_ACPI_TIMER` is
disabled. This is done to bring SKL, CNL, DNV in line with the other
platforms, in order to transition handling of the PM timer from FSP to
coreboot in the follow-up changes.

For SKL and CNL, this temporarly redundantly disables the PM Timer,
since FSP does that, too. This redundancy is resolved in the follow-up.

Change-Id: I47280cd670a96c8fa5af107986496234f04e1f77
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57932
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 13:58:15 +00:00
Michael Niewöhner 6eaffcdbb1 soc/intel: implement ACPI timer disabling per SoC and drop common code
Since it's just a one-liner, implement disabling of the ACPI timer in
soc code. This reduces complexity.

Change-Id: I434ea87d00f6e919983d9229f79d4adb352fbf27
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58020
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 13:57:53 +00:00
Michael Niewöhner 01b3c40bfe soc/intel: move disabling of PM Timer to SoC PMC code
Move disabling of PM Timer to SoC PMC code.

The original reason for placing that in `finalize` [1] was FSP hanging
due to use of the PM timer without enabling timer emulation first in
coreboot, which was added later [2].

[1] commit 6c1bf27dae (intel/skylake: disable ACPI PM Timer to enable
    XTAL OSC shutdown)

[2] commit f004f66ca7 (soc/intel/skylake: Enable ACPI PM timer emulation
    on all CPUs)

Change-Id: I354c3aea0c8c1f8ff3d698e0636932b7b76125f7
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58019
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 13:57:30 +00:00
Michael Niewöhner 820b9c4676 soc/intel/common: add possiblity to override GPE0 to acpi_fill_soc_wake
Currently, only the PM1_STS mask gets passed to `acpi_fill_soc_wake`. To
be able to override the GPE0_STS mask as well, also pass that one. To
accomplish that, pointers to the variables are passed now.

Change-Id: If9f28cf054ae8b602c0587e4dd4a13a4aba810c7
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58071
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 12:59:58 +00:00
Michael Niewöhner f855b8bfee soc/intel/common/acpi: drop `RTC_EN` from static wake bits mask
`RTC_EN` is in the RTC well* so we can rely on the actual register
content instead of statically overriding it. Drop it from the static
wake bits mask.

* Tested on clevo/l140cu

Change-Id: Ia0ae71f0a472513233bc0fd5625faf15bf86beaf
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58211
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-10-17 12:59:43 +00:00
Michael Niewöhner 9034689ee7 soc/intel: deduplicate acpi_fill_soc_wake
The PM1_EN bits WAK_STS, RTC_EN, PWRBTN_EN don't need any SoC-specific
handling. Deduplicate `acpi_fill_soc_wake` by setting these bits in
common code.

Change-Id: I06628aeb5b82b30142a383b87c82a1e22a073ef5
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58043
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 12:59:17 +00:00
Michael Niewöhner fbcfb63b06 soc/intel/skylake: switch to common GNVS
Switch to common GNVS. No additional fields to those being present in
common GNVS are used by any SKL/KBL device. Thus, they're dropped
completely.

Change-Id: I87ab4ab05f6c081697801276a744d49e9e1908e0
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2021-10-17 12:59:06 +00:00
Michael Niewöhner 7b34e319f2 soc/intel/common: add SGX fields to GNVS
Add the SGX fields to the GNVS. This is required for Skylake to use the
common GNVS.

Change-Id: I0077260b7eb1bc2b2fe2af69ac039b38ca0e7423
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57947
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-10-17 12:58:56 +00:00
Nico Huber 5bb6f9b794 drivers/emulation/qemu: Add missing include for MMIO
Change-Id: Ie3c820e2e20f8f71908319e89e49e5d66f58adc9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58347
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-10-17 11:48:13 +00:00
Patrick Georgi 0c12bdc9f8 Documentation: Improve preamble of coding style
The coding style doc isn't short, so scrap that, and it's specific to
the C parts of our tree, so add that.

Change-Id: Ib1ef7c1a96ff40f0cfbae7d22a47a95128981eb8
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58381
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-17 11:47:01 +00:00
Angel Pons 37a977dde9 Skylake boards: Drop setting useless `IRQ_SLOT_COUNT`
The `IRQ_SLOT_COUNT` value is only meaningful when generating a PIRQ
table. None of these boards do it, so specifying this value achieves
absolutely nothing. Drop it to prevent further useless copy-pasting.

Change-Id: I2d63b850c03fc1471c0eef180e8b621311b2c336
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2021-10-17 03:07:19 +00:00
Kyösti Mälkki c78c46d433 cpu/x86/lapic: Only deliver ExtINT to BSP
ExtINT is related to external PIC mode i8259 interrupts,
they should be delivered to one CPU (BSP) only.

Change-Id: I78490d2cbe3d9f52e10ef2471508263fd6c146ba
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42434
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-17 02:45:01 +00:00
Felix Held d1da9570da soc/amd/stoneyridge/include/iomap: rename I2C[ABCD]_BASE_ADDRESS defines
Picasso and Cezanne define and use APU_I2C[01234]_BASE for the base
addresses of the I2C controllers, so align Stoneyridge with this. The
ACPI device names aren't changed from I2C[ABCD] to I2C[0123] for now
since this might change behavior in the OS and would also change the
resulting binary of a timeless build.

TEST=Timeless build results in identical image for Google/Treeya.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I9c400c073eba5c14bd35703b717f75df89a8719d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58370
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-16 17:55:47 +00:00
Michael Niewöhner 9c19bf090e soc/intel/dnv_ns: enable uCode PM Timer emulation
Denverton-NS supports uCode PM Timer emulation, according to Intel
doc#558579 rev2.2. Thus, enable it.

Change-Id: I21f55816da9f5e240fdf01a0e92b67b09ef38599
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57944
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-16 09:29:38 +00:00
Michael Niewöhner c47fc40022 soc/intel/pmc: add a note about legacy OSes/payloads to PM Timer Kconfig
Since ACPI 5.0A it is allowed to disable the ACPI Timer, when the
according FADT flag `ACPI_FADT_PLATFORM_CLOCK` is unset.

Starting with Skylake, most platforms (except Xeon-SP) support PM Timer
emulation, so even legacy OSes and payloads should work fine with the
hardware PM Timer disabled. However, when the `TMR_STS` functionality
is required, some legacy OSes might still not work (properly).

Add a note about this to the Kconfig help.

Change-Id: I53f1814113902124779ed85da030374439570688
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58018
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Lance Zhao
2021-10-16 09:11:23 +00:00
Michael Niewöhner 5c259642c2 soc/intel/{common,skl}: set ACPI_FADT_PLATFORM_CLOCK based on Kconfig
The FADT contains a flag `ACPI_FADT_PLATFORM_CLOCK` telling the OSPM if
a specification-compliant PM Timer is present. Currently, this flag is
set regardless of the timer being enabled or disabled.

To be specification-compliant, only set that flag, when the hardware PM
Timer is enabled. This changes behaviour of all mainboards defaulting to
USE_PM_ACPI_TIMER=n.

Note: On platforms supporting uCode PM ACPI Timer emulation, this is
      required, too, because emulation does not support `TMR_STS`. Any
      OS or software checking this flag and thus relying on the overflow
      flag would not work (properly).

Change-Id: Id2e5d69b5515c21e6ce922dab2cb88b494c65ebe
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57934
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-10-16 09:09:19 +00:00
Angel Pons d4d4f08f54 Doc/releases/coreboot-4.11-relnotes.md: Fix typo
Replace `bee` with `been`.

Change-Id: I206f9b33d79386fc4f204db3e21a92fa20b703bd
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-10-16 01:04:52 +00:00
Joey Peng ef6a65f02a mb/google/brya/var/taeko: Add fw_config probe for GL9750 and RTS5232S
Add support for SD card reader GL9750 and RTS5232S

BUG=b:203014989
TEST=FW_NAME=taeko emerge-brya coreboot

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: I4353a094e2035ce94b5dd1a737e7e7009ad0614e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-10-16 01:04:28 +00:00
Ariel Fang e9fcc97697 mb/google/brya/variants/primus: To fine tune WWAN power sequencing
Follow the spec to correct the WWAN poweron and powerdown sequences. 

BUG=b:195625346
TEST=USE="project_primus emerge-brya coreboot" and verify it builds
without error.

Signed-off-by: Ariel Fang <ariel_fang@wistron.corp-partner.google.com>
Change-Id: I232d283a9d6093f5da64fcdce44e5cb640e3df0e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58319
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-16 01:04:19 +00:00
Kevin.Chang 4afdd693fa mb/google/brya/var/taeko: Include driver for GL9763E for eMMC boot disk
Support GL9763E as a eMMC boot disk

BRANCH=none
BUG=b:202192686
TEST=enable DRIVERS_GENESYSLOGIC_GL9763E and check eMMC on taeko.

Cq-Depend: chromium:3153210
Signed-off-by: Kevin.Chang <kevin.chang@lcfc.corp-partner.google.com>
Change-Id: I5db2b229ce1bbea54efe15f5288f13f8d4656899
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58297
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2021-10-15 21:04:49 +00:00
Felix Held a30ad9faf9 mb/google/guybrush/bootblock: add comment about LPC_LDRQ0_PU,PD_EN
The definition of those bits changed between Picasso and Renoir/Cezanne
so add a comment where those bit definitions are used as well.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If1cf4b06fc35f94cbd482f2869fcc64739e7d272
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-10-15 20:05:49 +00:00
Felix Held 718a3cba25 mb/google/guybrush/bootblock: drop redundant clearing of LPC decodes
The writes were originally added due to being part of the initialization
sequence in the reference code, but coreboot already has those registers
cleared by the time we reach this part of the code, so we can drop these
redundant writes.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I43344460e5355664841d77daf1df3fd386e047e9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-10-15 20:05:26 +00:00
Felix Held 1c03da5f5a soc/amd/common: move configure_espi_with_mb_hook implementation
Move the actual implementation of configure_espi_with_mb_hook out of the
header file and into the espi_util.c file.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1106e69a52bf329a41e8e12fd09db846310b102a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58340
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-10-15 20:05:02 +00:00
Felix Held 4e379a2374 soc/amd: make configure_espi_with_mb_hook call conditional
If a system doesn't use eSPI or has the eSPI interface already
configured in verstage on PSP, not calling configure_espi_with_mb_hook
from fch_pre_init makes it a bit more obvious that the eSPI interface
initialization will be skipped.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia77b83d56a5dab1bac6cfbbd92d33aa60a9e8b89
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58339
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-10-15 20:04:44 +00:00