Commit graph

21222 commits

Author SHA1 Message Date
Naresh G Solanki
bd73d0ddf0 UPSTREAM: sb/intel/common/firmware: Keep CHECK_ME disabled by default
While building poppy board, build failed with following error message:

Writing new image to build/coreboot.pre.new
mv build/coreboot.pre.new build/coreboot.pre
util/me_cleaner/me_cleaner.py -c build/coreboot.pre > /dev/null
This image does not contains a ME/TXE firmware NR = 0)
make: *** [src/southbridge/intel/common/firmware/Makefile.inc:55:
add_intel_firmware] Error 1

Hence keeping CHECK_ME unset by default.

TEST=Succesfully built coreboot for Poppy & booted to OS.

Change-Id: Ie6de9fb169ae2225430651fe35109178194f20d3
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 95d6dd21c9
Original-Change-Id: Ib3186498c8da307b686c06c3828e24acbc7f2d17
Original-Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19257
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Nicola Corna <nicola@corna.info>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/539212
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:31 -07:00
Nico Huber
469fdac020 UPSTREAM: Revert "sb/intel/bd82x6x: Disable unused bridges"
This reverts commit f4835a85c0. It
completely ignores port coalescing and breaks enumeration in many
cases. The code reused to disable and hide the root ports was never
meant to be called that way.

The same effect of power saving can likely be achieved by clock
gating unused ports after enumeration without further, error-prone
function hiding.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ibb8c6c2143324a3d366d838234ae0b2fe317fdaa
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: fc20926130
Original-Change-Id: I90d8b9236004f0c42d5a2b6bbd39f6dea07bd3d1
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/20216
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://chromium-review.googlesource.com/539211
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:31 -07:00
Aaron Durbin
df69990261 UPSTREAM: soc/intel/apollolake: revert CPU MP init prior to FSP-S
A major regression was introduced with commit 6520e01a
(soc/intel/apollolake: Perform CPU MP Init before FSP-S Init)
where the APs execution context is taken away by FSP-S. It
appears that FSP-S is not honoring the SkipMpInit UPD because
it's been shown with some debug code that FSP-S is compeltely
hijacking the APs:

Chrome EC: Set WAKE mask to 0x00000000
Chrome EC: Set WAKE mask to 0x00000000
CBFS: 'VBOOT' located CBFS at [440000:524140)
CBFS: Locating 'vbt.bin'
CBFS: Found @ offset 2e700 size 1a00
Running FSPS in 4 secs.. 315875 4315875
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
cpu2 Waiting for work
cpu3 Waiting for work
cpu1 Waiting for work
Running FSPS.. 4315875 4315875
ITSS IRQ Polarities Before:
ITSS IRQ Polarities Before:
IPC0: 0xffffeef8
IPC1: 0xffffffff
IPC2: 0xffffffff
IPC3: 0x00ffffff
ITSS IRQ Polarities After:
IPC0: 0xffffeef8
IPC1: 0x4a07ffff
IPC2: 0x08000000
IPC3: 0x00a11000

This is essentially a revert of 6520e01a to fix the previous
behavior.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id678f145584418e76d0ffbb9884e58e6e55db9b6
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ac3e48257e
Original-Change-Id: I2e136ea1757870fe69df532ba615b9bfc6dfc651
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20215
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/539210
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:30 -07:00
Furquan Shaikh
1a1b413abb UPSTREAM: mainboard/google/{poppy,soraka}: Disable unused GSPI1 interface
TEST=Verified that board still boots to OS without any error.

Change-Id: I44c002e71e85017599a3f474941ced51c79e44d3
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 296c79c9be
Original-Change-Id: I02d2a6cbcab92766a35993bfd20aaeed4ca22c90
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20143
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/539209
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:29 -07:00
Furquan Shaikh
7fde2e025d UPSTREAM: mainboard/google/{poppy,soraka}: Enable generation of SPI TPM ACPI node
Now that we dynamically disable TPM interface based on config options,
add support for generation of SPI TPM ACPI node if SPI TPM is used.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie64165f4b10fdae8ab64267f713a1feaaf1594c6
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: dec6d4e8c7
Original-Change-Id: I87d28a42b48ba916c70e45a061c5efd91a8a59bf
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20142
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/539208
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:29 -07:00
Furquan Shaikh
942a7939fa UPSTREAM: mainboard/google/poppy: Disable unused TPM interface dynamically
Based on the config options selected, decide at runtime which TPM
interface should be disabled so that ACPI tables are not generated for
that interface.

