Commit Graph

19462 Commits

Author SHA1 Message Date
Renze Nicolai 282c832279 mainboard/ms7721: Add MSI MS-7721 (FM2-A57MA-E35)
Adds support for the MSI MS-7721 (FM2-A75MA-E35) motherboard.

Tested by building coreboot with:
 - VGA bios (needed for onboard video)
 - XHCI firmware
 - SeaBIOS payload

CPU: AMD A8-6500 APU
RAM: 2x 2GB Samsung M378B5673EH1

Confirmed booting using:
 - USB stick with Arch Linux (kernel 4.7.5)
 - Gentoo live CD from SATA dvd drive
 - Gentoo installation from SATA harddisk (kernel 4.4.26)

Change-Id: I757e011de01ca9f340fd524b10e7fa3f291d53e3
Signed-off-by: Renze Nicolai <renze@rnplus.nl>
Reviewed-on: https://review.coreboot.org/17495
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-11-22 05:19:06 +01:00
Renze Nicolai a688b7cb7b mainboard/ms7721: Copy files from "asus/f2a85-m" to "msi/ms7721".
This patch adds a copy of the Asus F2A85-M code with only minimal changes.
(to ensure that the code compiles)

A second commit will be published to remove the copied code parts that
don't apply to the MS-7221 and to make everything else actually work
on the MS-7221 board.

Change-Id: I1426c0876c7bfeb264231c0d338301133c721484
Signed-off-by: Renze Nicolai <renze@rnplus.nl>
Reviewed-on: https://review.coreboot.org/17494
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-11-22 05:18:34 +01:00
Kyösti Mälkki 809b5881a9 nb/intel/sandybridge/raminit: Do not log inside busy-wait loop
Time spent in printk() is highly unpredictable, depending of the
enabled consoles. If only CBMEM console is enabled, debugstring
is repeated tens of times, consuming preram_cbmem_console storage.

Change-Id: I2b0d9bd11c294d988a0eb84b90e77d5cc7f1f848
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17516
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-22 05:02:45 +01:00
Kyösti Mälkki ebc21d125f intel/sch: Switch to MMCONF_SUPPORT_DEFAULT
Untested, only affected board is iwave/iwRainbowG6.

Change-Id: Ie3c40ede85c9f89b54804dd2a411645be93911bf
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17528
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-22 04:17:03 +01:00
Kyösti Mälkki bac0fad408 Remove explicit select MMCONF_SUPPORT
Make MMCONF_SUPPORT selected with MMCONF_SUPPORT_DEFAULT.

Platforms that remain to have explicit MMCONF_SUPPORT are
ones that should be converted.

Change-Id: Iba8824f46842607fb1508aa7d057f8cbf1cd6397
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17527
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-22 04:15:11 +01:00
Kyösti Mälkki f748eb7ab7 intel FSP sandy/ivy: Move select MMCONF_SUPPORT
Note: Platforms have no MMCONF_SUPPORT_DEFAULT.

Change-Id: I8a02ea78957fca23b1cf161a00d5e3edda73d683
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17543
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-22 04:14:49 +01:00
Arthur Heymans c79ced0a68 mb/gigabyte/ga-g41m-es2l: Add MAX_CPU = 4 in Kconfig
This motherboard support Intel core 2 quads.

Before this change SeaBIOS was not usable, due to it crashing before it
got to load anything.

Change-Id: Ifdaaceace04f9ba0753aab2d3b05c0519367f91f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17537
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-11-22 02:00:52 +01:00
Arthur Heymans 5d0a93d5e7 mb/ga-g41m-es2l: Correctly configure PCI IRQ in ACPI
Obtained from vendor bios DSDT, under "Device (HUB0),
Name (_ADR, 0x001E0000)".

The schematics also indicate that the INTA-D are hardwired to these
PIRQ lines.

Change-Id: I8e1c6cb986a2b345a5e1fddd454c7fb12fb8256a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17099
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-21 23:58:15 +01:00
Martin Roth 53bd26f531 drivers/intel/fsp2_0: Check for NULL before using pointer
The cbmem routines pass back NULL on error.  Check for this before using
the pointer.

Addresses coverity issue 1365731 - Dereference null return value

Change-Id: I92995366ffb15afd0950b9a8bbb6fe16252b2c38
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17480
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-21 23:45:06 +01:00
Martin Roth ad6c885ce4 console/vtxprintf.c: cast precision to size_t for string length
If no maximum string length is specified, we're intentionally passing a
value of -1 to get the string length so that it's not limited.  This
makes checking tools unhappy, so actively cast it to size_t before
passing it into strlen to show that it's not an accident.

