Commit Graph

30222 Commits

Author SHA1 Message Date
Arthur Heymans 014c88923a arch/x86/exit_car.S: Fix checking clflush support
The BT instruction stores its result in CF and not ZF so use the
correct jump instruction.

This fixes a hang in postcar on CPUs lacking support for this
instruction. This concerns older pre-SSE2 hardware.

Change-Id: I704e3c579150fb9b9a292ef0e83050e7bf7cb078
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44922
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2020-08-31 06:45:35 +00:00
Shreesh Chhabbi 8fadf5aabf mainboard/intel/tigerlake: Update SPD files for TGL-UP3 RVP
These changes are according to spd_binary_optimization_volteer_v0.4 sheet.

Offset     Current value            Updated value       Analysis
1              0x10                    0x11             As per SPD spec rev 1.1
5              0x19                    0x21             16 bits for Row addrs, 10 bits for Column addrs
6              0x95                    0xB5             4 die, 2 ch per pkg, Byte 16 signal matrix
12             0x02                    0x0A             2 ranks per ch, 16 bits device data width
18             0x05                    0x04             4267MHz support
29             0x90                    0xC0             HW specific
30             0x06                    0x68             HW specific
31             0xD0                    0x60             HW specific
32             0x02                    0x04             HW specific
125            0x00                    0xE1             4267MHz support

BUG=b:159319534
TEST=Tested multiple cold boot cycles on TGL-UP3 with QS silicon

Change-Id: Ie506fbfe86a3ffb77763e8d9ef7e8aa69ea44bd3
Signed-off-by: Shreesh Chhabbi <shreesh.chhabbi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42524
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-by: Srinidhi N Kaushik <srinidhi.n.kaushik@intel.com>
Reviewed-by: Shreesh Chhabbi <shreesh.chhabbi@intel.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:45:04 +00:00
Wisley Chen 64c363b1a3 mb/google/dedede/var/drawcia: Add elan USI touchscreen
BUG=b:155002684
TEST=emerge-dedede coreboot chromeos-bootimage

Change-Id: I87d8575131e745dec818bc5864ca6b21ce0825af
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44660
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-08-31 06:44:48 +00:00
Felix Held bbed4d9ff0 mb/amd/mandolin: move PCIe GPP clock setting to devicetree
Checked with the schematics that all PCIe clocks have a corresponding
clock enable pin.

BUG=b:149970243
BRANCH=zork

Change-Id: If96cdf95e213682217e46a98fc69c5c2ef4a148d
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44892
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:43:05 +00:00
Felix Held d555d6a88c mb/google/zork/dalboz: move PCIe GPP clock setting to devicetree
BUG=b:149970243
BRANCH=zork

Change-Id: I0b31466c5a991b02cef3432942f8de45805fe546
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44891
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:42:56 +00:00
Felix Held 764b987a6f mb/google/zork/trembyle: add PCIe GPP clock setting to devicetree
BUG=b:149970243
BRANCH=zork

Change-Id: Ie3fc83484c6ce769956dc8e6e57194ffebb4f5b0
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44890
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:42:49 +00:00
Felix Held 82a0a63f99 soc/amd/picasso/southbridge: make GPP clock outputs configurable
Make the general purpose PCIe clock outputs configurable to be either
permanently enabled, permanently disabled or dynamically enabled via
their corresponding external #CLK_REQx pins in the board's devicetree.

BUG=b:149970243
BRANCH=zork

Change-Id: I3f5760c0b869e8a9416ba9b57d182a88a2eb5e44
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44889
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-08-31 06:42:39 +00:00
Felix Held 05ef94795f soc/amd/picasso/southbridge.h: rename GPP clock setting offsets
The _SHIFT postfix is a bit clearer than the _SHL one and more in line
with the names used for this kind of defines in coreboot. The
documentation on that register is currently wrong and will hopefully be
fixed in the future; the defines should now match the hardware.

BUG=b:149970243
BRANCH=zork

