Commit Graph

31881 Commits

Author SHA1 Message Date
Johanna Schander 0b82b3d6fd 3rdparts/fsp: Update fsp submodule
The name for the CoffeeLake FSP.fd was changed to Fsp.fd.
Therefore the CoffeLake / WhiskeyLake default path was
changed.

Change-Id: I0f51e378fcaacb25392d8940a342fc968c730157
Signed-off-by: Johanna Schander <coreboot@mimoja.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37564
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-09 09:44:07 +00:00
Angel Pons 96e2a5da34 soc/intel/bsw/gpio: Factor out GPI macros
This patch simplifies some GPIO macros by removing redundant code.
Also, for the sake of completeness, add two missing macros.

Change-Id: I838efe8b26f60d3e059f4ce18c116aefbc0b0400
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-12-09 09:43:48 +00:00
Peichao Wang 3b34db6c0f mb/google/octopus: Create Foob variant
This commit creates a foob variant for Octopus. The initial settings
override the baseboard was copied from variant phaser.

BUG=b:144890301
BRANCH=octopus
TEST=emerge-octopus coreboot

Signed-off-by: Peichao Wang <peichao.wang@bitland.corp-partner.google.com>
Change-Id: Ibcdda4dd0846612f5e98ab454db7144c1caf0507
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37456
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Marco Chen <marcochen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-09 09:40:47 +00:00
Arthur Heymans edcce07531 Documentation: Move ACPI documentation in a subindex
Change-Id: I17c5263674b805a73d98aaa3e7090083905e37ef
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37242
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-12-09 09:40:28 +00:00
Arthur Heymans 1bb330348d Documentation: Remove redundant 'documentation'
We are already in documentation so it should be obvious that other
links point to other documentation.

Change-Id: I7a021a09bdb88418ec85dbf433465f26445057d0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37241
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-12-09 09:40:02 +00:00
Tim Wawrzynczak 14dd073e80 EC sync: Properly handle VBERROR return codes from vb2api_ec_sync
Some return codes were missed when implementing this initially; the vboot
logic can require the system to command the EC to reboot to its RO, switch
RW slots or it can require a poweroff of the SoC.  This patch appropriately
handles these return codes.

BUG=b:145768046
BRANCH=firmware-hatch-12672.B
TEST=ODM verified this patch fixes the issues seen.

Change-Id: I2748cf626d49c255cb0274cb336b072dcdf8cded
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37562
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-12-09 09:39:29 +00:00
Wim Vervoorn 57aa8e37dc mb/intel/kblrvp: Remove hex values from VR settings
Change the hex values in the VR configuration tables of the Intel Kaby
Lake RVP boards to the same style that is used in the other mainboards.

Also, correct some numbers in the comment tables that did not match the register values.
The values in the tables haven't changed.

BUG=N/A
TEST=build

Change-Id: I77af544d7d88143e19abedb12a13627779c705c6
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37550
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-09 09:38:41 +00:00
Matt DeVillier 0bb644754d mb/google/poppy: set detachable system type for nocturne/soraka
Set the SMBIOS system type to detachable for nocturne and
soraka variants, to allow the OS to correctly process events.

Change-Id: Ie0ee5ea6666542c0bca2c264b2ed2e6135b78658
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37540
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-12-09 09:38:13 +00:00
Kyösti Mälkki 657d68bddc AGESA,binaryPI: Move PORT80 selection to C bootblock
Because the function is implemented in C, post_code() calls
from cache_as_ram.S and other early assembly entry files may
not currently work for cold boots. Assembly implementation
needs to follow one day.

This effectively removes PORT80 routing from boards with
ROMCC_BOOTBLOCK.

Change-Id: I71aa94b33bd6f65e243724810472a440e98e0750
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37451
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2019-12-09 05:23:55 +00:00
Elyes HAOUAS dafc78bb8d mb/asus/am1i-a: Remove defined and not used ITE_CONFIG_REG_CC
Change-Id: I934830c09f7996e8f5aae5d5abe9fb6014fb478d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37569
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Mike Banon <mikebdp2@gmail.com>
2019-12-08 17:52:30 +00:00
Elyes HAOUAS 9f56eeda41 src/superio: Remove unused intel's superio chips
Change-Id: Ie693ff700a804778682daf0cb3990a56ab747a93
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-06 15:24:27 +00:00
Peter Lemenkov a0c97590b9 mb/lenovo/w520/devicetree: Use subsystemid inheritance
Change-Id: If7816992e717b4da585b16e5bbe67610c9af867d
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37294
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-12-06 15:21:47 +00:00
Peter Lemenkov 2ee6fbf0d7 mb/lenovo/t520/devicetree: Use subsystemid inheritance
Change-Id: Iffeb634c73f58aa1cddac5210d75fda75a3d5e92
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37293
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-06 15:21:38 +00:00
Marshall Dawson 67910db907 arch|cpu/x86: Add Kconfig option for x86 reset vector
Prepare for an implementation supporting the reset vector in RAM and
not the traditional 0xfffffff0.  Add a Kconfig symbol that can be used
in place of hardcoded values.

