Commit Graph

3021 Commits

Author SHA1 Message Date
Bill XIE fa5f99430d ifdtool: Const-correct and redesign some functions
Const-correct some functions which do not write back,
and use pointers to access existing region_t variables.

The last changeset is dismantled this time.

This commit is only focused on const-correctness.

Change-Id: I6d05418c8b32fa31dcd038a3e56f9aefe13fa9c4
Signed-off-by: Bill XIE <persmule@gmail.com>
Reviewed-on: https://review.coreboot.org/21288
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-17 21:27:05 +00:00
David Hendricks c863be7ba4 board_status: Add option to set cbmem path
This allows the user to specify a custom path for cbmem on the DUT.

Change-Id: I2c28737d6efaae238fd6831cd3d00b2142b39a4c
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/21565
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-09-17 01:13:23 +00:00
Patrick Georgi 77343fd668 util/scripts/cross-repo-cherrypick: improve cros-side rewrite
Sometimes the BUG/BRANCH/TEST metadata isn't separated by a newline
from the later git/gerrit metadata, which messes up further processing.

Add that newline to minimize the amount of human intervention required.

Change-Id: I37171bf6764b64e0ab0e81297a03f4d8b7744256
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/21534
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-09-15 20:57:57 +00:00
Damien Zammit 0025247171 rmodtool: Increase limit on number of symbols
An internal index `i` was previously allocated as
Elf64_Half which is uint16_t.  Bumping to uint64_t
increases the number of allowed symbols and prevents
a segfault in processing a larger ramstage.debug file.
Also introduce a separate counter for the number of sections.

Change-Id: I9ad2f64c452cef2e7bf957f766600891cb5ae798
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/21360
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-09-13 19:25:14 +00:00
Martin Roth 7e464dcb85 util/lint: Exclude external payloads from coreboot lowercase check
Change-Id: I70bbf37fad67fd9bda5724811f4bbdcc53779a42
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-09-13 18:54:10 +00:00
Kyösti Mälkki eab5c12ee0 util/cbmem: Pretty print STAGEx_META and _CACHE
Also align entries without name with additional indents.

Change-Id: Ia6aa303daa11e6aec249232aadf4e346bad659d5
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/21383
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-09-06 17:25:23 +00:00
Patrick Georgi e41b0d09ba util/testing: Don't keep tegra lp0 build results
We don't actually care for them on our testers, just that the files
can be built.

Change-Id: Ib656a085d70e2aeb1601f1943ad8581af3133839
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/21420
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-06 11:36:27 +00:00
Patrick Georgi cdd3a4327b util/testing: Also test-build tegra's lp0 resume code
The regular build doesn't build it, so it fails every now and then due
to changes in its dependencies.

Make sure we notice these early.

Change-Id: I0603b22887487d8871611d91e6f8ab0ec210bff1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/21390
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-09-06 08:23:41 +00:00
Shawn Chang 027af74999 intelmetool: Add support for Sunrise Point-H
Tested on P10S-M WS.

Change-Id: I62f78fe5ca03bf70497939a12f0036bf247b2aa7
Signed-off-by: Shawn Chang <citypw@gmail.com>
Reviewed-on: https://review.coreboot.org/21301
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-09-06 04:35:02 +00:00
Damien Zammit b40c72ae18 abuild: Allow building with any toolchain
Adds -A --any-toolchain option to abuild
This is handy for those who want to test compiling
all board configs with abuild using a non-coreboot toolchain

Change-Id: Idd599b0d2c324ad88ba3c83cdf3b180eb6d1fc80
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/21352
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-09-06 04:31:30 +00:00
Idwer Vollering 1918c81d65 util/board_status: do a spell check
Change-Id: Ie39be471851586076343b8e9454a9140d4664b8d
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/21322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2017-09-04 08:27:27 +00:00
Nico Huber 3f12d9321a buildgcc: Fix up cross GCC building
Add a missing line-break escape and, rather cosmetic, guard execution of
$CXX which we allow but don't force to be set.

