Commit Graph

26534 Commits

Author SHA1 Message Date
Patrick Rudolph 92433c2878 mb/lenovo/*/acpi: Store the requested state wake state for bluetooth and WWAN
L520 and T420 should also use it - platforms are very similar to t420s
and t530. Z61t is based on T60/X60, X131e is based on X230 so commit
with Change-Id I13c08b8c6b1bf0f3deb25a464b26880d8469c005 should be
applied as well.

All four platforms are using ec/lenovo/h8 embedded controller.

Change-Id: Ib177f024871e82979dd430da86f1551aef14d446
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29064
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-17 12:06:22 +00:00
Tristan Shieh 71ae582f71 google/kukui: Configure USB
Set up USB host controller.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui

Change-Id: Iec98f3dc1bbf3dda3d28dbefad15339d48608c7e
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/28788
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Joel Kitching <kitching@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2018-10-17 12:05:47 +00:00
Jumin Li b2c136d960 mediatek/mt8183: Add USB support
This patch implements SoC-specific defines of mt8183 and links the
common code to support USB.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui

Change-Id: I1224cf24f92b07f3c1814f1cbfef96aafa5a992b
Signed-off-by: Jumin Li <jumin.li@mediatek.com>
Reviewed-on: https://review.coreboot.org/28787
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-17 12:05:39 +00:00
Tristan Shieh 223434644a mediatek: Refactor USB code among similar SoCs
Refactor USB code which will be reused among similar SoCs.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Elm

Change-Id: I06fefb4149a489be991e13ddf624082d11e31765
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/28786
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-10-17 12:05:25 +00:00
Joel Kitching 6d88a5d588 vboot: do not extend PCRs on resume from S3
BUG=b:114018226,chromium:873099
TEST=compile coreboot

Change-Id: I6840c45604535089fa8410f03c69702bec91218f
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/28750
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-10-17 12:04:58 +00:00
Joel Kitching 15eb58d77b tpm/tpm_setup: fail on invalid result from tlcl_resume
BUG=b:114018226
TEST=compile coreboot

Change-Id: I8f5df2b0119d35e4000fe62bf1bba6ca07f925f3
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/28748
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-17 12:04:41 +00:00
Nico Huber 10d7845f09 soc/cavium/cn81xx: Drop dead do_soft_reset() implementation
Change-Id: I85f357739220f16497f65df1bb317d9d6eb54d9f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/29046
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-10-17 12:02:35 +00:00
Jonathan Neuschäfer 773cc1b413 arch/x86/exception: Improve the readability of a comment
Add punctuation and fix a typo.

Change-Id: Ic61c665f7e2daefb50b478a1710ea66c8a88235a
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/28993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-10-17 12:01:51 +00:00
Jonathan Neuschäfer 900fcb50f4 mb/lenovo/t530: Fix double indentation in Kconfig.name
There is no need to indent these lines with two tabs.

Change-Id: I2164f4e3ea48db8dc5242a55b0452782dae19a4b
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/28989
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-10-17 12:01:15 +00:00
Jonathan Neuschäfer e1de6482d0 mb/*/*: Clean up FADT checksum assignment
The assignment of header->checksum was in some cases done twice, or
unnecessarily split into two lines.

Change-Id: Ib0c0890d7589e6a24b11e9bda10e6969c7d73c56
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/28988
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2018-10-17 12:01:06 +00:00
Roy Mingi Park 9814f8f037 mb/google/poppy/variants/nocturne: Disable pull-down of GPP_E9/E10
While these pins were set to a pull-down 20KOhm, NPCX EC consumes
~2.1mW higher power. Becasue there was leakage current on both GPIO67
and GPIO70 from NPCX EC. With the external pull-up 10KOhm for
USB_OC0#/USB2_OC1#, this wasn't enough to prevent leakage current.

BUG=b:117139495
TEST=Check nxpc EC power to see power improvement

Change-Id: I685d876461c263f07ca4c8f8046635cb7087279c
Signed-off-by: Roy Mingi Park <roy.mingi.park@intel.com>
Reviewed-on: https://review.coreboot.org/29007
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-10-17 11:59:54 +00:00
praveen hodagatta pranesh 6c96542a3e drivers/intel/fsp2_0: Add new config option to support FSP CAR
CPU_MICROCODE_CBFS_LEN and CPU_MICROCODE_CBFS_LOC configs pass the CPU
microcode length and base address in CBFS to FSPT binary as init parameters.

