Commit graph

2,117 commits

Author SHA1 Message Date
Kyösti Mälkki
d40ca30dfa UPSTREAM: AGESA: Unify heap location
HEAP management is identical enough to move heap away from
first 1MiB for all platforms.

BUG=none
BRANCH=none
TEST=none

Change-Id: I79304c0005afa758845ca402f2d0c20132e9e5ba
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 59b23a2fae
Original-Change-Id: I4128fc084fe072fef6194d260c05592582b7b0d0
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19267
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/480285
2017-04-18 13:19:01 -07:00
Aaron Durbin
e1961389d4 UPSTREAM: arch/x86: remove CAR global migration when postcar stage is used
When a platform is using postcar stage it's by definition not
tearing down cache-as-ram from within romstage prior to loading
ramstage. Because of this property there's no need to migrate
CAR_GLOBAL variables to cbmem.

BUG=none
BRANCH=none
TEST=none

Change-Id: I34c0ae5c9f5e862ad523c58ceeeb1ab3873bc4c3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bc17cdef0d
Original-Change-Id: I7c683e1937c3397cbbba15f0f5d4be9e624ac27f
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19215
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/472720
2017-04-10 14:28:39 -07:00
Marshall Dawson
ab48ce26df UPSTREAM: northbridge/amd/stoney: Add FT4 package
Add package options to the CPU Kconfig that may be selected by the
mainboard's Kconfig file.  Stoney Ridge is available in FP4 and FT4
packages and each requires a unique binaryPI image.  Default to the
correct blob used by the northbridge by looking at the CPU's package.

Also modify Gardenia to select the right package.

