Commit Graph

316 Commits

Author SHA1 Message Date
Patrick Rudolph 24efe73dfd nb/intel/sandybridge/raminit: Move fill_smbios17 to ddr3.c
There's nothing Sandy Bridge specific in this code.
Make it available on all platforms to reduce code duplication.

Tested on Lenovo T430: SMBIOS entry 17 is still valid.

Change-Id: I051c3e07a999d8dad082c24f65b43dce180349fd
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/28213
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-21 23:04:08 +00:00
Patrick Rudolph 15e6469ef9 nb/intel/sandybridge: Fill in DIMM serial number
Fill in SMBIOS type 17 DIMM serial number, read from SPD.

Fixes FWTS SMBIOS type 17 test.

Change-Id: Id6e818bfdf4af0fd34af56dc23df052a3f8c348d
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/28191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-20 09:51:22 +00:00
Elyes HAOUAS 394ec02298 src/device: Fix typo
Change-Id: I65e57b37db9649b30ca25b2150f21ebffee73105
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27917
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-08-09 15:57:35 +00:00
Richard Spiegel 5e9785d6e4 src/device/pci_rom.c: Remove double initialization
In procedure pci_rom_probe(), variable vendev is initialized twice.
Remove one initialization.

BUG=b:112253891
TEST=Build and boot grunt.

Change-Id: I8a71aa1aea2047ab2d98e09d1d6610de552b6cb4
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/27949
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-08-09 15:47:07 +00:00
Richard Spiegel 38ad45c893 device/pci_device.c: Remove unused variable attr setting
In procedure pci_get_resource, when setting an IO mapped base address,
variable attr is &= with PCI_BASE_ADDRESS_IO_ATTR_MASK. However, in this
particular code flow variable attr is not used later. Remove the line.

BUG=b:112253891
TEST=Build and boot grunt.

Change-Id: Ia4fdda1be92d22017a7a913a911db15aaa440b69
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/27928
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-08-08 15:30:04 +00:00
Felix Held a662777b6f pnp_device: don't treat missing PNP_MSC devicetree entry as error
Change-Id: I8da01cd462225b633bf2043ab33b35aeddc8d55a
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/27668
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-29 15:06:41 +00:00
Felix Held f2ec648fcb device/pnp_device: rewrite pnp_get_ioresource
The rewrite simplifies the code and fixes the limit on the case of IO resources
with the length of 1 byte.

This patch is inspired by the comment of Nico Huber on
Ia99b785dcd9cf56fb236ad7ade54656851f88a5e

If the ones in the mask aren't a continuous block, now a warning message gets
printed.

Change-Id: I0089278f5adf65e8f084580bc5bc1eb2f77b87f7
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/27654
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-29 15:06:10 +00:00
Aaron Durbin a0dabd1848 device: add child traversal helper function
Add a function, dev_bus_each_child(), which walks through all the
children for a given bus of a device. This helper allows one to
walk through all the children of a given device's bus.

BUG=b:111808427,b:111743717
TEST=built

Change-Id: Iedceb0d19c05b7abd5a48f8dc30f85461bef5ec6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/27636
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-07-26 15:35:44 +00:00
Patrick Rudolph 4e2f95b789 device/pci: Add MSI-X helper functions
Basic PCI MSI-X table helper functions.
Imported from GNU/Linux kernel PCI subsystem.

To be used on Cavium to configure MSI-X tables.

Change-Id: I94413712e7986efd17e6b11ba59f6eb390384c8c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/26329
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-19 13:52:28 +00:00
Felix Held 745e58a5ee pnp_device: improve readability
Add comments on the ops handling in pnp_enable_devices function and the
pnp_info struct.

Also remove the negation in the check if an LDN-specific override is used.
This patch doesn't change the logic though.