Addresses coverity issue 1129133 - Argument cannot be negative

Change-Id: I40f8f2101e170a5c96fcd39c217aa414f4316473
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17479
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-21 23:44:18 +01:00
Martin Roth 128c104c4d nb/intel: Fix some spelling mistakes in comments and strings
Change-Id: I4a8297397d878e38516c8df19dd311c7ef19ec06
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17478
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-21 23:43:54 +01:00
Brandon Breitenstein c6ec8dd1cb fsp2_0: implement stage cache for silicon init
Stage cache will save ~20ms on S3 resume for apollolake platforms.
Implementing the cache in ramstage to save silicon init and reload
it on resume. This patch adds passing S3 status to silicon init in
order to verify that the wake is from S3 and not for some other
reason. This patch also includes changes needed for quark and
skylake platforms that require fsp 2.0.

BUG=chrome-os-partner:56941
BRANCH=none
TEST=built for reef and tested boot and S3 resume path saving 20ms

Change-Id: I99dc93c1d7a7d5cf8d8de1aa253a326ec67f05f6
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/17460
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-21 23:43:28 +01:00
Marshall Dawson 5c325491ca util/inteltool: Fix bay trail ahci device
Use a unique bus/device/function if a bay trail LPC bridge was found.

TEST=Run on MinnowBoard MAX Turbot and customer's LynxPoint-LP.

Change-Id: Ib4b50aaf9817ac94f46c28925081540676226d84
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/17464
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21 23:38:40 +01:00
Martin Roth 8955d5572f util/amdfwtool: Wrap long lines, excluding comments
Change-Id: I35c4340cf14ca1609ce3bfcac78cc4e286eff34a
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/17326
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21 23:37:08 +01:00
Martin Roth cd15bc86f1 util/amdfwtool: Fix whitespace
Change-Id: I33e41b745e7ec55ed39d7125fc74b1619d28bb54
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/17325
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21 23:36:49 +01:00
Jonathan A. Kollasch 657d9cd548 smscsuperio: map interrupt in smscsuperio_enable_serial()
This is a stopgap for when you use SUPERIO_SMSC_SMSCSUPERIO and the
interrupt is unmapped at reset, but for whatever reason the chip is
inaccessible in smscsuperio/superio.c::enable_dev() and thus the
devicetree.cb IRQ information is not applied in ramstage and then
serial console output fails to work for more than the UART FIFO depth
in the OS.

Change-Id: I00998088975569516f7caeb7f4098b48fe437889
Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-on: https://review.coreboot.org/10807
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-11-21 22:42:28 +01:00
Paul Menzel 7f1df8c0c1 intel/i82801gx: Reorder spaces in output
Currently, the coreboot log of a Lenovo X60, not having any IDE devices
connected, there is a trailing whitespace in the output.

	[…]
	PCI: 00:1f.1 init ...
	i82801gx_ide: initializing...
	PCI: 00:1f.1 init finished in 11 usecs
	[…]

Reorder the whitespaces, so they are added when needed.

Change-Id: I640e514c89fe0246a847d1fd088def1c88e864f8
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/11870
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-11-21 22:23:59 +01:00
Michał Masłowski 1ae3bec087 lenovo/x200/board_info.txt: Add SOIC-8 to ROM package
Some X200 use a 4 MiB SOIC-8 flash chip.

Change-Id: Ie5bd359ef08cf1be369a026be376c21555d0ea18
Signed-off-by: Michał Masłowski <mtjm@mtjm.eu>
Reviewed-on: https://review.coreboot.org/8391
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-11-21 21:50:02 +01:00
Kyösti Mälkki 96874aebe3 AMD binaryPI: Drop commented code with bad PCI IDs
There is mismatch of VENDOR_ID_AMD with DEVICE_ID_ATI, also
the device IDs have not been defined.

Change-Id: I3076cb08e3181e7f86de38deb18f1661f037bc38
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17508
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-21 21:03:42 +01:00
Kyösti Mälkki d61d07bdd9 AGESA: Drop commented code with bad PCI IDs
There is mismatch of VENDOR_ID_AMD with DEVICE_ID_ATI, also
the device IDs have not been defined.

Change-Id: I0d85893169fe877e384746931605f563c50308b2
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17509
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-21 21:03:09 +01:00
Kyösti Mälkki d3af82ef44 AMD sb700: Fix PCI ID error
Broken since March 2010, looking for incorrect PCI VENDOR.