Change-Id: I6a814f7179ee4251aeeccb2555221616e944e03d
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-12-06 15:16:47 +00:00
Wim Vervoorn 4ba70a7575 src: Add Facebook Monolith to maintainers
Add Facebook Monolith maintainers.

BUG=N/A
TEST=build

Change-Id: I4e7f44710deada0331ac9b4e77d6144848faf6cb
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37517
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2019-12-06 15:15:27 +00:00
Wim Vervoorn 7c04acff8a mb/facebook/monolith: Add Facebook Monolith
The board is booting Linux and has been briefly tested.

SeaBIOS, TianoCore payload and Linux as payload all seem to work fine.

BUG=N/A
TEST=tested on Facebook Monolith

Change-Id: I65a2e03334af65cfb3f825d43fa0daa6e6c75913
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37516
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2019-12-06 15:15:08 +00:00
Wim Vervoorn cbc878d2a2 drivers/intel/fsp2_0: Add logo support
Add support for the FSP feature to display the logo.

BUG=N/A
TEST=tested on facebook monolith

Change-Id: Iaaffd2be567861371bbe908c1ef9d7dde483a945
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-12-06 15:14:27 +00:00
Wim Vervoorn 2ab4f4b2c5 soc/intel/skylake: Add option to control microcode update inclusion
On embedded boards the cpu mounted on the board is known. So it is not
required to include microcode for all possible Sky Lake and Kaby Lake
cpus. This patch provides the possibility to only support the versions
required.

By default all microcode updates will be included and the versions not
required can be removed using Kconfig.

BUG=N/A
TEST=build

Change-Id: Iaa36c2846b2279a2eb2b61e6c97d6c89d0736f55
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2019-12-06 15:14:15 +00:00
Kyösti Mälkki 05fe16c4f3 console,monotonic_timer: Avoid calls from APs
The code in cpu/x86/lapic/apic_timer.c for timer_monotonic_get()
is not SMP safe as LAPIC timers do not run as synchronised as TSCs.

The times reported for console for boot_states does not accumulate
from APs now. Also remove console time tracking from ENV_SMM.

Change-Id: I1ea2c1e7172f8ab3692b42dee3f669c5942d864a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37398
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-06 15:11:02 +00:00
Philipp Hug 934ae21b52 mb/emulation/qemu-riscv: Implement ipi using clint to enable smp in qemu/spike.
TEST=Set MAX_CPUS=2 and run qemu with -smp 2

Signed-off-by: Philipp Hug <philipp@hug.cx>
Change-Id: I94fb25fad103e3cb5db676eb4caead11d54ae0ae
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Xiang Wang <merle@hardenedlinux.org>
2019-12-06 15:09:48 +00:00
Elyes HAOUAS 8cb5ea7879 nb/i945: Fix typo
Change-Id: I082ac2c1c13cbe6835a02d703f8651e837a43f37
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37518
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-12-06 15:09:17 +00:00
Julius Werner 879ea7fce8 endian: Replace explicit byte swapping with compiler builtin
gcc seems to have some stupid problem with deciding when to inline byte
swapping functions (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92716).
Using the compiler builtin instead seems to solve the problem.

(This doesn't yet solve the issue for the read_be32()-family of
functions, which we should maybe just get rid of at some point?)