Change-Id: I3e80dbce1f29ee3e95e3b1d71c9b8479561d5c1a
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/27384
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-17 18:06:19 +00:00
Elyes HAOUAS b0b0c8c60a src/{device,drivers}: Use "foo *bar" instead of "foo* bar"
Change-Id: Ic1c9b1edd8d3206a68854107ddcbc5c51cb487c3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-09 09:27:34 +00:00
Elyes HAOUAS e3e3f4f4ed src: Get rid of unneeded whitespace
Change-Id: I3873cc8ff82cb043e4867a6fe8c1f253ab18714a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-02 07:39:51 +00:00
Aamir Bohra cbc012318c src/device: Add check for existence and validity of PCIE base address config
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Change-Id: I89b0e9c927d395ac6d27201e0b3a8658e958518d
Reviewed-on: https://review.coreboot.org/27263
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-06-29 11:40:12 +00:00
Elyes HAOUAS c8a649c08f src: Use of device_t is deprecated
Change-Id: I9cebfc5c77187bd81094031c43ff6df094908417
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27010
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-06-14 09:29:31 +00:00
Nico Huber 29cc33181a drivers/intel/gma: Unify VBT related Kconfig names
Shuffle words and drop the _DATA_FILE suffix.

Change-Id: I0b0d50ea729e5580c0bc7b43f250ff387ce59cfc
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/26898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-06-12 18:07:51 +00:00
Arthur Heymans 7225a366bd drivers/intel/gma: Include mainboard data.vbt
This adds a INTEL_GMA_VBT_HAVE_DATA_FILE Kconfig option for the path
to point to the mainboard dir and to select
INTEL_GMA_ADD_VBT_DATA_FILE by default.

Change-Id: I730cb0737945631e2d5379a9e26b8c039ec6dc49
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/26653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-06-06 14:58:11 +00:00
Patrick Rudolph a59333941b device: Only expose VGA_ROM_RUN on supported architectures
The yabel emulator depends on IO ports, that aren't available on
ARM and MIPS. Add additional dependencies to fix compilation errors
with the default configuration.

Change-Id: If0e28b356c01cb3ae0739a54aa3531a2acedbfbb
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/26754
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-06-04 08:24:33 +00:00
Kyösti Mälkki 2df1c124c4 device: Move find_dev_path() to device_const.c
Change-Id: I8a27aa7157b5706623272ba9354ed8dff9b8184f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/26446
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-05-25 02:45:17 +00:00
Nico Huber f6a4344c5b device: Move dev_find_path() to device_const.c
Make it available early and use it in dev_find_next_pci_device().

Change-Id: I1d0ad07f37ea79dae2b9a592fcccba5e03fd86d5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/26294
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2018-05-25 02:44:04 +00:00
Nico Huber 81ec9c0500 device: Rename device_simple.c --> device_const.c
In early stages (pre ramstage), we have two notions of devices.
To access the hardware, "simple device" handles are used. These
are plain numbers. To access the static information of the device
tree, we use `struct device` pointers. This is referred to as
DEVTREE_EARLY in the code.

This file is about the latter and its name reflects that the
tree remains unmodified.

Change-Id: I31aeb118615e86026f7111f83a7866d4e7426170
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/26293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-05-25 02:43:24 +00:00
Nico Huber 9129f1aae9 device: Always build device_simple.c for less code duplication
Change-Id: Iec0a11d67d7641996f26b3a01352be762006ebb6
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/26292
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-05-24 12:17:51 +00:00
Elyes HAOUAS e348066bd8 src/device: Get rid of device_t
Use of device_t has been abandoned in ramstage.
The function prototype for "struct device *add_cpu_device"
is already correct and doesn't need to be fixed.

Change-Id: I7bd8b93922f113bdaf7ba460acf6a7d62c4df013
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26067
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-22 07:24:23 +00:00
Elyes HAOUAS b7482219e8 device/device_util.c: Remove space after sizeof
Change-Id: Ic8b77c78739badbea398053944484a55f715d03d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-22 07:18:57 +00:00
Duncan Laurie bae9f85ddb devicetree: Add USB device type
This commit adds support for describing USB ports in devicetree.cb.
It allows a USB port location to be described in the tree with
configuration information, and ACPI code to be generated that
provides this information to the OS.

A new scan_usb_bus() is added that will scan bridges for devices so
a tree of ports and hubs can be created.

The device address is computed with a 'port type' and a 'port id'
which is flexible for SOC to handle depending on their specific USB
setup and allows USB2 and USB3 ports to be described separately.

For example a board may have devices on two ports, one with a USB2
device and one with a USB3 device, both of which are connected to an
xHCI controller with a root hub:

     xHCI
       |
    RootHub
    |     |
USB2[0]  USB3[2]

device pci 14.0 on
  chip drivers/usb/acpi
    register "name" = ""Root Hub""
    device usb 0.0 on
      chip drivers/usb/acpi
        register "name" = ""USB 2.0 Port 0""
        device usb 2.0 on end
      end
      chip drivers/usb/acpi
        register "name" = ""USB 3.0 Port 2""
        device usb 3.2 on end
      end
    end
  end
