Commit Graph

22774 Commits

Author SHA1 Message Date
Philipp Deppenwiese c9b7d1fb57 security/tpm: Fix TCPA log feature
Until now the TCPA log wasn't working correctly.

* Refactor TCPA log code.
* Add TCPA log dump fucntion.
* Make TCPA log available in bootblock.
* Fix TCPA log formatting.
* Add x86 and Cavium memory for early log.

Change-Id: Ic93133531b84318f48940d34bded48cbae739c44
Signed-off-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/29563
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-03-07 12:47:01 +00:00
Maxim Polyakov 7a732b4781 soc/intel/skylake: Add H110 PCH series
This patch adds support H110 chipset (Sunrise Point) for Skylake and
Kaby Lake processor families by adding the corresponding IDs. It has
been tested on ASRock H110M-DVS motherboard (Skylake i5-6600 CPU).

Change-Id: I85ba65ac860687b0f9fd781938e5cac21a1b668d
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31602
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 20:06:48 +00:00
Maxim Polyakov 46e6852062 soc/intel/skylake: Add new Northbridge and IGD IDs
This patch adds support
1) Intel(R) Xeon(R) E3 - 1200/1500 v5/6th Gen Intel(R) Core(TM) Host
Bridge/DRAM Registers - 191F;
2) HD Graphics 530 Skylake GT2 - Intel integrated graphics processor
https://en.wikichip.org/wiki/intel/hd_graphics/530.

This is required to run coreboot on the Intel Core i5-6600 (Skylake)
desktop processor. It has been tested on ASRock H110M-DVS motherboard.

Change-Id: If47e9ac32813a9f73d3a23f44536f60d1003971d
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31601
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 20:06:24 +00:00
Frans Hendriks 9126169419 soc/intel/braswell/include/soc/spi.h: Add OPTYPE values
Add SPI_OPTYPE_XXX values for the SPI controller.

BUG=N/A
TEST=flashrom on Facebook FBG-1701

Change-Id: Id183d68b3a80b2e7ab1a0685580d79ca327db03a
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31712
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2019-03-06 20:06:02 +00:00
Frans Hendriks 3397386399 soc/intel/braswell/include/soc/pci_devs.h: Add PUNIT_DEV
Intel Braswell P-UNIT is missing in pci_devs.h
Add PUNIT device, function and device ID

BUG=N/A
TEST=Facebook FBG-1701 booting Embedded Linux

Change-Id: I80c87c8964b3ba830571e0c03c424b67729a0c1a
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31711
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 20:04:23 +00:00
Elyes HAOUAS 89989cf61f src: Drop unused include <arch/acpi.h>
Change-Id: I1f44ffeb54955ed660162a791c6281f292b1116a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31715
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2019-03-06 20:03:55 +00:00
John Su c2209e4bef mb/google/poppy/variants/nami: Use Pantheon VBT
Add new Pantheon sku-id for loading vbt-pantheon.bin

BUG=b:78663963
BRANCH=firmware-nami-10775.B
TEST=Boots to OS and display comes up.

Change-Id: Icd56905e1e04de6f307393ae23f741b93ff23a4c
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31747
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 20:03:15 +00:00
Jett Rink f8edeffe6b mb/google/sarien: add ish firmware_variant field to _DSD
We want to publish "arcada_ish.bin" as the fw name for Integrated
Sensor Hub (ISH) so the kernel shim loader code can use it to
construct the correct path in /lib/firmware/intel for the firmware
load process.

BUG=b:122722008
TEST=Verify that shim loader CLs use new value when constructing
firmware path

Change-Id: I6299de82566a3bad8521f8158bb047d5c1ff0cf8
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31683
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-03-06 20:02:06 +00:00
Jett Rink 6bdfc8027b driver/intel/ish: add ish chip driver support
We want to be able to specify the firmware variant suffix
in the devicetree.cb configuration for particular firmware
builds. This driver allows us to specify the firmware_variant
property in the device tree and have it populate a _DST table
in the SSDT ACPI table for the ISH device, thus making the
suffix available to the kernel (See crrev.com/c/1433482 for kernel
change that uses the value)

BUG=b:122722008
TEST=decompile DDST table and verify that new firmware-variant value
is present. Also verfied that kernel can access this new field using
the shim loader kernel CLs

