Commit graph

2,310 commits

Author SHA1 Message Date
Patrick Rudolph
23b6fa43fe UPSTREAM: nb/intel: Deduplicate vbt header
Move header and delete duplicates.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id37925c750ace32dd41591f926614229c2b65f30
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 45a0dbc95c
Original-Change-Id: I0e1f5d9082626062f95afe718f6ec62a68f0d828
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/18903
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: coreboot org <coreboot.org@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/466050
2017-04-03 11:48:56 -07:00
Kyösti Mälkki
2642495281 UPSTREAM: AGESA: Introduce AGESA_LEGACY and its counterpart
We define AGESA_LEGACY as an implementation of mainboard
that has its romstage main completely under mainboard/
directory. We have learnt from other platforms this approach
has several downsides when it comes to making platform-wide
improvements.

We start by creating per-family romstage.c file, which
boards will gradually take into use by removing the
AGESA_LEGACY Kconfig option we here apply to all of them.

BUG=none
BRANCH=none
TEST=none

Change-Id: I3ff98b2ee71ee55883efe83372494d2181785388
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 967d94d626
Original-Change-Id: Id01931e185a023039a60af16a678de9966db8d65
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18619
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/462938
2017-03-30 05:29:58 -07:00
Arthur Heymans
8b696db45f UPSTREAM: nb/intel/sandybridge: Use DIV_ROUND_UP macro to select timings
This is a cosmetic change.

BUG=none
BRANCH=none
TEST=none

Change-Id: I4536ce41bad5c02a10d008b52df66819b0910bd2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 50db9c99be
Original-Change-Id: Iea4dd97e9d83594447427abd9f844e507b805192
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18960
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/462935
2017-03-30 05:29:56 -07:00
Julius Werner
af538017b2 UPSTREAM: vboot: Select SoC-specific configuration for all Chrome OS boards
Some Chrome OS boards previously didn't have a hardcoded vboot
configuration (e.g. STARTS_IN_BOOTBLOCK/_ROMSTAGE, SEPARATE_VERSTAGE,
etc.) selected from their SoC and mainboard Kconfig files, and instead
relied on the Chrome OS build system to pass in those options
separately. Since there is usually only one "best" vboot configuration
for a certain board and there is often board or SoC code specifically
written with that configuration in mind (e.g. memlayout), these options
should not be adjustable in menuconfig and instead always get selected
by board and SoC Makefiles (as opposed to some external build system).

(Removing MAINBOARD_HAS_CHROMEOS from Urara because vboot support for
Pistachio/MIPS was never finished. Trying to enable even post-romstage
vboot leads to weird compiler errors that I don't want to track down
now. Let's stop pretending this board has working Chrome OS support
because it never did.)

Change-Id: Ie50b79b1bb1acd10ed64332eaa763f0a6cb9ea17
Original-Change-Id: Ibddf413568630f2e5d6e286b9eca6378d7170104
Original-Reviewed-on: https://review.coreboot.org/19022
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Commit-Id: 1210b41283
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/462007
2017-03-29 13:43:05 -07:00
Paul Menzel
c256a420f0 UPSTREAM: nb/intel/i945: Fix SPD dumps
Currently the `break` further down is called unconditionally as the
brackets for the body of the if statement are missing. Add those.

BUG=none
BRANCH=none
TEST=none

Change-Id: I738178ea9f4f92fad237cfec23acad6af17995dd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b45bbb253f
Original-Change-Id: I34917a9877dcc882d880dedea689e1d72fe52888
Original-Found-by: Coverity (CID 1372941:  Control flow issues  (UNREACHABLE))
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18971
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/459504
2017-03-29 09:06:48 -07:00
Antonello Dettori
ed6ace5b27 UPSTREAM: northbridge/via/vx900: transition away from device_t
Replace the use of the old device_t definition inside
northbridge/via/vx900.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iaf6a189371992a2f6d391802c1bb714d29baf8ba
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 823f7bb962
Original-Change-Id: I04292a6b698a42a5c582eddcef7cf5a235e1a464
Original-Signed-off-by: Antonello Dettori <dev@dettori.io>
Original-Reviewed-on: https://review.coreboot.org/17317
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/459659
2017-03-25 03:51:12 -07:00
Arthur Heymans
d8e532cbfe UPSTREAM: nb/intel/i945: Fix errors found by checkpatch.pl
BUG=none
BRANCH=none
TEST=none