Change-Id: I1960aa168e59364ad962f00c81b67b8bdc5773ad
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17514
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-21 21:01:43 +01:00
Kyösti Mälkki 4596a64a61 AMD sb600: Fix PCI ID error
Broken since February 2008, looking for incorrect PCI VENDOR.

Change-Id: I6935683a8a7428ca9b2e90bcc0a090c3865ffd33
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17513
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-21 21:01:22 +01:00
Ronald G. Minnich 76a6586eef net/r8167: do net set bus msater enable
It's very dangerous to set bus master enable, and more so on
a NIC, where random broadcast packets can end up in memory
in unexpected ways.

If your kernel has trouble with the fact that we do not set
bus master enable, you need to fix your kernel.

Change-Id: If07fde7961ad80125567240cb43db036346bef97
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/17559
Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>
Tested-by: build bot (Jenkins)
2016-11-21 18:06:33 +01:00
Aaron Durbin ebbd12f8bc arch/x86: don't create new gdt in cbmem for relocatable ramstage
When running with relocatable ramstage, the gdt loaded from c_start.S
is already in CBMEM (high memory). Thus, there's no need to create
a new copy of the gdt and reload.

Change-Id: I2750d30119fee01baf4748d8001a672d18a13fb0
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17504
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21 16:45:10 +01:00
Nico Huber 4c002ac729 mb/siemens/sitemp_g1p1/cmos.layout: Re-add cmos_defaults_loaded
I guess it was dropped because its concept was misunderstood. The idea
is to always have it set to `Yes` in the cmos.default. Users can then
ack the loading of the defaults by setting it to `No`. If the defaults
ever get loaded again, they'll be notified by the default `Yes`.

Change-Id: I1aa6d75bd5aa153c7b11a6b74564272eaa7cc523
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17355
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-21 15:15:54 +01:00
Dennis Wassenberg 020a3ce90b ec/roda/it8518: Add another embedded controller
The embedded-controller interface of Roda's Ivy Bridge notebooks is
supposedly programmed by AMI.

Change-Id: I153d831fcea8a3132c7bd1927ff3b445d9a8e92c
Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17288
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2016-11-21 15:07:26 +01:00
Nico Huber c868fd16a7 drivers/usb: Add option for baudrate of FT232H UART
The maximum supported rate is 12MHz. Only tested with 4MHz though,
since I couldn't set anything higher on my Linux receiver. But that
works fine with another FT*232H as receiver, whoosh.

Change-Id: Ie39aa0170882ff5b4512f0349f6f86d3f0b86421
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17477
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-11-21 15:04:35 +01:00
Kyösti Mälkki 378d79eb30 device/dram/ddr3: Fix calculation CRC16 of SPD
Fix regression with commit:
   7dc4b84 device/dram/ddr3: Calculate CRC16 of SPD unique identifier

Misplaced parenthesis causes CRC check failure, potentially
rendering some platform unbootable.

Change-Id: I9699ee2ead5b99c7f46f6f4682235aae3125cca6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17550
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2016-11-21 02:21:17 +01:00
Ronald G. Minnich 4e793ec358 riscv: map first 4GiB of physical address space
o The first 4G of physical address space is now mapped at 0.
o The first 4G of physical address space is now mapped at 1 << 38.
o The first 2G of DRAM (2 - 4 GiB of physical address space)
  is now mapped at the top of memory save for the last 4K
  i.e. at 0xffffffff80000000, with SBI page at the very top.

Of these, we hope to remove the *most* of the
last one once the gcc toolchain
can handle linking programs that can run at "top 33 bits
of address not all ones (but bit 63 set)". The 4K mapping
of the top of the 64 bit address space will always remain,
however, for SBI calls.

Change-Id: I77b151720001bddad5563b0f8e1279abcea056fa
Reviewed-on: https://review.coreboot.org/17403
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2016-11-20 22:42:48 +01:00
Kyösti Mälkki e258b9a2d5 intel sandy/ivy: Improve DIMM replacement detection
When MRC cache is available, first read only the SPD unique
identifier bytes required to detect possible DIMM replacement.
As this is 11 vs 256 bytes with slow SMBus operations, we save
about 70ms for every installed DIMM on normal boot path.

In the DIMM replacement case this adds some 10ms per installed DIMM
as some SPD gets read twice, but we are on slow RAM training boot path
anyways.

Change-Id: I294a56e7b7562c3dea322c644b21a15abb033870
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17491
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2016-11-20 21:24:13 +01:00
Kyösti Mälkki 38cb82222c intel sandy/ivy: Skip SPD loading on S3 resume path
For S3 resume path SPD is only used for DIMM replacement detection.
As this detection already fails in the case of removal/insertion of
same DIMM, we can rely on cbmem_recovery() failure alone to force
system reset in case someone accidentally does DIMM replacements while
system is suspend-to-ram stage.