Change-Id: Icf6d3b7de4b7999b8214489f28997964c490d1e9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21307
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-09-02 15:30:52 +00:00
Damien Zammit adb026f76a clang: Enable integrated assembler on clang builds
Change-Id: I883bf7eb2ab52ba3d7a284c96d4aade8bc1ee4ae
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/21221
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-02 15:21:35 +00:00
Martin Roth 1f3daeab41 util/lint/checkpatch: Untaint variables from env & command line
Jenkins is giving warnings due tainted variables from the environment
and command line:
Insecure $ENV{PATH} while running setgid at util/lint/checkpatch.pl line
907, <$conststructs> line 39.

Insecure dependency in piped open while running setgid at
util/lint/checkpatch.pl line 907, <$conststructs> line 39.

This should fix those warnings.

Change-Id: I6a09915d13547bf9a86c011d44cbcd39c46f3fec
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-09-02 15:17:58 +00:00
Stefan Reinauer f3e23a3135 buildgcc: Integrate nds32 update from Andes Technology
This patch has been provided by Mentor Chih-Chyang Chang
on behalf of Andes Technology. It fixes using the coreboot
toolchain to compile the Chrome EC code base on the ITE8320
embedded controller.

The new patch incorporates a fix for the issue previously
fixed by patches/gcc-6.3.0_nds32.patch, so that patch can
be removed.

patches/gcc-6.3.0_riscv.patch needs to be slightly adjusted
to still apply cleanly (configure scripts only).

Change-Id: I0033888360f13ba951b692b3242aab6697ca61b3
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20901
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-09-01 12:32:36 +00:00
Maciej Suminski 3a44b6a34c util/msrtool: Exit program after displaying the help message
In case there is no mode selected, sys and cpu variables are not
initialized, causing a segfault on exit (goto done).

Change-Id: I4a183c267e306598627c1612f4633f1e19019f3c
Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch>
Reviewed-on: https://review.coreboot.org/21026
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
2017-08-22 10:10:49 +00:00
Maciej Suminski d5fb99eab6 util/inteltool: Remove duplicated error message, switch to snprintf
Passing a string containing output from strerror() to perror() causes
double error message display. It is also causing segfaults when the
error message is longer than temp_string capacity.

To fix the problems, sterror() call has been removed so the error
message is printed only once. This could be enough to avoid segfaults,
but it is a good practice to limit output size with snprintf().

Change-Id: I5ccc37e404f278cafae0a451c5acaa27d7907cce
Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch>
Reviewed-on: https://review.coreboot.org/21025
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-22 10:10:34 +00:00
Maciej Suminski 3455672797 util/inteltool: Fix a comparison between signed and unsigned integers
Change-Id: Ic6489c408a87213d3c39626c5379a44acea2c34d
Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch>
Reviewed-on: https://review.coreboot.org/21024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-20 21:45:10 +00:00
Nicola Corna 98f30340cf util/me_cleaner: Pull the latest changes from upstream
Relevant changes (commit 2e8761e):
 * Add an option to truncate the ME image file
 * Add full support for Skylake (ME 11) and following, including
    modules removal, truncation informations and partition
    relocation
 * Add two options to generate a shrinked ME image file and the
    corresponding descriptor with a modified flash layout
 * Update README.md
 * Bug fixes

Also add a link to the usage guide in the Kconfig help.

Change-Id: I690c5d558139f64f38babf3c0988b53834ba8b37
Signed-off-by: Nicola Corna <nicola@corna.info>
Reviewed-on: https://review.coreboot.org/20915
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-08-20 21:19:47 +00:00
Iru Cai 457fba6be5 kbc1126_ec_dump: fix some errors
- fix the error caused by signed integer extension
- fix fopen mode
- one minor style fix

Change-Id: Iacc4ea50515ea219bc1868dae0446d576e8dce0c
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/21013
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-18 15:32:08 +00:00
Martin Roth 992d8a7711 util/lint: Change final-newlines to lint-test from lint-extended-test
The final newline check is taking longer than we'd like to run.  Since
it runs on every commit as part of the pre-commit check, we want that
to run faster than it currently does.

