Commit graph

18589 commits

Author SHA1 Message Date
Aaron Durbin
77a269cf91 UPSTREAM: mainboard/google/reef: support WLAN_PE_RST
The reef DVT build added another way to assert the wifi module's
reset line. Ensure it's deasserted by default. For previous boards
this GPIO doesn't matter because it wasn't routed anyway.

BUG=chrome-os-partner:56737
BRANCH=None
TEST=None

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/16373
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: I63e97b091ca0a278682c883303b1d7e052d8e677
Reviewed-on: https://chromium-review.googlesource.com/380993
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 23:28:39 -07:00
Martin Roth
26a4b43f29 UPSTREAM: amd/sb700/bootblock.c: Restore accidentally deleted code
The recent changes to this file from commit 6e5421d2
(sb/amd/sb700: Add option to increase SPI speed to 33MHz)
were accidentally removed in a code cleanup patch:
commit ba28e8d7 (src/southbridge: Code formating).

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16384
Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>
Tested-by: build bot (Jenkins)

Change-Id: I6cf3e8f29d5c0384d35637f35e051be40318d20f
Reviewed-on: https://chromium-review.googlesource.com/380992
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 23:28:37 -07:00
Elyes HAOUAS
58647909d1 UPSTREAM: northbridge/intel: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16304
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I53208ce5db06d2c65f954e6d59222924ab87722e
Reviewed-on: https://chromium-review.googlesource.com/380991
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 23:28:34 -07:00
Elyes HAOUAS
59bb2c9aff UPSTREAM: northbridge/amd: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16305
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Ic85f725bbdf72fbac5a4d9482c61343c5eb35e25
Reviewed-on: https://chromium-review.googlesource.com/380990
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 23:28:32 -07:00
Elyes HAOUAS
411dc554cf UPSTREAM: src/ec: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16322
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I013f71b702644ab337c3d76be1489530bad6e6cc
Reviewed-on: https://chromium-review.googlesource.com/380989
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 23:28:29 -07:00
Elyes HAOUAS
1bbd393a3b UPSTREAM: soc/broadcom/cygnus/ddr_init.c: Correct typo in POWER ON and POWER OK.
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16343
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)

Change-Id: I5b69a8429eb2f7add08bc134d5d2366a1afe6a4f
Reviewed-on: https://chromium-review.googlesource.com/380988
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 23:28:27 -07:00
Elyes HAOUAS
cf9d15f5a0 UPSTREAM: src/southbridge: Code formating
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16291
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)

Change-Id: Icfc35b73bacb60b1f21e71e70ad4418ec3e644f6
Reviewed-on: https://chromium-review.googlesource.com/380987
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:57 -07:00
Elyes HAOUAS
2641d8bb06 UPSTREAM: src/drivers: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16321
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I4d0087b2557862d04be54cf42f01b3223cb723ac
Reviewed-on: https://chromium-review.googlesource.com/380986
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:54 -07:00
Elyes HAOUAS
b43ce2e7ff UPSTREAM: northbridge/via: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16284
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Ic644cf6792a5d360527e48e04c74ae92be0d1d4f
Reviewed-on: https://chromium-review.googlesource.com/380985
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:52 -07:00
Elyes HAOUAS
2d09978e4c UPSTREAM: src/soc: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16324
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Ifc47f103492a2cd6c818dfd64be971d34afbe0a4
Reviewed-on: https://chromium-review.googlesource.com/380984
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:49 -07:00
Elyes HAOUAS
3531d7d23d UPSTREAM: src/console: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16323
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Ibb2ce383322c174bdb3bcc88ae35c17f179f6d21
Reviewed-on: https://chromium-review.googlesource.com/380983
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:47 -07:00
Rizwan Qureshi
d18a2df56a UPSTREAM: skylake: Add initial FSP2.0 support
Add Initial pieces of code to support fsp2.0 in skylake keeping
the fsp1.1 flow intact.

The soc/romstage.h and soc/ramstage.h have a reference to
fsp driver includes, so split these header files for
each version of FSP driver.

Add the below files,
car_stage.S:
	Add romstage entry point (car_stage_entry).
	This calls into romstage_fsp20.c and aslo handles
	the car teardown.
romstage_fsp20.c:
	Call fsp_memory_init() and also has the callback
	for filling memory init parameters.

Also add monotonic_timer.c to verstage.

With this patchset and relevant change in kunimitsu mainboard,
we are able to boot to romstage.

