Commit Graph

27063 Commits

Author SHA1 Message Date
Martin Roth 3a2aa45eeb libpayload: Don't try to use invalid row count
console->scroll_up() was hanging when console->rows is 0.  This
was happening on delan if no screen was attached.  If there are no
rows, just return.

BUG=b:119234919
TEST=Boot delan with no flat panel.  System boots to OS

Change-Id: Ib022d3c6fc0c9cf360809dca28761a50c787304a
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/c/30092
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2018-12-09 09:30:13 +00:00
Lijian Zhao ffe4aededf mb/google/sarien: Enable LAN clock source usage
FSP defined a special clock source usage 0x70 for PCH LAN device, update
that to google sarien platform.

BUG=b:120003760
TEST=Boot up into OS, ethernet able to be listed in ifconfig.

Change-Id: I9f945be4f0ce15470ab53f44e60143f3fd0fddf8
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/c/30100
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2018-12-09 09:29:28 +00:00
Lucas Chen b1baa980ea google/grunt: Update micron-MT40A1G16KNR-075-E.spd.hex SPD file Module
Part Number

Correct Ram_ID=0b0011 SPD Module Part Number to "MT40A1G16KNR-075:E" from
"4ATS1G64HZ-2G6E1".

BUG=b:120000816
BRANCH=master
TEST=mosys memory spd print all

Change-Id: I9d582b3753de9a48865eb6eca7e4fbdb31b799ff
Signed-off-by: Lucas Chen <lucas.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/30049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-12-08 16:13:46 +00:00
Lucas Chen f1126a8c14 google/grunt: Update hynix-H5AN8G6NAFR-UH.spd.hex SPD file Module Part
Number

Correct Ram_ID=0b0000 SPD Module Part Number to "H5AN8G6NAFR-UH" from
"HMA851S6AFR6N-UH".

BUG=b:120000816
BRANCH=master
TEST=mosys memory spd print all

Change-Id: I1f6e885638589a35334a9a8f905af4877c5d1f91
Signed-off-by: Lucas Chen <lucas.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/30048
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-12-07 19:27:31 +00:00
Lucas Chen 2ae61712ea google/grunt: Update micron-MT40A512M16JY-083E-B.spd.hex SPD file Module
Part Number

Correct Ram_ID=0b0010 SPD Module Part Number to "MT40A512M16JY-083E:B"
from "4ATF51264HZ-2G3B2".

BUG=b:120000816
BRANCH=master
TEST=mosys memory spd print all

Change-Id: I6847a55968260cdbc1588ddeb8d23c515ad87920
Signed-off-by: Lucas Chen <lucas.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/30050
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-12-07 19:26:47 +00:00
Duncan Laurie b0c726b683 mb/google/sarien: Enable ISH on arcada, disable on sarien
The Intel Sensor Hub was enabled on the wrong variant so this change
moves the enable from sarien to arcada.

Change-Id: If933623f7dbb45c4805fb61430465236eca19ee8
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/30070
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-12-07 18:02:15 +00:00
Richard Spiegel 0050390102 mb/google/kahlee: Use new VBIOS if liara
A new liara specific VBIOS updating eDP power sequence is available now,
Change Kconfig to use it if board is google liara.

BUG=b:120534087
TEST=Build liara, booted, tested eDP test compliance.

Change-Id: I444cfa0bd755480e006f11c0d692b25b96129c29
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/30090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-12-07 15:51:34 +00:00
Richard Spiegel 8f64759326 3rdparty/blobs: Update video BIOS to customize release binary
A liara specific VBIOS was released and merged to blobs. Now coreboot
need to point to the updated blob, so it can use liara specific VBIOS.

Liara Chromebook Stoney VBIOS BRT39865
BRT39865.001 12/05/18,01:13:54 CL#1716128 @ 15.49.0.18 ATOMBuild#436504

Major Changes included:
1. First Stoney VBIOS released to Liara update eDP power up sequence.

BUG=b:120534087
TEST=none