TEST=Verified that unused interface does not show up in ACPI tables.

Change-Id: I62356b4f834c95f4d5a6982c9e2d1d2131d68092
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: b2f423578e
Original-Change-Id: Iee8f49e484ed024c549f60c88d874c08873b75cb
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20141
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539207
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:28 -07:00
Furquan Shaikh
b99994198e UPSTREAM: soc/intel/skylake: Add missing PCH_DEV_* definitions
BUG=none
BRANCH=none
TEST=none

Change-Id: I4cea3f1c9f9084312f0f0c91028425b68d2c31c2
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 268eea0e41
Original-Change-Id: Ib7aa495ccfd405d6ffc968388c28dc540da2f525
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20203
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/539206
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:28 -07:00
Furquan Shaikh
46f2add6c0 UPSTREAM: soc/intel/common/block/i2c: Ignore disabled I2C devices
If I2C device is disabled:
1. BAR for the device will be 0
2. There is no need to generate ACPI tables for the device

TEST=Verified that if an i2c device is disabled statically in
devicetree or dynamically in mainboard, then coreboot does not die
looking for missing resources.

Change-Id: I3617894691853f18b1ebb6f1fe26202d8d3ff502
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: d629e433dd
Original-Change-Id: Id9a790e338a0e6f32c199f5f437203e1525df208
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20140
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539205
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:27 -07:00
Ryan Salsamendi
52a2297743 UPSTREAM: Add support for Undefined Behavior Sanitizer
Initial support for undefined behavior sanitizer in ramstage. Enabling
this will add -fsanitize=undefined to the compiler command line and
link with ubsan.c in ramstage. Code with UB triggers a report with
error, file, and line number, then aborts.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ifa0436eda099cceb1d238a1006d47c7d86793e10
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ab37e9a171
Original-Change-Id: Ib139a418db97b533f99fc59bcb1a71fb6dcd01d8
Original-Signed-off-by: Ryan Salsamendi <rsalsamendi@hotmail.com>
Original-Reviewed-on: https://review.coreboot.org/20156
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539204
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:27 -07:00
Ryan Salsamendi
878d839596 UPSTREAM: cbmem_console: Fix undefined behavior
Fixes report found by undefined behavior sanitizer. Left shifting an int
where the right operand is >= width of type is undefined. Add
ul suffix since it's safe for unsigned types.

BUG=none
BRANCH=none
TEST=none

Change-Id: I76262ee24dc89fac3d2b027ded72f1f32afaa580
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: fce582fa1c
Original-Change-Id: I4b2365428e421085285006bc1ea8aea75890ff65
Original-Signed-off-by: Ryan Salsamendi <rsalsamendi@hotmail.com>
Original-Reviewed-on: https://review.coreboot.org/20144
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Youness Alaoui <snifikino@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539203
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:26 -07:00
Ryan Salsamendi
9faef705ba UPSTREAM: arch/x86: Fix undefined behavior
Fixes report found by undefined behavior sanitizer. Dereferencing a
pointer that is not aligned to the size of access is undefined behavior.
Switch to memcpy() for unaligned write to EBDA_LOWMEM. Change other
write16()s in setup_ebda() to memcpy() for consistency.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ic28f2b8d8b84a71b65ceb1a47015eef99a95319a
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: f0b0712023
Original-Change-Id: I79814bd47a14ec59d84068b11d094dc2531995d9
Original-Signed-off-by: Ryan Salsamendi <rsalsamendi@hotmail.com>
Original-Reviewed-on: https://review.coreboot.org/20132
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539202
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:26 -07:00
Furquan Shaikh
15ba5ad6f2 UPSTREAM: soc/intel/skylake: Add USB port number information to wake source
USB port status register can be used to decide if a particular port
was responsible for generating PME# resulting in device wake:
1. CSC bit is set and port is capable of waking on connect/disconnect
2. PLC bit is set and port is in resume state

BUG=b:37088992
TEST=Verified with wake on USB2.0 port 3, mosys shows:

19 | 2017-06-08 15:43:30 | Wake Source | PME - XHCI (USB 2.0 port) | 3

Change-Id: I5e566b106bf896ca278a4ccf552d4d4be69736f0
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ef08545bff
Original-Change-Id: Ie4fa87393d8f096c4b3dca5f7a97f194cb065468
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20122
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/539201
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:25 -07:00
Arthur Heymans
bf69b488ca UPSTREAM: nb/intel/pineview/raminit.c: Use static const for lookup tables
Also changes the arguments of some functions to const.