TEST= Build and Boot Kunimitsu with PLATFORM_USES_FSP1_1
Build and Boot Kunimitsu to romstage with PLATFORM_USES_FSP2_0

BUG=None
BRANCH=None

Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/16267
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)

Change-Id: I4309c8d4369c84d2bd1b13e8ab7bfeaaec645520
Reviewed-on: https://chromium-review.googlesource.com/380057
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:45 -07:00
Arthur Heymans
3f2f19d893 UPSTREAM: i945: Enable changing VRAM size
On i945 the vram size is the default 8mb. It is also possible
to set it 1mb or 0mb hardcoding the GGC register in early_init.c

The intel documentation on i945, "Mobile Intel 945 Express Chipset
Family datasheet june 2008" only documents those three options.
They are set using 3 bits. The documententation also makes mention
of 4mb, 16mb, 32mb, 48mb, 64mb but not how to set it.

The other non documented (straight forward) bit combinations allow
to change the VRAM size to those other states.

What this patch does is:
- add those undocumented registers with their respective vram size to
the i945 NB code;
- make this a cmos option on targets that have this northbridge.

TEST: build, flash to target, set cmos as desired and boot linux.
On Debian it can be found using "dmesg | grep stolen".
NOTE: dmesg message about reserved vram are quite different depending
on linux version

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/14819
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Ia71367ae3efb51bd64affd728407b8386e74594f
Reviewed-on: https://chromium-review.googlesource.com/380982
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:42 -07:00
Andrey Petrov
a18c606165 UPSTREAM: soc/intel/apollolake: Disable Periodic Retraining per-SKU
Certain LPDDR4 models have some HW issues that can be worked around
by turning off Periodic Retraining feature in the memory controller.
Add option to disable PR per SKU.

BUG=chrome-os-partner:55466
BRANCH=None

TEST=run RMT test, pass

Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/16320
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)

Change-Id: Ie7aa79586665f6d3a7edd854a9eef07e6a1b2ab8
Reviewed-on: https://chromium-review.googlesource.com/380981
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:40 -07:00
Brandon Breitenstein
5bee99cbb6 UPSTREAM: soc/intel/apollolake: Update FSP UPD header files for SIC 1.1.3
Update FSP Header files to provide UPD for periodic training
disable. This is for the SIC 1.1.3/150_11 FSP release.

BUG=chrome-os-partner:54100
BRANCH=none
TEST=built coreboot image with new headers for reef

Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/16352
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)

Change-Id: I2ba11aa3d2d664c1d34e39c4c8144fb1c4f2149a
Reviewed-on: https://chromium-review.googlesource.com/380980
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:38 -07:00
Rizwan Qureshi
85c17bf7b7 UPSTREAM: driver/intel/fsp2.0: Add External stage cache region helper
If ramstage caching outside CBMEM is enabled
i.e CONFIG_CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM, then a
helper function to determine the caching region in SMM
should be implemented. Add the same to FSP2.0 driver.
FSP1.1 driver had the same implementation hence copied stage_cache.c.

The SoC code should implement the smm_subregion to provide
the base and size of the caching region within SMM. The fsp/memmap.h
provides the prototype and we will reuse the same from FPS 1.1.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/16312
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)

Change-Id: I4412a710391dc0cee044b96403c50260c3534e6f
Reviewed-on: https://chromium-review.googlesource.com/380056
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-04 19:36:35 -07:00
Simon Glass
434e9ceb5f arm_tf: Fix code style nits and comments
Tidy up a few things which look incorrect in this file.

BUG=chrome-os-partner:56314
BRANCH=none
TEST=build for gru
Change-Id: Ida7a62ced953107c8e1723003bcb470c81de4c2f
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/376848
Commit-Ready: Simon Glass <sjg@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-09-04 17:47:57 -07:00
Shunqian Zheng
000b5c0993 gru/kevin: set 1.15v for lit cpu 1.5G
In kernel side we set 1.1v for 1.5G, even for coreboot RO,
a higer voltage could be safer, 1.2v now seems too high.

BRANCH=none
BUG=chrome-os-partner:56948
TEST=bootup

Change-Id: Iecc620deee553c61a330353ac160aa3a36f516df
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/380896
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-09-04 15:00:50 -07:00
John Zhao
ac714334a3 UPSTREAM: soc/intel/apollolake: Gather microcode revision
Expose get_microcode_info in cpu initialization. Microcode
revision is retrieved and stored into log file at verstage.

BUG=chrome-os-partner:56544
BRANCH=None
TEST=Built coreboot image and validate log file

