Commit Graph

37070 Commits

Author SHA1 Message Date
Eric Lai fa0080d187 mb/google/octopus: Clean up LTE power off function
All octopus board share the same power off sequence.
Move to smihandler.c instead variant.c.

BUG=b:168075958
BRANCH=octopus
TEST=build image and verify on the DUT with LTE DB.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I2be5a656fb42fff99c56d21aaa73ed9140caad37
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45436
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 12:41:57 +00:00
Angel Pons 3da27ab681 nb/intel/sandybridge: Check ME status only once
The pre-RAM CBMEM console is tiny. Do not fill it with largely redundant
information, when we could instead store more useful raminit debug logs.

Change-Id: I3a93fdeb67b0557e876f78b12241b70933ad324d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45499
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-09-21 08:14:00 +00:00
Angel Pons 035096c6f0 nb/intel/sandybridge: Simplify SPD validity check
Instead of decoding the entire SPD, just check the memory type directly.

Tested on Asus P8Z77-V LX2, still boots.

Change-Id: I3afa0ca5aae984895e50fe7b3792192fdd2ee6c6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45498
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-09-21 08:13:48 +00:00
Iru Cai 8c6d1610d1 util/autoport: Always output quoted Kconfig string
Change-Id: I2076af9c70b626673a83af9abf464d376cda711b
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-09-21 08:13:08 +00:00
Jamie Ryu 5a401ae262 mb/intel/tglrvp: Enable HECI interface
This is to enable Intel ME communication interface HECI1 by
devicetree for PAVP with CSE Lite.
PAVP feature is enabled with CSE Lite SKU for Chrome and HECI1 interface
is required between kernel and CSE Lite.

BUG=None
TEST=Build and boot tglrvp. Run lspci and check pcie device
     00:16.0 Communication controller: Intel Corporation Device a0e0

Change-Id: I23117fa96503942e6a72765dd3fd1cc762e3f705
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42307
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-09-21 08:12:33 +00:00
John Zhao 388e551dc3 drivers/intel/mipi_camera: Avoid resource leak
Coverity detects variable dsd going out of scope leaks the storage it
points to. Move dsd resource allocation after sanity check for
config->nvm_compact to avoid leak.

Found-by: Coverity CID 1432727
TEST=Built and boot up to kernel on Volteer.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I86af322dc78845b8b312b6815135336c2c56b4dd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45531
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-09-21 08:12:25 +00:00
Arthur Heymans 342d0a8365 cpu/x86/smm.h: Add function to return the SMM save state revision
Change-Id: I3e4450088adbb654050e7420956cf58ee1170a98
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44318
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:11:54 +00:00
Dtrain Hsu d579a502d0 mb/google/dedede/var/madoo: Add Wifi SAR for madoo
Add wifi sar for madoo.
Using tablet mode of fw config to decide to load custom wifi sar or not.

BUG=b:165105210
TEST=enable CHROMEOS_WIFI_SAR in config of coreboot,
emerge-dedede coreboot-private-files-baseboard-dedede coreboot chromeos-bootimage.

Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: Ic6128b966c952cdc02a6359c14fa41f22265039a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45439
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2020-09-21 08:11:40 +00:00
Igor Bagnucki 9cd8afdc3c soc/amd/common/block/spi/fch_spi_util.c: Fix read with invalid length
Fix function call to invoke 16-bit read in 16-bit api instead of 8-bit read.

Signed-off-by: Igor Bagnucki <bagnucki02@gmail.com>
Change-Id: Ifd9079fc6446125e0e58402fdb64bc198bb8e381
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-09-21 08:11:29 +00:00
Sam Lewis 362a156867 arch/arm: Add support for loading Linux kernels
Adds support for loading Linux kernels through FIT payloads. This has
been implemented as an assembly function in order to simplify dealing
with some of the intricacies of loading a kernel (such as needing to
jump to the kernel in ARM mode and the kernel ABI).

TEST: Booted a FIT image containing a 5.4 kernel and initramfs on the
Beaglebone Black.