This reduces romstage size by a whopping 1009 bytes.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7f0aba95153bf8aa822900880001d46049e966c1
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 6bf13012c1
Original-Change-Id: I054504412524b7be19d98081097843b61bc0c459
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/20147
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Ryan Salsamendi <rsalsamendi@hotmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/539200
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:25 -07:00
Julius Werner
8b3d156e5d UPSTREAM: Consolidate reset API, add generic reset_prepare mechanism
There are many good reasons why we may want to run some sort of generic
callback before we're executing a reset. Unfortunateley, that is really
hard right now: code that wants to reset simply calls the hard_reset()
function (or one of its ill-differentiated cousins) which is directly
implemented by a myriad of different mainboards, northbridges, SoCs,
etc. More recent x86 SoCs have tried to solve the problem in their own
little corner of soc/intel/common, but it's really something that would
benefit all of coreboot.

This patch expands the concept onto all boards: hard_reset() and friends
get implemented in a generic location where they can run hooks before
calling the platform-specific implementation that is now called
do_hard_reset(). The existing Intel reset_prepare() gets generalized as
soc_reset_prepare() (and other hooks for arch, mainboard, etc. can now
easily be added later if necessary). We will also use this central point
to ensure all platforms flush their cache before reset, which is
generally useful for all cases where we're trying to persist information
in RAM across reboots (like the new persistent CBMEM console does).

Also remove cpu_reset() completely since it's not used anywhere and
doesn't seem very useful compared to the others.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iaa2ba1292cb6dc1a4a8098ee256044691f42daba
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 01f9aa5e54
Original-Change-Id: I41b89ce4a923102f0748922496e1dd9bce8a610f
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19789
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/539199
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:24 -07:00
Aaron Durbin
9cf3f8ebd7 UPSTREAM: cpu/x86/mtrr: fail early if solution exceeds available MTRRs
If an MTRR solution exceeds the number of available MTRRs
don't attempt to commit the result. It will just GP fault
with the MSR write to an invalid MSR address.

BUG=none
BRANCH=none
TEST=none

Change-Id: I93cca7a563bc70aaa5d13163a37c89cd53605aac
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: d9762f70ac
Original-Change-Id: I5c4912d5244526544c299c3953bca1bf884b34d5
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20163
Original-Reviewed-by: Youness Alaoui <snifikino@gmail.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539198
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:24 -07:00
Arthur Heymans
5def309169 UPSTREAM: cpu/amd/fam10/ram_calc: Remove superfluous guard
AMD_FAM10H code enables early cbmem by default.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie52b4f096e2bd77ca6cd8fe12f3d3f9d0bf472be
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: e1058c7c99
Original-Change-Id: Ifad007f6604bb612d544cf1387938a8fef1cceb4
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/20148
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/539197
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:23 -07:00
Mario Scheithauer
8bcfbc0af1 UPSTREAM: siemens/mc_apl1: Enable decoding for COM 3 on LPC
Since this mainboard provides 3 COM ports on LPC, enable decoding of the
corresponding address range for COM 3.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iae09fc6a1ef0457322c9d5c84fefcd06832bf248
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: a00d84536b
Original-Change-Id: I15c0748fce67eef46401c314f441aa45f5e3c5fa
Original-Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Original-Reviewed-on: https://review.coreboot.org/20162
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://chromium-review.googlesource.com/539196
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:23 -07:00
Samuel Holland
27b68e083d UPSTREAM: device/pnp: remove struct io_info
The 'set' field was not used anywhere. Replace the struct with a simple
integer representing the mask.

initializer updates performed with:
sed -i -r 's/\{ ?0(x([[:digit:]abcdefABCDEF]{3,4}))?, (0x)?[04]? ?\}/0\1/g' \
        src/ec/*/*/ec.c
sed -i -r 's/\{ ?0(x([[:digit:]abcdefABCDEF]{3,4}))?, (0x)?[04] ?\}/0\1/g' \
        src/ec/*/*/ec_lpc.c \
        src/superio/*/*/superio.c \
        src/superio/smsc/fdc37n972/fdc37n972.c \
        src/superio/smsc/sio10n268/sio10n268.c \
        src/superio/via/vt1211/vt1211.c

src/ec/kontron/it8516e/ec.c was manually updated. The previous value for
IT8516E_LDN_SWUC appears to have been a typo, as it was out of range and
had a zero bit in the middle of the mask.