end

Change-Id: I64e6eba503cdab49be393465b535e139a8c90ef4
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/26169
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-05-11 08:59:51 +00:00
Elyes HAOUAS 1943f3798d {device,drivers,lib,mb,nb}: Use only one space after 'if'
Change-Id: I390191fb58605d1bd6a2e5d19a9dfa7c8493e6b2
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26063
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-09 13:11:04 +00:00
Nico Huber d4ac11f6fa Move `pci_ops_mmconf` from arch/x86/ to device/
MMConf is not architecture specific. We also always provide a
pci_bus_default_ops() now if MMCONF_SUPPORT is selected.

Change-Id: I3f9b403da29d3fa81914cc1519710ba7d1bf2bb5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/26062
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-08 03:01:35 +00:00
Nico Huber ea4d692d57 device/pci_ops: Remove unnecessary weak implementation
I doubt this is or will ever be referenced anywhere. And if, we
probably shouldn't return.

Change-Id: I3704fec694c5e5a9d5ff7d78d8bf2f23cf463e3c
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/26054
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-05-08 03:00:48 +00:00
Elyes HAOUAS 6e019d88ee device/root_device.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: Ia25c5097d4cfa979c18a855e656ad794c2f0260c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26008
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:18:38 +00:00
Elyes HAOUAS 69de055865 device/pci_class.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: I839533a33aa54df4efed3f372c6f88e79b0b559b
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26007
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:17:28 +00:00
Elyes HAOUAS b9e82f03b1 device/pcix_device.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: I14c0db71ffa5faa8321c88c9c75c0c18a70910e8
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26006
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:17:17 +00:00
Elyes HAOUAS 2f119a31f7 device/smbus_ops.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: I5eb858df7b69a7177564c883b81177ffadc63691
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26005
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:17:08 +00:00
Elyes HAOUAS e18cbea8f5 src/device/cardbus_device.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: I6f3efd8c9be7f9fb83b373fbee311b06cde54181
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26004
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:16:20 +00:00
Elyes HAOUAS b1fa2871c9 src/device/pciexp_device.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: I82b73e1698d8d44e32ad9f21e575a7fce35baa1c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26003
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:15:52 +00:00
Elyes HAOUAS b77cf628d1 src/device/pnp_device.c: Get rid of device_t
Use of `device_t` has been abandoned in ramstage.

Change-Id: Ic25d1eb3c7f0ed5b65aa1cf9e16c39415b7cd3c7
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26002
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-04 10:14:43 +00:00
Subrata Banik 564547f283 src/device: Fix discarded-qualifiers compilation issue
coreboot build is broken due to
CL: I6830a65bc9cea2907f4209bb97a53ccebcbf248d

This patch ensures to build coreboot successfully.

Change-Id: I4c9dfc9b19ce159ce1abcfbb287be4ce273cbaf1
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/25985
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-02 08:06:06 +00:00
Patrick Rudolph f5180a957a pci: Fix MMCONF_SUPPORT on non x86
Move x86 specific pci_bus_default_ops into arch/x86 folder.
Fixes compilation on platforms that do neither have MMCONF_SUPPORT
nor NO_MMCONF_SUPPORT (for example: all non-x86) but select PCI.

Change-Id: I0991ab00c9a56b23cd012dd2b8b861f9737a9e9c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25724
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-05-02 06:54:22 +00:00
Julius Werner 6dc7b220a3 software_i2c: Improve error behavior
This patch fixes a bug in the software_i2c (bitbang) framework where it
would previously not return an error when receiving a NACK on a write
transaction (deviating behavior from our hardware I2C drivers). It also
adds explicit error codes to be returned for the different kinds of
failure conditions so they are more useful for debugging when dumped.

Change-Id: Ie63bf35123d89dcd99a1f9c079d4cae6a33b0b09
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/25963
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-05-02 00:23:30 +00:00
Lubomir Rintel 9ba8f7c28e device: constify some variables
Change-Id: I6830a65bc9cea2907f4209bb97a53ccebcbf248d
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-on: https://review.coreboot.org/25873
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-04-30 06:22:13 +00:00
Nico Huber 570b183f7e device: Add flag to disable PCIe ASPM
For broken devices that spuriously advertise ASPM, make it possible to
decide ASPM activation in the device driver.