Change-Id: Id20a4c5f8c0f52dc19a52d0220f9b3092b7d491f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 70a8e34853
Original-Change-Id: Ic2dd40e73d4a4c091c5ce1f49bbf9ab4d013d7af
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18704
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/458637
2017-03-23 08:22:33 -07:00
Arthur Heymans
80441f223f UPSTREAM: nb/x4x: Move checkreset before SPD reading
It makes no sense to read SPDs if the system will reset anyway.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icc0587de64d04063c9203535a773ec1967604b23
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bb5e77c478
Original-Change-Id: Id2ad9b04860b3e4939a149eef6b619a496179ff8
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/17661
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/458348
2017-03-22 10:08:24 -07:00
Arthur Heymans
e9c234b89f UPSTREAM: nb/intel/x4x: Fix issues found by checkpatch.pl
BUG=none
BRANCH=none
TEST=none

Change-Id: Id8a55a04b884ac28c88aec0a6f0510f1c69f77b4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 70a1dda927
Original-Change-Id: Ie22b8bd5420f8c33df1866410af42ef41ad38362
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18694
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/458347
2017-03-22 10:08:24 -07:00
Arthur Heymans
9905ad23e1 UPSTREAM: nb/i945/gma.c: Refactor panel setup
This reuses some of gm45 code to set up the panel.

Panel start and stop delays and pwm frequency can now be set in
devicetree.

Linux does not make the difference between 945gm and gm45
for panel delays, so it is safe to assume the semantics of those
registers are the same.

The core display clock is computed according to "Mobile Intel 945
Express Chipset Family" Datasheet.

This selects Legacy backlight mode since most targets have some smm
code that rely on this.

This sets the same backlight frequency as vendor bios on Thinkpad X60
and T60.

A default of 180Hz is selected for the PWM frequency if it is not
defined in the devicetree, this might be annoying for displays that
are LED backlit, but is a safe value for CCFL backlit displays.

BUG=none
BRANCH=none
TEST=none

Change-Id: I86445ab53cb83bc5183fb998ca03e00b4746a33f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8e079000dc
Original-Change-Id: I1c47b68eecc19624ee534598c22da183bc89425d
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18141
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/457362
2017-03-20 10:33:11 -07:00
Patrick Rudolph
8d120a532b UPSTREAM: device/dram/ddr2: Add common ddr2 spd decoder
Decode DDR2 SPD similar to DDR3 SPD decoder to ease
readability, reduce code complexity and reduce size of
maintainable code.

Rename dimm_is_registered to spd_dimm_is_registered_ddr3 to avoid
compilation errors.

BUG=none
BRANCH=none
TEST=none

Change-Id: I2580a164627a0348da02aad6dbbe5311c442fe35
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6e53ae6f5c
Original-Change-Id: I741f0e61ab23e3999ae9e31f57228ba034c2509e
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/18273
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/452895
2017-03-10 10:54:48 -08:00
Paul Menzel
bf315a45d2 UPSTREAM: northbridge/intel/i440bx: Align code
BUG=none
BRANCH=none
TEST=none

Change-Id: I483868170597138f3cb3b2df9684cecb8d8f7163
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7c414e78cc
Original-Change-Id: Idd4127f7491524121b4b65c6fb9511e2c8159912
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18609
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/452889
2017-03-10 10:54:45 -08:00
Kyösti Mälkki
2db766f76b UPSTREAM: AGESA: Fix loop condition for eventlog read
Do not evaluate AmdEventParams if AmdReadEventLog() fails.

BUG=none
BRANCH=none
TEST=none