See the Infrastructure Roadmap for FP4 (#53555) and FT4 (#55349) for
additional details for the packages.

Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Marc Jones <marcj303@gmail.com>
(cherry picked from commit 7b8ed7b732b7cf5503862c5edc6537d672109aec)

BUG=none
BRANCH=none
TEST=none

Change-Id: I2fcb523d6cfef530fb7b2a9b9c7ca2e92a73297f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5995ee62f7
Original-Change-Id: I7bb15bc4c85c5b4d3d5a6c926c4bc346a282ef27
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18989
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/471465
2017-04-07 16:06:58 -07:00
Kyösti Mälkki
5eb692b1d9 UPSTREAM: AGESA: Disable CAR with empty stack
Calling disable_cache_as_ram() with valuables in stack is not
a stable solution, as per documentation AMD_DISABLE_STACK
should destroy stack in cache.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia9cd3c78925d7da22ba54ed9719df33867ca72e8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ba22e159bb
Original-Change-Id: I986bb7a88f53f7f7a0b05d4edcd5020f5dbeb4b7
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18626
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/471450
2017-04-07 07:03:33 -07:00
Kyösti Mälkki
0b297c413c UPSTREAM: AGESA: BIST is already preserved
Officialy we enter with BIST in %eax, but %ebp is old backup register.
Note that post_code() destroys %al.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ic3f210d22cb1efae868ab29911dda63449475184
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1779d534e5
Original-Change-Id: I77b9a80aac11ae301fdda71c2a20803d7a5fb888
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18625
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/471449
2017-04-07 07:03:32 -07:00
Kyösti Mälkki
ce38c5cc8b UPSTREAM: AGESA: Move romstage main entry under cpu
As we now apply asmlinkage attributes to romstage_main()
entry, also x86_64 passes parameters on the stack.

BUG=none
BRANCH=none
TEST=none

Change-Id: Idc959f24a256aa5c77b00b030b2d01b0ea6dd127
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: df7ff31c59
Original-Change-Id: If9938dbbe9a164c9c1029431499b51ffccb459c1
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18624
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/471448
2017-04-07 07:03:32 -07:00
Kyösti Mälkki
76cd5e4c39 UPSTREAM: AGESA: Move amd_initmmio() call
Function enables PCI MMCONF and XIP cache, it needs
to be called before giving platform any chance of
calling any PCI access functions.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ib1e1131ad5e149a81da19bb6cdb2945450ea9b60
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 13cf135871
Original-Change-Id: Ic044d4df7b93667fa987c29c810d0bd826af87ad
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18623
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/471447
2017-04-07 07:03:31 -07:00
Kyösti Mälkki
5c7c4c7909 UPSTREAM: AGESA: Reduce typecasting in heapmanager calls
BUG=none
BRANCH=none
TEST=none

Change-Id: I85166b7437097d5349c2cc8b8d86968295c80738
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 45ff9cbaa9
Original-Change-Id: Ifc065dca00ab3dfc65a314aaaf04dd2a7afcad0e
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19040
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/467111
2017-04-04 03:02:44 -07:00
Kyösti Mälkki
5d0440d718 UPSTREAM: AGESA: Handle HEAP_CALLOUT_RUNTIME allocation more cleanly
This was guarded because AGESA.h only defined it starting from fam15
header files. We can simply test if it has been defined.

The way coreboot currently handles this request, is to make the
allocation outside the heap, since heap may not be in CBMEM and thus
not available runtime. The acquired buffer from Allocate() would not
be found with Locate() or Deallocate(), so move the alloc_cbmem()
call for better code symmetry.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id9ce566cd144da8ebf470ace7df2cfb90ebca12d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bceccec0f7
Original-Change-Id: Ibf0066913a0b73e768488c3afbeb70139a3961eb
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19039
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/467110
2017-04-04 03:02:43 -07:00
Kyösti Mälkki
8233f7763e UPSTREAM: AGESA: Adjust heap location for S3 resume path
Once we do CAR teardown between AmdInitResume() and
AmdS3LateRestore() we attempt to find our heap from the
temporary memory buffer instead of cache.

S3 resume is essentially broken anyways and this is not yet a
proper fix at all, but barely keeps system from halting on S3
resume.

Offset that seems arbitrary was taken from hudson/agesawrapper.c.

BUG=none
BRANCH=none
TEST=none

Change-Id: I26ac7d9b1f5bf27871faf32e02bacc1d21c9ebc1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 42402772e5
Original-Change-Id: Idddf2ecde5a9d32d532071d6ba05032be730460c
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19038
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/467109
2017-04-04 03:02:43 -07:00
Kyösti Mälkki
d9027c13b1 UPSTREAM: AGESA: Refactor S3 support functions
Producer and consumer of these buffers now appear in same file.
Also add test for uninitialized NonVolatileStorage in SPI.

BUG=none
BRANCH=none
TEST=none

Change-Id: I2af72fb451ee9faa5efa14fcbcaf8083a85f7b69
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 424c63950b
Original-Change-Id: Ibbf6581a0bf1d4bffda870fc055721627b538b92
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19037
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/467108
2017-04-04 03:02:42 -07:00
Kyösti Mälkki
85864df0d2 UPSTREAM: AGESA: Fork for new cache-as-ram init code
To gradually consolidate and improve AGESA board romstages,
fork the original CAR setup code as a separate file. It becomes
too messy with preprocessor to attempt make changes within the
same file, and at end of patchset original becomes obsolete.

BUG=none
BRANCH=none
TEST=none

Change-Id: If6b072173e1cefc4f676f0295040ff6debeaeaa3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 77d3c4b690
Original-Change-Id: I256b675b1ab9e13c2bcc956e0d67c6c03e91f2ed
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18620
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/462939
2017-03-30 05:29:58 -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
Bora Guvendik
0e4f5c9718 UPSTREAM: cpu/x86: add a barrier with timeout
In case something goes wrong on one of the
cpus, add the ability to use a barrier with
timeout so that other cpus don't wait forever.
Remove static from barrier wait and release.

BUG=chrome-os-partner:59875
BRANCH=reef
TEST=None

Change-Id: I51079396aa35bcebb5282e30ecf2235d9694b512
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9b76f0b27b
Original-Change-Id: Iab6bd30ddf7632c7a5785b338798960c26016b24
Original-Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18107
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/457366
2017-03-20 17:33:15 -07:00
Kyösti Mälkki
5ae3eb31bd UPSTREAM: binaryPI: Fix SSE regression and align stack early
When allowing use of SSE instructions, stack must be
aligned to 16 bytes. Adjust x86 entry to C accordingly,
by pushing values to maintain the alignment.

For some builds, new toolchain and GCC-6.3 could emit
SSE instruction 'andps (%esp),%xmm0' with incorrectly
aligned esp, raising exception and thus preventing boot.

BUG=none
BRANCH=none
TEST=none

Change-Id: I8cf0cd97d9191e23f1f9ce0b8ae647f523a076cd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bf3091bae6
Original-Change-Id: I452d40eadac2b743d0d8431809c9a81bf28c330a
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18691
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/456301
2017-03-17 11:06:51 -07:00
Lee Leahy
3cb3176b38 UPSTREAM: cpu/intel: Fix the remaining issues detected by checkpatch
Fix the following error and warnings detected by checkpatch.pl:

ERROR: switch and case should be at the same indent
WARNING: Consecutive strings are generally better as a single string
WARNING: static const char * array should probably be static const char * const

TEST=Build and run on Galileo Gen2

Change-Id: I5834753bf10fd542d699a52cd5fe7a8bb56b4b5d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4dddda294f
Original-Change-Id: I03d5d0d2db0d5e9b33c8ec807b236fe229bcc8f3
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18851
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456248
2017-03-16 11:25:46 -07:00
Lee Leahy
23e0d52191 UPSTREAM: cpu/intel: Wrap lines at 80 columns
Fix the following warning detected by checkpatch.pl:

WARNING: line over 80 characters

TEST=Build and run on Galileo Gen2

Change-Id: Iafab3ac126690df28f1fb3fff891219e8c156882
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: cdc50480c4
Original-Change-Id: I74f25da5c53bd518189ce86817d6e3385b29c3b4
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18850
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456247
2017-03-16 11:25:45 -07:00
Lee Leahy
feb3940707 UPSTREAM: cpu/intel: Fix brace issues detected by checkpatch.pl
Fix the following error and warning detected by checkpatch.pl:

ERROR: that open brace { should be on the previous line
WARNING: braces {} are not necessary for single statement blocks

TEST=Build and run on Galileo Gen2

Change-Id: I19682d7da511d778cb2c9c41b9d2cb60e560e555
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 26eeb0f8ad
Original-Change-Id: Icdd6bd9ae578589b4d42002d200fa8f83920265e
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18849
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456246
2017-03-16 11:25:45 -07:00
Lee Leahy
368252ec7e UPSTREAM: cpu/intel: Add int to unsigned
Fix the following warning detected by checkpatch.pl:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

TEST=Build and run on Galileo Gen2

Change-Id: I48858d8d7a2ace1f719ba46b5cb5f7751a9a8518
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 73a2894203
Original-Change-Id: I207713a3370e5a9abed4535187aa2aaeef502d6f
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18848
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456245
2017-03-16 11:25:44 -07:00
Lee Leahy
732cc35efb UPSTREAM: cpu/intel: Fix the spacing issues
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: spaces required around that '=' (ctx:VxV)
ERROR: space required after that ',' (ctx:VxV)
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
ERROR: need consistent spacing around '-' (ctx:WxV)
ERROR: spaces required around that '>' (ctx:VxV)
ERROR: need consistent spacing around '>>' (ctx:WxV)
ERROR: need consistent spacing around '<<' (ctx:VxW)
ERROR: spaces required around that '||' (ctx:VxV)
ERROR: "foo * bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"
WARNING: space prohibited between function name and open parenthesis '('
WARNING: storage class should be at the beginning of the declaration

TEST=Build and run on Galileo Gen2

Change-Id: I8307c37acfeccbd48274beaa772533ec31b718cd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9d62e7e75e
Original-Change-Id: I6602fbc8602171ab6c2f3b6c204558ad2c811179
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18847
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456243
2017-03-16 11:25:44 -07:00
Lee Leahy
e07e37e642 UPSTREAM: cpu/intel: Indent with tabs
Fix the following error and warning detected by checkpatch.pl:

ERROR: code indent should use tabs where possible
WARNING: please, no space before tabs

TEST=Build and run on Galileo Gen2

Change-Id: Icb5c8dc05bb977313235c46d6eb09a821b9450c5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7b5f12b9b2
Original-Change-Id: I5bcd82561ef5856e99055d46528dcf3a283d2310
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18846
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456242
2017-03-16 11:25:43 -07:00
Lee Leahy
f00b0f1a7a UPSTREAM: cpu/x86: Fix misc. remaining issues detected by checkpatch
Fix the following error and warnings detected by checkpatch.pl:

ERROR: trailing statements should be on next line
WARNING: storage class should be at the beginning of the declaration
WARNING: type 'long unsigned int' should be specified in [[un]signed] [short|int|long|long long] order

TEST=Build and run on Galileo Gen2

Change-Id: Ia707c6e3a6b65f12d3b1e60510b4a99bc24ea83d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: dfc8a560d7
Original-Change-Id: I9cfe42cf1836cfd40ffcf67237c818543f508feb
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18845
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456241
2017-03-16 11:25:43 -07:00
Lee Leahy
0310f9e513 UPSTREAM: cpu/x86: Wrap lines at 80 columns
Fix the following warning detected by checkpatch.pl:

WARNING: line over 80 characters

TEST=Build and run on Galileo Gen2

Change-Id: I7805a5121d572e07ebb155eca1f7d75efaf13f94
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c5917079eb
Original-Change-Id: I56ea28826963403dc0719f40c13782c56dc97feb
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18844
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456240
2017-03-16 11:25:42 -07:00
Lee Leahy
9924bb0f08 UPSTREAM: cpu/x86: Add int to unsigned
Fix the following warning detected by checkpatch.pl:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

TEST=Build and run on Galileo Gen2

Change-Id: I068dd20c4cbfdfb8b7a0703c3711582eaa884743
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8ca9a21a43
Original-Change-Id: I97bbe8ba19680bdb99fa38daa5e18b440c338576
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18843
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/456239
2017-03-16 11:25:42 -07:00
Lee Leahy
174294afe7 UPSTREAM: cpu/x86: Remove braces and else if unnecessary
Fix the following warnings detected by checkpatch.pl

WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement
WARNING: else is not generally useful after a break or return

TEST=Build and run on Galileo Gen2

Change-Id: Icab33fe1dc3080d5c98cbcec1993364a06e51c5b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: a15d8af140
Original-Change-Id: I2d6b22c66d52f5f2d24b15270ad4b52894adebc2
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18842
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/456238
2017-03-16 11:25:41 -07:00
Lee Leahy
e9bcb7940f UPSTREAM: cpu/x86: Use tabs for indent
Fix the following error and warning detected by checkpatch.pl:

ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

TEST=Build and run on Galileo Gen2

Change-Id: Iac22e8fea19724d9ca43a96b67902b4e19018c0f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: a07d0ddc44
Original-Change-Id: Ie6e4dd4c3eb0d2c44ecd008740dfc348d496fe78
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18841
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/456237
2017-03-16 11:25:41 -07:00
Lee Leahy
0fe83023be UPSTREAM: cpu/x86: Fix various issues detected by checkpatch.pl
Fix the following errors and warning detected by checkpatch.pl:

ERROR: spaces required around that '=' (ctx:VxV)
ERROR: space prohibited after that open parenthesis '('
ERROR: need consistent spacing around '|' (ctx:WxV)
ERROR: need consistent spacing around '|' (ctx:VxW)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:ExV)
WARNING: space prohibited between function name and open parenthesis '('

TEST=Build and run on Galileo Gen2

Change-Id: Ibff31d4011e7457c198b102afea9a7e8aed6aa11
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8bad6d2f90
Original-Change-Id: I61d08055b207c607d5b7d72b0094ad8e24fbd106
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18840
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456236
2017-03-16 11:25:41 -07:00
Lee Leahy
8c5e2b0b28 UPSTREAM: src/cpu/x86: Remove space between * and variable name
Fix the following error detected by checkpatch.pl:

ERROR: "foo * bar" should be "foo *bar"

TEST=Build and run on Galileo Gen2

Change-Id: I800b829d82546f5f4f34c3ffc64ae2ece0b22811
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5f94541329
Original-Change-Id: I8b5342df3f42dbb4576aecf5b0a59f195ae8511e
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18839
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/455855
2017-03-16 11:25:40 -07:00
Kyösti Mälkki
c19aeabec8 UPSTREAM: AGESA f14: Fix infinite loop
Fix regression after commit:
  22f32c7 cpu/amd/agesa: Unify init files

BUG=none
BRANCH=none
TEST=none

Change-Id: I7eb5184f30d03e8cc1be0f0e030b5c810cac18d6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7f3741840c
Original-Change-Id: I36fb7369084c68577df69abc251c84dad64f7015
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18822
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/455843
2017-03-16 11:25:35 -07:00
Paul Menzel
5b601e0fac UPSTREAM: cpu/amd/agesa: Unify init files
The init files for the AMD families using the AGESA platform
initialization code are quite similar. So reduce the differences, by
using the same comments, variable names, console messages, and blank
lines.

BUG=none
BRANCH=none
TEST=none

Change-Id: I290453cd875ed445755de6218f9349bc9906e481
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 22f32c723c
Original-Change-Id: Id4a3a5c3812a34627d726cdcbe8f4781a14be724
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18507
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/452891
2017-03-10 10:54:46 -08:00
Kyösti Mälkki
a52c64ed19 UPSTREAM: AGESA: Log heap initialisation
This is useful for debugging S3 issues and in general
to understand AGESA memory allocator behaviour.

BUG=none
BRANCH=none
TEST=none

Change-Id: I6537ba637e2e7adbaf0f82481ff75cd4cfd110c1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 50e6daff95
Original-Change-Id: I422f2620ed0023f3920b8d2949ee1c33a6c227e0
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18535
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/452465
2017-03-10 10:54:35 -08:00
Kyösti Mälkki
5b96ebc654 UPSTREAM: AGESA: Fix SSE regression and align stack early
When allowing use of SSE instructions, stack must be
aligned to 16 bytes. Adjust x86 entry to C accordingly,
by pushing values to maintain the alignment.

Fixes regression with new toolchain using GCC-6.3 and
  ec0a393 console: Enable printk for ENV_LIBAGESA

For some builds, the above-mentioned commit emitted
SSE instruction 'andps (%esp),%xmm0' with incorrectly
aligned esp, raising exception and thus preventing boot.

BUG=none
BRANCH=none
TEST=none

Change-Id: I5384281bdb98775fc6537734172c515eda58925a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 26929bd71a
Original-Change-Id: Ief57a2ea053c7497d50903838310b7f7800bff26
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18622
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/452463
2017-03-10 10:54:34 -08:00
Paul Menzel
94e0c6ca37 UPSTREAM: cpu/intel/model_6{e,f}x: Unify init files
The init files for the Core Duo and Core 2 Duo are very similar. Reduce
the differences, by using the same order for the include statements, the
same blank lines, and the same comments.

BUG=none
BRANCH=none
TEST=none

Change-Id: I2ac2f5eda9f6d2dcc475d9363496dbcd26b9d03b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7129ccbd23
Original-Change-Id: I0de060222a61a482377c760c6031d73c7e318edf
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18506
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/452461
2017-03-10 10:54:33 -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
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
Kyösti Mälkki
a05d6a8d01 UPSTREAM: AMD geode: Avoid conflicting main() declaration
Declaration of main in cpu/amd/car.h conflicts with the
definition of main required for x86/postcar.c in main_decl.h.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iedbb3818068b7a24d35057537eccd385da58383b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8e1f908ce0
Original-Change-Id: I19507b89a1e2ecf88ca574c560d4a9e9a3756f37
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18615
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/451429
2017-03-08 05:13:00 -08:00
Marshall Dawson
f3f98c0cce UPSTREAM: amd/pi/hudson: Move APIC enable to CPU file
Relocate the enabling of the LAPIC out of the southbridge source and
surround it with a check for CONFIG_UDELAY_LAPIC (typical for AMD
systems).  The LAPIC is now enabled for all cores; not only the BSP,
and not only when the UART is used.

This solves the problem of APs not having their APICs enabled when
the timer is expected to be functional, e.g. verstage often uses
do_printk_va_list() instead of do_printk() which exits early for
APs when CONFIG_SQUELCH_EARLY_SMP=y.

The changes were tested with two Gardenia builds, one using verstage
and another with CONFIG_SQUELCH_EARLY_SMP=n.

Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Marc Jones <marcj303@gmail.com>
(cherry picked from commit 93ffc311165f19d4192a5489051fa4264cd8e0ad)

BUG=none
BRANCH=none
TEST=none

Change-Id: I3b2cf63f46cb63e46ddc916f399de7f9e76759e1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 03e6a455a3
Original-Change-Id: Ieaecc0bf921ee0d2691a8082f2431ea4d0c33749
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18436
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/451427
2017-03-08 05:13:00 -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
Martin Roth
a52be7639e UPSTREAM: src/cpu/x86: Update/Add license headers to all files
BUG=none
BRANCH=none
TEST=none

Change-Id: Ic24065a7375733299c7effda30fa833b524b8156
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6add44bd3c
Original-Change-Id: I436bf0e7db008ea78e29eaeef10bea101e6c8922
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18405
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://chromium-review.googlesource.com/445824
2017-02-26 11:30:16 -08:00
Martin Roth
ce81e0c8a1 UPSTREAM: src/cpu/intel: Add license headers to all files
BUG=none
BRANCH=none
TEST=none

Change-Id: I0486cca8c6954f4d978c5cc2442be169994490a5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 996cf797e1
Original-Change-Id: I5ba8b186972fb59686dcbe11358cd26408cbaf05
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18404
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://chromium-review.googlesource.com/445823
2017-02-26 05:40:57 -08:00
Martin Roth
b8676a582b UPSTREAM: src/cpu/amd: Update/Add license headers to all files
BUG=none
BRANCH=none
TEST=none

Change-Id: Icf521d160cb304ac03cb9dbd9a836f9f376d7fd0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 869532264a
Original-Change-Id: I1e0b2b9086db6b3c2f716d9400a83eb60b2ce222
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18403
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://chromium-review.googlesource.com/445822
2017-02-25 14:23:20 -08:00
Arthur Heymans
83630efc37 UPSTREAM: cpu/intel/model_6fx: Add Conroe-L to cpu_device_id list
Tested with Intel Celeron Processor 420.

BUG=none
BRANCH=none
TEST=none

Change-Id: I0f7033c7d520d51e38edb57b4acafffcc791f3c0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3f2d6c0cf3
Original-Change-Id: I63d308477a22a9e55ceed1b6b36e63a3044c2354
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18057
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/428238
2017-01-13 15:22:22 -08:00
Damien Zammit
32d1273318 UPSTREAM: amdfam10: Perform major include ".c" cleanup
Previously, all romstages for this northbridge family
would compile via 1 single C file with everything
included into the romstage.c file (!)

This patch separates the build into separate .o modules
and links them accordingly.

Currently compiles and links all fam10 roms without
breaking other roms.

Both DDR2 and DDR3 have been completed

TESTED on REACTS: passes all boot tests for 2 boards
 ASUS KGPE-D16
 ASUS KFSN4-DRE

Some extra changes were required to make it compile
otherwise there were unused functions in included "c" files.
This is because I needed to exchange CIMX
for the native southbridge routines. See in particular:
 advansus/a785e-i
 asus/m5a88-v
 avalue/eax-785e

A followup patch may be required to fix the above boards.
See FIXME, XXX tags

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/17625
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>

Change-Id: Id0f9849578fd0f8b1eab83aed910902c27354426
Reviewed-on: https://chromium-review.googlesource.com/425291
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:40 -08:00
Martin Roth
d2cc87f0e1 UPSTREAM: Microcode: Show a useful warning when microcode bins are missing
Because the binary repo is disabled by default, we get frequent
questions about why the build failed, relating to microcode in the
binary repository.

- Show an error saying that the file is missing instead of the typical
make error of no rule to build the file.
- Show a note encouraging users to try enabling the binary repo if it's
not enabled.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17940
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: If4148c18cfb781ed2932bd2ae4a289b621afdebf
Reviewed-on: https://chromium-review.googlesource.com/425259
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:23 -08:00
Matt DeVillier
e28af0e812 UPSTREAM: cpu/intel/common: Add/Use common function to set virtualization
Migrate duplicated enable_vmx() method from multiple CPUs to common
folder.  Add common virtualization option for CPUs which support it.

Note that this changes the default to enable virtualization on CPUs
that support it.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/17874
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins)