Signed-off-by: John Zhao <john.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/16311
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I1e792e70f1318df64b4b85a319700013f3757952
Reviewed-on: https://chromium-review.googlesource.com/380979
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:16 -07:00
Werner Zeh
97b2af0654 UPSTREAM: fsp_broadwell_de: Refactor code for SPI debug messages
Currently boards based on fsp_broadwell_de fail to compile if the config
switch CONFIG_DEBUG_SPI_FLASH is selected. The error is caused by the
usage of const for the address pointer in the functions writeb_, writew_
and writel_. The reason why it stayed hidden for so long is the fact that
the switch is used with the preprocessor and nobody really selects it
until there is a bug one want to find in this area.

This patch fixes the parameter type definition which solves the error.
In addition the config switch is not used on preprocessor level anymore
but instead on compiler level. This ensures that at least the code
syntax is checked on build time even if the config option is not
selected. Also prefix the messages with "SPI:" to make them more
meaningful in a full log.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/16347
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I3514b0d4c08bf5a4740f2632641e09af1b3aaf3a
Reviewed-on: https://chromium-review.googlesource.com/380978
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:14 -07:00
Barnali Sarkar
8dcf854aa7 UPSTREAM: soc/intel/skylake: Include Kabylake specific IGD Device IDs
Add Kabylake specific Graphics IDs in report_platform.c and igd.c.

BUG=none
BRANCH=none
TEST=Built and boot kunimitsu

Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/16329
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I3b810d0ff51eb51d396b783e282779aefb2dcb8c
Reviewed-on: https://chromium-review.googlesource.com/380055
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:11 -07:00
Paul Kocialkowski
45129d71cc UPSTREAM: nyan-blaze: Correct indentation for sdram configs
This corrects indentation for sdram configs in nyan_blaze.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/16342
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: Ia9ad2a37c6e3b79e1260f490db893244c32685b6
Reviewed-on: https://chromium-review.googlesource.com/380977
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:09 -07:00
Aaron Durbin
a94a2572bb UPSTREAM: mainboard/google/reef: set SLP_S3_L assertion width to 28ms
The reef board needs at least ~28ms for its S0 rails to discharge
when S3 is entered. Because of the granularity in the chipset the
effective SLP_S3_L assertion width is 50ms.

BUG=chrome-os-partner:56581
BRANCH=None
TEST=None

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/16327
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: I20514eb0825cd4bc2ee9276b648204b7bfd6a7b0
Reviewed-on: https://chromium-review.googlesource.com/380976
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:07 -07:00
Aaron Durbin
cc64a6d2ee UPSTREAM: soc/intel/apollolake: add option for SLP_S3_L assertion width
In order to provide time for the S0 rails to discharge one needs
to be able to set the SLP_S3_L assertion width. The hardware default
is 60 microcseconds which is not slow enough on most boards. Therefore
provide a devicetree option for the mainboard to set accordingly
for its needs. An unset value in devicetree results in a conservative
2 second SLP_S3_L duration.

BUG=chrome-os-partner:56581
BRANCH=None
TEST=None

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/16326
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>

Change-Id: I6c6df2f7a181746708ab7897249ae82109c55f50
Reviewed-on: https://chromium-review.googlesource.com/380975
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:05 -07:00
Jonathan Neuschäfer
e6e00c5dfd UPSTREAM: arch/riscv: Add missing "break;"
BUG=None
BRANCH=None
TEST=None

Reported-by: Coverity (1361947)
Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/16335
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Iea3f12a5a7eb37586f5424db2d7a84c4319492f8
Reviewed-on: https://chromium-review.googlesource.com/377862
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:02 -07:00
Elyes HAOUAS
e38ae0e8e4 UPSTREAM: src/arch: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16287
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I8a44a58506d7cf5ebc9fe7ac4f2b46f9544ba61a
Reviewed-on: https://chromium-review.googlesource.com/377861
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:57:00 -07:00
Elyes HAOUAS
48ebfe1dba UPSTREAM: src/cpu: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16286
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Omar Pakker

Change-Id: I7fb9bfcaeec0b9dfd0695d2b2d398fd01091f6bc
Reviewed-on: https://chromium-review.googlesource.com/377860
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-03 23:56:58 -07:00
Andrey Petrov
92f5b1fef9 UPSTREAM: soc/intel/apollolake: Add CQOS CAR implementation
Add new option to set up Cache-As-RAM by using CQOS, Cache Quality of
Service. CQOS allows setting ways of cache in no-fill mode, while keeping
other ways in regular evicting mode. This effectively allows using CAR
and cache simultaneously.