BUG=none
BRANCH=none
TEST=none

Change-Id: I40ce1f7f62ac7e9b82b974d314a8bc2335cf8cb7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 7daac91236
Original-Change-Id: I1e7853844605cd2a6d568caf05488e1218fb53f9
Original-Signed-off-by: Samuel Holland <samuel@sholland.org>
Original-Reviewed-on: https://review.coreboot.org/20078
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Myles Watson <mylesgw@gmail.com>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/539195
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:22 -07:00
Mario Scheithauer
7a5a8b99f2 UPSTREAM: siemens/mc_apl1: Use Siemens NC FPGA driver
- use Siemens NC FPGA driver for backlight brightness and PWM control
- set Dsave time for board reset after falling edge of signal xdsave

BUG=none
BRANCH=none
TEST=none

Change-Id: I6a51fce1d40d68dc2953a5f49213076f734121d8
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: c21ba2cd3e
Original-Change-Id: I5077d4af162e54a3993e5e0d784a8356f51bd0c9
Original-Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Original-Reviewed-on: https://review.coreboot.org/20161
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/539194
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:22 -07:00
Mario Scheithauer
69d0976c50 UPSTREAM: siemens/nc_fpga: Expand FPGA functionality
The siemens/mc_apl1 mainboard needs more functionality provided by
Siemens NC FPGA. The additional functionality contains backlight
brightness/PWM control and Dsave time for board reset.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ib9b98e0c5c9a350f84a0f520df3ec37a94760d8a
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: c4ff1de8bf
Original-Change-Id: I6b65b01f0d67afe598b7c005868f71b00dec56fd
Original-Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Original-Reviewed-on: https://review.coreboot.org/20160
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/539193
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:21 -07:00
Mario Scheithauer
d4270a6d6f UPSTREAM: vendorcode/siemens: Add new values to hwilib
The Siemens mc_apl1 mainboard needs new values from hwilib.

- add Dsave time for board reset
- add backlight brightness for panel setting
- add backlight PWM period

BUG=none
BRANCH=none
TEST=none

Change-Id: Idc3c86ccbd1d16f9b3ddd46a556a19dbe83f6dcf
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 59dd466414
Original-Change-Id: I3a48654ef57c7f8accaabe60e8aec144e4fe5466
Original-Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Original-Reviewed-on: https://review.coreboot.org/20159
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/539192
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 11:51:21 -07:00
Patrick Georgi
f0025ad631 UPSTREAM: google/slippy: Don't force native graphics init
The board dutifully registers an int15h handler and provides the
defaults to add a VGABIOS.
That should be good enough to initialize graphics through the VGABIOS
file.

Fixes build on Chrome OS configurations (at least until the Ada toolchain
situation is resolved over there).

BUG=none
BRANCH=none
TEST=none

Change-Id: Ib535d95885606decf029206e615817a774e25029
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 1d3661be0a
Original-Change-Id: I1d956b5a163b7cdf2bd467197fba95f16e5e8fa3
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/20218
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/538580
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:24 -07:00
Patrick Rudolph
7da1b45e9a UPSTREAM: nb/intel/haswell/gma: Use common init_igd_opregion method
Use common init_igd_opregion method and remove duplicated code in
acpi.c.

BUG=none
BRANCH=none
TEST=none

Change-Id: I27da90bcdeabd10454b16e366a47d3fb46bd57ad
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 9aca643ccb
Original-Change-Id: I811e8bd2be68813321dc4581af02e1c21b0da076
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19910
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/538579
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:23 -07:00
Patrick Rudolph
a8c7bd8f6c UPSTREAM: nb/intel/haswell/gma: Write ACPI tables
Add method gma_write_acpi_tables.
No need to update GNVS as it doesn't have ASLB.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ib4b9afce32ada234f26322b8002c465bba74a596
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ee14ccca7a
Original-Change-Id: Ia138cfde2271a298c36b85e999ff69f0f211ba11
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19909
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/538578
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:23 -07:00
Nico Huber
804f574bfc UPSTREAM: drivers/xgi: Fix usage of NGI Kconfig options
This driver reinvented MAINBOARD_DO_NATIVE_VGA_INIT in a very special
way: If it wasn't set, perform native gfx init in textmode, if it was
set, perform native gfx init in linear framebuffer mode. Test for
LINEAR_FRAMEBUFFER instead and make the native gfx init optional.
Also, make Kconfig reflect the actual behaviour.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ife5c5357bc5efef51d0def034b0fb3f3b4caaa45
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: a1f842d158
Original-Change-Id: If20fd1f5b0f4127b426e8ff94acc61fcd4eb49af
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/20131
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/538577
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:22 -07:00
Nico Huber
779950bc87 UPSTREAM: nb/via/cn700: Guard VGA_BIOS_ID appropriately
This was the single spot where VGA_BIOS_ID wasn't guarded by anything.
It resulted in the wrong default id if we didn't chose to add a VGA BIOS
at first but added one later (e.g. a board provided default guarded by
VGA_BIOS wasn't applied then, because the Via/CN700 value was already
set).