Change-Id: I491aa32a3ec954be87a474478609f0f3971d0fdf
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/25617
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-04-26 21:32:48 +00:00
Aaron Durbin 6403167d29 compiler.h: add __weak macro
Instead of writing out '__attribute__((weak))' use a shorter form.

Change-Id: If418a1d55052780077febd2d8f2089021f414b91
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-04-24 14:37:59 +00:00
Paul Menzel 484aa42403 device/oprom/yabel: Fix spelling of *successful*
Remove one *l* at the end.

Change-Id: Ife5af64b380dc5d31f22873f1639382d2bf9a5d9
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/25748
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-04-23 09:23:13 +00:00
Patrick Rudolph e56189cfd1 pci: Move inline PCI functions to pci_ops.h
Move inline function where they belong to. Fixes compilation
on non x86 platforms.

Change-Id: Ia05391c43b8d501bd68df5654bcfb587f8786f71
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25720
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-04-20 13:03:54 +00:00
Hal Tsai 551e1fe06f device/oprom/yabel: Fix vbe-buffer index in vbe.c
There's a issue about {VbeSignature to "VBE2" to indicate VBE 2.0+
request}, these indexes are counted wrong.

Change-Id: I8ec85df60076162518aa55a94fa7b66c0c2391ab
Signed-off-by: Hal Tsai <hal_tsai@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/25736
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-20 11:44:30 +00:00
Dan Elkouby 0c024208cd device/dram/ddr3: improve XMP support
- Fix offsets for supported CAS latencies
- Add support for reading CWL and CMD rate from the profile

Change-Id: Ie4f545ed1df92c146be02f56fea0ca9037478649
Signed-off-by: Dan Elkouby <streetwalkermc@gmail.com>
Reviewed-on: https://review.coreboot.org/25663
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>
2018-04-16 08:46:23 +00:00
Arthur Heymans 97b337b252 device/dram/ddr2.c: Add methods to compute to identify dram
DDR2 DIMMs are uniquely defined by SPD byte 64 till 72 and 93 till
98. Compute a crc16 over that data to provide a solid way to check
DIMM identify.

Reuse the crc16 function from ddr3.c to do this.

Change-Id: I3c0c42786197f9b4eb3e42261c10ff5e4266120f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/23345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-04-09 09:31:11 +00:00
Elyes HAOUAS ec19354b9a src/device/dram/ddr2: Fix supported burst lengths
Supported burst lengths are described at byte 16

Change-Id: I502710bdac7eec715b29febefd64be88e5a1b80a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/25098
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-03-14 11:17:42 +00:00
Martin Roth 5dd4a2a4b0 timestamps: Add timestamps around the vbios load & init
Add timestamps before and after the vBIOS load and after the vBIOS
run.  This lets us see exactly how long it took to load it from the
ROM chip, and how long it takes to run.

BUG=b:64549506
TEST=Build & boot Grunt, see vBIOS load & initialization times.

Change-Id: I878ba653eb086ad6c6614aa08a6d3fe216a9323e
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/25018
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-03-08 18:14:54 +00:00
Arthur Heymans fc31e44e47 device/ddr2,ddr3: Rename and move a few things
In order for ddr2.h and ddr3.h to be included in the same file it
cannot have conflicting definitions, therefore rename a few things and
move some things to a common header.

Change-Id: I6056148872076048e055f1d20a60ac31afd7cde6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/23717
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-02-22 10:07:53 +00:00
Subrata Banik 5f1da55b49 device: Include devicetree in SMM stage
Allow bootblock to get access to the entire static device tree
as other stages can access independently.

TEST=SMM code now can access devicetree.cb variables.

Change-Id: I59537c16f0a459e48d8b1efb5c1b196302f13381
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/23823
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-02-22 09:55:19 +00:00
Arthur Heymans 4ad1f7d67e Add a default path for vbt.bin
FSP_GOP needs a vbt.bin to work but before this patch it was able to
build with the default configuration which was an empty path for
vbt.bin.

To make Jenkins happy don't select FSP_GOP by default, at least until
all boards have the proper vbt blobs in the blobs repo.

Change-Id: Ibc36d6d4dd1a56c53819b169e6f4799ce3c23e03
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/23290
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-02-01 18:57:28 +00:00