Commit Graph

19877 Commits

Author SHA1 Message Date
Martin Roth 74e0b2795f chromeec: Update Chrome EC submodule
Update to Chromium TOT with bcffec7f (reef: Cleanup battery code)

292 commits between Oct 28, 2016 and Jan 2, 2017

Change-Id: I6bc356b9e458bebaa5839375ff40dd7e0d6ccff1
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18023
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-01-10 17:23:37 +01:00
Timothy Pearson a4dcdca7ba amd/mct/ddr2|ddr3: Refactor persistent members of DCTStatStruc
Several members of DCTStatStruc are designed to persist across resets of
all other members.  Move the persistent members into a substructure in
order to simplify the reset logic and avoid compiler warnings / UB.

Change-Id: I1139b7b3b167d33d99619338d42fcd26e2581a5d
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Reviewed-on: https://review.coreboot.org/18058
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-10 17:22:33 +01:00
Ricardo Ribalda Delgado 8c42424ec1 amd/hudson/agesa: Fix position of hudson_fwm
AMDFWTOOL calculates the location of the amdfw based on the
CONFIG_ROM_SIZE. If HUDSON_FWM_POSITION does not match that location the
resulting rom does not boot.

This patch forces the position of HUDSON_FWM_POSITION to be the
position calculated by amdfwrom.

Tested on a Bettong derivative with a 16MiB flash.

Change-Id: I3ce69f77174327c18ff97e551c0665c9f633991e
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-on: https://review.coreboot.org/17934
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-01-10 17:21:00 +01:00
Ricardo Ribalda Delgado baae959a63 amd/hudson/pi: Fix position of hudson_fwm
AMDFWTOOL calculates the location of the amdfw based on the
CONFIG_ROM_SIZE. If HUDSON_FWM_POSITION does not match that location the
resulting rom does not boot.

This patch forces the position of HUDSON_FWM_POSITION to be the
position calculated by amdfwrom.

Tested on a Bettong derivative with a 16MiB flash.

Change-Id: Id2ee96ee076293d48ade84fd6e976ca994dcf491
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-on: https://review.coreboot.org/17925
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-01-10 17:20:40 +01:00
Patrick Georgi df1ff231e4 buildgcc: try curl if wget is not present
There are systems that come with curl but not wget (eg macOS) and they
now have to install one less additional dependency.

Also fix some cosmetic issues in console output and require valid
certificates on https downloads.

Change-Id: Idc2ce892fbb6629aebfe1ae2a95dcef4d5d93aca
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18048
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-10 14:43:49 +01:00
Kyösti Mälkki 3d0288d676 intel/i82801dx: Support 2MiB FWH part
Default setting of southbridge assigned 1MiB of memory
for FWH ID 0, while 2MiB is commercially available.
Only remap IDs when large ROM is requested in case some
board uses multiple FWH parts.

Change-Id: I500425f42f755f911d84c6f94a9f3ab5a1ca0b51
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17918
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-01-10 13:25:57 +01:00
Martin Roth f2f4b78dd2 .gitignore: Add utility binaries
Change-Id: Iad84eda9949a60bcbde092ad8f4d7cd0bcbdb942
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/17991
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-09 23:32:20 +01:00
Martin Roth 047c2f44b0 util/abuild: Print list of failed boards at the end of the abuild
When running abuild outside of jenkins, because all of the builds are
printed intermixed, it's easy to miss when a board has failed the build
by looking at the output.  This saves a list of failed builds and prints
the list at the end of the run.

- Add a command line option to mark when abuild is being called
recursively.
- Add all failed builds to a list.
- Print the list when a non-recursive abuild run exits.

Change-Id: Icb40ed8083a57bbcde49297d2b0814f98dcbb6c8
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17890
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-09 18:26:38 +01:00
Sebastian 'Swift Geek' Grzywna e6bd18f6b5 util/autoport: Fix gfx dump of log_maker
Variable name of inteltoolArgs was fixed.