BUG=none
BRANCH=none
TEST=none

Change-Id: Idea0ab009cc745ce480031f144c8b66c9278198e
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: e8f6569ab3
Original-Change-Id: Ia16a5e6d194191d8da8c551d6eb3849bc65864a9
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/20101
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/538576
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:22 -07:00
Patrick Rudolph
1ccea54013 UPSTREAM: nb/intel/sandybridge/gma: Use common init_igd_opregion method
Use common init_igd_opregion method.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icea02c61ca2846880b2a7a3f8b1b6c75b12972c4
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 402e9c18dd
Original-Change-Id: Ia10a28d05b611a59f787b53f9736b3b76a19ea4a
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19908
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/538575
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:21 -07:00
Patrick Rudolph
58b74a4d75 UPSTREAM: nb/intel/nehalem/gma: Use common init_igd_opregion method
Use common init_igd_opregion method.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ieb90061fda4eeadb0c1131fc5682856833e8a337
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 5c82026ca6
Original-Change-Id: Ic8a85d1373f04814b4460cce377d6e096bcdc349
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19907
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/538574
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:21 -07:00
Arthur Heymans
f7734a803f UPSTREAM: nb/intel/gm45: Don't allow too low values for gfx_uma_size
Too low gfx_uma_size can result in problems if the framebuffer
does not fit.

This partially reverts: 7afcfe0 "gm45: enable setting all vram sizes
from cmos"

BUG=none
BRANCH=none
TEST=none

Change-Id: I123e68c49e5329b5729cd593a0bb40f1156ec5f7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: d65ff22988
Original-Change-Id: I485d24198cb784db5d2cfce0a8646e861a4a1695
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/20194
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/538573
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:20 -07:00
Matt DeVillier
7d14a192ef UPSTREAM: drivers/fsp1_1: decouple VBT from execution of GOP driver
Commit 2e7f6cc introduced the 'no graphics init' option for
FSP 1.1 SoCs using a GOP driver to init the display, but selecting
that option while including a VBT breaks compilation for Braswell
and Skylake devices because the VBT and GOP driver are intertwined.

This patch decouples the VBT from the GOP driver execution,
allowing the 'no graphics init' option to compile (and work)
properly when CONFIG_ADD_VBT_DATA_FILE=y.

BUG=none
BRANCH=none
TEST=none

Change-Id: I25447b151e00c2505e7c6eff9411adbbadaa9848
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 660de34bbf
Original-Change-Id: Ifbcf32805177c290c4781b32bbcca679bcb0c297
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/20210
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Youness Alaoui <snifikino@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/538572
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
2017-06-18 04:25:20 -07:00
Nico Huber
f0d7e3a5df UPSTREAM: fsp/gop: Add running the GOP to the choice of gfx init
The new config choice is called RUN_FSP_GOP. Some things had to happen
on the road:

  * Drop confusing config GOP_SUPPORT,
  * Add HAVE_FSP_GOP to chipsets that support it,
  * Make running the GOP an option for FSP2.0 by returning 0
    in random VBT getters.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icf0e46a75e0440c458f554de748d2e979dfffa30
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 2e7f6ccafc
Original-Change-Id: I92f88424004a4c0abf1f39cc02e2a146bddbcedf
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19815
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/533093
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:19 -07:00
Nico Huber
4506dc9c38 UPSTREAM: device/Kconfig: Put gfx init methods into a choice
Provide all gfx init methods as a Kconfig `choice`. This elimates the
option to select native gfx init along with running a Video BIOS. It's
been only theoretically useful in one corner case: Hybrid graphics
where only one controller is supported by native gfx init. Though I
suppose in that case it's fair to assume that one would use SeaBIOS to
run the VBIOS.