Change-Id: I7dbf9467665ec17447cec73676763844b4be4764
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45335
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-09-21 08:10:56 +00:00
Maxim Polyakov d5dda47db8 mb/51nb/x210/gpio: 3/4 Fix PAD_RESET to convert to PAD_NC()
Fix this bit field to convert to target macros PAD_NC() macros.

This is part of the patch set
"mb/51nb/x210/gpio: Rewrite pad config using intelp2m":

CB:43566 - 1/4 Decode raw register values
CB:43567 - 2/4 Exclude fields for PAD_CFG
CB:43568 - 3/4 Fixes PAD_RESET to convert to PAD_NC()
CB:43410 - 4/4 Convert field macros to PAD_CFG

Change-Id: I73a3d78457c1e50dc9625a47394e340181516696
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43568
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:10:28 +00:00
Maxim Polyakov 2b93bebc02 mb/51nb/x210/gpio: 2/4 Exclude fields for PAD_CFG
This patch excludes bit fields that must be ignored (1,2) in order
to convert current macros to target PAD_CFG_*() macros. The following
commands were used for this:

./intelp2m -fld cb -ign -t 1 -file ../../src/mainboard/51nb/x210/gpio.h

 - ignore RO bit fields;
 - ignore RX Level/Edge Configuration (bit 26:25) and RX/TX Buffer
   Disable (bit 9:8) for the native function, because it does not
   affect the pad in this mode.

This is part of the patch set
"mb/51nb/x210/gpio: Rewrite pad config using intelp2m":

CB:43566 - 1/4 Decode raw register values
CB:43567 - 2/4 Exclude fields for PAD_CFG
CB:43568 - 3/4 Fixes PAD_RESET to convert to PAD_NC()
CB:43410 - 4/4 Convert field macros to PAD_CFG

Change-Id: Id0196b20783126c36f8552534b7ec3bd9049a24f
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43567
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:10:15 +00:00
Caveh Jalali c07fb75c90 security/tpm/tss/tcg-2.0: add const to marshalling functions
This adds the const qualifier to inputs of marshalling functions as
they are intended to be read-only.

Change-Id: I099bf46c928733aff2c1d1c134deec35da6309ba
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-09-21 08:09:28 +00:00
Maxim Polyakov 0f9c8b3aa5 mb/razer/blade_stealth_kbl: 2/3 Exclude fields to match PAD_CFG
This patch excludes bit fields that must be ignored (1,2) in order
to convert current macros to target PAD_CFG_*() macros. The following
commands were used for this:

./intelp2m -fld cb -ign -t 1 -file ../../src/mainboard/razer/
blade_stealth_kbl/gpio.h

 - ignore RO bit fields;
 - ignore RX Level/Edge Configuration (bit 26:25) and RX/TX Buffer
   Disable (bit 9:8) for the native function, because it does not
   affect the pad in this mode.

This is part of the patch set
"mb/razer/blade_stealth_kbl/gpio: Rewrite pad config using intelp2m":

CB:43857 - 1/3 Decode raw register values
CB:43858 - 2/3 Exclude fields for PAD_CFG
CB:43411 - 3/3 Convert field macros to PAD_CFG

Change-Id: Ia36c5d0cd449a32d76351a87a33a55196ae78443
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43858
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Mimoja <coreboot@mimoja.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:09:05 +00:00
Maxim Polyakov f8c147431e mb/razer/blade_stealth_kbl: 1/3 Decode raw register values
Use the intelp2m utility [1,2] with -adv options to convert the pad
configuration format with the raw values of the DW0 and DW1 registers
to the format with the bit fields macros: PAD_FUNC(), PAD_RESET(),
PAD_TRIG(), PAD_BUF(), PAD_PULL(), etc...

./intelp2m -fld cb -t 1 -file ../../src/mainboard/razer/
blade_stealth_kbl/gpio.h

This is part of the patch set
"mb/razer/blade_stealth_kbl/gpio: Rewrite pad config using intelp2m":

CB:43857 - 1/3 Decode raw register values
CB:43858 - 2/3 Exclude fields for PAD_CFG
CB:43411 - 3/3 Convert field macros to PAD_CFG

Tested with BUILD_TIMELESS=1, Razer Blade Stealth, remains identical.