Remove LINT_SKIP_NEWLINE_CHECK as it's no longer needed.

Change-Id: Ie945dd6caba84e0d23af499d43367d70b1696089
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-08-17 11:27:02 +00:00
Martin Roth 0bb936da9a lint: update signed-off-by check
The current signed-off-by check doesn't really work well as a lint
stable test being run by the pre-commit git hook.  This test looks
at the PREVIOUS commit instead of the staged commit, which works well
on the server. In looking for a way to check the staged commit message,
I found the commit-msg hook, which is the correct way to check the
staged message.

- Update the commit message check from a lint-stable test to a
lint-extended test.
- Add the check for signed-off-by to the commit-msg hook

Change-Id: I8be8aef25730d988c7cf1586ae66ecb839d5f756
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20920
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@chromium.org>
2017-08-17 11:26:31 +00:00
Idwer Vollering b2b1d66826 util/kbc1126: [cosmetic] change Makefile casing
Change-Id: Iac616fdb3de79f4f58c30a2eb674ed5152b6a6e4
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/21050
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-16 18:23:09 +00:00
Idwer Vollering e2ef3cf8e3 buildgcc: surround *.log with apostrophes when build fails
Apparently the script's output text is unclear.
Emphasize the file name, keeping the dot to close the sentence.

Change-Id: I1f214b71629eda5fc54e5671ce63e58948343656
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/21012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-15 20:05:21 +00:00
Martin Roth ea383676cf Makefile.inc: lint: Update to run lint-extended scripts
- Add lint-extended as a valid option
- Call lint-extend from what-jenkins-does and test-lint
- When logging to a junit.xml file, name the file extended-junit.xml
so it doesn't conflict with the stable junit.xml file.

Change-Id: I7e4156844b8c60790e03a0e43564610bb0c8f386
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@chromium.org>
2017-08-14 18:05:41 +00:00
Martin Roth 35bfb9d9be util/lint: add extended stable checkpatch for testing
The checkpatch script takes a while to run, so don't add it to the
lint-stable checks which run pre-commit.

Change-Id: I907176c21c057564495b75133ba10b0761c9fe7b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16360
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@chromium.org>
2017-08-14 18:05:02 +00:00
Idwer Vollering 6dc3492355 util/cbmem, util/cbfstool: resolve macro errors on FreeBSD
Using sys/cdefs.h would come to mind,
however this include would not solve the build error.

Built and runtime tested on FreeBSD 12.0-CURRENT, r322031

Change-Id: I6ec9bc7fea72aa69a41439e002f381bd5e5b6bc6
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/20924
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-08-11 18:54:23 +00:00
Martin Roth 6c9c196f1c copy & update test routines from what-jenkins-does
Currently the only testing we had was 'what-jenkins-does' and
'make lint'. While the lint testing is suitable for developers,
the 'what-jenkins-does' target really isn't, as it was designed
specifically for testing on jenkins.

This adds the infrastructure for basic tests that are more suitable
for the developer. Extended tests and improvements will follow.

Add the coreboot-builds directories to .gitignore.

TODO:
- Save/restore .config
- Update test-abuild to use existing COREBOOT_BUILD_DIR variable

Change-Id: I19e1256d79531112ff84e47a307f55791533806f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-08-11 15:24:56 +00:00
Martin Roth e624e270e6 Make: Move testing into a subdirectory
In preparation for expanding the testing, move the test targets
out of the top level Makefile.inc and into a separate
subdirectory.

Change-Id: Ie252c7555223f9ce76b54e6f7b66d03f3cf60500
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20873
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-08-11 15:24:49 +00:00
Martin Roth ed0ee0a83d util/lint: Update license header lint scripts
- Check for original LinuxBIOS header from LANL
- Check for the BSD style license used in x86emu

- Add top level checks for src/cpu and src/vboot
- Add drivers dir check for aspeed, emulation, and sil
- Add mainboard dir check for digitallogic