For the case that we want the payload to initialize graphics or no
pre-boot graphics at all, the new symbol NO_GFX_INIT was added to the
choice. If multiple options are available, the default is chosen as
follows:

  * NO_GFX_INIT, if we add a Video BIOS and the payload is SeaBIOS,
  * VGA_ROM_RUN, if we add a Video BIOS and the payload is not SeaBIOS,
  * NATIVE_VGA_INIT, if we don't add a Video BIOS.

As a side effect, libgfxinit is now an independent choice.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7d9ee12b47caa8909bd204929adecfc7f78f027c
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: d4ebeaf475
Original-Change-Id: I06bc65ecf3724f299f59888a97219fdbd3d2d08b
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19814
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/533052
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:19 -07:00
Nico Huber
a5afa4b9f5 UPSTREAM: device/Kconfig: Introduce MAINBOARD_FORCE_NATIVE_VGA_INIT
MAINBOARD_FORCE_NATIVE_VGA_INIT is to be selected instead of the user
option MAINBOARD_DO_NATIVE_VGA_INIT. The distinction is necessary to
use the latter in a choice.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id68ef8d1fe1e00e03f8867d404c7b6b6e2ddd505
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 26ce9af9a0
Original-Change-Id: I689aa5cadea9e1091180fd38b1dc093c6938d69c
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19813
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/533051
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:18 -07:00
Nico Huber
c7d759c42f UPSTREAM: device/Kconfig: Move "Display" menu below gfx options
Make the "Display" menu a submenu of "Devices", place it below the
graphics options and reorder options by their dependencies.

BUG=none
BRANCH=none
TEST=none

Change-Id: I20f098649aebf71de278ff233df59081896a21a4
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: a2cf686396
Original-Change-Id: I9de3d8f76ae10b0a77678ce2d71f840fac32379c
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19806
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/533050
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:18 -07:00
Nico Huber
5aec84cd4a UPSTREAM: lib/coreboot_tables: Remove weak fill_lb_framebuffer()
Remove the weak function stub fill_lb_framebuffer() and guard with the
new `CONFIG_LINEAR_FRAMEBUFFER` instead.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ibd4095700b0e89eb9c933df30af00e7acb43bb7f
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ce768f3baf
Original-Change-Id: Ia9e477c2d501b249a632968b5636ac803323895a
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19807
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/533049
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:17 -07:00
Nico Huber
e12e3b7a17 UPSTREAM: Kconfig: Add choice of framebuffer mode
Rename `FRAMEBUFFER_KEEP_VESA_MODE` to `LINEAR_FRAMEBUFFER` and put
it together with new `VGA_TEXT_FRAMEBUFFER` into a choice. There are
two versions of `LINEAR_FRAMEBUFFER` that differ only in the prompt
and help text (one for `HAVE_VBE_LINEAR_FRAMEBUFFER` and one for
`HAVE_LINEAR_FRAMEBUFFER`). Due to `kconfig_lint` we have to model
that with additional symbols.

BUG=none
BRANCH=none
TEST=none

Change-Id: I095dd4f36d853de51387895bace494840aaca3c1
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 6d8266b91d
Original-Change-Id: I9144351491a14d9bb5e650c14933b646bc83fab0
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19804
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/533048
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:17 -07:00
Nico Huber
cf893c4a8c UPSTREAM: Kconfig: Introduce HAVE_(VBE_)LINEAR_FRAMEBUFFER
Like HAVE_VGA_TEXT_FRAMEBUFFER, these are selected by graphics drivers
that support a linear framebuffer. Some related settings moved to the
drivers (i.e. for rockchip/rk3288 and nvidia/tegra124) since they are
hardcoded.

BUG=none
BRANCH=none
TEST=none

Change-Id: If1746137edf2c976786e5b1a73c079d7e6c0f6d6
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 7971582ec4
Original-Change-Id: Iff6dac5a5f61af49456bc6312e7a376def02ab00
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19800
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/533047
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:16 -07:00
Nico Huber
f779919a58 UPSTREAM: Kconfig: Rework MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG
* Rename it to HAVE_VGA_TEXT_FRAMEBUFFER.
* Let drivers select it if they are in charge.
* Don't select it on the mainboard level if a driver handles it.

BUG=none
BRANCH=none
TEST=none