Change-Id: Id8be986185282521aee574027503eaf8968e1508
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31682
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-03-06 20:01:58 +00:00
Patrick Rudolph 4e8dee51e3 arch/x86: Prepare GDT for x86_64
Make GDT a separate table and don't reuse GDT descriptor as unused
first field of GDT.

Required for separate x86_64 GDT descriptor, pointing to the same
GDT.

Tested on qemu.

Change-Id: I513329b67d49ade1055bc07cf7b93ff2e0131e0b
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31769
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 20:00:55 +00:00
Subrata Banik 57b4ec6bd3 vendorcode/intel/fsp/fsp2_0/cml: Update FSP header files for Cometlake
Update header files for FSP for cometlake platform version 1065

Change-Id: I7be7535975b442490cc77c9c1dca4ef7a2d43a58
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31764
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2019-03-06 20:00:15 +00:00
Alexey Kharlamov 93d6ba0889 ec/lenovo/h8: Implement ACPI methods to set battery thresholds
There are two known reverse-engineered ways to manage battery
thresholds.
This patch implements them and adds a way to enable them for
different mainboards.

Tested on W530 with 4.18.3-gentoo kernel and X220 with 4.20.11.
Works fine with new Linux userspace API for controlling battery
thresholds, available since 4.17.
(/sys/class/power_supply/BAT0/charge_(start|stop)_threshold).

The new API is supported by TLP (you might need to set NATACPI_ENABLE=1
in /etc/tlp.conf).

tpacpi-bat works fine too.

Signed-off-by: Alexey Kharlamov <der@2-47.ru>
Signed-off-by: Evgeny Zinoviev <me@ch1p.com>

Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/23178
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-03-06 20:00:00 +00:00
Kyösti Mälkki b697c90a4c nb/intel/sandybridge: Reserve CAR region with !NATIVE_RAMINIT
Fail builds if MRC blobs pool heap would get corrupted
by CAR relocatable data from coreboot proper.

Add runtime logging how much pool was required.

Change-Id: Ibc771b592b35d77be81fce87769314fe6bb84c87
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31150
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 19:58:49 +00:00
Elyes HAOUAS c77ebc60cf mb/siemens/{mc_apl1,mc_tcu3}: Fix typo on "Display"
Change-Id: I58ecd95a8427eba87611dd8ea4616aedbb1d01c9
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31761
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-03-06 19:57:25 +00:00
Kyösti Mälkki 503d3247e4 Remove DEFAULT_PCIEXBAR alias
The other DEFAULT_ entries are just immediate
constants.

Change-Id: Iebf4266810b8210cebabc814bba2776638d9b74d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-03-06 11:54:17 +00:00
Kyösti Mälkki e079e5ccc2 device/pci_ops: Inline PCI config accessors for ramstage
Inlining here allows the check for (dev != NULL) to be
optimised and evaluated just once inside the calling
function body.

Change-Id: I0b5b4f4adb8eaa483a31353324da19917db85f4a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31751
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-03-06 11:53:56 +00:00
Kyösti Mälkki ad7758ca52 device/pci_ops: Change ramstage PCI accessor signatures
This reduces parameter passing and visibility of
parsing struct *dev to PCI bus:dev.fn.

Change-Id: Ie4232ca1db9cffdf21ed133143acfb7517577736
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31750
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-03-06 11:44:06 +00:00
Kyösti Mälkki 6fefdfd106 device/pci_ops: Simplify logic for PCI bus ops
Nobody ever sets ops_pci_bus. This implies pci_bus_ops() always
returns pci_bus_default_ops() and get_pbus returns NULL.

Change-Id: Ia30d579e1efe6542dc58714f2e7077507847c0de
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31684
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-06 11:39:57 +00:00
Kyösti Mälkki e459a89f0f soc/intel: Use simple PCI config access
Call the simple PCI config accessors directly.

Change-Id: I2c6712d836924b01c33a8435292be1ac2e530472
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31749
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-03-06 11:38:20 +00:00
Kyösti Mälkki c8b4d217d0 sb/amd: Use simple PCI IO config access
Call the simple PCI config accessors directly.

Change-Id: I4aa0669179d6b01ab0713fd2a8b3cf4baf6e572f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31748
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-03-06 11:38:10 +00:00
Krystian Hebel 6d81b15bbe superio/ite/it8613e: add support for ITE IT8613E
This change adds support for the SuperIO chip IT8613E. This chip uses
FANs 2-5 and has SmartGuardian always enabled (no ON/OFF control) so
it relies on support in common ITE code. LDNs were taken from IT8613E
Preliminary Specification V0.3.

