Commit Graph

19729 Commits

Author SHA1 Message Date
John Su 77a30af41c soc/intel/skylake: check DPTF_TSR1_ACTIVE_AC* in _ACx methods
Because thermal table is not included the values of DPTF_TSR1_ACTIVE_AC
from internal nami/vayne thermal team. Add conditional compilation
in _ACx methods if DPTF_ENABLE_FAN_CONTROL is defined in the dptf.asl.

BUG=b:72974136
TEST=Match the result.

Change-Id: I4b593118ca460a59aa49786cb99df417d135112a
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/26210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-05-15 15:50:20 +00:00
Naveen Manohar 532b8d5f25 soc/intel/apollolake: add rt5682 NHLT support
Add APIs and required parameters for creating Realtek 5682 SSP
endpoint in NHLT table.

BUG=b:79235534
TEST=check that NHLT table defined is created properly.
With the series merged & required driver support in kernel.
Verify Headset Audio playback.

Change-Id: Ic26a0b881f77af64ba00fd714b08c0f17c0acb3d
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-on: https://review.coreboot.org/26057
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-15 15:49:29 +00:00
Martin Roth 5dbe8ee725 ACPI: Set the correct number of arguments in ACPI methods
These methods had unused arguments and could be corrected by
setting the correct number in the method initializer.