Change-Id: I977f107d466521484ca13fa1f4dd86a50c8150d7
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44888
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-08-31 06:42:29 +00:00
Patrick Rudolph 15d6240c1d include/device/azalia_device: Fix typo
The code using the macro was found not working after finally enabling
the HDA PCI device on the hermes board.
Fix a typo to generate the correct verbs.

Tested on prodrive/hermes.

Change-Id: I953c2e9fbebc1f02bdf71ce868a95f578300c3a1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44900
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:41:50 +00:00
Kevin Chiu b91e518062 mb/google/zork: update GPIO config for dirinboz
dirinboz does not support stylus, config AGPIO4/5 to NC
to prevent unexpected wake event for s3.

BUG=none
BRANCH=zork
TEST=emerge-zork coreboot chromeos-bootimage

Change-Id: I3cfdeb326c3d3775148b2a00732c7d848dab35cb
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44894
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:40:18 +00:00
Kevin Chiu cf081ab58c mb/google/zork: update GPIO config for berknip
berknip does not support stylus, config AGPIO4/5 to NC
to prevent unexpected wake event for s3.

BUG=b:162376046
BRANCH=zork
TEST=emerge-zork coreboot

Change-Id: I8d9b711ce1d7300181fe496d490dd33b38bc5983
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44893
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:40:13 +00:00
Felix Held 28668cded4 soc/amd/picasso/southbridge.h: replace GPP_CLK_REQ_MAP_* with macros
Replacing the existing defines with macros makes them easier to use in a
function that applies the setting for a certain GPP/GFX clock output.
Also add macros for statically enabling or disabling the clock outputs
and not only for configuring them as controlled by the #CLK_REQx pins.

BUG=b:149970243
BRANCH=zork

Change-Id: I14198f224639721fe6ca71ca3dcd9cb413a587d5
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44887
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-08-31 06:40:01 +00:00
Felix Held 0d707303ee soc/amd/picasso/southbridge.h: remove OSCOUT*_CLK_OUTPUT_ENB definitions
On Picasso MISC_CLK_CNTL1 doesn't contain OSCOUT[12]_CLK_OUTPUT_ENB and
this was probably just copied over from stoneyridge.

BUG=b:149970243
BRANCH=zork

Change-Id: I32f459026c4e8632672123681b20736245f198b2
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44886
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:39:56 +00:00
Tim Wawrzynczak 1d8494116f mb/google/volteer: Add probed fw_configs to SMBIOS OEM strings
Some Linux kernel drivers bind to "DMI quirks." In this case, the audio
fw_config is added as an OEM string, e.g., "AUDIO-MAX98357_ALC5682I_I2S"
so the audio topology can be correctly discovered.
But add all successfully probed fw_config items as well, because this
makes it easier to view what is selected from userspace.

BUG=b:161963281
TEST=With CBI FW_CONFIG field set to 0x201:

localhost ~ # dmidecode -t 11
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x0009, DMI type 11, 5 bytes
OEM Strings
        String 1: DB_USB-USB4_GEN2
        String 2: AUDIO-MAX98373_ALC5682I_I2S

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I7b7586b0ebfe7b2fd888f448a50ae086364fa718
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44783
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-31 06:38:17 +00:00
Tim Wawrzynczak 299f3f834f fw_config: Add caching to successfully probed fields
Add a backing cache for all successfully probed fw_config fields that
originated as `probe` statements in the devicetree. This allows recall
of the `struct fw_config` which was probed.

BUG=b:161963281
TEST=tested with follower patch

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I0d014206a4ee6cc7592e12e704a7708652330eaf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44782
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-31 06:38:09 +00:00
Elyes HAOUAS 668132a47c {intel/gma,include/device}: Delete unused 'drm_dp_helper.h' file
'drm_dp_helper.h' file is duplicated and not used.