Change-Id: Ia2a6d8ea98987266ccc32ffaa0a7f78965fca1cd
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37343
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-12-06 15:08:50 +00:00
Elyes HAOUAS 6fdf122fc3 superio/smsc/lpc47n207: Remove unused <stdint.h>
Change-Id: I9e6b2548ff7eb7224b15ffa2541922790816c947
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-06 15:01:08 +00:00
Elyes HAOUAS 462738299b superio/nsc/pc87417: Remove unused <stdint.h>
Change-Id: Icacf2806702a868a807080e1e2d14b1ee4ed4f90
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37507
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-06 14:59:42 +00:00
Elyes HAOUAS 5cf4d0c148 src/superio/via: Remove unused superio chips
Change-Id: I248608361fcdc51ff435222d37c5bbc736b1947e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37511
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-12-06 14:29:10 +00:00
Elyes HAOUAS d3f2a1e4a9 superio/fintek: Fix typo
Change-Id: If5c0921e20b26ce558f542f405cf62ae8d4a8101
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37503
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-12-06 14:28:43 +00:00
Julius Werner 683657e93a vboot: Clear secdata change flags after factory init
factory_initialize_tpm() calls secdata_xxx_create() (for both firmware
and kernel space) and then immediately writes those spaces out to the
TPM. The create() functions make vboot think it just changed the secdata
(because it reinitialized the byte arrays in the context), so we also
need to clear the VB2_CONTEXT_SECDATA_xxx_CHANGED flags again, otherwise
vboot thinks it still needs to flush the spaces out to the TPM even
though we already did that.

Also clean up some minor related stuff (VB2_CONTEXT_SECDATA_CHANGED
notation is deprecated, and secdata space intialization should use the
same write-and-readback function we use for updates).

Change-Id: I231fadcf7b35a1aec3b39254e7e41c3d456d4911
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37471
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-12-06 05:23:33 +00:00
Joel Kitching 1debc0c101 vboot: update VbExNvStorageWrite function
Going forwards, vb2ex_commit_data will be used to flush both
nvdata and secdata.

The patch that is circularly dependent on this lies between a patch that
makes vboot no longer build and the patch that fixes that, so we have to
pull the whole thing in at once to sort out the mess.

Updating from commit id 1c4dbaa0:
2019-11-18 Julius Werner   Makefile: Fix typo for MOCK_TPM

to commit id 695c56dc:
2019-12-04 Julius Werner   Makefile: Make loop unrolling fully
                           controllable by the caller

BUG=b:124141368, chromium:1006689
TEST=make clean && make test-abuild
BRANCH=none

Change-Id: Ia2612da0df101cd3c46151dbce728633a39fada1
Signed-off-by: Joel Kitching <kitching@google.com>
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37315
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-12-06 05:23:26 +00:00
Craig Hesling fcd8c9e99e hatch: Fix FPMCU pwr/rst gpio handling
1. No gpio control in bootblock
2. Disable power and assert reset in ramstage gpio
3. Power on and then deassert reset at the end of ramstage gpio
4. Disable power and assert reset when entering S5

On "reboot", the amount of time the power is disabled for is
equivalent to the amount of time between triggering #4 and wrapping
around to #3, which is about 400ms on Kohaku.

Since #2 forces power off for FPMCU, S3 resume will still
not work properly.

Additionally, we must ensure that GPP_A12 is reconfigured as an output
before going to any sleep state, since user space could have configured
it to use its native3 function.
See https://review.coreboot.org/c/coreboot/+/32111 for more detail.

The control signals have been validated on a Kohaku in
the following scenarios:
1. Cold startup
2. Issuing a "reboot" command
3. Issuing a "halt -p" and powering back on within 10 seconds
4. Issuing a "halt -p" and powering back on after 10 seconds
5. Entering and leaving S3 (does not work properly)
6. Entering and leaving S0iX

BRANCH=hatch
BUG=b/142751685
TEST=Verify all signals as mentioned above
TEST=reboot
     flash_fp_mcu /opt/google/biod/fw/dartmonkey_v2.0.2417-af88cc91a.bin
TEST=halt -p
     # power back on within 10 seconds
     flash_fp_mcu /opt/google/biod/fw/dartmonkey_v2.0.2417-af88cc91a.bin
TEST=halt -p
     # power back on after 10 seconds
     flash_fp_mcu /opt/google/biod/fw/dartmonkey_v2.0.2417-af88cc91a.bin

Change-Id: I2e3ff42715611d519677a4256bdd172ec98687f9
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37459
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-12-05 21:27:42 +00:00
Gaggery Tsai 344b331783 mb/intel/coffeelake_rvp: Switch to overridetree setup
This patch moves the common devicetree settings into baseboard and
creates overridetree.cb for each variant. For PCIe root port settings,
SATA, eMMC, I2Cs and GBe, they are in overridetree.

TEST=build an image for each variant

Change-Id: I067bdb3fcf1218b93e52801f6db093e24d7d2b62
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36794
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-05 21:25:33 +00:00
Patrick Georgi b9d5b26458 soc/qualcomm/sc7180: Adapt to recent API changes
Definitions were moved so that now device/mmio.h needs to be included
instead of arch/mmio.h. Also, don't use le32 conversion.