Change-Id: I388e134017ee441cbd67b9a66fdbc07d992c9650
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ce642f08b9
Original-Change-Id: I2d9d09be9aa6d019e77460e69a245ad2d8cda4ea
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19791
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/533046
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:16 -07:00
Nico Huber
6236b19edd UPSTREAM: lib/edid: Split out fill_lb_framebuffer()
Place it into new edid_fill_fb.c, and invert the logic of the Kconfig
guard (NATIVE_VGA_INIT_USE_EDID is now !NO_EDID_FILL_FB). It has to be
selected by all drivers that use MAINBOARD_DO_NATIVE_VGA_INIT but pro-
vide their own fill_lb_framebuffer() implementation.

BUG=none
BRANCH=none
TEST=none

Change-Id: I5c147f429580ad3c43ff255c1a059196fc8cf1f5
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 3db7653aab
Original-Change-Id: I90634b835bd8e2d150b1c714328a5b2774d891bd
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19764
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/533045
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:15 -07:00
Nico Huber
302e5976b2 UPSTREAM: drivers/intel/gma: Drop unused INTEL_DP
BUG=none
BRANCH=none
TEST=none

Change-Id: If93eebd6929e3119a9cb6918b6c95008b0d93fbf
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 746aa054e2
Original-Change-Id: I786848cd48c6fcfecf9b72c60623cadcfcbb7db7
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19803
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/533044
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:15 -07:00
Nico Huber
57269e355f UPSTREAM: nb/intel/haswell: Fix up C NGI remnants
BUG=none
BRANCH=none
TEST=none

Change-Id: Ib7c915f85fb38b04f99b1a97704d3779902a351c
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 0df9a01009
Original-Change-Id: I3cd5e99b9954a68837de85b49b4389b668e00cf4
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19802
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/533043
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:14 -07:00
Aaron Durbin
924948ddef UPSTREAM: vbe: remove the necessity for a global vbe_mode_info_valid()
There's no users of vbe_mode_info_valid() aside from the local
compilation units. Remove the declaration and make the function
static to the current global implementers.

BUG=none
BRANCH=none
TEST=none

Change-Id: I12a5c25769e399734edbb1f386f7febe6f6bd8a9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 57e15e609e
Original-Change-Id: I4872ac6ad15ba6a86bba69d51a8348b9921c152d
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19730
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/533042
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:14 -07:00
Aaron Durbin
46630035c6 UPSTREAM: coreboot_tables: specify clear interface for lb_framebuffer()
For some reason the "interface" for adding framebuffer information
is sitting in src/include/vbe.h while also guarding the call to
fill_lb_framebuffer() with vbe_mode_info_valid() along with some
macro if CONFIG_* for good measure.

Move the fill_lb_framebuffer() declaration to coreboot_tables.h and
provide a comment about how it should be used. Also, now that
there's no need for the notion of a global vbe_mode_info_valid()
remove it from the conditional call path of fill_lb_framebuffer().

BUG=none
BRANCH=none
TEST=none

Change-Id: I8ebd24b872d568c4991fd56d344fbd4629071239
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: bdb5c8feae
Original-Change-Id: Ib3ade6314624091ae70424664527a02b279d0c9b
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19729
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/533041
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:13 -07:00
Matt DeVillier
18da90a814 UPSTREAM: northbridge/haswell: clean up native graphics init code
Clean up NGI code now that libgfxinit has replaced old C code:

- replace #if preprocessor guards with if (IS_ENABLED(...))
- don't guard variable declarations
- remove code that would only be executed for old NGI / isn't
  used by libgfxinit

Test: boot google/wolf with VBIOS, NGI, and UEFI/GOP video init,
observe payload and pre-OS graphics display functional.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icdc95edeec9812b7d76ab32729052c46a7658509
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 6955b9c5b2
Original-Change-Id: I96e74f49ea70e09cbac6f8af561de3e18fa7d260
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19327
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/533040
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:13 -07:00
Nico Huber
8ea56df8c6 UPSTREAM: 3rdparty/libgfxinit: Update submodule pointer
Some renamings force us to update our code:

  * Scan_Ports() moved into a new package Display_Probing.

  * Ports Digital[123] are called HDMI[123] now (finally!).

  * `Configs_Type` became `Pipe_Configs`, `Config_Index` `Pipe_Index`.

Other noteworthy changes in libgfxinit:

  * libgfxinit now knows about ports that share pins (e.g. HDMI1 and
    DP1) and refuses to enable any of them if both are connected
    (which is physically possible on certain ThinkPad docks).

  * Major refactoring of the high-level GMA code.

BUG=none
BRANCH=none
TEST=none