BUG=chrome-os-partner:51959
BRANCH=None

TEST=switch from NEM to CQOS and back, boot

Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/15455
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Ic7f9899918f94a5788b02a4fbd2f5d5ba9aaf91d
Reviewed-on: https://chromium-review.googlesource.com/377859
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:32:10 -07:00
Andrey Petrov
cfd0b8cb5e UPSTREAM: soc/intel/apollolake: Update stage link addresses for 768 KiB cache
Update link addresses for romstage and verstage. Also update FSP-M relocation
address.

BUG=chrome-os-partner:51959
BRANCH=None
TEST=None

Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/15454
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Ia51a341f05b33151ea5fda9f8620408b5a15bc19
Reviewed-on: https://chromium-review.googlesource.com/377858
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:32:08 -07:00
Andrey Petrov
2692114cee UPSTREAM: soc/intel/apollolake: Handle CAR sizes other than 1 MiB
Since whole L2 (1MiB) is not used, it is possible to shrink CAR size
to 768 KiB. Since 768 KiB is not power of two, 2 MTRRs are used to
set it up. This is a part of CQOS enabling.

BUG=chrome-os-partner:51959
BRANCH=None
TEST=None

Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/15453
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I56326a1790df202a0e428e092dd90286c58763c5
Reviewed-on: https://chromium-review.googlesource.com/377617
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:32:06 -07:00
Elyes HAOUAS
db969ec8cf UPSTREAM: src/cpu: Remove unnecessary whitespace before "\n"
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16279
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: Iebdcc659bf2a3e738702c85ee86dbb71b504721a
Reviewed-on: https://chromium-review.googlesource.com/377616
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:32:03 -07:00
Elyes HAOUAS
753bba04af UPSTREAM: src/arch: Capitalize CPU and ACPI
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16277
Reviewed-by: Omar Pakker
Tested-by: build bot (Jenkins)

Change-Id: I37dfa853c3dbe93a52f6c37941b17717e22f6430
Reviewed-on: https://chromium-review.googlesource.com/377615
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:32:01 -07:00
Elyes HAOUAS
ed0d3318ba UPSTREAM: src/device: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16289
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker

Change-Id: I48477c2917ab1be14d3cedf25e8b97dae1c1d309
Reviewed-on: https://chromium-review.googlesource.com/377614
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:31:59 -07:00
Elyes HAOUAS
fd89b1821b UPSTREAM: src/include: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16285
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker

Change-Id: I307d37cdf2647467d4c88dfa4be5c66c8587202e
Reviewed-on: https://chromium-review.googlesource.com/377613
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:31:56 -07:00
Elyes HAOUAS
d589ff9726 UPSTREAM: src/device: Remove unnecessary whitespace before newline
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16288
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker

Change-Id: I3536a99a1a6fd2bc7b10777654c1937b92e8eacd
Reviewed-on: https://chromium-review.googlesource.com/377612
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:31:54 -07:00
Elyes HAOUAS
e4eb3da3c4 UPSTREAM: src/southbridge: Add required space before opening parenthesis '('
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16290
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker

Change-Id: I43b9b86fd51dbdc50108026099c60238f3012cbe
Reviewed-on: https://chromium-review.googlesource.com/377611
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 09:31:52 -07:00
Elyes HAOUAS
b3b0810f3f UPSTREAM: src/soc: Remove unnecessary whitespace before "\n" and "\t"
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16325
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I89bc8b26f2dba4770aea14b8bbc7e657355e8c59
Reviewed-on: https://chromium-review.googlesource.com/377610
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 07:11:51 -07:00
Simon Glass
49c2fc20d7 rockchip: spi: Improve SPI read efficiency
The SPI driver is quite slow at reading data. For example, with a 24MHz
clock on gru it achieves a read speed of only 13.9Mbps.

We can correct this by reading the status registers once, then reading as
many bytes as are available before checking the status registers again. It
seems likely that a status register read requires synchronizing with the
SPI FIFO clock domain, which takes a while.

BUG=chrome-os-partner:56556
BRANCH=none
TEST=run on gru and see the speed increase from 13.920 Mbps to 24.712 Mbps

Change-Id: I42745f01f0fe069f6ae26d866004d36bb257e6b2
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/376945
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-09-02 07:11:08 -07:00
Daisuke Nojiri
4e7a42c999 Veyron: Increase bit-per-pixel to 32
This enhances gradation of some icons on vboot screens.