Change-Id: I50c67ec617a749e29aec51d353fa507b25be33aa
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 49b4a89323
Original-Change-Id: I2b8afe827ffe6757e64c00ab005d3bb8cc577321
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18611
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/452467
2017-03-10 10:54:36 -08:00
Kyösti Mälkki
afc9a7671d UPSTREAM: AGESA: Log if memory training result cannot be stored
A problem around CAR teardown time may result with missing
training results at the time we want to save them.

Record this in the logs for debugging purposes, it will
not be possible to use S3 suspend if this happens.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1be67747db636b92ddc7c38d2d851ce81b7b359d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 86690eb0a1
Original-Change-Id: Id2ba8facbd5d90fe3ed9c6900628309c226c2454
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18534
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-on: https://chromium-review.googlesource.com/452464
2017-03-10 10:54:35 -08:00
Stefan Tauner
d594911e1e UPSTREAM: nb/intel/nehalem/raminit.c: Refine broken comment
BUG=none
BRANCH=none
TEST=none

Change-Id: Ib190c91c0c947fb7bcfcf0e150d1cdf42918ebe4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f13bd41c50
Original-Change-Id: Ic5c92d9a2d8bb040a04602e5da2cd37a2ae8db95
Original-Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at>
Original-Reviewed-on: https://review.coreboot.org/18052
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/451618
2017-03-08 05:13:05 -08:00
Kyösti Mälkki
7777aca024 UPSTREAM: binaryPI platforms: Drop any ACPI S3 support
No board with binaryPI currently supports HAVE_ACPI_RESUME. For
platforms with PSP the approach is also very different from what
we previously had here.

Furthermore, s3_resume.[ch] files under cpu/amd/pi do not
distinguish between NonVolatile and Volatile buffers of S3 storage.
This means the Volatile buffer that is maintained and available in
CBMEM is unnecessarily copied to SPI flash. This has been fixed on
open-source AGESA directory, so development of S3 suspend support
with binaryPI is better continued with that.

Unfortunately there are further complications and indications that
open-source AGESA may have always had a low-memory corruption
issue. This has to be investigated separately before restoring
or claiming S3 is supported on binaryPI.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iaa3b5135ab114cd1e0dcd540ed8df3adee235dcf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 97a4b3edf0
Original-Change-Id: I81585fff7aae7bcdd55e5e95bc373e0adef43ef0
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18501
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-on: https://chromium-review.googlesource.com/451433
2017-03-08 05:13:02 -08:00
Kyösti Mälkki
c830f11111 UPSTREAM: AGESA fam10: Add missing include
The file is used for fam15.

BUG=none
BRANCH=none
TEST=none

Change-Id: I52a113c24020e70ae237a97661ced1310c6f6185
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3444a9d716
Original-Change-Id: I7cdf238a8f7be4bf79546bcfc3c9d05bd8986e3e
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18635
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-on: https://chromium-review.googlesource.com/451431
2017-03-08 05:13:01 -08:00
Kyösti Mälkki
a41716dc7f UPSTREAM: AGESA: Move heap allocator declarations
Definitions are not part of ACPI S3 feature, nor do
they require any AGESA headers so move them to a
better location.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icb4e2a24f724cf12b9891e9a73a5683972155994
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: da74041b2b
Original-Change-Id: I9269e9d65463463d9b8280936cf90ef76711ed4f
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18616
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-on: https://chromium-review.googlesource.com/451430
2017-03-08 05:13:01 -08:00
Paul Menzel
2389bb0b57 UPSTREAM: nb/amd/amdht: Use variable for function name
One very long line has to be wrapped to be shorter than 80 characters to
satisfy the lint scripts.

Note, that this gets rid of the brackets ().

BUG=none
BRANCH=none
TEST=none

Change-Id: I096cf6151a68e30a9b438d4b5526d72f0faacd94
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3329262eca
Original-Change-Id: Ie98eff360ebc5b68ce496edc15eb2d9fddcac868
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/18556
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/451358
2017-03-07 14:15:54 -08:00
Kyösti Mälkki
a79e481063 UPSTREAM: AGESA: Add agesa_helper.h header
These definitions do not require AGESA.h include,
and we will eventually remove agesawrapper.h files.

BUG=none
BRANCH=none
TEST=none