Change-Id: I54b958e7fc141fdb112b0594b159e08d2981aef0
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 989aae9f61
Original-Change-Id: I0ac376c6a3da997fa4a23054198819ca664b8bf0
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/18770
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/533039
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:12 -07:00
Matt DeVillier
eb9ba642c6 UPSTREAM: google/slippy: clean up NGI and move to libgfxinit
- remove old, buggy NGI code from falco/peppy variants
- remove superfluous INTEL_DP/INTEL_DDI configs, since already
selected by northbridge/haswell
- always use libgfxinit when use native init config selected
- enable NGI/libgfxinit for all slippy variants

The reset of the old Haswell NGI code will be cleaned up in
a subsequent patchset.

Test: select MAINBOARD_DO_NATIVE_VGA_INIT, observe panel init
using SeaBIOS and Tianocore payloads on peppy, wolf variants

[pg: add CQ-DEPEND to cover all pending graphics commits.
There are some fun little bugs and fixes along the chain.]

BUG=none
BRANCH=none
TEST=none
CQ-DEPEND=CL:538580

Change-Id: Ie127751e69309b2f3082e96ec1689c2600f4e526
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 472d5111ad
Original-Change-Id: Id5727cad7f714ffa57e77e2a25505e3c28f55237
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18824
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/533038
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-18 04:25:12 -07:00
Caesar Wang
e878f9f4a2 UPSTREAM: google/gru: drive the stronger pull-up for touchpad
As the hardware designed on gru, the AP_I2C_TP_PU_EN (gpio3_b4) controlled
the SCL/SDA status to avoid leakage. And the gpio3_b4 of rk3399 pull
resistor is 26k~71k and 3.3v for supply power, and gpio3_b4 pin connected
2.2k resistor to i2c of TP device.

The default of this gpio status is pulled up during the start to bootup,
it's very weak drive for the TP device that maybe cause to trigger the
recovery process of elan's firmware.

Also, the Elan updated its firmware(102.0.5.0) to delay checking the
i2c of touchpad is greater than 1 second.

So we have to drive the stronger pull-up within 1 second of powering up
the touchpad to prevent its firmware from falling into recovery.

BUG=b:36705749
BRANCH=gru
TEST=none

Old-change-Id: I9a67d1c041afafde24ed9f00716ba41a9b41a8da
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-on: https://review.coreboot.org/19863
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ibb0ba3eff09de727e60a2bff5603deade4dc3d54
Reviewed-on: https://chromium-review.googlesource.com/537772
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
2017-06-15 20:13:55 -07:00
Julius Werner
a1d1941d62 UPSTREAM: cbmem: Escape literal asterisks in log banner regex
I had a stupid. :( Asterisks have a special meaning in regexes, but I
just wanted to match three literal ones. This kills the regex parser.

BUG=chromium:729621

Change-Id: Ia6149e72715d651c914583ed3235680ce5b7a2e0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/20171
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/537138
2017-06-15 17:27:54 -07:00
Nicola Corna
3a1de662ac UPSTREAM: sb/intel/common/firmware: Add Intel ME/TXE firmware check
Ensure that the provided ME/TXE firmware is valid, using the
check capabilities of me_cleaner.

me_cleaner checks that the fundamental partition is available and
it has a correct signature. The checks performed by me_cleaner
aren't exhaustive, but they should find at least whether the user
has provided an empty or corrupted firmware.

me_cleaner has been tested on all the ME (6-11.6) and TXE (1-3)
firmwares available here [1], and it hasn't reported any false
positive.

[1] http://www.win-raid.com/t832f39-Intel-Engine-Firmware-Repositories.html

BUG=none
BRANCH=none
TEST=none
CQ-DEPEND=CL:535697

Change-Id: Idcda139803b2d64813ece6cfbadac5ef0997483e
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 16719ad143
Original-Change-Id: Ie6ea3b4e637dca4097b9377bd0507e84c4e8f687
Original-Signed-off-by: Nicola Corna <nicola@corna.info>
Original-Reviewed-on: https://review.coreboot.org/18768
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/533094
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-14 12:23:03 -07:00
Nico Huber
9c5abd4e0d UPSTREAM: inteltool/Makefile: Separate CPPFLAGS from CFLAGS
Separate the required CPPFLAGS from environment overridable CFLAGS.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id32f44086ede9f8058cfa57a09a9bbd98da6c4e4
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: cce508fed2
Original-Change-Id: I0c1c0a1cebc7f7971634bf57d4a2370939c43fda
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/20175
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-by: Hannah Williams <hannah.williams@intel.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/535635
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-14 08:14:33 -07:00