BUG=chrome-os-partner:56056
BRANCH=none
TEST=Booted Jerry

Change-Id: I126cb7077c834e1a8b0a625a592dce8789b5876c
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/376884
2016-09-02 04:27:02 -07:00
Julius Werner
4e8be3f09a google/gru: Fix up PWM regulator ranges
We did yet another small adjustment to the PWM regulator ranges for
Kevin rev6... this patch reflects that in code. Also rewrite code and
descriptions to indicate that these new ranges are not just for Kevin,
but also planned to be used on Gru rev2 and any future Gru derivatives
(which as I understand it is the plan, right?).

BRANCH=None
BUG=chrome-os-partner:54888
TEST=Booted my rev5, for whatever that's worth...

Change-Id: I723dc09b9711c7c6d2b3402d012198438309a8ff
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/379921
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2016-09-02 04:25:20 -07:00
Julius Werner
c4e5a2852a UPSTREAM: rockchip/rk3399: Enable ramstage compression, shuffle around memlayout
Since we now have so much more room for activities in our romstage SRAM
section, we can easily fit the LZMA decompressor to enable ramstage
compression. Also shuffle around memlayout sections a little more to
make use of unused space, and balance out leftover memory so that all
sections that might need future expansion have a reasonable amount.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16334
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I47f2d03e520fc3103ef04257b4ba7e93874b8956
Reviewed-on: https://chromium-review.googlesource.com/377609
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 04:23:08 -07:00
Julius Werner
80cd9b78de UPSTREAM: gru: Make SDRAM parameters individual struct files in CBFS
This patch changes Gru SDRAM parameters from structures that just get
compiled into the romstage to individual CBFS files. This allows us to
only load the parameter set we need for the board we're booting from
flash, which reduces our boot time and the SRAM memory footprint
required to hold the romstage.

BUG=None
BRANCH=None
TEST=Booted Kevin.

Change-Id: Ie88a515cbdb19a794ca0a230a56bcc82bed1e550
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16274
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/377608
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-09-02 04:23:06 -07:00
Julius Werner
2d123177fa UPSTREAM: cbmem: Always maintain backing store struct in a global on non-x86
The current CBMEM code contains an optimization that maintains the
structure with information about the CBMEM backing store in a global
variable, so that we don't have to recover it from cbmem_top() again
every single time we access CBMEM. However, due to the problems with
using globals in x86 romstage, this optimization has only been enabled
in ramstage.

However, all non-x86 platforms are SRAM-based (at least for now) and
can use globals perfectly fine in earlier stages. Therefore, this patch
extends the optimization on those platforms to all stages. This also
allows us to remove the requirement that cbmem_top() needs to return
NULL before its backing store has been initialized from those boards,
since the CBMEM code can now keep track of whether it has been
initialized by itself.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16273
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Ia6c1db00ae01dee485d5e96e4315cb399dc63696
Reviewed-on: https://chromium-review.googlesource.com/377607
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-02 04:23:03 -07:00
Daisuke Nojiri
bb1f0fb00d Gru: Increase bit-per-pixel to 32
This enhances gradation of some icons on vboot screens.

BUG=chrome-os-partner:56056
BRANCH=none
TEST=Booted kevin-tpm2

Change-Id: Ieb61830b9555da232936087cdcf7c61a1e55bab4
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/376883
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-09-02 01:28:24 -07:00
Julius Werner
9c714baad2 UPSTREAM: cbfs: Add "struct" file type and associated helpers
This patch adds functionality to compile a C data structure into a raw
binary file, add it to CBFS and allow coreboot to load it at runtime.
This is useful in all cases where we need to be able to have several
larger data sets available in an image, but will only require a small
subset of them at boot (a classic example would be DRAM parameters) or
only require it in certain boot modes. This allows us to load less data
from flash and increase boot speed compared to solutions that compile
all data sets into a stage.

Each structure has to be defined in a separate .c file which contains no
functions and only a single global variable. The data type must be
serialization safe (composed of only fixed-width types, paying attention
to padding). It must be added to CBFS in a Makefile with the 'struct'
file processor.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16272
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Iab65c0b6ebea235089f741eaa8098743e54d6ccc
Reviewed-on: https://chromium-review.googlesource.com/377606
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-01 22:56:18 -07:00
Julius Werner
3b8f3d064a gru: Add watchdog reset support
This patch adds support to reboot the whole board after a hardware
watchdog reset, to avoid the usual TPM issues. Work 100% equivalent to
Veyron.