Change-Id: I3b060b1ccfb311584afd0fb66258eb7cc942408d
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/30089
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-12-07 15:19:06 +00:00
Karthikeyan Ramasubramanian 78ca711338 soc/intel/apollolake: Print ME version on exit of BS_DEV_INIT stage
Recently there has been a change to print ME version. But the stage at
which the version is printed causes the HECI device to remain in D0 state.
This in turn prevents the SoC from entering S0ix state.

This change moves printing ME version a little earlier so that the HECI
device is put into D0i3 state by FSP and the SoC can enter S0ix state
successfully.

BRANCH=octopus
BUG=b:120571529
TEST=Ensure that the ME version gets printed in BIOS logs. Ensure that
the device boots to ChromeOS. Ensure that the device enters S0ix
successfully(using suspend_stress_test -c 25).

Change-Id: I85bc45003a040c8347f929457792d78a9a077c6c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/30074
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-12-07 11:38:30 +00:00
Philipp Hug 968a23d2e0 riscv: fix non-SMP support
Use CONFIG_CPU_MAX which defaults to 1 instead of CONFIG_RISCV_HART_NUM.
The default value of CONFIG_RISCV_HART_NUM was 0 and cause a jump to address 0.
Add a die() call to fail gracefully.

Change-Id: I4e3aa09b787ae0f26a4aae375f4e5fcd745a0a1e
Signed-off-by: Philipp Hug <philipp@hug.cx>
Reviewed-on: https://review.coreboot.org/c/29993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Xiang Wang <wxjstz@126.com>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-12-07 11:37:53 +00:00
Nico Huber 6ee37ef59d cbfs: Alert if something goes wrong in cbfs_boot_locate()
Change-Id: I5a3cb41b3a7ff2aa527cc2b40c9d7438474c2f93
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/30084
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-07 11:34:54 +00:00
Marshall Dawson 500d81a95a sb/amd/pi/hudson: Fix UART address math
Correct a build error that occurs when HUDSON_UART is selected.
Replace sizeof() of a nonexistent variable with the intended type.
This was introduced in
   bd48b23 "southbridge//hudson: Get rid of void pointer math".

BUG=b:118484178
TEST=Build Bettong with Chipset/"UART controller for Kern"

Change-Id: Icc0ff9d80c3f5cab9ab837cf1cd0cd8eb0753284
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-12-07 11:34:13 +00:00
Tristan Corrick baa4c07ed4 sb/intel/lynxpoint/pcie.c: Fix a mistake in a comment
The code annotated by the comment is dealing with root port 7, so update
the comment to reflect that. It looks like the comment was copied from
the root port 3 case, but not updated.

Change-Id: I0e27e4453f4c3b2b1b9dffb0c89b71373c6b303e
Signed-off-by: Tristan Corrick <tristan@corrick.kiwi>
Reviewed-on: https://review.coreboot.org/c/30078
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-12-07 11:33:09 +00:00
Elyes HAOUAS 1dcd8dbf76 src/southbridge: Get rid of device_t
Use of device_t is deprecated.

Change-Id: Ib4db9c263ff156966926f9576eed7e3cfb02e78a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/30045
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-12-07 11:22:20 +00:00
Bill XIE 012ef7735d mainboard/lenovo/t430s: Add ThinkPad T431s as a variant
The code is based on autoport and that for T430s

Tested:
- CPU i5-3337U
- Slotted DIMM 2GiB
- Soldered RAM 4GiB from samsung (There may be more models here)
- Camera
- pci-e and usb2 on M.2 slot with A key for wlan
- sata and usb2  (no superspeed components) on M.2 slot with B key for wwan
- On board SDHCI connected to pci-e
- USB3 ports
- libgfxinit-based graphic init
- NVRAM options for North and South bridges
- Sound
- Thinkpad EC
- S3
- TPM1 on LPC
- EHCI debug on SSP2 (USB3 port on the left)
- Linux 4.9.110-3 within Debian GNU/Linux stable, loaded from
  Linux payload (Heads), Seabios may also work.