Change-Id: I73c083b7019163c1203a5aabbef7d9d8f5ccb16a
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-03-06 11:27:49 +00:00
Julius Werner 175aa69639 intel/apollolake: Fix incorrect config usage
This IS_ENABLED(XXX) line should've clearly been IS_ENABLED(CONFIG_XXX).
This patch can fix that. However, I don't have (and don't plan to
acquire) an affected system to test, so approve at your own risk (or
let me know if I should just remove that check instead).

Change-Id: I79a0fca65853798ee45c3779b437864ba3cf2b1e
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2019-03-06 01:15:10 +00:00
Julius Werner c8aed48127 x86/car: Fix incorrect config usage
This IS_ENABLED(XXX) line should've clearly been IS_ENABLED(CONFIG_XXX).
This patch fixes the issue. Not tested on a real board, but looking at
the affected code paths suggests that this will result in no effective
change anywhere (since CAR should already be torn down by the time this
is called on FSP1.0 boards, so do_car_migrate_variables() would have
immediately exited anyway).

Change-Id: I74e0ed4d04471ee521ff5c69a74a6f4c949e5847
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31744
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-03-06 01:14:57 +00:00
Hung-Te Lin e5861828ee mainboard: Enable PRESERVE flag in all vboot/chromeos FMD files
For Chrome OS (or vboot), The PRESERVE flags should be applied on
following sections:
 RO_PRESERVE, RO_VPD, RW_PRESERVE, RW_ELOG, RW_NVRAM, RW_SMMSTORE,
 RW_VPD, RO_FSG (b:116326638), SI_GBE (chromium:936768),
 SI_PDR (chromium:936768)

With the new PRESERVE flag, we don't need RO_PRESERVE and RW_PRESERVE in
the future. But it's still no harm to use it if there are multiple
sections all needing to be preserved.

BUG=chromium:936768
TEST=Builds google/eve and google/kukui inside Chrome OS source tree.
     Also boots successfully on eve and kukui devices.

Change-Id: I6664ae3d955001ed14374e2788d400ba5fb9b7f8
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31709
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-03-05 20:52:06 +00:00
Arthur Heymans 65200f0746 mb/qemu-{i440fx,q35}: Use POSTCAR stage to load the ramstage
Qemu does not have a real CAR but postcar stage is still useful
for testing the stage.

The postcar stage is also mandatory for x86_64 to setup
pagetables for x86_64 ramstage.

Do not set up MTRRs, as qemu ignores them anyways.

Tested on qemu-i440fx and qemu-q35.

Change-Id: I6638534d99fde312e55b6a6be8c95e4cb25cca80
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/30499
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-03-05 19:35:37 +00:00
Kyösti Mälkki 7362768c50 arch/io.h: Drop includes in fam10 romstages
These files suffer from .c includes.

Change-Id: Id836595290922fcbd108a5ed576fc640b2530711
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31696
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-05 16:19:37 +00:00
Frans Hendriks b27fb330c4 soc/intel/braswell: Add SMBus support
Intel Braswell SoC contains SMBus controller but no support
is available for this controller.
This controller is compatible with the Intel SMBus support in the
southbridge common directory.

To be able using smbus support from the Intel common directory
the smbus.c is moved outside SOUTHBRIDGE_INTEL_COMMON
dependency block.
Use SOUTHBRIDGE_INTEL_COMMON_SMBUS to include support.

BUG=N/A
TEST= Facebook FBG-1710 LCD panel