Change-Id: Ibb08f7ff91c3914940dfe899be331b06e292c7c9
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44842
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-08-31 06:36:18 +00:00
Elyes HAOUAS 55a044c8ab mb/pcengines/apu2/mainboard.c: Use 'PCI_BASE_ADDRESS_0' instead of magic number
Change-Id: I21378acd6408a4fae5600a54a41f695e54221dc2
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44829
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:35:13 +00:00
Elyes HAOUAS 978d85e15e mb/pcengines/apu1/mainboard.c: Use 'PCI_BASE_ADDRESS_2' instead of magic number
Change-Id: Ibc2446d7b8d4334e26ca6335179f50b7abe301cb
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44831
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:34:52 +00:00
Nick Vaccaro 0c9bdc456e mb/google/volteer: add GPP_F11 to baseboard gpio_table
GPP_F11 was in the early gpio table, but the definition was missing
from the main gpio_table.  This change adds GPP_F11 to the gpio_table
array.

BUG=none
TEST="emerge-volteer coreboot" and verify it builds correctly.

Change-Id: I40f887300a9dfd4f8e790031b77bbee8a014f499
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2020-08-31 06:31:51 +00:00
Nick Vaccaro 8605782c2b mb/google/volteer: add generic DDR4 SPDs for Eldrid
Add Makefile.inc to include six generic DDR4 SPDs for the following
parts for Eldrid:

  DRAM Part Name                 DRAM ID to assign
  H5AN8G6NDJR-XNC                0 (0000)
  MT40A512M16TB-062E:J           1 (0001)
  H5ANAG6NCMR-XNC                2 (0010)
  K4A8G165WC-BCWE                0 (0000)
  K4AAG165WA-BCWE                3 (0011)
  MT40A1G16KD-062E:E             3 (0011)

Add mem_list_variant.txt as a manifest of eldrid's DRAM parts for use
by gen_spd, the generic DD4 SPD generation tool.

Add dram_id_generated.txt to specify DRAM ID strap settings.

NOTE that Eldrid specified DRAM IDs for the first three parts to be 0
though 2 (i.e. no combined DRAM IDs for parts that use the same SPD).

BUG=b:161772961
TEST="FW_NAME=eldrid emerge-volteer coreboot" and verify it builds
without error.

