summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x86: add coreboot table entry for TSC infoAaron Durbin2016-02-192-0/+26
| | | | | | | | | | | | | | | | | | | | | | | The 8254 (Programmable Interrupt Timer) is becoming optional on x86 platforms -- either from saving power or not including it at all. To allow a payload to still use a TSC without doing calibration provide the TSC frequency information in the coreboot tables. That data is provided by code/logic already employed by platform. If tsc_freq_mhz() returns 0 or CONFIG_TSC_CONSTANT_RATE is not selected the coreboot table record isn't created. BUG=chrome-os-partner:50214 BRANCH=glados TEST=With all subsequent patches confirmed TSC is picked up in libpayload. Change-Id: Iaeadb85c2648587debcf55f4fa5351d0c287e971 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13670 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
* lib/coreboot_table: add function to allow arch code to add recordsAaron Durbin2016-02-197-0/+27
| | | | | | | | | | | | | | | | | Add lb_arch_add_records() to allow the architecture code to generically hook into the coreboot table generation. BUG=chrome-os-partner:50214 BRANCH=glados TEST=With all subsequent patches confirmed lb_arch_add_records() is called when a strong symbol is provided. Change-Id: I7c69c0ff0801392bbcf5aef586a48388b624afd4 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13669 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
* RISC-V: Add more debug info to debug printksAndrew Waterman2016-02-191-2/+5
| | | | | | | | Change-Id: I49292e69a5636c675bb8ed7cfe4462ca8189487e Signed-off-by: Andrew Waterman <waterman@cs.berkeley.edu> Reviewed-on: https://review.coreboot.org/13736 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
* RISC-V: Make inline asm usage saferAndrew Waterman2016-02-191-7/+5
| | | | | | | | Change-Id: Id547c98e876e9fd64fa4d12239a2608bfd2495d2 Signed-off-by: Andrew Waterman <aswaterman@gmail.com> Reviewed-on: https://review.coreboot.org/13735 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
* power8: qemu "cpu"Ronald G. Minnich2016-02-193-0/+73
| | | | | | | | Change-Id: Ib20d88bb208a605b6bf44e6bf7151c24a08549aa Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/13702 Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Tested-by: build bot (Jenkins)
* Payloads: Add U-Boot as a coreboot-payloadMartin Roth2016-02-187-2/+164
| | | | | | | | | | | | | | | | | | | | | | - Add Kconfig and Makefile options to use U-Boot as a payload. - Add Kconfig option for extra cbfstool command line arguments. - Add Kconfig & Makefile option to load the payload as a flat binary. - Add u-boot directory to .gitignore. This is currently working for X-86 only. Graphics worked in U-Boot correctly by initializing the VBIOS and setting up a console mode. Tested in QEMU and on Minnowboard Max. Got into U-Boot, have not booted an OS yet. Change-Id: Ia122a4ad7cd7d96107c1552b0376c8106ca8fb92 Signed-off-by: Martin Roth <martinroth@google.com> Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/12714 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* soc/intel/quark: Enable HSUART1Lee Leahy2016-02-184-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | Enable HSUART1 for debug serial output. Specify the fixed resources in the UART driver. This keeps debug serial output flowing during the rest of the device initialization. Testing on Galileo: * Edit the src/mainboard/intel/galileo/Makefile.inc file * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing successful if: * Debug serial output stays enabled after BS_DEV_RESOURCES state Change-Id: Ica02e5fece156b21d4a3889284ca467d55c7880d Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13730 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* soc/intel/quark: Establish the Memory MapLee Leahy2016-02-184-2/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | Add ramstage.h to define some of the common header files used by the drivers in ramstage. Add northcluster.c, the driver for the memory controller, which defines the memory map. Testing on Galileo: * Edit the src/mainboard/intel/galileo/Makefile.inc file * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing successful if: * Memory map successfully displayed in BS_WRITE_TABLES state Change-Id: I8dc91119eaad0b7abc2e484d13ee708ba1253438 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13721 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* soc/intel/quark: Enumerate the PCI devicesLee Leahy2016-02-181-2/+26
| | | | | | | | | | | | | | | | | | | | | | | Add the chip and domain support which enables the display of the vendor and device IDs for the PCI devices. Testing on Galileo: * Edit src/mainboard/intel/galileo/Makefile.inc file * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing is successful if: * The PCI vendor and device IDs are displayed. Change-Id: I517dcafd83c7dd850bc3471f939d6804a05020c3 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13719 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* device: Add device path display supportLee Leahy2016-02-182-0/+32
| | | | | | | | | | | | | Add an optional routine to translate the device path types into a string for display. TEST=Build and run on Galileo Change-Id: Iea5d0a2430d9a8546105324e2beda0955210dca9 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13715 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* arch/arm64: Compile arm-trusted-firmware with coreboot timestampPatrick Georgi2016-02-182-1/+1
| | | | | | | | | | | | | | Update ATF codebase to a version that supports passing a timestamp and fix the format to what it accepts now (including quotes). This provides reproducible builds. Change-Id: I12a0a2ba1ee7921ad93a3a877ea50309136ab1ab Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13726 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* intel/kunimitsu: Set USB Type A current limit to 2ANaresh G Solanki2016-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The GPIO USB_A0_ILIM_SEL & USB_A1_ILIM_SEL should be low to enable 2A charging from the USB Type-A port. BUG=chrome-os-partner:50212 BRANCH=glados TEST=Build CB & booted kunimitsu, verified that USB_A0_ILIM_SEL & USB_A0_ILIM_SEL are at logic zero. Change-Id: I989987eaaa2015720bbb1403caf20b97a996e168 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 640834506ad749359104e24fdb664044d499fd5f Original-Change-Id: I741f79a69b78dbb7d4f8cb9718355d802b94b96d Original-Signed-off-by: Naresh G Solanki <Naresh.Solanki@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/327121 Original-Commit-Ready: Naresh Solanki <naresh.solanki@intel.com> Original-Tested-by: Naresh Solanki <naresh.solanki@intel.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13722 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* board_status.sh: Be smarter about cbfstool usageDavid Hendricks2016-02-181-3/+21
| | | | | | | | | | | | | | | | | This changes how we build and use cbfstool: 1. If build/cbfstool exists, use it. 2. Otherwise, try util/cbfstool/cbfstool. 3. As a last resort, build it and clean it when we're done. Hopefully this will resolve issues people have had with permissions and reduce overhead of building cbfstool when not necessary. Change-Id: I5de6581ca765e5a8420b101a5865ddd633334b9c Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: https://review.coreboot.org/12490 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* board_status: Add script that will set up a ubuntu live imageMartin Roth2016-02-181-0/+70
| | | | | | | | | | | | | | | | | | | This is a pretty basic script that can be downloaded with wget to a ubuntu-based live image, and will set it up so that the board_status script can connect and run cbmem. 1) Verify that this is being run on a ubuntu-based live image by checking for the installer. 2) Install and configure the ssh server. 3) Set a root password 'coreboot' so that root can log in. 4) download and build cbmem. 5) find and print the IP(s) that should be used to connect. Change-Id: I068423c9f5501b156f25371d89559f4a206916b5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13648 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* acpi/tpm: Gracefully handle missing TPM module.Tobias Diedrich2016-02-181-15/+24
| | | | | | | | | | | | | | | | When TPM support is enabled, verify the TPM_DID_VID field is not all zeroes or all ones before returning 0xf in the _STA method. This avoids these kernel errors when no module is installed: [ 3.426426] tpm_tis 00:01: tpm_transmit: tpm_send: error -5 [ 3.432049] tpm_tis: probe of 00:01 failed with error -5 Change-Id: Ia089d4232e0986b3bc635d346e68d982e8aecd44 Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de> Reviewed-on: https://review.coreboot.org/13713 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Duncan Laurie <dlaurie@google.com>
* Redo testbios utility to use all of YABELStefan Reinauer2016-02-1820-1654/+904
| | | | | | | | | | | Drop buggy duplicate implementation of intXX handlers and provide enough glue to use all of YABEL. Change-Id: I2db77a56a2a991cb84876456dcbb3a843a0d9754 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/12117 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
* util/autoport: Use common gpio.c for bd82x6xStefan Reinauer2016-02-181-2/+2
| | | | | | | | | | | In accordance to change I8bd981c4696c174152cf41caefa6c083650d283a change autoport as well, as suggested by Vladimir. Change-Id: I7cdaa779c11fd3f791a3ad213c24d927b5da76b9 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13731 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
* nb/intel/sandybridge: Start PEG link trainingPatrick Rudolph2016-02-181-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue observed: The PCIe Root port shows up in GNU/Linux but no PCIe device is being detected. Test system: * Gigabyte GA-B75M-D3H (Intel Pentium CPU G2130) * Lenovo T530 (Intel Core i5-3320M CPU) Problem description: The PEG Root port link training on Ivy Bridge needs to be manually started. Problem solution: The bits are set in early_init to meet PCIe reset timeout of 100msec. The bits should be set in PCI device enable function, but this causes the PCI enumeration to not detect the card, as it's still booting. Adding a fixed delay of 100msec resolves this problem, but this would increase boot time. Read the PCI base revision mask to make sure it's any IvyBridge CPU. Don't run the code on MRC path as it has its own PEG initilization code. Tested with: * Nvidia NVS 5400M (PCIe2) * ATI Radeon HD4780 (PCIe2) * Nvidia GeForce 8600 GT (PCIe1) Untested: * PCIe3 devices Final test results: The PEG device shows up under GNU/Linux and can be used without issues. Change-Id: Id8cfc43e5c4630b0ac217d98bb857c3308e6015b Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/11917 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* southbridge/intel/bd82x6x/acpi: Fix IRQ warningsPatrick Rudolph2016-02-181-1/+11
| | | | | | | | | | | | | | | | | The PCIe slot uses Message Signaled Interrupts (MSI) as the IGD does and doesn't use hardware INT lines. Adding the IRQ entry for PEG slot fixes a warning showing up in GNU/Linux dmesg. Test system: * Intel IvyBridge * Gigabyte GA-B75M-D3H Change-Id: I5ac40e7bea9a659c6c89262aac4552bc8177a9e5 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/13612 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* southbridge/intel/bd82x6x: Use common gpio.cPatrick Rudolph2016-02-1846-219/+87
| | | | | | | | | | | | Use shared gpio code from common folder. Bd82x6x's gpio.c and gpio.h is used by other southbridges as well and will be removed once it is unused. Change-Id: I8bd981c4696c174152cf41caefa6c083650d283a Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/13614 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* cpu/amd: Add socket FM2Damien Zammit2016-02-185-0/+45
| | | | | | | | Change-Id: I397c908867fef7583063c8cad7b83ce53482529b Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/13708 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* crossgcc: Change 'tar balls' to 'tarballs'Martin Roth2016-02-181-2/+2
| | | | | | | | Change-Id: I8665724c381c204af5bc8bb06117c8af9c32be8a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13729 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* lib: Add Kconfig to toggle boot state debuggingLee Leahy2016-02-183-17/+22
| | | | | | | | | | | | | | | | Add the DEBUG_BOOT_STATE Kconfig value to enable boot state debugging. Update include/bootstate.h and lib/hardwaremain.c to honor this value. Add a dashed line which displays between the states. Testing on Galileo: * select DEBUG_BOOT_STATE in mainboard/intel/galileo/Kconfig * Build and run on Galileo Change-Id: I6e8a0085aa33c8a1394f31c030e67ab3d5bf7299 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13716 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* power8: try to fix toolchain.inc for power8.Ronald G. Minnich2016-02-171-0/+3
| | | | | | | | Change-Id: Ic249ee89d8683b9ecc020d1ec6934019ae5ae1b6 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/13724 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* mainboard/intel/galileo: Enable PCIe root port 0Lee Leahy2016-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Enable PCIe root port 0 Testing on Galileo: * Add a 802.11 wireless card in the mini-PCIe slot * Edit the src/mainboard/intel/galileo/Makefile.inc file * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing successful if: * After PCI 00:17.0, memory addresses are assigned to the 802.11 wireless card on PCI 01:00.0 during BS_DEV_RESOURCES state Change-Id: I68ea25b8e594480fe5146ffad75e293e346e9517 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13723 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
* mainboard/intel/galileo: Disable the remaining PCI devicesLee Leahy2016-02-171-2/+15
| | | | | | | | | | | | | | | | | | | | | | | Add additional lines to the devicetree.cb file to disable the PCI devices in the Quark SoC. Testing on Galileo: * Edit the src/mainboard/intel/galileo/Makefile.inc file * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing is successful if: * Devices show up as disabled in BS_DEV_ENUMERATE state or ramstage Change-Id: I1edbbcb88cef29ce972ef054c82e37bf07c3761d Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13720 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* payloads/external/GRUB2: Add a possibility to add custom modules.Vladimir Serbinenko2016-02-172-1/+11
| | | | | | | | Change-Id: I3004eac248561b0cd4e44bcef90fc66fae5d77ca Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: https://review.coreboot.org/13727 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
* arch/x86: Add option to disable default mmap_boot implementationAlexandru Gagniuc2016-02-172-4/+14
| | | | | | | | | | | | | On certain platforms, the boot media is either not memory-mapped, or not mapped at the top of 4G. This makes the default mmap_boot implementation unsuitable. Add an option to allow such platforms to define their own mapping implementation. Change-Id: I8293126fd9cc1fd3d75072f7811e659765348e4a Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com> Reviewed-on: https://review.coreboot.org/13319 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* nb/intel/sandybridge/raminit: Add shift offsetPatrick Rudolph2016-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | It looks like the falling timing was missing the shift offset. Not sure if this was intentional, I guess not. Tested on my hardware and produced no regressions. Test system: * Intel IvyBridge * Gigabyte GA-B75M-D3H Please test on real hardware ! Change-Id: Id8c60217093a48bf322f406ea258c10a02c936e8 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/13682 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
* lint: Make sure site-local isn't committed to coreboot repoMartin Roth2016-02-161-0/+29
| | | | | | | | Change-Id: I1dc9469e3d001fe0d5b0517d45679b056586b5b3 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13556 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* soc/intel/apollolake: bootblock: implement platform_prog_run()Andrey Petrov2016-02-162-0/+11
| | | | | | | | | | | | | Once bootblock copied romstage into CAR it may not jump into it right away. This is because we are in NEM mode, there is no backing store and a miss in L1 may cause L1D line snoop that gets written back. The solution is to flush L1D to L2 so snoop guaranteed to hit L2. Change-Id: I2ffe46dbfdfe7f0ccd38b34ff203ff76b6d5755b Signed-off-by: Andrey Petrov <andrey.petrov@intel.com> Reviewed-on: https://review.coreboot.org/13703 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* device/pci_rom: Rename missleading ON_DEVICE_ROM_RUNPatrick Rudolph2016-02-162-9/+7
| | | | | | | | | | | | | | | | | | | | | The Kconfig option "ON_DEVICE_ROM_RUN" suggests that PCI Option ROMs are run, but in fact it only controls the loading of PCI based Option ROMs. At the moment coreboot only executes Option ROMs if they are VGA Options ROMs and the VGA Option ROM execution flag is enabled. Setting ON_DEVICE_ROM_RUN with VGA Option ROM execution disabled has no effect. Clarify that this flag controls the loading behaviour and not the execution behaviour. Change-Id: Ie3e503cb145f9b7ce613755e60ac0f6c00f2bcdb Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/13684 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* southbridge/intel/common: Add common gpio.cPatrick Rudolph2016-02-164-0/+346
| | | | | | | | | | | | | | | Add a common southbridge gpio code to reduce existing duplicated code. By adding it to ram-stage, GPIOs can be changed any time, without the need of direct register access. The files are based on bd82x6x and lynxpoint gpio.c. Change-Id: Iaf0c2f941f2625a5547f9cba79da1b173da6f295 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/12893 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* Fix a build problem with power 8: use --with-system-zlibRonald G. Minnich2016-02-151-0/+1
| | | | | | | | | | | | | | | | | Power 8 was once again having build issues. Adding --with-system-zlib fixes them. It seems the builtin one is only needed when you are going to build programs, and it falls apart in other cases. Searching --with-system-zlib reveals this to be a very popular topic. This has not broken other toolchain builds (for me); it should not for anyone else. Then again, this is gcc, about which I need say no more. Change-Id: Ica9d057d88982543b5dda471cc949c31fe15932f Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/13700 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* skylake: Finalize SMM in corebootDuncan Laurie2016-02-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Once we lock down the SPI BAR we need to tell SMM to re-init its SPI driver or it will be unable to write ELOG events via SMI. This SMI is also sent at the end of depthcharge so there was just a window where SMI events could get lost. BUG=chrome-os-partner:50076 BRANCH=glados TEST=enable DEBUG_SMI, boot to dev screen, press power button and see elog events get added without without transaction errors. Change-Id: I1f14717b5e7f29c158dde8fd308bdbfb67eba41a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 60ca24c760c70e2ebe5f3e68f95d3ffdba0fef9e Original-Change-Id: I4e323249f00954e290a6a30f515e34632681bfdd Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/326861 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13697 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* skylake: Check for power failure when WAK_STS is not setDuncan Laurie2016-02-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | The PCH does not set PM1_STS[WAK_STS] bit when waking from a G3 state, which is triggered by hibernate now on chell when we do a PMIC shutdown. This means the checks for S5 wake are not done and instead it is logged as a wake from S0. BUG=chrome-os-partner:50076 BRANCH=glados TEST=pass firmware_EventLog test on chell Change-Id: I3ca05a4824df3401150a63d4b6555f759de40087 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: de6c9bac447edd06568193f990f1f4e278576783 Original-Change-Id: I4472498468d620fe69f2b68710e818a4ad287382 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/326888 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13696 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* skylake: Enable DDI-A 4-lane support if GOP does not executeDuncan Laurie2016-02-151-4/+17
| | | | | | | | | | | | | | | | | | | | | | This change will allow the kernel to use 4-lane eDP connections if the GOP driver does not execute and set this bit. If GOP has executed (everyone but Chrome OS verified mode) the link will already be up and this will do nothing. BUG=chrome-os-partner:50197 BRANCH=glados TEST=boot on chell and ensure 4 Change-Id: I9e2328b00db84f26b9bd03220b8ac0bd5f64cfbf Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: cff83e18ce9936c8d507f93c8443b7056c62e844 Original-Change-Id: I3f1e5d78b91eb0e4a23fcc196aff0edadc252a0c Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/327251 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13690 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* skylake: acpi: Make GRXS method serializedDuncan Laurie2016-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | This method creates a named object and should be serialized to avoid a compiler warning from recent iasl releases. BUG=chrome-os-partner:40635 BRANCH=glados TEST=emerge-chell coreboot with no iasl warnings Change-Id: If54df4eca8849a8d278816712164b30a775a41ca Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 9aa8c5627276be08bf0dc3d0f4b9b7bd3f40c227 Original-Change-Id: Ieb05525503bf61c9922677484aba5479856a3f35 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/326843 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13689 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* kconfig: make oldconfig work "non-strict"Patrick Georgi2016-02-151-1/+3
| | | | | | | | | | | | | oldconfig is regularly used to clean up templates that sometimes contain duplicates or old symbols. Since it cleans up the config, it doesn't need to fail on issues. Change-Id: Ife0e9e3b9bfdde1eb6be0e2e38e81b9042cb7950 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13687 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Intel common: add microcode loading to romstage before fspmemoryinitrobbie zhang2016-02-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | The intend is to seek upgraded microcode in RW section and load it before Fsp memoryinit, to ensure any goodness in the microcode update, especially related to memory configuration, can be applied earlier. BUG=chrome-os-partner:50132 BRANCH=glados TEST=Built and boot on kunimintus. Verified microcode gets reloaded. Boot time impact is very minor. CQ-DEPEND=CL:327170 Change-Id: I1a5df1d1efa25fb256743dca6a661c828263ec7c Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: d7f700c1876e53194748d1d1c66637b9419b7086 Original-Change-Id: I7083ec6305af9e14a57d7b0cb1bd800cd9e22f44 Original-Signed-off-by: Robbie Zhang <robbie.zhang@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/327193 Original-Tested-by: Wenkai Du <wenkai.du@intel.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13688 Tested-by: build bot (Jenkins) Reviewed-by: Robbie Zhang <robbie.zhang@intel.com> Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
* cpu/amd: Update/Add license headersDamien Roth2016-02-1414-12/+190
| | | | | | | | | | | These license headers were either not compliant with the coreboot standard or were missing completely. Change-Id: I0c46ad9ba7f3d950b3eff96ee6e9c36acbf1a3a5 Signed-off-by: Damien Roth <yves.r.roth@gmail.com> Reviewed-on: https://review.coreboot.org/13288 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* CPU/intel: Add missing license headersDamien Roth2016-02-1414-0/+182
| | | | | | | | | | Add missing license headers to files that have no coreboot header. Change-Id: Iaaa04b5dcbd446a2064ac68d501ae8e860486e36 Signed-off-by: Damien Roth <yves.r.roth@gmail.com> Reviewed-on: https://review.coreboot.org/13289 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* FMAP: Clean up debug outputDuncan Laurie2016-02-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the debug output from FMAP lookups. When we had one or two FMAP lookups in a boot this was not a big deal, but now that we do many lookups it is a lot of unnecessary output duplication. This change reduces these 3 lines: FMAP: area VBLOCK_A found FMAP: offset: 200000 FMAP: size: 65536 bytes To just one line: FMAP: area VBLOCK_A found @ 200000 (65536 bytes) And makes the header output only print once: FMAP: Found "FMAP" version 1.0 at c10000. FMAP: base = 0 size = 1000000 #areas = 29 BUG=chrome-os-partner:40635 BRANCH=glados TEST=boot on chell and enjoy non-truncated memconsole Change-Id: Ib5862b8bfad113a700faae89089557094aa6d499 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 6890f36536d4ae6fc4988fc8191b0cff4e33e2e6 Original-Change-Id: Ifefee1ab26e6ee406de552880fbbd5b7916fcadd Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/326887 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13695 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* cpu/allwinner: Update license headersDamien Roth2016-02-1322-52/+306
| | | | | | | | | | These licence headers were not compliant with the coreboot standard. Change-Id: I85bb5f971ab1f8ac3e9589f712370fbf09716b67 Signed-off-by: Damien Roth <yves.r.roth@gmail.com> Reviewed-on: https://review.coreboot.org/13287 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* crossgcc: Use acpica-unix2 over acpica-unixPatrick Georgi2016-02-134-5/+5
| | | | | | | | | | | | | | | Apparently acpica-unix is shipped under "A non-open source license (the 'Intel license')" while acpica-unix2 comes under GPLv2/BSD dual license. (see https://acpica.org/Licensing) So go with unix2. Change-Id: I412812187bbf488eb4ad6d7fb8d2840f2f5e06d4 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13686 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
* sandybridge: Always include MRC if not using native RAM init.Vladimir Serbinenko2016-02-135-35/+5
| | | | | | | | | | | Otherwise the image is simply unusable. Change-Id: I1e2562ba17279d14dc73b05e4f8fa493e06fbcd2 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: https://review.coreboot.org/13699 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* soc/intel/apollolake: add assert for pad constraintsAaron Durbin2016-02-131-0/+3
| | | | | | | | | | | Ensure the pads passed into the gpio functions are within range. Change-Id: Ic523cbfaf60a46709080347af3a36d6330f9a07c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13694 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* soc/intel/apollolake: pre-evaluate gpio number valuesAaron Durbin2016-02-132-172/+175
| | | | | | | | | | | | | To allow sharing macros in ASL as well as C the macros can't have complex expression because the ASL compiler does not evaluate those expressions. To that end, just pre-calculate the values. Lastly, add N_OFFSET and utilize it for symmetry. Change-Id: I546d71008e776b27ce8bcd24d2cbd2ee1b2d8020 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13693 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* soc/intel/apollolake: limit bootblock size to 32KiBAaron Durbin2016-02-131-0/+5
| | | | | | | | | | | | The CSE places the bootblock (IBBL in Intel parlance) below 4GiB at top of the address space. However, it's size is limited to 32KiB. For now, just limit all of bootblock to 32KiB. Change-Id: I8f84138fb81027eae1712b7af3943942c35cf0ea Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13692 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* x86: make bootblock size for C_ENVIRONMENT_BOOTBLOCK configurableAaron Durbin2016-02-132-1/+7
| | | | | | | | | | | | | | Certain platforms may need to limit their bootblock size to within a given size because specific constraints. Allow the size to be provided by the mainboard or chipset by way of the arch Kconfig being processed after those. Change-Id: I46cc6315918cde575070fa2d3e2514f28008f575 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/13691 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>