Skipping DIMM replacement detection allows skipping slow SPD loading,
thus reducing S3 resume path time by 80ms for every installed DIMM.

Change-Id: I4f2838c05f172d3cb351b027c9b8dd6543ab5944
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17490
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 21:23:32 +01:00
Kyösti Mälkki 4cb44e5645 intel sandy/ivy: Move SPD loading after TS_BEFORE_INITRAM
Take the timestamp before SPD loading takes place, for easier
comparison against MRC blob performance and followup changes
will optimize some of the slow SPD/SMBus operations.

Change-Id: I50b5a9d02d2caf4c63e1a4025544131a085b8fb6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17489
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 21:22:43 +01:00
Kyösti Mälkki fc5d85cc66 intel sandy/ivy: Change CRC used to detect DIMM replacement
Switch to use CRC of unique identifier section SPD[117..127],
remaining area of SPD data is ignored.

Change-Id: If4b43183f99f5f911ae6c311b43c29a72b9922e2
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17487
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2016-11-20 21:22:25 +01:00
Kyösti Mälkki 7dc4b84d8c device/dram/ddr3: Calculate CRC16 of SPD unique identifier
Specification allows for the unique identifier bytes 117..125
to be excluded of CRC calculation. For such SPD, the CRC
would not identify replacement between two identical DIMM parts,
while memory training needs to be redone.

Change-Id: I8e830018b15c344d9f72f921ab84893f633f7654
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17486
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 21:21:59 +01:00
Kyösti Mälkki c13d65c29b intel sandy/ivy: Increase XIP cache with USE_NATIVE_RAMINIT
Compiled romstage is over 64kiB and exceeded XIP_ROM_SIZE,
so it was not entirely set WRPROT cacheable.

Reduces first boot raminit (including training) time by 400ms.

Change-Id: I5c4cbf581fc845150f207087c1527338ca364f60
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17488
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 21:21:36 +01:00
Tim Chen 51e238d3b4 mainboard/google/reef: Update DPTF parameters provided from thermal team
Update the DPTF parameters based on thermal test result.

1. Update DPTF CPU/TSR0/TSR1/TSR2 passive/critial trigger points.
   CPU  passive point:61
   TSR0 passive point:120, critial point:125
   TSR1 passive point:46,  critial point:75
   TSR2 passive point:100, critial point:125

2. Update PL1/PL2 Min Power Limit/Max Power Limit
   Set PL1 min to 3W, and max to 6W
   Set PL2 min to 8W

3. Change thermal relationship table (TRT) setting.
   Change CPU Throttle Effect on CPU sample rate to 80secs
   Change CPU Effect on Temp Sensor 0 sample rate to 120secs
   The TRT of TCHG is TSR1, but real sensor is TSR2.
   Change Charger Effect on Temp Sensor 2 sample rate to 120secs
   Change CPU Effect on Temp Sensor 2 sample rate to 120secs

BUG=chrome-os-partner:60038
BRANCH=master
TEST=build and boot on electro dut

Change-Id: I7a701812cb45f51828a3cbb3343e03817645110e
Signed-off-by: Tim Chen <Tim-Chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/17466
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 16:32:53 +01:00
Patrick Rudolph 74163d61bf nb/intel/sandybridge/raminit: Fix disable_channel
Also memset info.dimm as it contains decoded SPD timings
used to calculate common timings.

Tested manually on Lenovo T420.

Change-Id: I659e5bc2a6cbadd9539931ee00ddea0a5253295f
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/17473
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-20 15:03:14 +01:00
Patrick Rudolph 45d6a5588a nb/intel/sandybridge/raminit: Find CMD rate per channel
No need to find the same CMD rate for all channels.
Allow different CMD rates for every channel.

Tested on Lenovo T420 with different modules on each channel.
No regressions found.

Change-Id: I7036275ae89335dd3549ec392fa64824355b3cbf
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/17472
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-20 15:02:55 +01:00
Patrick Rudolph 069018d69a nb/intel/sandybridge/raminit: Define registers
Use register names found on forums.corsair.com.
No functionality changed.

Change-Id: Ibaede39a24e8df1c4d42cb27986ab66174b7d45b
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/17400
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-11-20 15:01:30 +01:00
Patrick Rudolph f704754847 nb/intel/sandybridge/raminit: Get rid of fallback attempts
Locking the PLL again once it's locked doesn't work.
The MRC doesn't do this, for some reason.
Remove fallback attempts of lowering DDR frequency.