Change-Id: If0e0310f276c5d72fac69f959a935f0d4ac7aa76
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d610c5823c
Original-Change-Id: I1b5b78409828aaf2616e177bb54a054960c3869f
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18588
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/451271
2017-03-07 04:17:31 -08:00
Elyes HAOUAS
97f5780308 UPSTREAM: nb/i945: Clean "Programming DLL Timings" function
As we drive both channels with the same speed,
chan0dll and chan1dll are the same.

BUG=none
BRANCH=none
TEST=none

Change-Id: I64c2fe3d14c3f174448863ac37ac8ba21f09a369
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 44a3066015
Original-Change-Id: I7253ea9ea66396c536c82d63c67fecb041681707
Original-Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Original-Reviewed-on: https://review.coreboot.org/18472
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/450238
2017-03-06 07:04:36 -08:00
Ricardo Ribalda Delgado
067e4274df UPSTREAM: agesawrapper: Fix endless loop on bettong
AGESA AmdInitEarly() reconfigures the lapic timer in a way that
conflicts with lapic/apic_timer.

This results in an endless loop when printk() is called after
AmdInitEarly() and before the apic_timer is initialized.

This patch forces a reconfiguration of the timer after
AmdInitEarly() is called.

Codepath of the endless loop:

printk()->
  (...)->
    uart_tx_byte->
      uart8250_mem_tx_byte->
        udelay()->
          start = lapic_read(LAPIC_TMCCT);
                do {
                        value = lapic_read(LAPIC_TMCCT);
                } while ((start - value) < ticks);
         [lapic_read returns the same value after AmdInitEarly()]

BUG=none
BRANCH=none
TEST=none

Change-Id: I32003d5fc62bcd2a54a91dc536d0e43315642c28
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b2bb6ad2a7
Original-Change-Id: I1a08789c89401b2bf6d11846ad7c376bfc68801b
Original-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/17924
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/450237
2017-03-06 07:04:36 -08:00
Daniel Kulesz
422e80b453 UPSTREAM: Revert "nb/amd/mct_ddr3: Fix RDIMM training failure on Fam15h"
This reverts commit fec8872c9d.

The commit introduced a regression which is causing MC4 failures
when 8 RDIMMs are populated in a configuration with a single CPU
package. Using just 4 RDIMMs, the failure does not occur.

After reverting the commit, I tested configurations with
1 CPU (8x8=64GB) and 2 CPU packages (16x8=128GB) using an
Opteron 6276. The MC4 failures did not occur anymore.

BUG=none
BRANCH=none
TEST=none

Change-Id: I0a508bff03899c8b7bd7429bce653a7bea94bef0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 610d1c67b2
Original-Change-Id: Ic6c9de84c38f772919597950ba540a3b5de68a65
Original-Signed-off-by: Daniel Kulesz <daniel.ina1@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18369
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>
Reviewed-on: https://chromium-review.googlesource.com/449827
2017-03-06 07:04:33 -08:00
Elyes HAOUAS
3128292626 UPSTREAM: nb/intel/i945: Fix sdram_enhanced_addressing_mode for channel1
BUG=none
BRANCH=none
TEST=none

Change-Id: I195ac25154f4c5444ac0b2b710865c26076b48e7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 308aefffc6
Original-Change-Id: I304467353bb9989f0d7e0ad7d1b632081f66b1af
Original-Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Original-Reviewed-on: https://review.coreboot.org/18482
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/449823
2017-03-06 07:04:32 -08:00
Jonathan Neuschäfer
afd08e2978 UPSTREAM: nb/amd/amdmct: Remove another currently unused table
This fixes a warning that the new toolchain generates.

BUG=none
BRANCH=none
TEST=none