Add new config FSP_T_XIP in Kconfig, which is selected by platform config.
If FSP_T_XIP is selected, then relocate FSPT binary while adding it in CBFS
so that it can be executed in place.

BUG= None
TEST= Build for both CFL RVP11 & RVP8 and verified for successfull CAR setup.

Change-Id: Ic46e0bb9ee13c38ff322979119c4813653c61029
Signed-off-by: praveen hodagatta pranesh <praveenx.hodagatta.pranesh@intel.com>
Reviewed-on: https://review.coreboot.org/28985
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-10-17 06:06:49 +00:00
Sumeet R Pawnikar 5ac643362b mb/google/poppy/variants/nocturne: Tune DPTF settings for CPU
Update CPU passive temperature threshold value from 70C to 80C,
to avoid early throttling for spiky workloads. Also, change CPU
throttling interval from 1 sec to 5 sec for CPU temperature.

BUG=b:116400298
BRANCH=None
TEST=Manual performance testing on nocturne.

Change-Id: Ic5031a4aa16f750237565f4e4928e78834b1d686
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/29044
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-17 03:52:42 +00:00
Peter Lemenkov a71b6b3b4c mb/*/*/Makefile.inc: Remove acpi_tables.c from Makefiles
It always included if ACPI is supported since commit 822bc65 with
Change-Id I372dbd03101030c904dab153552a1291f3b63518 ("ACPI: Remove
CONFIG_GENERATE_ACPI_TABLES").

Change-Id: If17a6f43e368ccf850031b349714fa1ec4d02c1d
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/28954
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>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-10-16 17:37:40 +00:00
Wonkyu Kim af89f49b83 tianocore : Enable Serial Debug for UEFI payload Debug build
Change-Id: I29953250ca278d5b1977be3763359df5110f67c7
Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-on: https://review.coreboot.org/29004
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-15 22:51:34 +00:00
Amanda Huang f7b57d0b78 mb/google/poppy/variants/nami: Disable rear camera/DMIC for Syndra
Since there are two cameras on Nami and only one camera on Syndra.
We need to disable rear camera/DMIC on all Syndra sku.

BUG=b:112876867

Change-Id: I92fb43ec84387c268ffdb6d0d34a5e5b13bcf50a
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/29022
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-10-15 21:11:32 +00:00
Patrick Rudolph ac4819de70 libpayload: Always set pciaddr
For debugging purposes always set the pciaddr attribute.
Tested on Lenovo T500.

Change-Id: I83a0e7f7196ed251fa0becc4e56bef3ca68f20f4
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/18599
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-15 15:42:18 +00:00
Peter Lemenkov 0f79a92bb6 mb/lenovo/*/smihandler: Remove some unused includes
Tried to build all affected mainboards - still compiles fine.

Change-Id: I385cac1a75cee13453b831bd75b3ecc7a6d229fa
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29033
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>
2018-10-15 15:41:51 +00:00
Peter Lemenkov 43fcec67e5 mb/lenovo/*/dsdt: Remove HAVE_LCD_SCREEN
This define is no longer used by anyone. It was removed everywhere else
with commit with Change-Id I556769e5e28b83e7465e3db689e26c8c0ab44757.
It seems that these two files were simply mislooked. So let's remove it.

Change-Id: Ifbb62441e16e97c0cae0713968844e296619a880
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29070
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>
2018-10-15 15:40:31 +00:00
Arthur Heymans 5f7910d220 mb/asus/p5q_pro: Add mainboard
This mainboard is quite similar to the p5qc. The main differences being a second
PEG slot, the IDE slot and being DDR2 only.

The following was tested:
- both PEG slots populated (coreboot sets legacy VGA decoding on the GPU in the
black slot)
- USB
- Ethernet NIC
- PS2 Keyboard
- COM1
- S3 resume

Change-Id: I49a4bca4256e2a905aff3252eca76387c81152c1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/29102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-15 14:11:22 +00:00
Arthur Heymans 7f922b0f6a drivers/net/atl1e: Add driver
A shortcoming of this driver is that if multiple devices with the same PCI ID
are present and don't have an eeprom, they would all get the same macadress set.
The r8168 driver deals with such cases so it should be easy to implement if
needed.

Change-Id: I5c32df00e25453c350a45e7f1ee6834b89c4289f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/28265
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-15 14:11:00 +00:00
Arthur Heymans 1541256f22 mb/asus/p5qc: Add mainboard
SeaBIOS does not seem to like the Marvel IDE controller, so disabled SeaBIOS
support for ATA. It works fine in Linux afterwards.

Working:
- SATA on southbridge port
- SATA on marvel IDE controller ports (only in Linux)
- USB
- COM1
- PS2 Keyboard
- DDR2 DIMMs
- PCIe x16 PEG port
- PCI port
- NIC (needs a driver to set macaddress)
- S3 resume

Not working:
- SeaBIOS with ATA support (long timeout marvel controller so disabled)
- DDR3 fails because the proper clock signal does not get enabled. Even when
fixing this it fails later or during memtest, so it should be considered
unsupported for now

Untested:
- PCIe x1 ports (expected to work)
- sound (expected to work)

TODO:
add documentation

Change-Id: I4a81940707566776bd048904ca1387fea741fece
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/28264
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-15 14:10:18 +00:00
Aaron Durbin 6db1b2fc24 vc/google/chromeos/ec: remove EC hibernate in cr50 update path
More platforms are not able to hibernate under certain circumstances,
such as when AC is plugged. This original path was conservatively put in
to prevent potential damage when cr50-update-caused asynchronous resets
occur.  Julius' compelling argument that async resets from recovery mode
requests should have enough coverage of the design over the course of
project development. Remove the hibernate path and assume all is well
going forward.

Change-Id: I37121e75ff4e6abcb41d8534a1eccf0788ce2ea2
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/29076
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-15 13:56:01 +00:00
Arthur Heymans b1ba6624cd nb/intel/x4x: Fix P45 CAPID max frequency
It looks like on the ASUS P5QC has 0 in this CAPID field while still supporting
TCK_666MHZ.

Change-Id: Id1a94d91434dbe782fcc56dad56fcaee4e78463b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/29101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-15 12:51:31 +00:00
Arthur Heymans de82ac7735 sb/intel/i82801jx: Use macros for LPC_EN
Change-Id: I4a9a9366c85206fa460519a26f48b3aada5bc7c3
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/29100
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-15 12:51:18 +00:00
Arthur Heymans 8ddd7d1e5e nb/intel/x4x: Program read training results to all ranks
While during the read training itself only the settings for rank 0 are used for
all ranks, the controller does use the separate settings for each rank later on.
It is unknown which register is responsible for this.
The signals are probably not generated separately and therefore need to have the
same settings for all ranks. Therefore program the results for all ranks instead
of for all populated ranks.

TESTED: Fixes DG43GT not booting with only the second DIMM slot of a channel
populated.

Change-Id: I7965a068ef4779847e62e966154764370c91302a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/28577
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-15 12:50:50 +00:00
Joel Kitching 672d5ad20b cbfstool: make comments more consistent
Fix a typo and make comments more consistent (start with
capital letter).

BUG=None
TEST=None

Change-Id: I97bff5e05596fc6973f0729e276a2e45b291120d
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/29025
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2018-10-14 19:13:14 +00:00
Marshall Dawson d453081a57 soc/amd/stoneyridge: Define PM USB Enable register
Make #define definitions for PMxEF and replace the hardcoded values.

Note that this doesn't change the current functionality of the source.
The existing code has been propogated from the sb//hudson port, which
seems to attempt to enable 100% of all OHCI and EHCI controllers that
may be present in the system.

Change-Id: I6018b0062730de19e3283a010144dfedc2b11423
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29075
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-14 19:11:54 +00:00
Marshall Dawson afaedc96c8 soc/amd/stoneyridge: Remove hudson EHCI debug controllers
Remove nonpreset controllers from the PCI device identifier function
(ignoring any CONFIG_USBDEBUG_HCD_INDEX).  The extra devices appear
to be holdovers from the original sb/hudson source.

TEST=Jam Makefile.inc to unconditionally build enable_usbdebug.c and
     verify proper BDF is returned in romstage and ramstage.

Change-Id: I2e819d5e998922ad427c4a094c29a590f249a0d3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29074
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-10-14 19:11:48 +00:00
Marshall Dawson fdff6c25a1 soc/amd/stoneyridge: Remove errant parenthesis in southbridge.h
Delete an unmatched opening parenthesis in the definition for the EHCI
hub config register definition.  This wasn't causing a problem unless
EHCI debug was enabled.

TEST=Jam Makefile.inc to unconditionally build enable_usbdebug.c and
     verify successful build

Change-Id: I5f461d1573e416b5a8ee24329142e3c46b6a05e3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29073
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-14 19:11:41 +00:00
Marshall Dawson ba8751fc72 soc/amd/stoneyridge: Rearrange southbridge.h more
Move the SPI base address register definition to D14F3.  This was
missed in:
  bba043 amd/stoneyridge: Rearrange southbridge.h

Change-Id: Ia722339418c118bdf4b000bbf97ae4266e9b3be2
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-10-14 19:11:34 +00:00
Patrick Georgi c366f90a2e util/abuild: When using blobs, enable 3rdparty/fsp by default
This is a no-op on non-FSP systems, but enables using it when supported.

Change-Id: I66fe9b8587753ea017e13a752a7728e47287e9a0
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/28776
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-12 23:24:27 +00:00
Patrick Georgi 1a6fd0b538 3rdparty/blobs: Update to include QuarkFsp
Change-Id: I0032e86755750755e7ae6e2a53863e1600f96a5b
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/29030
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-12 23:21:35 +00:00
Patrick Georgi 6539e10c4f drivers/intel/fsp2_0: Hook up IntelFSP repo
With https://github.com/IntelFsp/FSP/pull/4 merged, this allows using
Intel's FSP repo (that we mirror) to build a complete BIOS ifd region
with a simple coreboot build, automatically drawing in headers and
binaries.

This commit covers Apollolake, Coffeelake, Skylake, and Kabylake.

Skylake is using Kabylake's FSP since its own is FSP 1.1 and Kabylake's
also supports Skylake.

Another candidate (given 3rdparty/fsp's content) is Denverton NS, but
it requires changes to coreboot's FSP bindings to become compatible.

Cannonlake, Whiskeylake require an FSP release.

Change-Id: I8d838ca6555348ce877f54e95907e9fdf6b9f2e7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/28593
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-by: Naresh Solanki <naresh.solanki@intel.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-12 23:20:53 +00:00
Julius Werner f3aa6e9319 libpayload: arm64: Add GDB support
This patch adds remote GDB support for the arm64 architecture.

Change-Id: I2fa4dbca6c39f822f489a5e81bd052f53fda98a5
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/29020
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-12 20:17:48 +00:00
Julius Werner 1bfda7293a libpayload: gdb: Factor out gdb_handle_reentrant_exception() from arm32
The arm32 GDB architecture code contains a little hack that allows it to
(sort of) correctly deal with a reentrant exception triggered from
within the GDB stub. The main logic for this isn't really arm32 specific
and could be useful for other architectures as well, so factor it out
into a separate function.

Change-Id: I3c6db8cecf1e86bba23de6fd2ac9fdf0cf69d3c6
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/29019
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-12 20:17:40 +00:00
Julius Werner 5c0e72ff99 libpayload: arm64: Make exception handling closer to arm32
This patch reworks the arm64 exception handling to be more similar to
how it works on arm32. This includes a bunch of features like actually
saving and restoring more exception state in the exception_state
structure and supporting the same sort of partial reentrancy that is
useful for GDB. Since there's no instruction to directly load into or
store out of SP on arm64, we can't do quite the same thing where we use
that to read an exception_state_ptr variable right after exception entry
when no other register is available. But we can do something very
similar by (ab-)using the "high" stack pointer (SP_EL2) as a pointer to
the exception_state struct and providing a function to change it.

Change-Id: Ia16a1124be1824392a309ae1f4cb031547d184c1
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/29018
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-12 20:17:28 +00:00
Julius Werner ca52a25882 libpayload: arm64: Conform to new coreboot lib_helpers.h and assume EL2
This patch adds the new, faster architectural register accessors to
libpayload that were already added to coreboot in CB:27881. It also
hardcodes the assumption that coreboot payloads run at EL2, which has
already been hardcoded in coreboot with CB:27880 (see rationale there).
This means we can drop all the read_current/write_current stuff which
added a lot of unnecessary helpers to check the current exception level.

This patch breaks payloads that used read_current/write_current
accessors, but it seems unlikely that many payloads deal with this stuff
anyway, and it should be a trivial fix (just replace them with the
respective _el2 versions).

Also add accessors for a couple of more registers that are required to
enable debug mode while I'm here.

Change-Id: Ic9dfa48411f3805747613f03611f8a134a51cc46
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/29017
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2018-10-12 20:14:54 +00:00
Marshall Dawson e1b1ec7154 amd/stoneyridge: Fix PmControl register size in SMI handler
The AMD implementation of this register is only 16 bits.  Change the
source accordingly.

TEST=Suspend/Resume a Grunt several times

Change-Id: Ib900468cc1c790fa7d57bb6faa91aee012173f7a
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29016
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:17:04 +00:00
Marshall Dawson edba21e4a6 amd/stoneyridge: Rename CGPLL_CONFIG definitions
Shorten the names in the MISC CGPLL_CONFIG, and make the formatting match
the surrounding source.

Change-Id: I71cf1ff6bd4bca7a25484b4da9388c17cfecc043
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29015
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:16:52 +00:00
Marshall Dawson d1aa8eba72 amd/stoneyridge: Rename GppClkCntrl fields
Make the field names of the MISCx00 GPPClkCntrl more manageable by
shortening their names.  Make the definitions look more like the
rest of the header file.

Change-Id: I515cd664808e38851a7dbdba899df4fb9bbbcde6
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29014
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:16:23 +00:00
Marshall Dawson bba0439d09 amd/stoneyridge: Rearrange southbridge.h
Group definitions so they're near others of the same type, e.g. PCI,
AcpiMmio, etc.

Change-Id: Ia6ef21431db0e758eba0ea043b54c036ec6235fe
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29013
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:15:55 +00:00
Marshall Dawson fdefe96503 amd/stoneyridge: Remove dead GPIO definitions
Delete definitions that are no longer used.

Change-Id: I94c9c33f73c1a2d9308408e3e9ca526e876d6135
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:15:31 +00:00
Marshall Dawson 8db8432cf5 amd/stoneyridge: Clarify XHCI_PM register definitions
Change-Id: I1b44ffd7c0244b0408c3823d634a9b8d5038462f
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29011
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:15:10 +00:00
Marshall Dawson 1548458efd amd/stoneyridge: Fix SPI_CMD_TRIGGER coding style
Make the whitespace match surrounding lines and remove unnecessary
parentheses.

Change-Id: I2ed02494ba69237c38af61317e435d9575cefe1c
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29010
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:14:35 +00:00
Marshall Dawson ecce847606 amd/stoneyridge: Convert hex definitions to lower case
Match the rest of the soc/stoneyridge source.

Change-Id: I4531e6dad0362be73499647d9fc93c168b6f163e
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:13:32 +00:00
Marshall Dawson 10509c6f19 amd/stoneyridge: Remove hudson register definitions
Delete artifacts remaining from the original "hudson" and "yangtze"
controller hub designs.

Husdon devices had a configurable AcpiMmio base address, and a selection
for I/O vs. MMIO decode.  Modern products are fixed at 0xfed80000 in MMIO.

Remove the flash control register definitions for the old generations.

The manual reset register appears to not function as hudson.

PMIO_DEBUG is named differently now, and not used, so remove its
definition too.

Change-Id: I6484bb2ca80b65318565dfee1a3368b121aea9de
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29008
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-12 15:08:21 +00:00
Furquan Shaikh ba748cc7c0 mb/google/poppy/var/nocturne: Provide override for ec eventinfo
This change implements the callback to provide google_chromeec_event_info
structure in nocturne variant and sets MKBP SCI based on board id.

BUG=b:112366846,b:112112483,b:112111610

Change-Id: Ifcc10aefc8f450214bd64dfffaf8854ada43f323
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/28984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Enrico Granata <egranata@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-11 23:58:25 +00:00
Furquan Shaikh 6985c90ff4 mb/google/poppy: Allow variants to provide event info at runtime
This change adds a variant callback to read google_chromeec_event_info
from variant at runtime to allow override of any events based on
factors like board id.

This callback is used in ramstage and smm to get
google_chromeec_event_info structure for performing various actions
like setting masks and logging wake events from EC.

BUG=b:112366846,b:112112483,b:112111610

Change-Id: If89e904c92372530a0f555952f87702f068e0b03
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/28983
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Enrico Granata <egranata@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-11 23:58:18 +00:00
Furquan Shaikh 8dcfcb3106 ec/google/chromeec: Add support for querying ec board id in smm stage
This change adds ec_boardid.c to smm stage, which is required to allow
mainboards to query the ec to get board version in this
stage.

BUG=b:112366846,b:112112483,b:112111610

Change-Id: Iccbba96ebb94a12745a62cbfe3496f9e6f921e3d
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/28982
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Enrico Granata <egranata@chromium.org>
2018-10-11 23:58:10 +00:00