Change-Id: Iccb54fa7d7357a22182dd26bd5b49c4073c04dc9
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/17399
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-20 15:00:53 +01:00
Patrick Rudolph bec669685c nb/intel/sandybridge/raminit: Fix CAS Write Latency
As documented in DDR3 spec for MR2 the CWL is based on DDR frequency.
There's no to little difference for most memory modules operating at DDR3-1333.

It might fix problems for memory modules that operate at a higher frequency and
memory modules with low CL values should work even better.

Tested on Lenovo T420 with DDR3-1333 CL9 and DDR3-1600 CL11.
No regressions found.

Change-Id: Ib90b5de872a219cf80b4976b6dfae6bc02e298f4
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/17389
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-11-20 14:59:59 +01:00
Kyösti Mälkki 78c5f0cc02 arch/x86 GDT: Fix orphan debug output
On S3 resume path, CBMEM_ID_GDT already exists but we only printed
the final "ok" string. Always tell GDT is about to be moved.

Change-Id: Ic91c5389cf4d47d28a6c54db152c18541c413bc1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17500
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 03:10:32 +01:00
Kyösti Mälkki dfb2de80ec intel car: Move pre-ram stack guard lower
SPD data alone consumes 0x400 of pre-ram stack, so the guard was
initially set too high, printing spurious "smashed stack detected"
messages at end of romstage.

Use the same stack size as haswell.

Change-Id: I24fff6228bc5207750a3c4bf8cf34e91cf35e716
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17501
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-20 03:10:06 +01:00
Aaron Durbin 1f0ce3a80e commonlib/include: remove NEED_VB20_INTERNALS
vboot_handoff.c is the only place that needs the vb2 internals.
Provide it in the one place it is actually required instead of
pulling in the headers unnecessarily in common code. There is,
however, still a need to get the vb2 hashing types for a function
declaration.

Change-Id: I038fda68b1cd05fa2e66135158e5e2d18567563a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17475
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-11-19 16:57:27 +01:00
Aaron Durbin e35e695377 soc/intel/common/lpss_i2c: correct bus speed error
The wrong value was used for reporting an error when a requested
bus speed was made that isn't supported. Use the requested value.

Change-Id: I6c92ede3d95590d95a42b40422bab88ea9ae72a1
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17474
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-19 16:56:23 +01:00
Aaron Durbin bff8c5ec19 soc/intel/common/lpss_i2c: fix NULL dereference in error path
If the SoC clock speed is not supported there is supposed to
be an error printed. However, the value printed was wrong which
was dereferencing a NULL struct. Fix that.

Change-Id: I5021ad8c1581d1935b39875ffa3aa00b594c537a
Found-by: Coverity Scan #1365977
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17468
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-11-19 16:55:52 +01:00
Kyösti Mälkki e39a8a9c09 intel/sandybridge: Use romstage_handoff for S3
Don't use scratchpad registers when we have romstage_handoff
to pass S3 resume flag. Also fixes console log from reporting
early in ramstage "Normal boot" while on S3 resume path.

Change-Id: I5b218ce3046493b92952e47610c41b07efa4d1de
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17455
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-18 21:03:05 +01:00
Kyösti Mälkki bfca67078c intel/sandybridge post-car: Redo MTRR settings and stack selection
Adapt implementation from haswell to prepare for removal of HIGH_MEMORY_SAVE
and moving on to RELOCATABLE_RAMSTAGE. With the change, CBMEM and SMM regions
are set to WRBACK with MTRRs and romstage ram stack is moved to CBMEM.

Also fixes regression of slower S3 resume path after commit
   9b99152 intel/sandybridge: Use common ACPI S3 recovery

Skipping low memory backup and using stage cache for ramstage decreases
time spent on S3 resume path by 50 ms on samsung/lumpy.

Change-Id: I2afee3662e73e8e629188258b2f4119e02d60305
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15790
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-11-18 21:00:30 +01:00
Kyösti Mälkki de01136484 intel post-car: Increase stacktop alignment
Align top of stack to 8 bytes, value documented as FSP1.1 requirement.
Also fix some cases of uintptr_t casted to unsigned long.

Change-Id: I5bbd100eeb673417da205a2c2c3410fef1af61f0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17461
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-18 20:59:12 +01:00
Matt DeVillier b17f4e8d26 sb/lynxpoint: use hda_verb.c from VARIANT_DIR if applicable
Change-Id: Ie2d0cf573876694fe87edf2f6915a5cc26238940
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/17453
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-18 20:45:49 +01:00