Change-Id: I110558801c33c2d82d56b8fd0a65b10f0e161605
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 37e30aa624
Original-Change-Id: Idf46026729a474323e74a5cf7a156bf5bc8cf026
Original-Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Reviewed-on: https://review.coreboot.org/18485
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/446840
2017-02-27 14:07:53 -08:00
Jonathan Neuschäfer
0a647ed5a8 UPSTREAM: nb/amd/amdmct: Remove two currently unused tables
This fixes warnings that the new toolchain generates.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie91f31785d2f3a78b96147b4f5a41e16b8d1142f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: a6b1b258d2
Original-Change-Id: I83d2c4c4651a89b443121312a5f36adfc1e4bc48
Original-Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Reviewed-on: https://review.coreboot.org/18308
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/446389
2017-02-27 14:07:50 -08:00
Paul Menzel
6983c4ddd7 UPSTREAM: intel/i945: Fix up whitespace and indentation
Fix up the whitespace issues introduced in commit 39bfc6cb
(nb/i945/raminit.c: Fix dll timings on 945GC).

BUG=none
BRANCH=none
TEST=none

Change-Id: I554ffd57aad825befe86f659dd25c246c9029f1d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bce7e33f23
Original-Change-Id: I3a4152866226401bc51c7fb1752aab541a4c72b0
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18465
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-on: https://chromium-review.googlesource.com/446383
2017-02-27 14:07:48 -08:00
Arthur Heymans
52fb9554c7 UPSTREAM: nehalem/Kconfig: Rename TRAINING_CACHE_SIZE to MRC_CACHE_SIZE
This is more consistent with newer Intel targets.

BUG=none
BRANCH=none
TEST=none

Change-Id: If00a2a24cb0d9f85913fb60ef87048a2feac844c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b29e0b70f8
Original-Change-Id: I52ee8d3f0c330a03bd6c18eed08e578dd6ae284b
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18371
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/445832
2017-02-27 12:03:17 -08:00
Arthur Heymans
9678662418 UPSTREAM: nb/intel/nehalem: Clean nehalem.h
Remove unused definitions, prototypes and macros moslty copied from gm45.

BUG=none
BRANCH=none
TEST=none

Change-Id: I2a4fc5d94643cbe2da388196988c83a0fcb97ee1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bd9548ba7c
Original-Change-Id: I076e204885baec3d40f165785cf4ae4adc9154c5
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18370
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/445831
2017-02-27 12:03:16 -08:00
Tobias Diedrich
41132fd257 UPSTREAM: southbridge/amd: Add LPC bridge acpi path for Family14 and SB800
Adds the necessary plumbing for acpi_device_path() to find the LPC
bridge on the AMD Family14 northbridge with an SB800 southbridge.
This is necessary for TPM support since the acpi path to the LPC bridge
(_SB.PCI0.ISAB) doesn't match the built-in default in tpm.c
(_SB.PCI0.LPCB).

BUG=none
BRANCH=none
TEST=none

Change-Id: I707dcace91005120df4361e8bad749b2f165a308
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d8a2c1fb17
Original-Change-Id: I1ba5865d3531d8a4f41399802d58aacdf95fc604
Original-Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>
Original-Reviewed-on: https://review.coreboot.org/18402
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/446379
2017-02-23 16:02:04 -08:00
Elyes HAOUAS
e1cd10787e UPSTREAM: nb/i945/raminit.c: Fix dll timings on 945GC
Values based on vendor bios.
TESTED on ga-945gcm-s2l with 667MHz ddr2.

BUG=none
BRANCH=none
TEST=none

Change-Id: I6d655ea4bf76622d18303eb66bead3c836c96117
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 39bfc6cb13
Original-Change-Id: I2160f0ac73776b20e2cc1ff5bf77ebe98d2c2672
Original-Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Original-Reviewed-on: https://review.coreboot.org/17197
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/446378
2017-02-23 16:02:03 -08:00
Elyes HAOUAS
c1ad3c90e2 UPSTREAM: nb/i945/raminit: sdram_set_channel_mode Test if DIMM slot 3 is populated
Add a test in case we have a DIMM2 not populated but DIMM3 is.

BUG=none
BRANCH=none
TEST=none