Not tested:
- Fingerprint reader on USB2 (not present on mine)
- Keyboard backlight (not present on mine)
- "sticky_fn" flag in nvram

Not implemented yet:
- Fn locking in nvram (may not be identical to "sticky_fn")
- C-based native graphic init (since T431s has eDP instead of LVDS)
- Detecting the model of Soldered RAM at runtime, and loading the
  corresponding SPD datum (3 observed) from CBFS (the mechanism may be
  similar to that on x1_carbon_gen1 and s230u, but I do not know how
  to find gpio ports for that, and SPD data stored in vendor firmware.)

Change-Id: Ic8062cacf5e8232405bb5757e1b1d063541f354a
Signed-off-by: Bill XIE <persmule@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-12-07 11:20:53 +00:00
Duncan Laurie d2226060aa mb/google/sarien: Set initial I2C bus rise/fall times
Provide rise/fall times as measured on existing boards.  This will
need adjusted for new boards but provides a starting point that
makes I2C clocks look reasonable.

Tested by measuring I2C bus speed and rise/fall times with a scope.

Change-Id: Ic18010f5efc41dcee8925d696767ba2c44e3df4b
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/30069
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2018-12-07 11:19:16 +00:00
Duncan Laurie 4afefd648b drivers/i2c/designware: Add soc_clock entry for 216MHz
Add an entry to the soc_clock table for a 216MHz clock so that
the I2C controller clock is calculated correctly when the I2C
bus is used in coreboot.

This was tested by measuring the I2C clock speed on H1 I2C bus
on a sarien board in coreboot and ensuring it is ~400KHz.

Change-Id: I6c3cacdad318a5ce41bc41e3ac81385c2d4f396c
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/30068
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-07 11:18:55 +00:00
Duncan Laurie 695f2feaf8 soc/intel/cannonlake: Fix I2C clock input
The input clock for the I2C controllers was set at 133MHz but should
really be 216MHz according to the kernel:

https://patchwork.kernel.org/patch/10408729/
"Intel Cannon Lake PCH has much higher 216 MHz input clock to LPSS I2C
than Sunrisepoint which uses 120 MHz. Preliminary information was that
both share the same clock rate but actual silicon implements elevated
rate for better support for 3.4 MHz high-speed I2C."

This change was tested on a sarien board where an I2C trackpad that was
measuring ~700MHz on I2C and is now measuring ~380MHz.

Change-Id: I792d1f013da5538a2b8157e2f99b754ca7b6bf70
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/30061
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-07 11:18:43 +00:00
kane_chen 8440bf7114 rammus: ELAN touchpad I2C special timing requirement
According to issue tracker b:119899090.
https://partnerissuetracker.corp.google.com/issues/119899090

We modify rammus devicetree.cb .i2c[1] configuration to meet ELAN touchpad I2C special timing requirement.

BUG=b:119899090
BRANCH=firmware-rammus-11275.B
TEST=emerge-rammus coreboot chromeos-ec chromeos-bootimage
Flash FW to DUT, and check touchpad I2C characteristics meet requirement

Signed-off-by: YanRu chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: Ifeb08c2530e6a7674f23f7d48cefa16cfc59cb13
Reviewed-on: https://review.coreboot.org/c/29922
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-06 12:11:37 +00:00
Nico Huber 56dd2d6ff1 soc/intel/apl: Warn if CBFS is outside the memory mapped area
As part of the memory mapped BIOS region is covered by SRAM, check
that CBFS always fits the effectively mapped region of flash. This
is usually taken care of by reserving the SRAM range in the FMAP
(e.g. as BIOS_UNUSABLE), but can be missed.

Change-Id: If5a5b553ad4853723bf13349c809c4f6154aa5f2
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/30055
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-12-06 12:06:16 +00:00
Chris Zhou 6a5b53bef8 mb/google/sarien/variants/sarien: Enable melf touchscreen
BUG=b:119799550
BRANCH=master
TEST=Verify touchscreen on sarien works with this change.