Change-Id: Ie1ef6a39fd1d184815d22235d43780caedb2ca95
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/19122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-10 15:53:17 +00:00
Martin Roth 7eab2889d1 lint: Update lint-stable-021-coreboot-lowercase
- Exclude .patch files from check
- Exclude 'CorebootBdsLib' path in Tianocore.

Change-Id: I82186f401d267d7594fe1cd88c818c4a7015ba91
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Evelyn Huang <evhuang@google.com>
2017-08-10 15:50:49 +00:00
Aaron Durbin 8304d6fcbe util/lint: provide option to skip newline check
The newline lint check takes forever as it checks every file
in the git repo -- not just the files changed. To add insult to
injury these checks are performed on every commit. Allow one to
skip this check by setting the LINT_SKIP_NEWLINE_CHECK environment
variable.

Change-Id: I1cd5c50627b73d68b0da2fcb2d9546eb874a7959
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20903
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-08-09 17:47:23 +00:00
Caveh Jalali 0068a9f579 add __must_check to */compiler.h
the __must_check function attribute is pretty much straight from the
linux kernel - used to encourage callers to consume function return
values.

Change-Id: I1812d957b745d6bebe2a8d34a9c4862316aa8530
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://review.coreboot.org/20881
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-08 18:18:03 +00:00
Stefan Reinauer 2f0d4efa20 buildgcc: Fix libelf 64bit detection
Taken from crosstool-ng and and re-applied to 0.8.13

Change-Id: I43ad23b66ec10915cc68be8c395825f4f9161725
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20800
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-08-07 21:47:23 +00:00
Stefan Reinauer dcce8bef0e buildgcc: Update to gdb 8.0 and expat 2.2.1
Among other improvements, the new GDB has a new GDB/CLI
command to erase flash memory and a few Python scripting
enhancements.

Change-Id: Ie3852d5bc74617d3e05509e19bbd1caa281da3e0
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-07 21:47:17 +00:00
Martin Roth 5cb2263004 util/scripts: Add script to update submodules
Change-Id: I4e238b539f06ce4031e0e99d26943d226a3c2556
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20703
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-08-04 15:33:03 +00:00
Iru Cai 4225493159 util/kbc1126: Refactor kbc1126_ec_insert
Add support for setting addresses of blobs only, and using address in
memory when ROM is mapped

Change-Id: I053c55253eee00558071d15923e3eb17b1e8410c
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/20474
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-03 18:54:41 +00:00
Patrick Georgi d42eb37be4 util/cbfstool: Fix build with armv7-eabi cross compiler
We recently changed all PACKED, __PACKED, __attribute__((packed)) ... to
__packed to gain some consistency. In cbfstool we use compiler.h to
provide that where necessary.

The cross compiler I use doesn't provide __packed by itself, but liblz4
doesn't compensate for that. Therefore include compiler.h, and to avoid
adding dependencies to non-liblz4 code, do so through the command line.

Change-Id: I581e45639ac3e103af7c16793e8effe2e632dec7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/20836
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-08-02 09:55:11 +00:00
Martin Roth ba973bd2de util/abuild: Set exit status on failure
Currently, the what-jenkins-does target doesn't stop if abuild fails.
This change gives a command line parameter to abuild with tells it to
exit with a non-zero exit status if any of the builds failed.

This will be particularly useful for concourse which doesn't parse the
junit.xml files, and only knows whether a build passed or failed by the
exit status.

Change-Id: Ic2be5deaedacd3f55db8e0b14a2b7b39cc44664e
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20656
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-07-31 20:52:07 +00:00
Nico Huber e48b3db519 util/autoport: Remove copy-pasting of PMIR register
AFAIR from reviews, writing the PMIR (aka. ETR3) register never turned
out to do anything useful.

Change-Id: I119fb1212f360a59b695e2dfef68e19c330d01ca
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20817
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>
2017-07-31 15:00:43 +00:00
Nico Huber 23b93dd7d8 intel/sandybridge: Clean VGA BIOS ids up a little
Sync map_oprom_vendev() and autoport with the list of PCI ids in the
`gma.c` driver, remove one obsolete Kconfig default override.