Change-Id: I80508fd652795593aef7e202891b494d60d4d6a9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 75da1fb2ba
Original-Change-Id: I14f82afe03884740570838e7b2771233356c518d
Original-Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Original-Reviewed-on: https://review.coreboot.org/18386
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/445150
2017-02-21 06:44:27 -08:00
Arthur Heymans
a54bfc066d UPSTREAM: nb/intel/x4x: Implement resume from S3 suspend
It rewrites the results of receive enable stored in the upper nvram
region, to avoid running receive enable again.

Some debug info is also printed about the self-refresh registers.
(Not enforcing a reset here, since 0 does not necessarily mean it's
not in self-refresh).

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie8a85069cc613706c1405e150bece11bc6ba43c1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ef7e98a2ac
Original-Change-Id: Ib54bc5c7b0fed6d975ffc31f037b5179d9e5600b
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/17998
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445144
2017-02-21 06:44:24 -08:00
Arthur Heymans
7fc65a855a UPSTREAM: nb/intel/x4x: Fix raminit on reset path
Previously the raminit failed on hot reset and to work around this
issue it unconditionally did a cold reset.

This has the following issues:
* it's slow;
* when the OS issues a hot reset some disk drives expect their 5V
  power supply to remain on, which gets cut off by a cold reset,
  causing data corruption.

To fix this some steps in raminit must be ommited on the reset path.
This includes receive enable calibration.
To achieve this it stores receive enable results in RTC nvram for them
to be rewritten on the resume path.
Note: The same thing needs to be done on the S3 resume path.

Calling a hot reset after raminit "outb(0x6, 0cf9)" works.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7abad55524ecea8bbd828aba6dd3ce7708f1a7bd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 97e13d84c3
Original-Change-Id: I6601dd90aebd071a0de7cec070487b0f9845bc30
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18009
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/445143
2017-02-21 06:44:24 -08:00
Arthur Heymans
b58d1197a4 UPSTREAM: nb/i945/gma.c: Remove writes to FIFO Watermark registers
Those are the result from tracing what linux or the option rom do
but are not needed here.

TESTED on Thinkpad X60.

BUG=none
BRANCH=none
TEST=none

Change-Id: I4aa3ebf50bc772ff0baf0b6c685022ea40750234
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: d81078d944
Original-Change-Id: I4297a78c4ab6a19ef6161778c993fc3f3fb08c7e
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18294
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/443675
2017-02-17 04:09:18 -08:00
Arthur Heymans
6ce9caf32e UPSTREAM: nb/i945/gma.c: Change name and type of mmiobase in functions argument
Void pointer arithmetics are forbidden in standard C but GCC has
an extension that allows it.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id10d81e0663007c10a9a139cc437dd94be654212
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 85cfddb4b4
Original-Change-Id: I43029b2ab2f7709b8e1ba85eb05c31341b8ac16f
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18293
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/441809
2017-02-13 12:40:26 -08:00
Patrick Georgi
1a5c5c165b UPSTREAM: ddr3 spd: move accessor code into lib/spd_bin.c
It's an attempt to consolidate the access code, even if there are still
multiple implementations in the code.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icccf8c3113c0491ffc31d1ff04177b2116df8b17
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0e3c59e258
Original-Change-Id: I4b2b9cbc24a445f8fa4e0148f52fd15950535240
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18265
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/441807
2017-02-13 10:01:11 -08:00
Patrick Georgi
d6e19c1f2f UPSTREAM: ddr3 spd: Rename read_spd_from_cbfs() to read_ddr3_spd_from_cbfs()
Since it checks for DDR3 style checksums, it's a more appropriate name.
Also make its configuration local for a future code move.

BUG=none
BRANCH=none
TEST=none

Change-Id: I863c33342228fa73b60c31fd86d493774de1a6fd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2e08b59cdc
Original-Change-Id: I417ae165579618d9215b8ca5f0500ff9a61af42f
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18264
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/441806
2017-02-13 10:01:10 -08:00
Arthur Heymans
aac1ce128a UPSTREAM: Only show CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM option when implemented
This also selects RELOCATABLE_RAMSTAGE and
CACHE_RELOCATABLE_RAMSTAGE_OUTSIDE_CBMEM by default on Haswell.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ide9ebe83af4db2ccfe63be72b9caa124ecb550ea
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 410f256b6f
Original-Change-Id: I50b9ee8bbfb3611fccfd1cfde58c6c9f46b189ca
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18232
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/438056
2017-02-06 10:37:41 -08:00
Nico Huber
d342ea573d UPSTREAM: drivers/intel/gma/vbt: Add Kconfig symbol for SSC ref
The selection of the SSC reference frequency for LVDS was based on a
completely unrelated clock.