[1] https://github.com/maxpoliak/pch-pads-parser
[2] https://review.coreboot.org/c/coreboot/+/35643

Change-Id: I7c4a29f87b56c5ec7e4b74274ae677c4c08c2e8c
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43857
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Mimoja <coreboot@mimoja.de>
2020-09-21 08:08:51 +00:00
Maxim Polyakov 22bf6fbcba mb/51nb/x210/gpio: 1/4 Decode raw register values
Use the intelp2m utility [1,2] with -fld=cb options to convert the pad
configuration format with the raw values of the DW0 and DW1 registers
to the format with the bit fields macros: PAD_FUNC(), PAD_RESET(),
PAD_TRIG(), PAD_BUF(), PAD_PULL(), etc...

./intelp2m -fld cb -t 1 -file ../../src/mainboard/51nb/x210/gpio.h

This is part of the patch set
"mb/51nb/x210/gpio: Rewrite pad config using intelp2m":

CB:43566 - 1/4 Decode raw register values
CB:43567 - 2/4 Exclude fields for PAD_CFG
CB:43568 - 3/4 Fixes PAD_RESET to convert to PAD_NC()
CB:43410 - 4/4 Convert field macros to PAD_CFG

Tested with BUILD_TIMELESS=1, 51NB-X210, remains identical.

[1] https://github.com/maxpoliak/pch-pads-parser
[2] https://review.coreboot.org/c/coreboot/+/35643

Change-Id: I19282c985cf35a9f99be449915aa9bab7e03472d
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43566
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:08:26 +00:00
Maxim Polyakov 0a6f82835e util/intelp2m: Check keywords in common code
TEST = ./intelp2m -n -file inteltool.log;
       ./intelp2m -fld cb -file inteltool.log;
       ./intelp2m -fld fsp -file inteltool.log;
       ./intelp2m -fld raw -file inteltool.log.
       Before and after the patch, gpio.h is no different.

Change-Id: I8af28960e41fcb97f03fe97c42cdddde07b3615a
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45167
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-09-21 08:07:26 +00:00
Caveh Jalali 85e4c43b02 volteer: set GSPI CS to deasserted by default
This sets the state of GSPI chip select to 1 (deasserted) as applied
by the FSP during the silicon init phase. GSPI 0 and 1 are set to CS
mode manual in the SerialIoGSpiCsMode section which means we need to
explicitly configure CS to deasserted in the SerialIoGSpiCsState
section. GSPI0 is the CR50 and GSPI1 is the fingerprint sensor. We
were running into problems where the normal expected CS toggle
sequence to wake up CR50 did not work because CS was already asserted
when it was expected to be deasserted, leading to TPM timeouts.

BUG=b:168090038
TEST=booted on volteer, no more "TPM flow control failure" messages;
	verified fingerprint enrollment still works.

Change-Id: I47aa5db429d75e66095d58a1eb77963dcfc3b9f3
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45384
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:07:13 +00:00
Frank Wu 362bcee0f4 mb/google/volteer: Add firmware configuration for MAX98373_ALC5682I_I2S_UP4
Add MAX98373_ALC5682I_I2S_UP4 firmware configuration option and configure GPIOs properly for UP4 design. The design is also for Halvor.

BUG=b:153680359, b:163382106
TEST=FW_NAME=halvor emerge-volteer coreboot chromeos-bootimage, fw_config value in Halvor:
> AUDIO=MAX98373_ALC5682I_I2S_UP4
ectool cbi set 6 0x00000400 4 2

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: Ie25f278dfbdc2f41a36b70403699a2e3c2234600
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44560
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-09-21 08:06:38 +00:00
Rocky Phagura cced3469c5 soc/intel/xeon_sp: Enable PMC support
PMC support was not enabled on Xeon_sp platforms. This involves turning
on SOC_INTEL_COMMON_BLOCK_PMC and then adding the proper hooks in SOC
specific code.  This patch leverages code from the Skylake project and
adds the bare minimum hooks to leverage PMC common code. Most
importantly this enables power management registers located in the PMC
device (under ACPI_BASE_ADDRESS). Access to this device is also needed
for SMM setup and handling.