From my tests it looks like both SRAM and PMUSRAM get preserved across
warm reboots. I'm putting the WATCHDOG_TOMBSTONE into PMUSRAM since that
makes it easier to deal with in coreboot (PMUSRAM is currently not
mapped as cached, so we don't need to worry about flushing the results
back before reboot).

BRANCH=None
BUG=chrome-os-partner:56600
TEST='stop daisydog; cat > /dev/watchdog', press CTRL+D, wait 30
seconds. Confirm that system reboots correctly without entering recovery
and we get a HW watchdog event in the eventlog.

Change-Id: I17c5a801bef200d7592a315a955234bca11cf7a3
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/375562
Commit-Queue: Douglas Anderson <dianders@chromium.org>
2016-09-02 05:13:58 +00:00
Julius Werner
c6fd5e9b00 UPSTREAM: commonlib: cbfs: Add CBFS attribute support
This patch adds support for the CBFS attributes that were already
introduced in cbfstool and libpayload. I'm only copy&pasting the header
definitions needed for this once more. Really, we should be unifying the
definitions (and possibly part of the code) from cbfstool with
commonlib, but apparently that hadn't been done when this feature was
introduced and I don't really have time to do it cleanly now.

Also add a function to extract info from the compression attribute,
which can then be used to run cbfs_load_and_decompress() on the file.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16271
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I7b6463597757122cfe84f006c946a1658bb3acc6
Reviewed-on: https://chromium-review.googlesource.com/377605
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-01 19:52:43 -07:00
Randall Spangler
db9bb2d392 vboot/vbnv_flash: Binary search to find last used entry
This improves the previous linear search to O(log n).  No change in
storage format.

BUG=chromium:640656
BRANCH=none
TEST=Manual
	(test empty)
	flashrom -i RW_NVRAM -e
	Reboot; device should boot normally.

	(start using records)
	crossystem kern_nv=0xaab0
	crossystem recovery_request=1 && reboot
	Device should go into recovery mode with reason 1
	Reboot again; it should boot normally.
	crossystem kern_nv (should still contain 0xaab0)
	Repeat steps several times with request=2, 3, etc.

	flashrom -i RW_NVRAM -r nvdata
	Modify nvdata to copy the first record across all valid
	records
	flashrom -i RW_NVRAM -w nvdata
	Reboot; device should boot normally.

Change-Id: I1eb5fd9fa6b2ae56833f024bcd3c250147bcc7a1
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/376928
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-09-01 05:02:33 -07:00
Arthur Heymans
042c3ccd1e UPSTREAM: lenovo/x200,t400: enable C4 cpu low power state
This enables the C4 low power state on the lenovo x200 and t400.
It's inspired by the thread on the mailinglist:
"[coreboot] Lenovo X200 running Coreboot drains 3-4W more power
than with Vendor BIOS".

What this does, is to enable a C3 state using MWAIT(C3) request
and set the southbridge config c4onc3_enable to automatically
upgrade C3 to the lower power C4 state.
The latency (0x37) is the same value used by the vendor bios.

With C4 enabled the idle power consumption is about ~2-3W lower.

TEST= build and install on target. Use powertop top to measure power
usage. To manually disable c-state to compare them,
do (tested on linux 4.4):
echo 1 > /sys/devices/system/cpu/cpu*/cpuidle/stateX/disable

BUG=None
BRANCH=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/15251
Tested-by: build bot (Jenkins)
Reviewed-by: Swift Geek
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: I1a1663a7662ebc7157a965667680688ad6a33545
Reviewed-on: https://chromium-review.googlesource.com/377604
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-01 05:02:31 -07:00
Eric Gao
ee4365c787 rockchip/rk3399: Add pwm_regulator.c for pwm then ramp boot up cpu
Before, we calculate the pwm duties for cpu cores and centerlogic by
hand, adding pwm_regulator.c to handle this. The default pwm design
min/max voltage may be different between revs.

With the pwm regulator, this patch changes the little cpu frequency from
600M to 1512M, and raises CPU voltage to 1.2V correspondingly.

This also means we decide to drop the ES1 because it may fail to
bootup with 1.5G ~ 1.2v.

BRANCH=none
BUG=chrome-os-partner:54376,chrome-os-partner:54862
TEST=Bootup on kevin board

Change-Id: Ide75bbd92d1cbb14f934baeec0e38862bc08402b
Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/364410
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-08-28 16:33:41 -07:00