Change-Id: Ie3d4f657558a1aed21b083ef5cad08ea96e629c3
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31661
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-03-05 12:23:56 +00:00
Casper Chang 80b0c6458a mb/google/sarien/variants/arcada: Add GPIO H15 to enable BT
Follow b:123342945 to add GPIO H15(BT_RADIO_DIS#).

BUG=b:123342945
TEST=Verified BT function on Arcada DVT1 system

Signed-off-by: Casper Chang <casper_chang@wistron.corp-partner.google.com>
Change-Id: I260a2312d47385da3c7ec215267ff63ada04f2c5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31705
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-03-05 08:28:20 +00:00
Seunghwan Kim 7c2b50894c mb/google/octopus: Add 6GB dual-channel memory configuration
Add 6GB dual-channel memory configuration for future use.

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

Change-Id: I36d6c704ac6708b29cc570a2209eeb32de6148b3
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31460
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-05 04:50:59 +00:00
Kyösti Mälkki 3ee8b750f4 arch/io.h: Separate MMIO and PNP ops
Change-Id: Ie32f1d43168c277be46cdbd7fbfa2445d9899689
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31699
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 15:59:23 +00:00
Kyösti Mälkki 3855c01e0a device/pnp: Add header files for PNP ops
Change-Id: Ifda495420cfb121ad32920bb9f1cbdeef41f6d3a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31698
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 15:58:55 +00:00
Kyösti Mälkki 3695593794 Fix indirect include for endianess
The function (preprocessor macro) we need is defined
in <endian.h> not <swab.h>.

Change-Id: I3a86c7050bf853e3a56a15421132240e19f40912
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31704
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 15:58:16 +00:00
Kyösti Mälkki 13f66507af device/mmio.h: Add include file for MMIO ops
MMIO operations are arch-agnostic so the include
path should not be arch/.

Change-Id: I0fd70f5aeca02e98e96b980c3aca0819f5c44b98
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31691
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 15:57:39 +00:00
Kyösti Mälkki 065857ee7f arch/io.h: Drop unnecessary include
Change-Id: I91158452680586ac676ea11c8589062880a31f91
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31692
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 15:08:03 +00:00
Kyösti Mälkki bdaec07a85 arch/io.h: Add missing includes
Fixes indirect includes that would break with followup work.

Change-Id: I37ca01b904a0b422a4d09475377e755e167a6ab3
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31697
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-03-04 14:07:46 +00:00
Kyösti Mälkki 3e6913b389 arch/io.h: Fix PCI and PNP simple typedefs
Provide clean separation for PCI and PNP headers,
followup will also move PNP outside <arch/io.h>.

Change-Id: I85db254d50f18ea34a5e95bc517eac4085a5fafa
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31690
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-03-04 14:07:23 +00:00
Kyösti Mälkki e132d5711d Fix <io.h> includes
These resolved to <device/oprom/include/io.h> which
included <arch/io.h> that we really wanted.

Change-Id: I9aa0bdf34cd1d53e20b4494c7986f0878f4fd840
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31693
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 14:06:57 +00:00
Duncan Laurie 71a652c774 mb/google/sarien: Enable MAC address passthru support
Enable the support for providing a MAC address for a dock to use based on
the VPD values set in the platform.

BUG=b:123925776
TEST=tested on sarien by setting VPD values and observing the string
returned by the AMAC() method:

> vpd -i RO_VPD -s "ethernet_mac0"="AA:AA:AA:AA:AA:AA"
> vpd -i RO_VPD -s "dock_mac"="BB:BB:BB:BB:BB:BB"

1) Test with no policy set, returns "dock_mac"
ACPI Debug:  "VPD region RW did not verify"
ACPI Debug:  "Found VPD KEY dock_mac = BB:BB:BB:BB:BB:BB"
ACPI Debug:  "MAC address returned from VPD: BB:BB:BB:BB:BB:BB"
ACPI Debug:  "AMAC = _AUXMAC_#BBBBBBBBBBBB#"

2) Test with policy set to "builtin", returns nothing
> vpd -i RW_VPD -s "dock_passthru"="builtin"
ACPI Debug:  "Found VPD KEY dock_passthru = builtin" [AMAC returns Zero]

3) Test with policy set to "ethernet_mac0"
> vpd -i RW_VPD -s "dock_passthru"="ethernet_mac0"
ACPI Debug:  "Found VPD KEY dock_passthru = ethernet_mac0"
ACPI Debug:  "Found VPD KEY ethernet_mac0 = AA:AA:AA:AA:AA:AA"
ACPI Debug:  "MAC address returned from VPD: AA:AA:AA:AA:AA:AA"
ACPI Debug:  "AMAC = _AUXMAC_#AAAAAAAAAAAA#"

4) Test with policy set to "dock_mac"
> vpd -i RW_VPD -s "dock_passthru"="dock_mac"
ACPI Debug:  "Found VPD KEY dock_passthru = dock_mac"
ACPI Debug:  "Found VPD KEY dock_mac = BB:BB:BB:BB:BB:BB"
ACPI Debug:  "MAC address returned from VPD: BB:BB:BB:BB:BB:BB"
ACPI Debug:  "AMAC = _AUXMAC_#BBBBBBBBBBBB#"