This follows the activities of commit 55009af42 (Change all
clrsetbits_leXX() to clrsetbitsXX()) and commit 1c37157218 (mmio: Add
clrsetbitsXX() API in place of updateX()).

Change-Id: Ie3af0d4f0b3331fe5572fc56915952547b512db7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37534
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-05 19:37:31 +00:00
Arthur Heymans 68b6eb78d2 soc/intel/braswell: Use common sb code for SPI lockdown configuration
This removes the weakly linked function to configure the SPI lockdown.

Change-Id: I1e7be41a9470b37ad954d3120a67fc4d93633113
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36007
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-05 17:59:29 +00:00
Aamir Bohra 53486a0be0 mb/intel/icelake_rvp: Remove nested variant header references
Change-Id: I11b2d75dc0d4ff180b03324e5ce3d5590c8169a5
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2019-12-05 17:59:05 +00:00
Julius Werner 51359d6c84 arm64: Print a char to UART early in exception handler
Over time our printk() seems to acquire more and more features... which
is nice, but it also makes it a little less robust when something goes
wrong. If the wrong global is trampled by some buffer overflow, it
suddenly doesn't print anymore. It would be nice to have at least some
way to tell that we triggered a real exception in that case.

With this patch, arm64 exceptions will print a '!' straight to the UART
before trying any of the more fancy printk() stuff. It's not much but it
should tell the difference between an exception and a hang and hopefully
help someone dig in the right direction sooner. This violates loglevels
(which is part of the point), but presumably when you have a fatal
exception you shouldn't care about that anymore.

Change-Id: I3b08ab86beaee55263786011caa5588d93bbc720
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37465
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-05 17:58:10 +00:00
Julius Werner 2e0bca011a arm64: Bump exception stack size to 2KB
To avoid trampling over interesting exception artifacts on the real
stack, our arm64 systems switch to a separate exception stack when
entering an exception handler. We don't want that to use up too much
SRAM so we just set it to 512 bytes. I mean it just prints a bunch of
registers, how much stack could it need, right?

Quite a bit it turns out. The whole vtxprintf() call stack goes pretty
deep, and aarch64 generally seems to be very generous with stack space.
Just the varargs handling seems to require 128 bytes for some reason,
and the other stuff adds up too. In the end the current implementation
takes 1008 bytes, so bump the exception stack size to 2K to make sure it
fits.

Change-Id: I910be4c5f6b29fae35eb53929c733a1bd4585377
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37464
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2019-12-05 17:58:05 +00:00
Julius Werner bb345abbfc arm64: Correctly unmask asynchronous SError interrupts
Arm CPUs have always had an odd feature that allows you to mask not only
true interrupts, but also "external aborts" (memory bus errors from
outside the CPU). CPUs usually have all of these masked after reset,
which we quickly learned was a bad idea back when bringing up the first
arm32 systems in coreboot. Masking external aborts means that if any of
your firmware code does an illegal memory access, you will only see it
once the kernel comes up and unmasks the abort (not when it happens).

Therefore, we always unmask everything in early bootblock assembly code.
When arm64 came around, it had very similar masking bits and we did the
same there, thinking the issue resolved. Unfortunately Arm, in their
ceaseless struggle for more complexity, decided that having a single bit
to control this masking behavior is no longer enough: on AArch64, in
addition to the PSTATE.DAIF bits that are analogous to arm32's CPSR,
there are additional bits in SCR_EL3 that can override the PSTATE
setting for some but not all cases (makes perfect sense, I know...).
When aborts are unmasked in PSTATE, but SCR.EA is not set, then
synchronous external aborts will cause an exception while asynchronous
external aborts will not. It turns out we never intialize SCR in
coreboot and on RK3399 it comes up with all zeroes (even the reserved-1
bits, which is super weird). If you get an asynchronous external abort
in coreboot it will silently hide in the CPU until BL31 enables SCR.EA
before it has its own console handlers registered and silently hangs.

This patch resolves the issue by also initializing SCR to a known good
state early in the bootblock. It also cleans up some bit defintions and
slightly reworks the DAIF unmasking... it doesn't actually make that
much sense to unmask anything before our console and exception handlers
are up. The new code will mask everything until the exception handler is
installed and then unmask it, so that if there was a super early
external abort we could still see it. (Of course there are still dozens
of other processor exceptions that could happen which we have no way to
mask.)