Change-Id: I12f24f415b695c516fbb947114e09c873af2e439
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20814
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-07-30 00:07:01 +00:00
Nico Huber 2b5c021431 intel/sandybridge: Gather MMCONF_BASE_ADDRESS defaults
All affected boards did the same USE_NATIVE_RAMINIT distinction or
actually selected USE_NATIVE_RAMINIT. Also update autoport.

Change-Id: I924c43cec1e36e84db40e4b8e1dd0e05cad2b978
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20813
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2017-07-30 00:06:51 +00:00
Martin Roth ef869305cf util/gitconfig: update pre-commit script
The previous pre-commit script generates an error when a commit doesn't
actually generate a patch file.  This happens in rare instances when the
only change in a patch is to update file permissions.

Update the pre-commit script to verify that there's actually a patch
before calling checkpatch.  Also print that we're running checkpatch
so that it doesn't look like odd failures come from lint-stable.

Fixes Bug #132 - Problem with `lint-stable` when changing mode of file

Change-Id: I142610b6fc984b2b14fd6c634bc4e7f2880ba987
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20781
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-29 21:36:38 +00:00
Pratik Prajapati 015082dff3 util/inteltool: Clean up checkpatch.pl warnings
Remove braces around single statements.
"WARNING: braces {} are not necessary for single statement blocks"

Change-Id: Id5a7dc3a9672266b66d7f46db2ff087b98fd174d
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/20771
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-28 16:21:40 +00:00
Pratik Prajapati 91664d4d6f util/inteltool: Add support for SGX status
Add support for dumping Intel Software Guard Extension (SGX)
status. --sgx or -x is the command line switch to get SGX status.
The code iterates through all cores and reads MSRs to check if SGX is
supported, enabled and the feature is locked.

Change-Id: I1f5046c1f6703f5429c8717053ffe9c981cedf6f
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/20758
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-28 16:21:32 +00:00
Martin Roth 6d2cbb9e58 abuild: Update file locations
The full path to the passed/failed build lists needs to be specified.
On the builders, the absolute path is passed in, which conflicted with
the ${TOP} value, causing this to fail on the builders. When TOP was
removed from the path, the builders worked correctly, but it failed when
run locally.  This fixes the path in either case.

Change-Id: Ia4370f4a2b84991edccfc723a3136b88ca27db7d
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20660
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-25 15:11:24 +00:00
Martin Roth 43be77db31 util/lint: Update final newline check
- Exclude .png and .patch files.
- Turn into a lint-stable test.

Change-Id: I4a5c77d7856bc5017ba441d458378b4837c1c7d5
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20706
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-24 16:28:24 +00:00
Martin Roth 4cfae2f574 util/lint: exclude patch files from asm syntax check
This allows the paches to add cross-compile support for true x86 16-bit
GCC (ia16) to go in.

Change-Id: If9246b5fb2f3578afea601fd63b7d716ddf8597e
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/19714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-21 15:55:21 +00:00
Stefan Reinauer e2804c14a4 util/vgabios: Don't call redefined printk in printk
A few pieces of coreboot code (like the video bios emulator) are
imported from other code bases, and hence might call printf. In
order to see the output, we redefine printf to printk. However,
when we are re-importing this code in a userspace utility, we might
call printk instead of printf if we're not careful.
A good fix for this would be to not call printf in coreboot ever.
As a short term fix to keep testbios from segfaulting, we just
don't call printf from printk, so we don't cause our own stack to
overflow.

Change-Id: I789075422dd8c5f8069d576fa7baf4176f6caf55
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20658
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-21 15:45:41 +00:00
Patrick Georgi e8253fea63 crossgcc: Clean out ABI variable for GMP
This is sometimes set by packaging systems (eg Gentoo), so give it a
sane preset.

Change-Id: I651fad12128143e8ed5053e7e9871ea271bfc797
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/20632
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-19 22:33:13 +00:00