The `ssc_freq` flag should be set when the SSC reference runs at a
different frequency than the general display reference clock (DREF).
For most platforms, there is no choice, i.e. for i945 and gm45 the SSC
reference always differs from the display reference clock (i945: 66Mhz
SSC vs. 48MHz DREF; gm45: 100MHz SSC vs. 96Mhz DREF), for Nehalem and
newer, it's the same frequency for SSC/non-SSC (120MHz).  The only,
currently supported platform with a choice seems to be Pineview, where
the alternative is 100MHz vs. the default 96MHz.

BUG=none
BRANCH=none
TEST=none

Change-Id: I869be7519523453cd776fdc8c4cdc4dc0db03ad2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 561bebfbaa
Original-Change-Id: I7791754bd366c9fe6832c32eccef4657ba5f309b
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/18186
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/438055
2017-02-06 10:37:41 -08:00
Patrick Rudolph
376c0aea6a UPSTREAM: nb/intel/gm45/igd: Hide IGD while disabling
Hide the IGD to make sure ramstage doesn't detect it.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ibb747e98c2851dc5a8dd744e6aa2c1fc04c3789c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bb1af99622
Original-Change-Id: If389016f3bb0c4c2fd0b826914997a87a9137201
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/18194
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/438053
2017-02-06 10:37:40 -08:00
Paul Menzel
caba0d26c5 UPSTREAM: amd/amdht: Fix format security errors
Ubuntus default compiler flags for GCC [1][2] include `-Wformat
-Wformat-security`, causing errors similar like the one below.

```
    CC         romstage/northbridge/amd/amdht/ht_wrapper.o
src/northbridge/amd/amdht/ht_wrapper.c: In function 'AMD_CB_EventNotify':
src/northbridge/amd/amdht/ht_wrapper.c:124:4: error: format not a string literal and no format arguments [-Werror=format-security]
    printk(log_level, event_class_string_decodes[evtClass]);
    ^
[]
```

Fix that, by explicitly using a format string.

TEST=Built and booted on ASUS KGPE-D16.

[1] https://stackoverflow.com/questions/17260409/fprintf-error-format-not-a-string-literal-and-no-format-arguments-werror-for
    "fprintf, error: format not a string literal and no format arguments [-Werror=format-security"
[2] I tested with gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609.

Change-Id: Iff829bf83e1ead8537fbe5d7c5c6376bdd77f323
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f6776fa62c
Original-Change-Id: Iabe60deeffa441146eab31dac4416846ce95c32a
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/18208
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/433880
2017-01-28 04:11:02 -08:00
Arthur Heymans
61c1644317 UPSTREAM: nb/intel/pineview: Make preallocated igd memory a cmos parameter
BUG=none
BRANCH=none
TEST=none

Change-Id: I2d057e7764b7eeb21208d9b6709e63c5198ba9f7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2a0e998ec2
Original-Change-Id: Ia7fa2c290e540ff779cf8dc16147db5a248021e2
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18142
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/432760
2017-01-27 07:48:59 -08:00
Arthur Heymans
bdb153ee8c UPSTREAM: nb/x4x/raminit: Fix programming dram timings
The results were obtained by comparing the MCHBAR registers of vendor bios
with coreboot at the same dram timings.

This fixes 2 issues:
* 1333MHz fsb CPUs were limited to 667MHz ddr2 speeds, because with
  800MHz raminit failed;
* 1067MHz fsb CPUs did not boot when second dimm slot was populated.