The way of passing arguments to inteltool was changed from "-a -f"
to "-af" which is better as the string seems to be parsed
as a single argument.

Change-Id: I0c48fb1e912261748ba9e2b91c291bac28b9e856
Signed-off-by: Sebastian 'Swift Geek' Grzywna <swiftgeek@gmail.com>
Reviewed-on: https://review.coreboot.org/18050
Reviewed-by: Stefan Tauner <stefan.tauner@gmx.at>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-09 18:17:45 +01:00
Robbie Zhang ed840023a8 chromeos: Implement locating and decoding wifi sar data from VPD
A VPD entry "wifi_sar" needs to be created which contains a heximal
encoded string in length of 40 bytes. get_wifi_sar_limits() function
retrieves and decodes the data from the VPD entry, which would later
be consumed by platform code.

BUG=chrome-os-partner:60821
TEST=Build and boot lars and reef

Change-Id: I923b58a63dc1f8a7fdd685cf1c618b2fdf4e7061
Signed-off-by: Robbie Zhang <robbie.zhang@intel.com>
Reviewed-on: https://review.coreboot.org/17958
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-09 18:16:10 +01:00
Martin Roth 23ceb7d240 util/lint: Add check for the signed-off-by line
Gerrit will let you push a patch without a signed-off-by line,
although I believe it can't actually be merged.  Instead of catching
it either manually, or when the patch is attempting to be merged,
catch this in the jenkins builder.

Change-Id: I80161befa157266dd4e3209839a06ff398aab6bb
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17941
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-01-09 18:14:10 +01:00
Ricardo Ribalda Delgado a132892de6 amd/pi: Make BottomIo position configurable
Some PCI peripherals, such as FPGA accelerators, require a great amount
of memory mapped IO. This patch allows the user to select at build time
the bottom IO to leave enough space for such devices.

We cannot calculate this value at runtime because it has to be set
before the PCI devices are enumerated.

Change-Id: Ic590e8aa8b91ff89877cbff6afd10614d33dcf8d
Credit-to: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-on: https://review.coreboot.org/17980
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-01-09 18:13:48 +01:00
Martin Roth f3e26796c4 Kconfig: Remind users to delete .config when switching boards
Because Kconfig default values *ONLY* get set when they are first
configured, if you switch mainboards with an existing .config,
the values will not be set as expected for the new board.

This seems to confuse most users, so put a warning in a visible
location to let them know.

Change-Id: Ie6a9c2d139ecd841d654943f14c119ebafd632f2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17939
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-01-06 21:33:58 +01:00
Arthur Heymans 8f8d56dded mb/asus/p5gc-mx: Use common/gpio.h
Should have been included in 62902ca45d "sb/ich7: Use common/gpio.h to
set up GPIOs", which was not rebased on addition of this board.

Change-Id: If4547ee43ce6a7a6e4af67e9364613e48f989401
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18047
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2017-01-06 20:23:07 +01:00
Patrick Georgi b5623dede7 libpayload: usb: handle situation with no free device address
Change-Id: I1308bdca90f1a09d980f384ee85552198a39b965
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1260940
Reviewed-on: https://review.coreboot.org/18036
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-06 18:43:05 +01:00
Patrick Georgi a370ae8556 libpayload: xhci: plug leak
Change-Id: Ia163872846906c6c78144a984a405812f856f626
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1325835
Reviewed-on: https://review.coreboot.org/18035
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-06 18:42:18 +01:00
Patrick Georgi 61dac130b2 libpayload: timer: cast cpu_khz to make sure 64bit math is used
Change-Id: Iaf84de2330b433076a66c22fa72ffb45e957c0dc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1261177
Reviewed-on: https://review.coreboot.org/18034
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-06 18:40:44 +01:00
Patrick Georgi 766c3fec2d util/romcc: avoid shifting more than the variable's width
That's undefined behavior in C