Change-Id: Ica62e299ed40e60c2d5928b29ead5d2205b1af66
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44272
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:31:37 +00:00
Elyes HAOUAS bb86e17e2d mb/biostar: Drop unneeded empty lines
Change-Id: I4c7f23615bcfd9c2bda2cac8808544b98f8e25a2
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44615
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-31 06:30:49 +00:00
Elyes HAOUAS 85c681e279 mb/amd: Drop unneeded empty lines
Change-Id: Ib82689150689716bc9afdf8d4527a1dcd5deae56
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44612
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-31 06:30:16 +00:00
Samuel Holland d429c1a842 superio/winbond/wpcd376i: Resurrect the driver
This SuperIO chip is used on the Intel DQ45EK mainboard. Restore the
driver that was deleted in commit d3a1a4171e ("src/superio: Remove
unused superio chips"). Changes from the previous version include:
 - Replacing the early serial implementation with Winbond common code,
 - Replacing the license boilerplate with SPDX headers, and
 - Removing unnecessary header file references.

Change-Id: I0ff1a63c47d5dff2599c83a1cebe1ac5ff2136b1
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44695
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-31 06:29:47 +00:00
John Zhao f90e3b9975 vendorcode/google: Add error handling
Coverity detects missing error handling after calling function
tlcl_lib_init. This change checks the function tlcl_lib_init return
value and handles error properly.

Found-by: Coverity CID 1431994
TEST=None

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ib831646b6a231ad57e3bfef85b801b592d572e6a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-08-31 06:28:45 +00:00
Angel Pons 66b0c5e884 nb/intel/sandybridge: Add ECC error injection register information
Change-Id: I669a611e804d67bb6e87775d273dc24b03b06691
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44396
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 06:28:09 +00:00
Frank Wu 285cbb38f7 mb/google/volteer/var/halvor: Update TBT2 setting for Halvor
Enable TBT2 setting in overridetree.cb based on schematic.

BUG=b:165175296, b:166060548
BRANCH=none
TEST=Check all USB ports USB2 and USB3 both functional

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I23ecf76a3c2f631211b0ae2898707c68862b374b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44747
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
2020-08-31 06:27:45 +00:00
David Wu 1bea841b2f mb/google/puff: Set TCC offset to 5 for kaisa and duffy
Set tcc offset to 5 degree celsius for kaisa and duffy

BUG=b:166696500
BRANCH=puff
TEST=Build, and verify test result by thermal team.

Change-Id: I2bb977b98c0764f0b9cac3543074da56057717cf
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44901
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 05:36:36 +00:00
Michael Niewöhner 1c97793b79 mb/system76/lemp9: gpio: add a pull-down for MODEM_CLKREQ / CNVI_CLKREQ
MODEM_CLKREQ / CNVI_CLKREQ has no external pull-down resistor.
When there is no M.2 card populated, the pin is floating. Thus
enable an internal 20K PD.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I37e0a9d7e9e0a8c8a7ac198abfd3995b8b0f9e3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43651
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-08-30 23:13:47 +00:00
Michael Niewöhner 8e2101d438 mb/system76/lemp9: add wifi devices
Add CNVi and PCIe wifi devices to the devicetree and enable the wifi
driver and SMBIOS tables in Kconfig.

Test: both CNVi and PCIe wifi devices work fine

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I16e04dbbf5fc3a163ce5a2bb8de646877d5cbc0f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43654
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:59:35 +00:00
Michael Niewöhner 47fd4fa617 mb/system76/lemp9: gpio: rework comments
Rework the comments:
  - fix wrong gpio / net names
  - convert all comments to <gpio> / <net name>
  - add more information where appropriate

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I51b552fd3255d5627dcc012e677bad51be517cf0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43650
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:56:58 +00:00
Michael Niewöhner 90041ef886 mb/system76/lemp9: gpio: convert PAD_CFG_TERM_GPO to PAD_CFG_GPO
Convert PAD_CFG_TERM_GPO with pull "NONE" to its shorter equivalent
PAD_CFG_GPO.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I9ed4d97ba184fa3e72425d5d16042a142b0640b4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43649
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:55:43 +00:00
Michael Niewöhner dd70d28ef7 mb/system76/lemp9: gpio: disable unused pad for INTP_OUT
INTP_OUT can be used as Type-C VBUS sense input/interrupt but is
currently unused in coreboot. It isn't a requirement for PD to work.
Disable it for now.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I233fbb562969487dff095ba6589fb9da3301ae4a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43647
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:52:10 +00:00
Michael Niewöhner 78cb41798e mb/system76/lemp9: gpio: disable internal SATAXPCIE pull-ups
Disable internal pull-ups for SATAXPCIE pads since there are external
ones at the M.2 slot's PEDET pins.

Test: both, SATA and NVME devices work fine on both slots

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I6be716620695ac38c44a17abe1c4de97b099b8d7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43645
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:51:54 +00:00
Michael Niewöhner 1ba8a50df3 mb/system76/lemp9: gpio: configure unused pads
There are pads being unused for various reasons:
  a) missing board support (DeepSx: SUSWARN#)
  b) unneeded feature ID pins
     - currently no known device models without keyboard backlight
     - currently no known device models without TPM
  c) BOARD_ID (L140CU/L140ZU) is fixed and known at build time
  d) DDR_TYPE_*: there is only one known ram model
  e) strap-only pads
  f) unconnected pads

Configure them as NC with appropriate pull-up if no external pull exists.
The latter was checked by schematics and looking at the board.

When any of the unused ID pins is needed in the future, they can be
reactivated easily (configure as GPI).

Further, convert from use of legacy macro PAD_CFG_NC to PAD_NC.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: Ia370c180d5ae6f48360be14af3cbab29e6814e75
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43644
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:51:34 +00:00
Jamie Ryu d10a10befd mb/google/volteer: Update flashmap descriptor for CSE Lite FW update
To support CSE Lite firmware update, CSE RW partition is extracted from
CSE blob binary and added to FW_MAIN_A and FW_MAIN_B.

CSE RW size for TGL is close to 2.3MB; hence, the size of FW_MAIN_A and
FW_MAIN_B is increased to avoid an overflow.