Change-Id: I90474e264cc433c0fd1a4b0dbaf98e5f74180d54
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31670
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2019-03-04 14:06:16 +00:00
Duncan Laurie 57d5e47694 vendorcode/google/chromeos: Support MAC address passthru policy
This change adds support for providing a MAC address that can be used
by the OS network drivers to change the MAC address that a NIC uses.

The Realtek r8152 driver in the Linux kernel supports a MAC address
passthru feature which can result in the dock ethernet port using the
same MAC address that is assigned to the internal NIC.  This is done
by calling an ACPI method at \_SB.AMAC() which returns a formatted
string containing the MAC address for the dock to use.

The Linux kernel implementation can be found at
drivers/net/usb/r8152.c:vendor_mac_passthru_addr_read()

This is implemented specifically for Chrome OS as it relies on VPD
to determine the MAC address to supply.

The policy which controls where the dock MAC address comes from is
written into RW_VPD property "dock_passthru":
  "dock_mac" or empty: Use MAC address from RO_VPD value "dock_mac"
  "ethernet_mac0": Use MAC address from RO_VPD value "ethernet_mac0"
  "builtin": existing dock MAC address (return nothing)

The MAC address in VPD is the standard format AA:BB:CC:DD:EE:FF and
it must be converted into the string format expected by the OS which
involves some string manipulation which ACPI is not great at handling.

BUG=b:123925776
TEST=this was tested on a sarien board by setting the VPD keys to
their expected values and observing if the AMAC() method returns the
expected string.

Change-Id: I3335e5d924155431e299844e2aaace62168294e0
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31669
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2019-03-04 14:05:52 +00:00
Duncan Laurie 48532ee3c4 vendorcode/google/chromeos: Add support for reading VPD in ACPI
This ACPI device presents an interface that allows other ACPI devices
or methods to read VPD strings.  The VPDF() method is provided the
VPD partition to look in, and the name of the VPD key to find and it
will return the VPD string if it exists.

For example:  VPD.VPDF ("RO", "serial_number")

BUG=b:123925776
TEST=this was tested on a sarien platform by adding ACPI code that
searches for a VPD key and returns the value it finds, and then setting
that VPD string from the OS with the Chrome OS 'vpd' utility to ensure
the ACPI method returns the correct value.

Change-Id: I4668f66d7f7f364ac8c3b064d406b24135abb0f6
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31668
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2019-03-04 14:04:53 +00:00
Duncan Laurie cf8094cabb vendorcode/google/chromeos: Save VPD region into GNVS
Store the memory address of VPD region start and length for the memory
mapped RO_VPD and RW_VPD into GNVS so they can be used by ACPI code.

BUG=b:123925776
TEST=boot on sarien and verify VPD start/length in GNVS

Change-Id: I39073a9d78f5ff60bfe088860c087a5167f05fdf
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2019-03-04 14:04:46 +00:00
Rizwan Qureshi e0a0c63e09 soc/intel/cannonlake: Move common definitions to a header file
Move common definitions for PCH H and LP to a common header.

Change-Id: If47692ecb05134db1ee6c0fb10125d6a1b67f127
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/31621
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 14:02:28 +00:00
Jett Rink 088d2a3dad soc/intel/cnl/acpi: add ish ACPI device
Create the ISH ACPI device so we can hang fields off of a _DSD table.

Since this is also a PCI device that has run time probing, we can always
emit the ACPI device and let the device tree turn the device on or off.

BRANCH=none
BUG=b:122722008
TEST=verify that _DSD table gets publish under ISH device in kernel ACPI
tables. Also verified that device is still turned off if device tree for
ISH is off.

Change-Id: Ic0231f1ac637fea0e251eb3ac84f0fd8d64c12b2
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31681
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 14:01:38 +00:00
Lijian Zhao 59e5c80237 soc/intel/cannonlake: Fix DSDT compile remarks
The following remarks show up during cannonlake based platform coreboot
build:
dsdt.asl     55:  Offset (0x00),
Remark   2158 -          ^ Unnecessary/redundant use of Offset operator

dsdt.asl    136:   Offset (0xa8),
Remark   2158 -          ^ Unnecessary/redundant use of Offset operator

Address those two remarks in coreboot.