Change-Id: I671ed8abf02e57a7cc993d1a85354e905f51717d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1229557
Reviewed-on: https://review.coreboot.org/18014
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-06 18:40:04 +01:00
Arthur Heymans 6d0c65ebc6 nb/intel/*/northbridge.c: Remove #include <device/hypertransport.h>
Nothing from that header is used or even declared since
CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT is not selected on Intel
hardware.

Change-Id: I9101eb6ffa6664a2ab45bc0b247279c916266537
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18044
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2017-01-06 18:15:03 +01:00
Arthur Heymans 62902ca45d sb/ich7: Use common/gpio.h to set up GPIOs
This is more consistent with newer Intel targets.

This a static struct so it is initialized to 0 by default.
To make it more readable:
* only setting to GPIO mode is made explicit;
* only pins in GPIO mode are either set to input or output since this
  is ignored in native mode;
* only output pins are set high or low, since this is read-only on
  input;
* blink is only operational on output pins, non-blink is not set
  explicitly;
* invert is only operational on input pins, non-invert is not set
  explicitly.

Change-Id: I05f9c52dee78b7120b225982c040e3dcc8ee3e4e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17639
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-06 18:14:00 +01:00
Philipp Deppenwiese 40843efe5d payloads/external/SeaBIOS: Bump version to 1.10.1
Changes since SeaBIOS 1.9.3

Release 1.10.0:
* Initial support for Trusted Platform Module (TPM) version 2.0
* Several USB XHCI timing fixes on real hardware
* Support for "LSI MPT Fusion" scsi controllers on QEMU
* Support for virtio devices mapped above 4GB
* Several bug fixes and code cleanups

Release 1.10.1:
* Updates for QEMU for reproducible builds

Change-Id: I465700307d72fa44b6900b38b332603ea505ed09
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/18026
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-06 18:10:12 +01:00
Aaron Durbin 49342cd688 arch/x86: fix cmos post logging in non romcc bootblock
cmos_post_init() is called in src/arch/x86/bootblock_simple.c, and
that function is reponsible for bootstrapping the cmos post register
contents. Without this function being called none of the cmos post
functionality works correctly. Therefore, add a call to lib/bootblock.c
which the C_ENVIRONMENT_BOOTBLOCK SoCs use.

BUG=chrome-os-partner:61546

Change-Id: I2e3519f2f3f2c28e5cba26b5811f1eb0c2a90572
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/18043
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-01-06 17:30:58 +01:00
Timothy Pearson 7ad4dc5e99 src/amd: Add common definition of AMD ACPI MMIO address
The bare ACPI MMIO address 0xFED80000 was used in multiple
AMD mainboard files as well as the SB800 native code.  Reduce
duplication by using a centrally defined value for all AMD
ACPI MMIO access.

Change-Id: I39a30c0d0733096dbd5892c9e18855aa5bb5a4a7
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Reviewed-on: https://review.coreboot.org/18032
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-05 21:53:55 +01:00
Arthur Heymans d502dc092a mb/ga-m57sli-s4: Fix early uart output
The console output is garbled until it is fixed in ramstage
by devicetree which sets the uart clock predivider correctly.

Change-Id: I6d6ec0febfec98a8d4a71e1476036c804cf5f08d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17969
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-01-05 17:45:18 +01:00
Martin Roth ab8f7d315e util/crossgcc: update jenkins-build-toolchain
This allows the make jenkins-build-toolchain to use the
BUILDGCC_OPTIONS variable.  Previously, the options were hardcoded.

Change-Id: I5f4c1d3fc8c714ec3640356ae3c86ae157f486d2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17766
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-04 22:18:55 +01:00
Nico Huber 2c1c02ea6a buildgcc: Remove quotes around a $CC call
If we use ccache we have to interpret spaces in $CC as separation
characters. The downside is that we can't support spaces in the
compiler's path. But, well...

Change-Id: I4e6e6324389354669a755f570083a40ff00b1bbf
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18018
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2017-01-04 22:18:24 +01:00
Manoj Gupta cf84619dd6 util/cbfstool: Fix to build with latest llvm
cbfs-payload-linux.c:255:43: note: add parentheses around left
hand side expression to silence this warning

if ((hdr->protocol_version >= 0x200) && (!hdr->loadflags & 1)) {

[pg: also fix the semantics. Thanks Nico for catching this]

BUG=chromium:665657
TEST=coreboot-utils builds

Change-Id: I025c784330885cce8ae43c44f9d938394af30ed5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 35c4935f2a89c3d3b45213372bcf0474a60eda43
Original-Change-Id: I8758e7d158ca32e87107797f2a33b9d9a0e4676f
Original-Reviewed-on: https://chromium-review.googlesource.com/411335
Original-Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Original-Tested-by: Manoj Gupta <manojgupta@chromium.org>
Original-Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://review.coreboot.org/17568
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-04 21:37:39 +01:00
Matt DeVillier 4aeb2394e9 google/auron: Fix omitted ACPI KB backlight for variants
Restores KB backlight functionality for auron variants
gandof, lulu, and samus.

TEST: boot Lulu and observe KB backlight functional

Change-Id: Iaa852f9327ff1690111db610b4cc5266cd7925b4
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/17960
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-04 21:27:20 +01:00
Lee Leahy 5e34752eb1 vboot: Remove rmu.bin from FW_MAIN_A and FW_MAIN_B
Add rmu.bin to the list of files that exist only in the read-only
section (COREBOOT) of the SPI flash.

TEST=Build and run on Galileo Gen2.

Change-Id: I30cbd3fb2ef1848807e4de4c479dc7a561c1faba
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18031
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-04 20:31:26 +01:00
Damien Zammit 75a3d1fb7c amdfam10: Perform major include ".c" cleanup
Previously, all romstages for this northbridge family
would compile via 1 single C file with everything
included into the romstage.c file (!)

This patch separates the build into separate .o modules
and links them accordingly.

Currently compiles and links all fam10 roms without
breaking other roms.

Both DDR2 and DDR3 have been completed

TESTED on REACTS: passes all boot tests for 2 boards
 ASUS KGPE-D16
 ASUS KFSN4-DRE

Some extra changes were required to make it compile
otherwise there were unused functions in included "c" files.
This is because I needed to exchange CIMX
for the native southbridge routines. See in particular:
 advansus/a785e-i
 asus/m5a88-v
 avalue/eax-785e

A followup patch may be required to fix the above boards.
See FIXME, XXX tags

Change-Id: Id0f9849578fd0f8b1eab83aed910902c27354426
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/17625
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>
2017-01-04 18:56:01 +01:00
Paul Menzel 6c20b65849 intel/i945 boards: Add romstage time stamps
Currently, some Intel 945 boards miss some or all of the time stamps
*1:start of rom stage*, *2:before ram initialization*, and *3:after ram
initialization*, so add them.

Use the same formatting as used for the board Lenovo X60, which already
has code for all the time stamps.

Change-Id: Ie25747d02fadd74b7d7b7cab234a7a88b2cc0c42
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17993
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-01-04 00:27:51 +01:00
Lee Leahy 68fdb785b2 soc/intel/quark: Add monotonic timer support
Add the Kconfig value HAVE_MONOTONIC_TIMER and the routine to read the
TSC for the monotonic timer.  Simplify the routine to get the TSC
frequency.

TEST=Build and run on Galileo Gen2

Change-Id: I806fb864b01e39277bf2d6276254b0543930c2f6
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18002
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-04 00:03:44 +01:00
Patrick Georgi 37935573bf util/romcc: remove dead assignments
Change-Id: Iab6fe065faeacfca3b41eb5bae1075dcfb1a2b05
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: scan-build (clang 3.8)
Reviewed-on: https://review.coreboot.org/18021
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:18:39 +01:00
Patrick Georgi e7724f1e1a util/romcc: Ensure that bit shift is valid
Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287090
Reviewed-on: https://review.coreboot.org/18020
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:18:06 +01:00
Patrick Georgi d057125290 util/romcc: avoid leaking a type
Only allocate ptr_type when it's actually used.

Change-Id: Iea5f93601a42f02a1866bdff099f63935fdd5b8d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1129117
Reviewed-on: https://review.coreboot.org/18017
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:17:04 +01:00
Patrick Georgi d8051896fd util/romcc: avoid dereferencing NULL pointer
argv is only filled for macro->argc > 0.

Change-Id: I5ff21098384afc823efa14be3d5565507fb2b3b2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287089
Reviewed-on: https://review.coreboot.org/18016
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:16:50 +01:00
Patrick Georgi 61dbbf65c3 util/romcc: free variable after use
closure_type is copied then never used again. Close that leak.

Change-Id: Idd4201f7fc6495fde5ad2e1feb7e499e38986e92
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287073
Reviewed-on: https://review.coreboot.org/18015
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:16:15 +01:00
Patrick Georgi 384ebc610d broadcom/bcm5785: don't treat KBC-DATA as COM1
Add a break statement instead.
While there, fix a bunch of typos in comments.

Change-Id: I465c0188d4b46eabf8d17e69fa0fdc6a9c2ad66e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1229645
Reviewed-on: https://review.coreboot.org/18013
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:15:52 +01:00
Hung-Te Lin fe2fc83936 vboot: Clear battery cutoff flags when vbnv_cmos loads backup VBNV.
When CONFIG_VBOOT_VBNV_CMOS_BACKUP_TO_FLASH is set, vbnv_cmos will try
to load VBNV from flash if the VBNV in CMOS is invalid. This is usually
correct, except the case of battery cut-off.

CMOS will always be invalid after battery cut-off if there is no RTC
battery (or if that is dead). However, in current implementation the
backup in flash is only updated in coreboot, while the real battery
cutoff (and the clearing of cutoff flags in VBNV) is done in payload
(Depthcharge) stage. This will create an endless reboot loop that:

 1. crossystem sets battery cutoff flag in VBNV_CMOS then reboot.
 2. coreboot backs-up VBNV_CMOS to VBNV_flash.
 3. Depthcharge sees cutoff flag in VBNV_CMOS.
 4. Depthcharge clears cutoff flag in VBNV_CMOS.
 5. Depthcharge performs battery cutoff (CMOS data is lost).
 6. (Plug AC adapter) Reboot.
 7. Coreboot sees invalid VBNV_CMOS, load backup from VBNV_flash.
 8. Jump to 3.

As a result, we should always clear battery cutoff flags when loading
backups from VBNV_flash.

BRANCH=glados,reef
BUG=chrome-os-partner:61365,chrome-os-partner:59615
TEST=emerge-reef coreboot bootimage;

Change-Id: I3250a3a179a7b0de9c6e401e4a94dcd23920e473
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/423460
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/18008
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:14:42 +01:00
Julius Werner 7e1f68c437 rockchip/common: Loosen I2C frequency target requirements
I've recently added an assertion to ensure that the effective I2C
frequency on Rockchip SoCs is not too far off the 400KHz target due to
divisor rounding errors. A 10KHz margin worked fine for RK3399, but it
turns out that RK3288 actually only ever hit 387KHz since its I2C clocks
are based off the already pretty low 75MHz PCLKs. While we could
probably change the PCLKs to make this closer, that seems like a too
intrusive change for something that has already worked just fine for
years, so just loosen the restriction a little more instead.

BRANCH=None
BUG=chromium:675043
TEST=None

Change-Id: I7e96a1a75b38f8ad3971dd33046699cceb17b80d
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421095
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://review.coreboot.org/18007
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:13:45 +01:00
Julius Werner a69ac7861b i2c/tpm: Ignore 0xFF bytes for status and burstCount
We've found that the SLB9645 TPM sometimes seems to randomly start
returning 0xFF bytes for all requests. The exact cause is yet unknown,
but we should try to write our TIS code such that it avoids bad
interactions with this kind of response (e.g. any wait_for_status()
immediately succeeds because all "status bits" are set in the response).
At least for status and burstCount readings we can say for sure that the
value is nonsensical and we're already reading those in a loop until we
get valid results anyway, so let's add code to explicitly discount 0xFF
bytes.

BRANCH=oak
BUG=chrome-os-partner:55764
TEST=None

Change-Id: I934d42c36d6847a22a185795cea49d282fa113d9
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/420470
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://review.coreboot.org/18006
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:13:19 +01:00
Nicolas Boichat b431a51086 Revert "google/oak: increase the driving strength for 4GB DRAMs"
This reverts commit 34a6537512, which
appears to cause random stability issues on some elm units.

BRANCH=oak
BUG=chrome-os-partner:60869
BUG=chromium:673349
TEST=None

Change-Id: I5ce9e2673db1bc7a1f487a3c3bcce4651a5e3567
Reviewed-on: https://chromium-review.googlesource.com/419862
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/18005
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 22:13:05 +01:00
Lee Leahy a765090f0d soc/intel/quark: Add early debugging code
Add Kconfig values and early debugging code to better segment and debug
the early code in bootblock by using the SD LED as an indicator.  Update
the help text for the debug Kconfig values to point to the various
failure locations.

TEST=Build and run on Galileo Gen2

Change-Id: I1cd62eba3e9547cb1dd7f547aaec5d4827e14633
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/17985
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 21:04:42 +01:00
Lee Leahy 73f6a282a1 soc/intel/quark: Fix serial port configuration
Fix serial port configuration broken by how PCI configuration space was
referenced introduced by change 3d15e10a (MMCONF_SUPPORT: Flip default
to enabled).

TEST=Build and run on Galileo Gen2

Change-Id: I2ab52cf598795e94f1f16977f8d12b7fdd95e146
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/17984
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 21:04:16 +01:00
Martin Roth 14b9b9380a util/abuild: Don't set XGCCPATH if it's in the environment
Change-Id: I0fa231ca3d33300a671810e994c5be54ac10a18b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17723
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-01-03 17:45:24 +01:00
Arthur Heymans 87fff20356 mb/asus/p5gc-mx: Remove extra BSEL strap check
This extra check is based on comparing CPU BSEL pins and reports in
MCH configuration. This gives false positives in the case of 1333MHz
CPUs which automatically get downgraded to 1067MHz by the northbridge
(max supported frequency by 945gc).

TESTED with Intel Xeon 5460 (does not boot but completes raminit)

Change-Id: I34cb37912906c803abdad0adbd9c589ca86a67c7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17997
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-03 17:42:22 +01:00
Arthur Heymans de47fc3317 mb/intel/d945gclf: Fix resume from S3 suspend
Checking for dram self refresh in MCHBAR8(SLFRCS) generates false positives.

Change-Id: I25afd565cae0269616e38ecbcdf385281bae5d1f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17996
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-03 17:42:01 +01:00
Arthur Heymans 7ff4fe1237 util/inteltool: Add ICH6-10 to BIOS_CNTL list
Without this change inteltool cannot read BIOS_CNTL values nor can it
read the SPIBAR values.

Change-Id: I9ff16e060aca66e3cb11c8315a6843ccecd1d3c2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17979
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 17:40:34 +01:00
Arthur Heymans a5798a9b8f util/inteltool: Fix ICH SPIBAR registers
The ICH7 SPIBAR offset and registers are different from later
generation.
ICH8 has a different offset from later generation.
ICH6 has no SPI controller.

Change-Id: I7691bce619089b15805114047bcb1fd121a5722b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17978
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 17:40:11 +01:00
Arthur Heymans 1eef32d92b sb/nvidia/mcp55: Fix P_state generation
amd_generate_powernow is never called by in lpc_slave_ops.
Move it to lpc_ops like on all other AMD southbridges.

TESTED on Gigabyte ga-m57sli-s4

Change-Id: I7db036e681d591a19e15dd3eaafb88b72a41bea1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17977
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-03 17:38:14 +01:00