Change-Id: I926c988c141628ae2d98206f9eb615d06357a366
Signed-off-by: Chris Zhou <chris_zhou@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/29830
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2018-12-06 12:05:29 +00:00
Frans Hendriks bd5233eb3d src/soc/intel/braswell/southcluster.c: Config i8254 timer
ISA timer is not configured.
Add call setup_i8254().

BUG=N/A
TEST=Intel CherryHill CRB

Change-Id: If45c4975d147f28a456198ea290efba1c8b0464b
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/29416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-12-06 11:59:52 +00:00
Nathaniel Roach 4f4322dd68 lenovo/h8,thinkpads: Re-do USB Always On
Re-write the UAO handling code as it had stopped working (#171)
  (the flag was not getting read from the RTC properly in SMM)

Remove the SMM code as it's not needed (but EC flag won't be set
  upon entering S3 now)
Set the EC flags on boot the same way other flags are set
Document bitwise operators for clarity
Propagate changes to other Thinkpads
  (updated X201 to have 2 bits for the flag as it only had 1)

Per Nicola Corna's previous commits, 0x0d is set for "AC only"
  "AC only" does exhibit different behaviour - the USB port is
  turned on a few seconds after entering S3, rather than < 1 sec,
  regardless of AC status

Tested on X220

Change-Id: If812cd1ef8fb1a24d7fadbe834f574b40cbcd56a
Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
Reviewed-on: https://review.coreboot.org/c/29565
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-12-06 11:59:22 +00:00
Tristan Corrick d88cf5f037 MAINTAINERS: Add myself as a maintainer for boards I've ported
Change-Id: I41363685bb5c84ce15698f96e58f6a5da9bd2ba2
Signed-off-by: Tristan Corrick <tristan@corrick.kiwi>
Reviewed-on: https://review.coreboot.org/c/30075
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-12-06 11:26:56 +00:00
Peter Lemenkov 6648e4ec8c mb/lenovo/t520/romstage: Remove unused includes
Tested - Lenovo t520 still builds fine with this patch.

Change-Id: I82492c071ca760f0790b992acbdb86021f470cfe
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30043
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-12-06 07:22:04 +00:00
Jett Rink 42d090a2ce mb/google/sarien: Enable ISH
Turn on the ISH in the device tree.

BUG=b:120295222

Change-Id: I0ba08c245d050aebc6eb06055690c422ab9b51c6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://review.coreboot.org/c/30034
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 17:06:22 +00:00
Patrick Rudolph c438bcd590 cpu/x86/pae: Fix pointer casts
Required to compile the code in x86_64, even though it's never used.

Change-Id: I2be8ad8805804e4da52bdb02ab43cb833402f999
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/29876
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-12-05 16:57:15 +00:00
Patrick Rudolph 4af2add608 sb/intel: Fix pointer casts
Fix some compiler warnings due to pointer to integer conversions
with different size.
Required for 64bit ramstage.

Change-Id: Ibfb3cacf25adfb4a242d38e4ea290fdc3929a684
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/29875
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-05 16:57:04 +00:00
Patrick Georgi 571477b514 util/scripts/maintainers.go: file: queries are more stable with quotes
The gerrit docs aren't very explicit about it, but file:"^foo$" is more
robust than file:^foo$.

Change-Id: I16c7d972d365cd04ca5fbb78012ad4eaad667be6
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/29781
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 15:21:21 +00:00
Michael Bacarella 8bed5efad7 Documentation/flash_tutorial/index.md: warn about dots painted on ICs
I fried my mainboard because I tried to orient my chip by lining a blue dot on
the corner of my chip with a dot depicted on the chip datasheet.  They
apparently have nothing to do with each other, and this is normal.  Add
warning about this to the docs to hopefully spare others from a similar fate.

Signed-off-by: Michael Bacarella <michael.bacarella@gmail.com>
Change-Id: Ib634589aaa11f75bde2ef2e13d2cacc4cae19a3f
Signed-off-by: Michael Bacarella <michael.bacarella@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30028
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-12-05 14:10:12 +00:00
Mukesh Savaliya b02452b490 sdm845: Add SPI-NOR flash driver
TEST=build & run