TESTED on ga-g41m-es2l on 800, 1067 and 1333MHz CPUs with
DDR2 667 and 800MHz dimms.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia83222824b338692fbcfe67318da1ca7173f46a7
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Commit-Id: eee4f6b224
Original-Change-Id: I70f554f97b44947c2c78713b4d73a47c06d7ba60
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18022
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/431292
Commit-Ready: Duncan Laurie <dlaurie@google.com>
Tested-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-23 02:03:27 -08:00
Arthur Heymans
5700b39b70 UPSTREAM: nb/gm45/gma.c: Fix reported Pixel clock
BUG=none
BRANCH=none
TEST=none

Change-Id: Ia2b544bd8d4b042a1eb1ceea52b76461d57c552e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1f06028793
Original-Change-Id: Ie1c360ac29eb30af6f4b5447add467f3c13ba211
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18180
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/430619
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-22 05:03:19 -08:00
Timothy Pearson
507b577b15 UPSTREAM: nb/amd/ddr3: Make the maximum CDD a signed value
max_cdd_we_delta should be signed to allow for negative CDD.

BUG=none
BRANCH=none
TEST=none

Change-Id: I25b6d05504da5cce4f1e75b32ecdf16b450c1f59
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9b4c888f7b
Original-Found-by: Coverity Scan #1347355
Original-Change-Id: Iaccd1021680296d169c26c25e339f83fbd7cc065
Original-Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Original-Reviewed-on: https://review.coreboot.org/18162
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/430733
2017-01-19 15:14:43 -08:00
Timothy Pearson
c3ea0ccecc UPSTREAM: amd/mct: Add default values to highest_rank_count for DDR2
The values of highest_rank_count were undefined on DDR2 systems.
Explcitly define these values on DDR2 platforms.

BUG=none
BRANCH=none
TEST=none

Change-Id: I0ecebad35e4ec895d460da023c264105de4acf3f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: a19d44d276
Original-Found-by: Coverity Scan #1347338
Original-Change-Id: Iad7bb00db97b2816fcc44fb5941bd14373451da2
Original-Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Original-Reviewed-on: https://review.coreboot.org/18078
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/427766
2017-01-17 14:54:32 -08:00
Timothy Pearson
b681a2112e UPSTREAM: amd/mct/ddr2: Remove orphaned Tab_TrefT_k variable
The orphaned Tab_TrefT_k causes a failure to build due to
an unused variable warning on GCC 6.  Remove this variable.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ib66ec10a6babbc59814ed51d244af2ef75306b96
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 17b66c3846
Original-Change-Id: Ida680a6a3bc2b135755dd582da8c6edb8956b6ff
Original-Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Original-Reviewed-on: https://review.coreboot.org/18094
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/428253
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
2017-01-13 18:41:19 -08:00
Timothy Pearson
aa6270a1d5 UPSTREAM: amd/mct/ddr3: Fix unintended sign extension warning
An unintended sign extension warning was thrown by Coverity.
Explicitly state the length of the constant multiplier.

BUG=none
BRANCH=none
TEST=none

Change-Id: I27d4c25248395d9595df285b2e9e99e16f92dc18
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 88a2e3b3bf
Original-Found-by: Coverity Scan #1347342
Original-Change-Id: Icd42eec13be04fc5fd2ffc85320cbadafc852148
Original-Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Original-Reviewed-on: https://review.coreboot.org/18077
Original-Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-on: https://chromium-review.googlesource.com/428250
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
2017-01-13 18:41:12 -08:00
Timothy Pearson
303afe6a03 UPSTREAM: amd/mct/ddr3: Avoid using uninitialized register address in ECC setup
Logic inside mct_EnableDimmEccEn_D uses an unintialized variable as
a register address under certain conditions.  Refactor mct_EnableDimmEccEn_D
to use the explicit address of the register in all cases.

BUG=none
BRANCH=none
TEST=none

Change-Id: If0a31097c60af1fa050b6794ed5d631a7aa4c0d7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 590a3e1f6c
Original-Found-by: Coverity Scan #1347337
Original-Change-Id: I6bc50d0524ea255aa97c7071ec4813f6a3e9c2b8
Original-Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Original-Reviewed-on: https://review.coreboot.org/18079
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/428249
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
2017-01-13 18:41:10 -08:00