TEST=build for Tiogapass and enable the following Kconfig options:
	select SOC_INTEL_COMMON_BLOCK_PMC
	select ACPI_INTEL_HARDWARE_SLEEP_VALUES
        select CPU_INTEL_COMMON_SMM

Boot the system and ensure pmbase is programmed. (Look for pmbase in
debug messages). Secondly check that SMIs are enabled by looking at the
debug messages (search for "Enabling SMIs") and verifying in HW by
reading IO port 0x530.

Change-Id: I6d57a8282a8b6dc4314f156c39deb09535575cbd
Signed-off-by: Rocky Phagura <rphagura@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42289
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2020-09-21 08:06:23 +00:00
Jonathan Zhang bb25c59e90 soc/intel/xeon_sp/cpx: search IIO_UDS HOB once when creating DMAR table
IIO_UDS HOB was searched several times during the creation of DMAR table.
Reduce it to only once to improve boot time.

Both DRHD and ATSR subtable creations involve addition of PCIe bridge
device entries, combine the functions with
acpi_create_dmar_ds_pci_br_for_port().

When looping through ports to create PCIe bridge device entries,
use MAX_PORTS intead of NUMBER_PORTS_PER_SOCKET to improve boot time.

Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: I469cd8473c50e105daeda6c5607592ae7cef6032
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2020-09-21 08:06:09 +00:00
Jonathan Zhang 3bfd3cfdee soc/intel/xeon_sp/cpx: remove DMAR_X2APIC_OPT_OUT flag
CPX-SP processor supports X2APIC.

Remove DMAR_X2APIC_OPT_OUT flag from DMAR table.

Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: I63c9feda74c7abb591eac991cb98cdcad8afc158
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45375
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:05:58 +00:00
Angel Pons eb53793fdb nb/intel/ironlake: Clean up cosmetics of early ME functions
Tested with BUILD_TIMELESS=1, Packard Bell MS2290 remains identical.

Change-Id: Ic766345b58c59f3d3c3570741c0eb0ad4e53ed79
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45366
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-09-21 08:05:22 +00:00
Angel Pons 55f11e29e4 nb/intel/ironlake: Clean up `send_heci_uma_message` signature
The only raminfo field it needs is `memory_reserved_for_heci_mb`. So,
pass in that value directly. As it's read-only, make it const as well.

Change-Id: Ib5d4604e6c1c9bc77df9adfead93b6028d536a3d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45365
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:04:57 +00:00
Angel Pons 36592bfe40 nb/intel/ironlake: Reduce the scope of `heci_uma_addr`
There's no need to have it in raminfo. Also, bump MRC_CACHE_VERSION.

Change-Id: Ida48ec4f50c880fe48d88d016acd3737a0650f80
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45364
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:04:43 +00:00
Angel Pons 2f60c83f44 nb/intel/sandybridge: Drop unnecessary `gma.h`
It only contains prototypes for the long-gone native graphics init.

Tested with BUILD_TIMELESS=1, Lenovo ThinkPad X230 remains identical.

Change-Id: I9413abb8e49496ada60dcdf801a1f8a03be38d2e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45360
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:04:26 +00:00
Angel Pons b8ebeba4a2 nb/intel/sandybridge: Put DMIBAR/EPBAR registers into separate files
Tested with BUILD_TIMELESS=1, Lenovo ThinkPad X230 remains identical.

Change-Id: I836df4675f4886635973c0c75f5981c9ef17d84b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45359
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:04:00 +00:00
Angel Pons 3447db5fe4 nb/intel/sandybridge: Move register headers into a subfolder
Move all files with register definitions into a `registers` subfolder.
Subsequent commits will move the remaining registers into this folder.

Tested with BUILD_TIMELESS=1, Lenovo ThinkPad X230 remains identical.

Change-Id: Ie525e755f32599db97af7969fc7fbb36a5d826b6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45358
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:03:42 +00:00
Angel Pons f950a7ec67 nb/intel/sandybridge: Clean up DMIBAR/EPBAR registers
Several registers have been copy-pasted from i945 and do not exist on
Sandy Bridge. Moreover, other register definitions were missing. Use the
newly-added definitions in existing code, in place of numerical offsets.