Change-Id: Ie404faf37617d2ad792310709ca2063f9a372076
Signed-off-by: Mukesh Savaliya <msavaliy@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/25392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-12-05 14:09:59 +00:00
Martin Roth 03f05cff2f mainboard/google/kahlee: Add romstage GPIO initialization
Move the backlight initialization from bootblock to romstage

BUG=b:120436919
TEST=Careena backlight is enabled

Change-Id: Ia4993b993d37afaf9e23d6f3316ba91053732f1d
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/c/30039
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-12-05 14:09:17 +00:00
Martin Roth 822ffe1ef0 soc/amd/stoneyridge: Run romstage mainboard code before AGESA
This is needed so the next patch can set up GPIOs before
AGESA runs.

BUG=b:120436919
TEST=Verified romstage mainboard code runs before AGESA

Change-Id: I76c035e166cd64382b52dff5ae00a6f115cbac9b
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/c/30038
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 14:09:07 +00:00
Lijian Zhao ad41f55123 google/sarien: Increase BIOS region to 28MB
Platform have a 32MB SPI chip, so we can increase the bios region from
16MB to 28MB.

BUG=b:119267832
TEST=Build and boot fine on sarien platform.

Change-Id: I9bc0fa0f662e5ec64e77f2005dbb2e7edb8b2524
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/c/29945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2018-12-05 14:07:57 +00:00
Julius Werner 378ec8b0de libpayload: Remove unused timer/serial drivers
This patch removes several timer and serial drivers (and configs) that
were specific to platforms which have been dropped in coreboot.

Change-Id: I589ca7f1a3b479f1c2b1b668a175a71583441ac9
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/30029
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2018-12-05 14:07:17 +00:00
Marshall Dawson 8ce51cde94 soc/amd/stoneyridge: Name IO061 in ASL appropriately
AMD traditionally claims the resource at I/O port 61 for the onboard
PC-AT speaker.  In later designs, the speaker may be omitted in favor
of routing the SPKR signal to the codec.

Some systems implement neither, and for those it is not correct to
identify the resource as a speaker.  Modify the EISAID reported to
the OS depending on the system design.  The default is that port 61
is reported as reserved.  In order to report a speaker, add #define
in mainboard//dsdt.asl.

TEST=check /proc/ioports and iasl -d for both ways using a Grunt
BUG=b:117818432

Change-Id: I33aafb187f9fea7b38aae43c399292c7521fcfc4
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30037
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-12-05 14:06:32 +00:00
Richard Spiegel 6a9e6cd89e src/(device/lib/soc): Remove unused variables
When building grunt with flags set to detect variables that get a value but
then are unused, there are 5 instances that causes error (unused variable).
In most cases it's enough to simply remove the variable. Other instances,
is better to simply use the variables (one instance it's a return value, on
the other instance using the variables makes code more readable).

BUG=b:120260448
TEST=Build and boot grunt.

Change-Id: I0d00fb6a42db20afb34c76b9445a741a57096ead
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/29985
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 14:05:23 +00:00
Peter Lemenkov c3a27dffe9 mb/lenovo/x201/dsdt: Remove duplicated include
Change-Id: Ifb08c903e19ef4e93bdc9cbc9844cb1888a8d2fa
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/29811
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-12-05 14:04:23 +00:00
Peter Lemenkov 0b344eea4d mb/lenovo/*/dsdt: Rearrange defines
Sort mainboard-specific defines in the same order as in all other Lenovo
boards. This is a purely cosmetic change which just makes diff between
boards smaller.

Change-Id: I4e379bb727b356fc6010e93de492f6d73f97a750
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/29544
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-12-05 14:04:07 +00:00
Peter Lemenkov 7012a59fc7 mb/lenovo/*/dsdt: Move mainboard-specific defines out of ec.asl
Most Lenovo mainboards define their own specific defines in dsdt.asl.
Let's make it consistent across all Lenovo mainboards.

Tested - builds fine.