Change-Id: I86606cfa1c391e2221cee31994e83667fa9ead61
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26125
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-05-15 15:43:41 +00:00
Martin Roth 782c910e86 mainboard/amd/*: Remove unused arguments from SIOW ACPI method
Since the SIOW method doesn't use any arguments, don't pass it any,
and initialize it as not using any.

Change-Id: I3fa2ab8afb7d09c176a94bbd1db27587c36030cd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26126
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-05-15 15:42:13 +00:00
Samuel Holland c622dc5e82 superio/ite/it8720f: Implement power control
Program the Super I/O to turn the machine on or restore its power state
when AC power is restored.

Based on code from src/superio/nuvoton/nct5572d/superio.c.

Change-Id: I1f3432f43b0784c3696bf1d7233b83d3a203af20
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-on: https://review.coreboot.org/25463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-15 11:47:14 +00:00
Julien Viard de Galbert 9d217bf79a mb/scaleway/tagada: Set DIMM slot information from mainboard
This field is not provided by the soc code so add it.

TEST=Check the output of 'dmidecode -t memory'

Change-Id: I6fdf3520da62336a5c654575ed8d1f33eb4f4dc5
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/24912
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-15 11:44:34 +00:00
Paul Menzel 717ba74836 cbfs/payload type: Fix build warning and whitespace in name
Currently, adding a payload to CBFS using the build system, the warning
below is shown.

    W: Unknown type 'payload' ignored

Update payload type from "simple elf" to "simple_elf" and rename the
word "payload" to "simple_elf" in all Makefiles.

Fixes: 4f5bed52 (cbfs: Rename CBFS_TYPE_PAYLOAD to CBFS_TYPE_SELF)
Change-Id: Iccf6cc889b7ddd0c6ae04bda194fe5f9c00e495d
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/26240
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-15 11:20:45 +00:00
Paul Menzel 2b2f89565e mb/emulation/qemu-q35: Enable user option table support
It’s unclear why this option was commented out. Activate the line, and
copy the CMOS layout and defaults from qemu-i440fx.

TEST=Boot 2.11.1(Debian 1:2.11+dfsg-1ubuntu7) and see that nvramcui
     works. A changed value doesn’t survive a reboot though.

Change-Id: Ieef86f092d323c68a6d2d0cc6c04c395f743a935
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/26265
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-15 11:16:08 +00:00
David Wu bb0d839b68 mb/google/fizz: Add device index for dual LAN sku
Fix dual LAN sku can't inherit correct MAC from VPD setting.

BUG=b:77836343
BRANCH=Fizz
TEST=Program the mac address to VPD in shell
     vpd -s ethernet_mac0=<mac address1>
     vpd -s ethernet_mac1=<mac address2> && reboot the system.
     Ensure the MAC address was fetched correctly by ifconfig command.

Change-Id: Ic357a3f1435d6d08107520e40872f1003ef2edf3
Signed-off-by: David Wu <david_wu@quantatw.com>
Reviewed-on: https://review.coreboot.org/25587
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-15 11:15:05 +00:00
David Wu 9a0d9e072f drivers/net: Check "ethernet_mac" when the device index is 1
It is a special case for the Fizz firmware branch, when the device index
is 1, it will check "ethernet_mac" first and then "ethernet_mac0".

For single NIC: config.device_index = "1", maps to "ethernet_mac"
For multiple NICs: config.device_index = "1", maps to "ethernet_mac0"

BUG=b:77836343
BRANCH=Fizz
TEST=Add device index in device tree &&
     Program the mac address to VPD in shell
     vpd -s ethernet_mac=<mac address> or
     vpd -s ethernet-mac[0-9]=<mac address> && reboot the system.
     Ensure the MAC address was fetched correctly by ifconfig command.

Change-Id: I67fd2e999c8f9d8782f294fcafa84b8da970a3a6
Signed-off-by: David Wu <david_wu@quantatw.com>
Reviewed-on: https://review.coreboot.org/26051
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-15 11:14:54 +00:00
Elyes HAOUAS 07e77f13d4 sb/intel/i82371eb: Get rid of device_t
Use of device_t has been abandoned in ramstage.

Change-Id: Ie366a49045940747eb5cc1e38316cce31c5774cb
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26251
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-05-14 22:26:46 +00:00
Elyes HAOUAS 6f7e8dee58 nb/intel/fsp_sandybridge: Get rid of device_t
Use of device_t has been abandoned in ramstage.

Change-Id: Id3289c891e8a81c750fc3f5fad0fd16c0f2702fe
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26195
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-05-14 22:26:24 +00:00
Elyes HAOUAS 9749a85cb0 nb/intel/i945/raminit.c: Remove not necessary braces {}
Braces {} are not necessary for single statement blocks.

Change-Id: I2a2d8672fe3f53450dcfa53dc127b89b4aa6b75e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26201
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-05-14 22:25:02 +00:00
Ronald G. Minnich 60fd684698 cbfs_locate: Optionally return file type
In some cases callers want to know if a file
exists and, if so, what its type is.

Modify cbfs_locate so that if the pointer is non-NULL,
but has the value 0, the type of the file that
matches the name will be returned.

Change-Id: Ic1349d358c3054207ccbccf3825db56784327ad0
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/26279
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-14 21:54:15 +00:00
Julien Viard de Galbert 5a1f5400fb soc/intel/denverton_ns: Enable common code for CPU
Change-Id: Ib215aa17dd20112946b74a1b63ce8a735388873c
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/24927
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 21:03:43 +00:00
Julien Viard de Galbert f729cd0b40 mb/scaleway/tagada: Update gpio configuration to use intelblock
Update the gpio configuration structure to the intelblock format.
The resulting configuration is functionally similar (even if some
bits are not identical).

Change-Id: Ide515424c6e1b0cb560b52a7f12909f23fd41e06
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/25424
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 21:03:28 +00:00
Julien Viard de Galbert 3ac3a68eef soc/intel/denverton_ns: port gpio to intelblock
The intelblock code is common code already used by appololake and
cannonlake platform. The denverton platform also use a similar gpio
controller so the intelblock code can be used as well.

Change-Id: I7ecfb5a3527e9c893930149f7b847a41c5dd9374
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/24928
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 21:03:17 +00:00
Julien Viard de Galbert 7ebb6b0f00 soc/intel/denverton_ns + mb: Rename gpio configuration
In order to use the shared code in intelblock, this patch renames the
denverton specific implementation to not use the same names (for files
and types).

- rename pad_config to remove conflict with soc/.../intelblocks/gpio.h
- rename gpio.c, soc/gpio.h to not conflict with intelblock

Note: There is no functional change in this patch.

Change-Id: Id3f4e2dc0a118e8c864a96a435fa22e32bbe684f
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/24926
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 21:03:04 +00:00
Subrata Banik adc9bdb97a security/vboot: Remove redundent _verstage/_everstage/_verstage_size symbols
All those symbols are part of /include/symbols.h file hence
removing from /security/vboot/symbols.h

Change-Id: Id968186e28d6b772a1a6bca200a852407324d6e3
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/26274
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-05-14 16:24:28 +00:00
Patrick Rudolph f18c1b03fb pci: Fix compilation on non x86
* Introduce pci_devfn_t on all arch
* Add PCI function prototypes in arch/pci_ops.h
* Remove unused pci_config_default()

Change-Id: I71d6f82367e907732944ac5dfaabfa77181c5f20
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25723
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 13:53:30 +00:00
Patrick Rudolph 4576600dd2 superio/nuvoton: Add support for NPCD378
The NPCD378 can be found on at least:
* HP Compaq 8200
* HP Compaq 8300

The datasheet is not publicly available, as HP implements lots of
custom hardware. Add basic support for it, based on HP Compaq 8200.
The first eight LDNs seem to be standard nuvoton compatible, except for
LDN4, which is used to control front LED and power in ACPI S3.

LDN8 provides access to HP's proprietary HWM which is accessiable at the LDN's
IOBASE with a size of 0x100 bytes.
The HWM consists of 16 pages with each holding 0xff bytes. The pages can be
selected by writing the page index to IOBASE + 0xff.

TODO:
Reverse engineer the HWM to support fan control.

WARNING:
The remaining LDNs have been guessed and might be wrong!

The serial has been tested and is working.

Change-Id: Ib497fd41b88e9c159eeeffa69bc2bfdccee9cb38
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/25384
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 12:39:20 +00:00
Subrata Banik 3337497d2a cpu/x86: Add support to run function with argument over APs
This patch ensures that user can pass a function with given argument
list to execute over APs.

BUG=b:74436746
BRANCH=none
TEST=Able to run functions over APs with argument.

Change-Id: I668b36752f6b21cb99cd1416c385d53e96117213
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/25725
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-05-14 08:39:42 +00:00
Aaron Durbin 223fb436fe cpu/x86/mp: pass pointers to structures for AP callbacks
In order to extend the MP callback infrastructure prepare for
easier changes by making the AP callback get signalled by a
single pointer to a local variable on the signaller's stack.
When the APs see the callback they will copy the structure
to a local variable and then set the acknowledgement by
clearing out the slot.

The reading and writing to the slots were implemented using inline
assembly which forces a memory access and a compiler barrier.

BUG=b:74436746

Change-Id: Ia46133a49c03ce3ce0e73ae3d30547316c7ec43c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/26043
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 08:39:18 +00:00
Arthur Heymans e6cc21e262 nb/intel/x4x/raminit: DDR3 specific ODT
Change-Id: Ie32a008ce636b8eee6ed90c364978f7d37f4bfb2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19876
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 08:30:51 +00:00
Arthur Heymans 0d1c9b0e32 nb/intel/x4x: Add DDR3 rcomp
Change-Id: Ifef905f5115ffc826b1a355e54c4b1ca818e56fa
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19875
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 07:42:38 +00:00
Arthur Heymans 638240e98b nb/intel/x4x/raminit: Support programming initials DD3 DLL setting
Adapt the programming of initial DLL values for DDR3.

Change-Id: I67e48b4ae6f2076399133ba7b98ab1dfc0e0ab08
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/22993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-05-14 07:42:25 +00:00
Arthur Heymans 66a0f55c2e nb/intel/x4x/raminit: Support programming DDR3 timings
Also throws in some minor fixes like the wrong conditional for
bankmod and using real CAS when programming MCHBAR(0x248).

Change-Id: Ia2494684ec66d84d4dc27c6a6b425a33ace6e827
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19873
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-05-14 07:41:58 +00:00
Arthur Heymans 7a3a319e3a nb/intel/x4x/raminit: Make programming launch ddr3 specific
Adds nmode to the sysinfo struct as it is needed later on.

Change-Id: Ia2ca4a200a1c813b2133eb1004fbe248fa3de9ce
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19872
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 07:41:29 +00:00
Arthur Heymans 840c27ecfc nb/intel/x4x/raminit: Make programming crossclock support DDR3
A few values were wrong, but it does not seem to matter all that
much.

Change-Id: I86b70e06c81817854994b7feddf9f3638fd16198
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19871
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 07:41:11 +00:00
Arthur Heymans a2cc23169a nb/intel/x4x: Rename a things that are not specific to DDR2
This memory controller supports both DDR2 and DDR3 memory, yet many
functions have ddr2 in their name while not being ddr2 specific.
This patch renames those to avoid confusion.

Change-Id: Ib3d10014f530905155e56fc52706edb4ab9f5630
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19870
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-05-14 07:40:49 +00:00
Arthur Heymans 1848ba3b54 nb/x4x/raminit: Decode ddr3 dimms
Since this memory controller supports both DDR2 and DDR3 allow it to
decode both while making the dram type mutually exclusive.

Change-Id: I8dba19ca1e6e6b0a03b56c8de9633f9c1a2eb7d7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19869
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-05-14 07:40:26 +00:00
Arthur Heymans 701da39fb7 nb/intel/x4x/raminit: Fix programming dual channel registers
Some things in programming registers related to dual channel
interleaved operation were wrong.

This also adds some code that could in the future be used when me is
active and claims some memory for its UMA.

This also uses some more sensible variable names to clarify at least
some of the magic.

This fixes memtest86+ failing with some assymetric DIMM configuration.

TESTED on DG43GT: memtest86+ now succeeds on many more different DIMM
configuration setups (would instantly fail at addresses above 4G on
many configurations).

Change-Id: If84099d27100e57437bf214dc4cf975f67c2ea1f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/22914
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-05-14 07:40:08 +00:00
Kevin Cody-Little c09840020b agesa/hudson/southbridge: add acpi name reporting for lpc
Add an lpc_acpi_name function to report its namespace as "LIBR"
rather than some fallback value which seems to vary. This repair
is required for the LPC TPM device to register its presence
without blowing up the table and preventing the payload from
seeing the SATA device.

Before change (but after other similar change to PCI0), the
TPM device reported itself as:

\_SB.PCI0.LPC0.TPM

After change, the TPM device reports as:

\_SB.PCI0.LIBR.TPM

which is consistent with the tables AGESA generates.

Change-Id: Ifa3a0e386cc00062855331e5f9d1c00d6541c238
Signed-off-by: Kevin Cody-Little <kcodyjr@gmail.com>
Reviewed-on: https://review.coreboot.org/26205
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-05-14 07:39:08 +00:00
Kevin Cody-Little 06d23234f3 agesa/family16kb/northbridge: report acpi namespace
Add a function domain_acpi_name to return "PCI0", rather than
falling back to the parent' device's "\_SB" label. This repair is
required for the LPC TPM device to register its presence without
blowing up the table and preventing the payload from finding SATA.

Before change, the TPM device reported as:

\_SB.\_SB.LPC0.TPM

After change, the TPM device reports as:

\_SB.PCI0.LPC0.TPM

A separate change submission will correct "LPC0" as well.

Change-Id: I5e8d4715c9b42f50c84dd65818e4b0fdfc9d54f9
Signed-off-by: Kevin Cody-Little <kcodyjr@gmail.com>
Reviewed-on: https://review.coreboot.org/26204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-05-14 07:38:30 +00:00
Raul E Rangel b3e0220a7d timestamp: Increase max number of timestamps
I'm increasing the max because when AGESA tracing is enabled it will use
over 120 entries. I added some padding to the number incase more probes
are added. This only affects ramstage so the extra ram shouldn't matter.

BUG=b:64549506
TEST=boot on grunt and ran cbmem -t

Change-Id: I7a3d2d09c91c9e302d139e7f65fa9c85c4594de4
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/26234
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-14 07:37:40 +00:00
Raul E Rangel 8af20c6403 grunt: use stage cache when waking from S3
BUG=b:79154155
TEST=built and tested on grunt
31 entries total:

   0:1st timestamp                                     20,917
 900:calling AmdInitReset                              87,525 (66,608)
 901:back from AmdInitReset                            98,318 (10,793)
 902:calling AmdInitEarly                              99,165 (847)
 903:back from AmdInitEarly                            139,619 (40,454)
   5:start of verified boot                            156,301 (16,682)
 503:starting to initialize TPM                        156,697 (396)
 504:finished TPM initialization                       186,107 (29,410)
 505:starting to verify keyblock/preamble (RSA)        187,316 (1,209)
 506:finished verifying keyblock/preamble (RSA)        208,000 (20,684)
 507:starting to verify body (load+SHA2+RSA)           208,108 (108)
 508:finished loading body (ignore for x86)            273,238 (65,130)
 509:finished calculating body hash (SHA2)             290,364 (17,126)
 510:finished verifying body signature (RSA)           294,236 (3,872)
 511:starting TPM PCR extend                           295,071 (835)
 512:finished TPM PCR extend                           320,512 (25,441)
 513:starting locking TPM                              320,514 (2)
 514:finished locking TPM                              332,081 (11,567)
   6:end of verified boot                              332,083 (2)
  13:starting to load romstage                         332,187 (104)
   4:end of romstage                                   395,559 (63,372)
  10:start of ramstage                                 395,999 (440)
 916:calling AmdS3LateRestore                          396,135 (136)
 917:back from AmdS3LateRestore                        428,066 (31,931)
  30:device enumeration                                428,087 (21)
  40:device configuration                              434,640 (6,553)
  50:device enable                                     438,185 (3,545)
  60:device initialization                             439,565 (1,380)
  70:device setup done                                 453,326 (13,761)
 918:calling AmdS3FinalRestore                         454,363 (1,037)
 919:back from AmdS3FinalRestore                       455,520 (1,157)
  98:ACPI wake jump                                    467,541 (12,021)

Total Time: 446,624

Change-Id: I326e81d3c987130e258c616c7c66dd82ddc0d942
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/26219
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-14 07:34:51 +00:00
Ronald G. Minnich f3d99b6a65 program_loading: make types a mask, make unknown type a non-zero
This will allow loading of programs that are more than one type,
e.g. ramstage type might now be a stage or payload.

Further, unknown types of 0 are dangerous, make it a real value.

Change-Id: Ieb4eeb7c5934bddd9046ece8326342db0d76363c
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/26242
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-05-14 02:54:21 +00:00
Kevin Cody-Little c97b5af898 drivers/pc80/tpm: get ioport from pnp records
Had 0x2e hardcoded, which is often the SuperIO chip. Instead,
pull the port from the PNP tree generated from devicetree.cb,
where either 0x4e or 0x2e will be specified.

Change-Id: I4a92693f8acd3a1618cefcdf6b25eb22a727e20f
Signed-off-by: Kevin Cody-Little <kcodyjr@gmail.com>
Reviewed-on: https://review.coreboot.org/26203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-05-13 10:16:24 +00:00
Noah Glovsky 7f268eab78 mainboard/asus: Add license headers
Change-Id: I71e461b91f981368d4bd13631b868430d1fc5774
Signed-off-by: Noah Glovsky <noah.glovsky@watershedschool.org>
Reviewed-on: https://review.coreboot.org/14530
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-05-13 10:13:32 +00:00
xiinc37 8a2b7f31fb mainboard/hp: Add HP Elitebook 8770w
This is based on the code from the 8470p port. Tested on the quad
core/quad SODIMM version. This laptop uses discrete MXM 3.0b graphics
cards. Tested working with both Quadro K3000M and GTX 980M 8GB. The
laptop must be completely disassembled down to the motherboard to
perform the initial flash, subsequent flashes can be done internally
via flashrom. There is a simple mod that can be performed to make
subsequent external flashes easier in case of a brick, I'll put more
information on this on the wiki later. The lack of an MXM structure
built in to the firmware causes the GPU to enter a mode with nerfed
performance, there is a workaround though, I'll add this to the wiki
as well. I have no info on EHCI debugging.

Tested and working:
- memory: 4G+4G, 4G+4G+4G+4G
- Linux (Debian Stretch with kernel 4.9.0) booted from SeaBIOS payload
with graphics init disabled in coreboot. I allowed SeaBIOS to load the
VBIOS from the MXM.
- WLAN
- keyboard, trackpoint and touchpad
- USB
- serial port on dock
- fan control
- VGA
- DisplayPort
- Audio
- Both HDD SATA ports, ODD SATA, eSATA
- S3 with SeaBIOS 1.11, SERCON must be disabled
- Brightness and volume FN keys
- Mute and calculator hotkeys
- Status LEDs
- Bluetooth

Not working:
- GRUB2 as payload will freeze. Has something to do with at_keyboard
module. The built in keyboard requires this module to function though.
- Sleep FN key
- WiFi toggle and internet browser hotkeys
- S3 fails to resume (restarts) if the laptop is removed from AC power,
or gets unplugged and then plugged back in while suspended. Sleep
status LEDs remain normal during this process.

Change-Id: Ic4ff64e9cf0c7a51ac48ca2fe6fe8beab02e9f9a
Signed-off-by: Robert Reeves <xiinc37@gmail.com>
Reviewed-on: https://review.coreboot.org/23651
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-05-13 10:12:50 +00:00
Raul E Rangel 4c518e18e3 timestamp: Add timestamps for TPM communication
On grunt these operations combined take a little over 37ms.

BUG=b:64549506
TEST=built on grunt
 511:starting TPM PCR extend                           301,268 (598)
 512:finished TPM PCR extend                           326,710 (25,442)
 513:starting locking TPM                              326,716 (6)
 514:finished locking TPM                              339,517 (12,801)

Change-Id: I05cfb3d0f8463f073e329a035484a340546649e1
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/26218
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-13 10:08:42 +00:00
Kevin Cody-Little f5f552afcd superio/ite/it8623e: initialize the PWM fan controller
Copies the common/env_ctrl support code from the it8728f driver.

Tested on an ASUS AM1I-A using Linux 4.16.7-gentoo as payload,
and booting userspace without a kexec call.

Prior to this change, an error was given during boot:

it87 it87.656: Detected broken BIOS defaults, disabling PWM interface

After this change, the message is gone, and PWM fan control works
through the /sys/class/hwmon interface.

Change-Id: Id97c4ec19562e7c78308c5afe6ff7c938922c9e7
Signed-off-by: Kevin Cody-Little <kcodyjr@gmail.com>
Reviewed-on: https://review.coreboot.org/26224
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-12 20:32:27 +00:00
Furquan Shaikh c6141b9451 mb/google/poppy/variants/nami: Provide implementation of mainboard_vbt_filename
This change adds board-specific implementation of
mainboard_vbt_filename which returns "vbt.bin" by default. This is in
preparation to allow multiple vbt binaries to be added to single
image. More sku_id specific names will be added in follow-up CLs.

BUG=b:79396300

Change-Id: I3821d55bfbe9e5773bd2eb0b0003045a80158d8c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/26227
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-05-12 08:13:38 +00:00
Youness Alaoui d319b98279 purism/librem_bdw: Rename Broadwell baseboard from BDL to BDW
My bad, it seems the acronym for Broadwell is BDW, and not BDL, so
I'm renaming librem_bdl into librem_bdw and changing the KConfig
options accordingly.

Change-Id: I8e992aa3474863236adf8893fcbe37c1b801fa25
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/26237
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-11 18:23:48 +00:00
Aaron Durbin 44f80657fd drivers/intel/gma: honor vbt_size parameter to locate_vbt()
In 4a3956d7 (drivers/intel/gma, soc/intel/common: improve
cooperation) the vbt_size parameter was not honored leading to
the use of unitialized variables from the caller. Instead, keep
track of if the vbt is already loaded by using the size returned
from the load. If it's non-zero the vbt has been loaded.

BUG=b:79562868

Change-Id: Ia1c47f0d982fae74e0223922f83943c68a846aa9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/26236
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-11 18:16:13 +00:00
ren kuo f064c75ae2 mainboard/google/coral: Override VBT selection for epaulette
Current VBT setting for T8 is only 1ms which is under Innolux
N116BCA-EA1 panel's spec.

Modify T8 to 100ms.
(Innolux's panel's spec requires T8 needs to be greater than 80ms

BUG=b:78541692
BRANCH=master
TEST=emerge-coral depthcharge coreboot chromeos-bootimage
     Run on DUT and check panel sequence meets spec.

Change-Id: I5f9103aca7871095a828a74cd6a97e1951adb81f
Signed-off-by: Ren Kuo <Ren.Kuo@quantatw.com>
Reviewed-on: https://review.coreboot.org/26214
Reviewed-by: Ren Kuo <ren.kuo@quantatw.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-05-11 13:01:38 +00:00
ren kuo 88c9d98b64 mb/google/reef/variants/: Add new memory ID
Add a new RAM ID of memrory PN:MT53E512M32D2NP

BUG=b:78491470
TEST= emerge-coral coreboot chromeos-bootimage.

Signed-off-by: Ren Kuo <Ren.Kuo@quantatw.com>

Change-Id: I855702c2850887df74941e00da69322124557498
Reviewed-on: https://review.coreboot.org/26213
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Ren Kuo <ren.kuo@quantatw.com>
2018-05-11 13:01:15 +00:00
Iru Cai 056cbbe3f5 asrock/b75pro3-m: Add superio ACPI declarations
Without it the PS/2 keyboard doesn't work after booting into the OS.

Change-Id: Idcb0ea0779fcd5dfd6e0fbf33a532ecf0caec420
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/26131
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-11 09:14:19 +00:00
Youness Alaoui 0cf89bf20a purism/librem_bdl: Add support for Librem 15 v2
Adding new librem_bdl variant for the Librem 15 v2, which is very similar
to Librem 13 v1, with the following differences:
- SATA ports 0 and 1 instead of 0 and 3
- SATA DTLE IOBP value is 7 instead of 9 for port 0
- There is no LAN device
- There are two SODIMM slots, and DQs are interleaved
- USB ports are different

Change-Id: Ifaca382a540d085e6c919daa992a0fbd52643a5b
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/26184
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-11 09:09:20 +00:00
Youness Alaoui b799e0df3d purism/librem_bdl: Convert to variant setup
Convert the purism/librem13v1 to a variant setup, in
preparation for adding the librem15v2 board as a new variant.
The Librem 13 v1 and Librem 15 v2 are nearly identical, so
this minimizes new code to add support for the latter.

Also update the URL in board_info to an archive.org link.

Change-Id: I00bb82b9e895e2464ddaa92915c01ce0e35933a2
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/26183
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-11 09:08:18 +00:00