Tested with BUILD_TIMELESS=1, Lenovo ThinkPad X230 remains identical.

Change-Id: I9ad849f57bc68256a2a87ffdc856c4b521e35892
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45357
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:03:24 +00:00
Angel Pons dfca1697fc nb/intel/sandybridge: Introduce memmap.h
Move all memory map definitions into a separate header.

Tested with BUILD_TIMELESS=1, Lenovo ThinkPad X230 remains identical.

Change-Id: I7f2ff2a5cee8bf12e5dca74ff9f0b1a44e26cded
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45356
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:03:06 +00:00
Duncan Laurie 14efbb464e mb/google/volteer: fw_config: Add fields for keyboard features
Add newly defined fields for presence of keyboard backlight and
number pad to the firmware configuration table.

We don't have a need to use these in coreboot (yet) but this
keeps the bit definitions in sync.

BUG=b:166707536
TEST=abuild -t google/volteer

Change-Id: I066e445f7d0be056e45737d2c538be1850ae85aa
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-09-21 08:02:50 +00:00
V Sowmya 3fc368d09b soc/intel/jsl: Use the common code to set the PchPmPwrCycDur
This patch uses the common code to avoid violating the PCH EDS
recommendation for the PchPmPwrCycDur setting.

Change-Id: I8aba558082ff5bbe2c5b12e0e623c013548e6481
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45030
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:02:34 +00:00
V Sowmya 27413d3219 soc/intel/cnl: Use the common code to set the PchPmPwrCycDur
This patch uses the common code to avoid violating the PCH EDS
recommendation for the PchPmPwrCycDur setting.

Change-Id: Id418480bc779d56ff5586516d9bd99ca15133203
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45029
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-21 08:02:30 +00:00
Harshit Sharma d8a722cb61 Documentation: Add ASan documentation
Change-Id: I710ea495798597189941620c7e48fd5aa7476781
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44814
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-09-21 07:45:37 +00:00
Michael Niewöhner 3f5bfbd4d1 mb/system76/lemp9: move LPC options to the devicetree
Change-Id: I7b7acdc51c848541fb39926bc8de1115c026dd05
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45496
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-20 21:32:50 +00:00
Michael Niewöhner 80bd8e43b0 mb/system76/lemp9: correct CBFS_SIZE
The BIOS region size is 0xc00000, not 0xa00000. Correct this.

Change-Id: I88cb0d4b9a590a32672054aa0db7f9a92070ff6d
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45504
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-09-20 21:32:32 +00:00
Michael Niewöhner 8b5cd49b5a mb/system76/lemp9: enable SATA ALPM capability
Enable SATA Link Power Management capability to be able to save power.

TEST: /sys/class/scsi_host/host*/link_power_management_policy exists.

Change-Id: I88de28cfb266af3fcd6e498a08a24b46c992cb9d
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45492
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-20 21:32:21 +00:00
Michael Niewöhner c9ebf8d501 mb/system76/lemp9: drop disabled options from devicetree
Drop all options with zero-value, since they already default to 0.

Change-Id: I2a1a91778e83dc49c6dcf2d518cd3591f7ec4cfa
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45491
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-20 21:32:11 +00:00
Kevin Chiu 1c065b311b mb/google/zork: update morphius dptc clamshell/tablet mode setting
clamshell/tablet:
Slow_ppt_limit(W)		20
Fast_ppt_limit(W)		24
Slow_ppt_time_constant		5
Stapm_time_constant		200
Sustained_power_limit(W)	12