Change-Id: I03fbeb09b25e42af2dfbb220c0f726e6abb73673
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/29543
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-12-05 14:03:45 +00:00
Arthur Heymans 6880a7a18b sb/intel/i82801{g,j}x: Remove unused smi.c files
Now that all targets featuring these southbridges use SMM_TSEG these
files are unused.

Change-Id: Ic3a1d790f3595e98a8d33e6e8274cb72ad356a89
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30018
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 13:45:39 +00:00
Jonathan Neuschäfer 97ca02cb17 soc/sifive/fu540: Add helper function to get tlclk frequency
tlclk is not specific to the UART block in the FU540, so let's calculate
its frequency in clock.c.

Change-Id: I270920027f1132253e413a1bf9feb4fe279b651a
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/c/29335
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philipp Hug <philipp@hug.cx>
2018-12-05 13:36:43 +00:00
Jonathan Neuschäfer 042772a6bd mb/emulation/spike-riscv: Implement mtime_init
This patch lets spike boot to "Payload not loaded" again.

Because soc/ucb/riscv/ does not represent a real SoC, but is a dummy
directory for emulators, and different emulators might have different
memory maps, I moved mtime_init to the mainboard-specific directories
for Spike and QEMU.

Change-Id: I080f7f81df752e25478bd277637bf894bbee4cb2
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/c/28873
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Hug <philipp@hug.cx>
2018-12-05 13:36:26 +00:00
Tristan Shieh 0688ab8d95 google/kukui: Support TPM
Init SPI bus 0 to connect TPM, configure interrupt type of GPIO CR50_IRQ,
implement tis_plat_irq_status(), and set up chromeos GPIO table for TPM
interrupt.

BUG=b:80501386
BRANCH=none
Test=Boots correctly on Kukui.

Change-Id: Ieaa6ae65fbfb5ab6323e226e8171dd7a992c3a39
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/29192
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-12-05 13:35:59 +00:00
Chuanjia Liu 3a065f1a76 mediatek: Share GPIO external interrupts (EINT) code among similar SoCs
Refactor GPIO EINT code which can be reused among similar SoCs.

BUG=b:80501386
BRANCH=none
TEST=emerge-elm coreboot; emerge-kukui coreboot

Change-Id: Ib01b43cf1aa4082d7d968fe1ef82f75e8cf05b8b
Signed-off-by: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/29837
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-12-05 13:34:57 +00:00
Arthur Heymans d5d20d03fe soc/intel/baytrail: Implement POSTCAR stage
Use common code to tear down CAR.

Change-Id: I62a70ae35fe92808f180f2b5f21c5899a96c2c16
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/29930
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-05 13:33:32 +00:00
Arthur Heymans f6cfbf3804 soc/intel/baytrail: Use postcar_frame functions to set up frame
Change-Id: I77e375a2ff2fbf1be4ded922195b80b49ffa4cc5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/29929
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 13:33:21 +00:00
Arthur Heymans 4ff7921753 soc/intel/baytrail: Improve CAR setup
This patch does the following:
- improve the style by removing tabs in front of jmp addresses
- Make the code for zeroing variable MTRR more readable (copied from
  cpu/intel/car)
- Fetch PHYSMASK high from cpuid instead of Kconfig

Change-Id: I6ba67bb8b049c3f25b856f6ebb1399d275764f54
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/29928
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-05 13:32:53 +00:00
Arthur Heymans 90cca5422d soc/intel/broadwell: Implement postcar stage
This does the following:
- Reuse the cpu/intel/car/non-evict CAR setup and exit.
- Use postcar_frame functions to set up the postcar frame

Change-Id: I428832a2d7e46ce61a7f9bd498b609feb4518eb0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/29927
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-12-05 13:32:42 +00:00
Patrick Georgi 9fca297ca4 smmstore: make smmstore's SMM handler code follow everything else
Instead of SMMSTORE_APM_CNT use APM_CNT_SMMSTORE and define it in
cpu/x86/smm.h

Change-Id: Iabc0c9662284ed3ac2933001e64524011a5bf420
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/30023
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-12-05 13:31:22 +00:00