BUG=b:140448618
TEST=build with me_rw binary blob for volteer and boot to kernel.

Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Change-Id: Ie3c2b657f0426d206dfe3729829ec34ff57812c7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43790
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 22:06:39 +00:00
Michael Niewöhner f0b6b30c46 mb/system76/lemp9: enable TPM
L140CU has a TPM2 connected via SPI. Add the TPM device to the
devicetree and enable it.

According to Intel doc#615170-001, PIRQ is required for SPI TPM to work.
Since the TPM is connected to GPP_A7, enable NF1 (PIRQA#) and set it as
TPM interrupt in Kconfig.

Note: The PCH maps either LPC TPM or SPI TPM to the same address and
handles either LPC or SPI communication transparently. Thus we can use
MAINBOARD_HAS_LPC_TPM here, which implements TPM via that address.

Tested, but only polling works currently, because there is some upstream
issue with the tpm_tis module in current Linux kernels. [1]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1770021

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I26d3b396fe1e99368e18fd3a6a9f02e3585b9f6e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43641
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 21:10:13 +00:00
Angel Pons 803bd3c682 security/intel/txt/getsec.c: Do not check lock bit
This allows calling GETSEC[CAPABILITIES] during early init, when the MSR
isn't locked yet.

Change-Id: I2253b5f2c8401c9aed8e32671eef1727363d00cc
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2020-08-30 19:26:48 +00:00
Angel Pons 7fdd1faf2d security/intel/txt: Add missing definitions
Change-Id: I3ca585429df318c31c2ffd484ec91a7971f18f27
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44882
Reviewed-by: Michael Niewöhner
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 19:25:55 +00:00
Angel Pons 99b2f30bd0 cpu/intel/haswell: Set LT_LOCK_MEMORY MSR on finalize step
This is a security lock and is required for TXT, among other things.

Tested on Asrock B85M Pro4, still boots.

Change-Id: I7b2e8a60ce92cbf523c520be0b365f28413b9624
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44884
Reviewed-by: Michael Niewöhner
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 19:25:43 +00:00
Kevin Chiu 144c5aeca2 mb/google/kukui: Add LPDDR4X Samsung K4UBE3D4AA-MGCR 4GB support for burnet/esche
Add LPDDR4x DRAM index#0 Samsung K4UBE3D4AA-MGCR 4GB

BUG=b:165956924
BRANCH=kukui
TEST=emerge-jacuzzi coreboot

Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Change-Id: I644b65d77b79891ed65215d810b970fe43b29e3f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44821
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-30 17:03:35 +00:00
Patrick Rudolph 9256e51f48 cpu/x86/smm/smmhandler: Fix x86_64 assembly exit
Fix an issue the assembler didn't warn about to fix a crash on real
hardware. qemu didn't catch this issue either.

The linker uses the same address for variables in BSS if they aren't
initialized in the code. This results in %edx being set to the value
of %eax, which causes an exception restoring IA32_EFER on real
hardware.

Tested on qemu with KVM enabled.

Change-Id: Ie36a88a2a11a6d755f06eff9b119e5b9398c6dec
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44780
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-08-30 14:48:35 +00:00
Angel Pons 2e29c3b0d5 sb/intel/bd82x6x: Factor out common ME functions
We can now factor out the essentially duplicated ME functions.

We include a .c file to preserve reproducibility. This is needed because
there are two different `mei_base_address` global variables, and we have
to access the same variables in order for builds to be reproducible.

The duplicate global in `me.c` and `me_8.x.c` will be completely gone
once this new `me_common.c` file becomes a standalone compilation unit.
We are wrapping some things in static inline functions, as they won't be
directly accessible anymore after moving to a separate compilation unit.

Tested with BUILD_TIMELESS=1, Asus P8Z77-V LX2 remains identical.

Change-Id: I057809aa039d70c4b5fa9c24fbd26c8f52aca736
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Michael Niewöhner
2020-08-29 20:15:37 +00:00
Edward O'Callaghan b656e9b71e PCI IDs: Add PCI ID for CML DPTF/DTT PCI device
This PCI ID is required in order for the CML devices to perform
SSDT generation for DPTF.

CML Processor, EDS, Vol 1,
Table 9-5, Section 9.2.

BUG=b:158986928
BRANCH=puff
TEST=builds

Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I94aea6b9e0f60656827daada7b2cc2741604b8b3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44902
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Reviewed-by: Andrew McRae <amcrae@google.com>
2020-08-29 01:59:02 +00:00
Kangheui Won 07de908373 amd/picasso/psp_verstage: add vboot rsa function
Add vb2ex_hwcrypto_rsa_verify_digest function for verifying rsa
signature against digest using PSP svc.

This function will be later used by vboot to accelerate rsa
verification.

BUG=b:163710320, b:161205813
TEST=build zork firmware with vboot modification, confirm it's booting
and boot time is reduced by ~230ms.

Change-Id: Ic5c1d13092db5a84191642444f3df9c26925e475
Signed-off-by: Kangheui Won <khwon@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44456
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-28 21:56:08 +00:00
Kane Chen 6d7996439f mb/google/zork: Modify USI_RESET_L GPIO 140 to be active to low
Modify USI_RESET_L GPIO_140 in touchscreen power on/off sequence
to be active low.

BUG=b:160126287
BRANCH=Zork
TEST=emerge-zork coreboot

Signed-off-by: Kane Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: I53dd872fdacb95cda43f297d2c3f9c6723b27bad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44858
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-28 19:04:09 +00:00
Matt Papageorge 48b2b2b8c1 mb/google/zork: Disable SATA device for all Zork platforms to save power
SATA is currently turned on in the Dalboz and Trembyle base board
variant devicetrees, even though no Google/Zork device uses SATA; for
mass storage they either use eMMC or NVME PCIe SSDs. This patch disables
both the SATA PCIe device and the bus where it was the only enabled
device on. The next patch in this patch train sets a new FSP-M UPD
setting

BUG=b:162302027

Change-Id: Ie7773d9dcb0518c3e01bdd0af23b62268ab64694
Signed-off-by: Matt Papageorge <matthewpapa07@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44068
Reviewed-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-28 17:54:19 +00:00
Matt Papageorge b87effe1dd soc/amd/picasso/romstage: Set SATA enable UPD if controller is enabled
FSP has recently added support for a UPD switch to power gate SATA. This
change adds the coreboot side of the feature. To avoid having two SATA
enable options, the value of the sata_enable UPD is determined by the
enable state of the AHCI controller in the platform devicetree.

BUG=b:162302027
BRANCH=zork
TEST=Verify AHCI controller can be hidden/disabled.

Change-Id: I48bf94a7e6249db6079a6e3de7456a536d54a242
Signed-off-by: Matt Papageorge <matthewpapa07@gmail.com>
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44067
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-28 17:50:50 +00:00
Nikolai Vyssotski b1c7ed326a vc/amd/fsp/picasso: Add FSP-M UPD enable_sata to 0xC7 to match FSP
BUG=b:162302027
BRANCH=zork

Signed-off-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Change-Id: I4b5c3b351b6232f8b0418ead47d87aaddd350668
Cq-Depend: chrome-internal:3201648
Cq-Depend: chrome-internal:3202602
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44863
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-28 17:49:10 +00:00
Johnny Lin 6da1710fbc mb/ocp/deltalake: Configure FSP DCI via VPD
Tested on OCP Delta Lake, with FSP WW34 DCI can be connected if enabled.

Change-Id: I8e0dff921cef02dfc66467a2b8fa3e196fb36ac2
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-28 17:45:24 +00:00
Jonathan Zhang d5f24dd99b vendorcode/intel/fsp/fsp2_0/CPX-SP: update to ww34 release and adapt soc
Intel CPX-SP FSP ww34 release added some features:
a. change DDR frequency limit.
b. define MRC debug message verbosity level.
c. enable/disablee of PCH DCI.

In addition, there are some changes to HOB data structures.

Update UPD and HOB header files and adapt soc accordingly.

TESTED=booted on YV3 DVT to target OS command line. Also rebooted okay.

Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: Iadbf5dc850c445f988bc7f07a24165abed2298c8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44685
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Johnny Lin <Johnny_Lin@wiwynn.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-28 17:44:46 +00:00