BUG=N/A
TEST=Build coreboot and check build log to see no more remark.

Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Change-Id: Iad660347b32d90ac1176654820375e30a21b5ffe
Reviewed-on: https://review.coreboot.org/c/31666
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2019-03-04 14:00:34 +00:00
Elyes HAOUAS 80505a6fef sb/intel/i82801gx: Remove unnecessary/redundant ACPI offset operator
Using ACPICA version 20180927 or greater, IASL detects Unnecessary/redundant
uses of the Offset() operator within a Field Unit list.
It then sends a remark "^ Unnecessary/redundant use of Offset".

Offsets refer to the current offset are unnecessary.
example:
    OperationRegion (OPR1, SystemMemory, 0x100, 0x100)
    Field (OPR1)
    {
        Offset (0),     // Never needed
        FLD1, 32,
        Offset (4),     // Redundant, offset is already 4 (bytes)
        FLD2, 8,
        Offset (64),    // OK use of Offset.
        FLD3, 16,
    }

We will have those remarks:
dsdt.asl     14:         Offset (0),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator

dsdt.asl     16:         Offset (4),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator

Change-Id: If53072c6a91dd794c70d1fab8697b1713d400fe8
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31672
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2019-03-04 13:58:11 +00:00
Elyes HAOUAS 2796b242b2 nb/intel/i945: Remove redundant use of ACPI offset operator
IASL version 20180927 and greater, detects Unnecessary/redundant uses of
the Offset() operator within a Field Unit list.
It then sends a remark "^ Unnecessary/redundant use of Offset"

example:
    OperationRegion (OPR1, SystemMemory, 0x100, 0x100)
    Field (OPR1)
    {
        Offset (0),     // Never needed
        FLD1, 32,
        Offset (4),     // Redundant, offset is already 4 (bytes)
        FLD2, 8,
        Offset (64),    // OK use of Offset.
        FLD3, 16,
    }

We will have those remarks:
dsdt.asl     14:         Offset (0),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator

dsdt.asl     16:         Offset (4),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator

Change-Id: Ie1f2a2ace335af7984209c9e286b9f85e5342a7e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31671
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-03-04 13:57:45 +00:00
Hung-Te Lin 4708612061 fmap: Add FMAP_AREA_PRESERVE
When updating firmware, we may need to preserve some sections like VPD,
calibration data, ... etc. The logic can be hard-coded in updater as a
list of known names, but a better solution is to have that directly
declared inside FMAP area flags.

To do that, the first step is to apply the changes in flash map
(http://crosreview.com/1493767). A new FMAP_AREA_PRESERVE is now
defined and will be set in future with new syntax in FMD parser.

BUG=chromium:936768
TEST=make; boots an x86 image.

Change-Id: Idba5c8d4a4c5d272f22be85d2054c6c0ce020b1b
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-03-04 13:25:01 +00:00
Puthikorn Voravootivat 6c36642c07 Revert "mb/google/poppy/variants/atlas: Update DPTF parameters"
This reverts commit 5e90ef8c35.

Reason for revert: The 1s interval causes early throttle in usage spike. (log in b/123895423#comment3)

BUG=b:113101335
BRANCH=None
TEST=learning from Nocturne

Change-Id: Id6467b51eb937b89b4c08641f36266544c8fa176
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31655
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2019-03-04 13:23:07 +00:00
Frans Hendriks b4f57bb3ca src/soc/intel/braswell/cpu.c: Set up local APIC
Local APIC was not configured.
Add setup_lapic() to configure the APIC.

BUG=N/A
TEST= Ubuntu 4.15.0 reports correct local APIC information
on Intel CherryHill CRB

Change-Id: Ic1da5b1bf235f34b957142e86c70a9dbfa3ded1d
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/29290
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2019-03-04 13:22:48 +00:00
Frans Hendriks 59ae2ef4c4 {src/include},{soc/intel): Configure HDA codecs
HDA support did not configure the codecs correclty.
Use Intel common block support to configure the codecs.

To use common Intel HDA support file hda.c file has been
removed and Braswell HDA device ID is added to list of
supported  PCI devices in intel/common/block/hda/hda.c.

CONFIG_SOC_INTEL_COMMON_BLOCK and
CONFIG_SOC_INTEL_COMMON_BLOCK_HDA  are enabled
to include hda.c in build.

When codec table is available at board level
SOC_INTEL_COMMON_BLOCK_HDA_VERB must be enabled
and a codec table must be supplied.

BUG=N/A
TEST=Facebook FBG-1701 ALC298 configuration

Change-Id: I5c23ec311e5b5a6dfd6f031aa19617407fe8ed63
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/29394
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>
2019-03-04 13:22:24 +00:00