clamshell:
Temperature limit(C')		100

tablet:
Temperature limit(C')		70

BUG=b:157943445
BRANCH=zork
TEST=1. emerge-zork coreboot
     2. change mode and check "thermctl_limit" will change

Change-Id: I1eda1411766e446b673046236f7cc4015696521f
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45520
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-20 17:25:15 +00:00
Kevin Chiu cdd9f5cb72 soc/amd/picasso: Add THERMCTL_LIMIT DPTC parameter support
Add THERMCTL_LIMIT (die temperature limit) DPTC parameter
for clamshell/tablet mode.

BUG=b:157943445
BRANCH=zork
TEST=build

Change-Id: Id193a74210c92d1e45ed4824ee9c0fc9ceaa5e3a
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45519
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-09-20 17:24:40 +00:00
Michael Niewöhner e0d749c23b lint: check for misuse of Kconfig SUBSYSTEM_*_ID
Check that nobody misuses the Kconfigs SUBSYSTEM_*_ID. They are meant to
be used for overriding the devicetree subsystem ids locally but shall
not be added to a board's Kconfig. Instead, the devicetree option
`subsystemid` should be used.

Add a linter script for this that finds and warns about such misuse.

Also add a note in the Kconfigs' description.

TEST=CB:45513

Change-Id: I21c021c718154f1396f795a555af47a76d6efe03
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-09-20 17:03:32 +00:00
Zheng Bao 6252b601c9 soc/amd/picasso: Fix typo of Kconfig setting
USE_PSPSCUREOS -> USE_PSPSECUREOS.

Change-Id: I5c89975cc317cb93e79509e885010d14a79dd7e1
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45285
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-09-20 02:47:27 +00:00
Michael Niewöhner 5a85d134b1 mb/system76/lemp9: move subsystem id from Kconfig to devicetree
Change-Id: I21e7e53787b115f50093d7caa72285ce480cef52
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-09-19 16:46:54 +00:00
Michael Niewöhner 1c661b92bc mb/up/squared: move subsystem id from Kconfig to devicetree
Change-Id: Icf62a73ee568d9369c53bd767bd4cfb736ea76f1
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45527
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-09-19 16:46:34 +00:00
Subrata Banik f463dc0947 soc/intel/common/block/cse: Refactor cse_request_global_reset() function
List of changes:
1. Check if CSE is enabled from devicetree.cb
2. Create helper function cse_request_reset()
3. Modify caller function argument cse_request_global_reset()

Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Change-Id: I3668b473bec8d51f847908d11e2e25c485ec7a97
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45341
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-09-19 06:37:37 +00:00
Subrata Banik e9b937352e apollolake boards: Enable CSE in devicetree
Enable CSE PCI device Bus 0: Device 0x0f: Function 0x00 to let
Intel common cse block code can use this device.

Calling me_read_config32(offset) function from ramstage:

Without this CL :
HECI: Global Reset(Type:1) Command
BUG: me_read_config32 requests hidden 00:0f.0
PCI: dev is NULL!

With this CL :
HECI: Global Reset(Type:1) Command
HECI: Global Reset success!

Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Change-Id: I97d221ae52b4b03ecd859d708847ad77fe4bf465
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45469
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-09-19 06:37:24 +00:00
Hsuan Ting Chen 8742e2a923 libpayload: free: Separate NULL check out for clarity
Separate the validity check of calling free(NULL) for clarity.

BUG=b:168441735
TEST=emerge-puff libpayload

Change-Id: I0dc355553410bbe59e658945fb40c05f5f709380
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45465
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2020-09-19 01:36:57 +00:00
Duncan Laurie cbd0bd8155 sconfig: Add function for parse+override of tree
Extract the steps to parse and override a devicetree into a function
so it can be used multiple times without copying the same logic.

Change-Id: I4e496a223757beb22e3bd678eb6115968bd32529
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44036
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2020-09-18 22:41:56 +00:00
Julius Werner 7a066ecb41 trogdor: Move EN_PP3300_DX_EDP for Coachz
This patch updates the display power enable GPIO which moved from 30 to
52 for Coachz. Veterans of this project know that there's no point
trying to ask *why* this change was necessary -- the pins move in
mysterious ways and all we can do is watch and wonder. Pin 30 is now
used for a new camera reset GPIO... surely, there must have been some
excellent reason why that pin couldn't just have become pin 52 instead.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I00ad6a6249df66006b4f2b953a0a2449bd478f6d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Philip Chen <philipchen@google.com>
2020-09-18 21:18:52 +00:00
Duncan Laurie 51c8373593 sconfig: Switch to getopt
Instead of positional arguments switch sconfig to use getopt and pass
the arguments as options in the build system.  This will make it easier
to add additional options.

Change-Id: I431633781e80362e086c000b7108191b5b01aa9d
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44035
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-09-18 17:50:00 +00:00