Change-Id: Ib110bed6c9f5508e3f867dcdc6f341fc50e501d1
Reviewed-on: https://chromium-review.googlesource.com/425255
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:14 -08:00
Kyösti Mälkki
5b372b34ab UPSTREAM: ti/beaglebone: Define arch for omap-header build
Required to add rules.h as default include, otherwise we get error:

   ./src/include/rules.h:128:5: error:
      "__COREBOOT_ARM_ARCH__" is not defined [-Werror=undef]

Previously, rules.h was not included in omap-header build at all.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17746
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I75265916856f2f21f7966619ea65d63acd599e2f
Reviewed-on: https://chromium-review.googlesource.com/422242
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-19 12:24:02 -08:00
Kyösti Mälkki
0faab9ae82 UPSTREAM: intel cache-as-ram: Move DCACHE_RAM_BASE
Having same memory region set as both WRPROT and WRBACK
using MTRRs is undefined behaviour. This could happen if
we allow DCACHE_RAM_BASE to be located within CBFS in SPI
flash memory and XIP romstage is at the same location.

As SPI master by default decodes all of top 16MiB below
4GiB, initial cache-as-ram line fills may have actually
read from SPI flash even in the case DCACHE_RAM_BASE was
below the nominal 4GiB - ROM_SIZE.