Change-Id: I5266481a7aaf0b72aca8988accb671d92739af6f
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2019-12-05 17:57:58 +00:00
T Michael Turney 31a5ff5e36 trogdor: libpayload USB support
Change-Id: I26c28f9af8d819f4644e383e8d0293a3d5de9eef
Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36233
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-12-05 17:57:31 +00:00
T Michael Turney 655220ae69 trogdor: Add mainboard USB support
Change-Id: I126d1d6b582ea95c97ac55784d44d3081aabdae7
Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-12-05 17:57:24 +00:00
T Michael Turney 050be72e77 sc7180: Add USB support
This includes USB QUSB2,QMP Phy and Controller support
And libpayload support for USB

Change-Id: I0651fc28dc227efbeb23eeefe9b96a3b940ae995
Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35503
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-12-05 17:57:16 +00:00
Ravi Kumar Bokka 6bbf8f238f sc7180: Add AOP firmware support
Developer/Reviewer, be aware of this patch from Napali:
https://review.coreboot.org/c/coreboot/+/25210/85

Change-Id: I1cd552fbf03b5135e5911f1143f8778cad81e360
Signed-off-by: Ashwin Kumar <ashk@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-12-05 17:57:07 +00:00
Akash Asthana 634c783d1f sc7180: Add SPI-NOR support
This implements the SPI-NOR driver for the Qualcomm QSPI core.

Developer/Reviewer, be aware of this patch from Napali:
https://review.coreboot.org/c/coreboot/+/27483/58

Change-Id: I2eb8cf90aa4559541ba293b3fd2870896bed20b7
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35501
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-05 17:56:44 +00:00
Elyes HAOUAS 7e51f15129 superio/fintek/f81866d: capitalize 'TODO'
Change-Id: I2879a8739012863837e23e60fed5eb6ee209dea0
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37504
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-05 15:29:43 +00:00
Elyes HAOUAS e46a41542b superio/serverengines/pilot: Fix typo
Change-Id: Ic7cd93150252b2e5235c82c8c63540059b68d22b
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-05 15:29:09 +00:00
Elyes HAOUAS 36c6f95602 superio/smsc/lpc47n2{17,27}: Fix typo
Change-Id: I29a42908af5699200216b7a0082e1417c90c95a6
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37510
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-05 15:28:33 +00:00
Elyes HAOUAS b21999cbed superio/ite/it8528e: Fix typo
Change-Id: I40035bf622fea2ff7aed74dce125cbf6265afa6e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37505
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-05 15:27:11 +00:00
Elyes HAOUAS 9a669b1c68 superio/{aspeed,nuvoton}: Fix typo
Change-Id: I7772fadc756ceeef5988e4b1ecf8f93ad3605a84
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-12-05 15:26:27 +00:00
Maxim Polyakov 2f50d7cd3b mb/asrock/h110m: disable CLKREQ to use onboard LAN
The PCH uses the SRCCLKREQ# pin to detect PCIe device in the slot in
order to send clock signal to it. However, this logic is not required
for the Realtek LAN device, since this chip is soldered to the board
and always uses clocking. The chipset can't receive the clock request
signal (most likely this pin isn't connected) and doesn't enable the
CLK. For this reason, the device is broken during the initialization
phase. The patch disables clock request logic for the PCH PCIe port 6
to initialize the onboard LAN device correctly.

Change-Id: I5cbce6177c89052eb50959f43903b6f8a607e77f
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36377
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-05 15:25:03 +00:00
Kane Chen b1ea707bda Revert "mb/google/hatch: Enable PchPmSlpS0Vm075VSupport for hatch"
This reverts commit 0bc35af933.

Reason for revert: This change breaks runtime s0ix.

BRANCH=hatch
BUG=b:141831197
TEST=Check slp_s0 residency increased when system is idle.

Change-Id: Ida80f55b56de7129ed629eb29bd14f2ef300126f
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37088
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-12-05 05:50:26 +00:00
Taniya Das 0e03aa2c6f sc7180: Add clock driver
Add support for clock driver for SC7180

Developer/Reviewer, be aware of this patch from Napali:
https://review.coreboot.org/c/coreboot/+/31083/6

Change-Id: I3f39252c887c36e8af43bc49289795000e4638d8
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35496
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-12-05 01:41:41 +00:00
Michał Żygowski 08cd65198e sb/amd/cimx/sb800: add C bootblock southbridge initialization
TEST=boot PC Engines apu1 with C bootblock patch and launch
Debian with Linux kernel 4.14.50

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ie81198f5034a84d319ee7143aa032433f82be254
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37329
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-12-04 16:41:49 +00:00