There are no reasons to have this as board-specific setting.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17806
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I2cce80731ede2e7f78197d9b0c77c7e9957a81b5
Reviewed-on: https://chromium-review.googlesource.com/422239
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-19 09:55:24 -08:00
Arthur Heymans
e82b8b6cd4 UPSTREAM: Set the fsb timer correctly for Netburst CPUs
On Netburst (Pentium 4) the fsb cannot be read from
MSR_FSB_FREQ (msr 0xcd). One has to use msr 0x2c instead.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17832
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>

Change-Id: I0beccba2e4a8ec5cd23537b2207f9c49a040fd73
Reviewed-on: https://chromium-review.googlesource.com/422215
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-19 09:54:27 -08:00
Kyösti Mälkki
2ad8d89ca4 UPSTREAM: ACPI S3: Flip ACPI_HUGE_LOWMEM_BACKUP default
Except fo nehalem, K8, f10 and f15 (non-AGESA) romstage ramstack
is placed in CBMEM and ramstage loader takes care of tiny backup.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17358
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I8477944f48ed2493d0a5e436a4088eb9fc3d59c5
Reviewed-on: https://chromium-review.googlesource.com/419620
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-13 17:49:16 -08:00
Kyösti Mälkki
6fe5716f13 UPSTREAM: intel i945 gm45 x4x post-car: Use postcar_frame for MTRR setup
Adapt implementation from skylake to prepare for removal of
HIGH_MEMORY_SAVE and moving on to RELOCATABLE_RAMSTAGE.
With this change, CBMEM region is set early-on as WRBACK
with MTRRs and romstage ram stack is moved to CBMEM.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15791
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Idee5072fd499aa3815b0d78f54308c273e756fd1
Reviewed-on: https://chromium-review.googlesource.com/418874
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-13 17:49:02 -08:00