Commit Graph

26815 Commits

Author SHA1 Message Date
Richard Spiegel 41baf0c3ff soc/amd/stoneyridge: Remove dev_find_slot where possible
The procedure dev_find_slot has 3 main uses. To find configuration
(devicetree), to verify if a particular device is enabled at build \
time, and to get the address for PCI access while in bootblock/romstage.
The third use can be hidden by using macros defined in pci_devs.h,
making it very clear what PCI device is being accessed. replace the
temporary pointers to device used with PCI access with SOC_XXX_DEV where
XXX is the device being accessed, and remove the setting of the temporary
pointers.

BUG=b:117917136
TEST=Build grunt.

Change-Id: Ic38ea04bfcc1ccaa12937b19e9442a26d869ef11
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/29227
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-10-30 16:57:53 +00:00
Mario Scheithauer 58bf3e7632 siemens/mc_apl3: Add new mainboard variant mc_apl3
This mainboard is based on mc_apl1. In a first step, it concerns a copy
of mc_apl1 directory with minimum changes. Special adaptations for
mc_apl3 mainboard will follow in separate commits.

Change-Id: I963ec63bccf71296c3fdabfcf9f3009c2febc791
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/29353
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2018-10-30 12:16:30 +00:00
Patrick Rudolph e63a5f1e7f drivers/spi: Winbond specific write-protection enable
Extend the SPI interface to enable write-protection.

Tested on Cavium EVB CN81xx using W25Q128.

Change-Id: Ie3765b013855538eca37bc7800d3f9d5d09b8402
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25105
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-30 12:15:57 +00:00
Jonathan Neuschäfer 61322d7ad2 security/tpm: Fix references to tpm_setup function
Change-Id: Ia97ddcd5471f8e5db50f57b67a766f08a08180b1
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/29349
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-30 12:12:50 +00:00
Elyes HAOUAS dfbe6bd5c3 src: Add missing include <stdint.h>
Change-Id: I6a9d71e69ed9230b92f0f330875515a5df29fc06
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/29312
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-30 09:41:08 +00:00
Paul Menzel b06f8ddfe8 Documentation/riscv: Improve `index.md`
1.  Add dot/period to the end of sentences
2.  Remove blank line at the end of the file
3.  Break lines after 75 characters
4.  Use RISC-V spelling
5.  Add comma for clarity

Change-Id: Icbe803dfbe92ca7850204a1a9f7175befe9c8bcf
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/28654
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Philipp Hug <philipp@hug.cx>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-30 02:10:44 +00:00
Philipp Hug 1ed082bc8b riscv: simplify timer interrupt handling
Just disable the timer interrupt and notify supervisor.
To receive another timer interrupt just set timecmp and
enable machine mode timer interrupt again.

TEST=Run linux on sifive unleashed

Change-Id: I5d693f872bd492c9d0017b514882a4cebd5ccadd
Signed-off-by: Philipp Hug <philipp@hug.cx>
Reviewed-on: https://review.coreboot.org/29340
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2018-10-30 02:09:05 +00:00
Philipp Hug d4ab5bbc82 src/arch/riscv/misaligned.c: Fix an off-by-one error when loading the opcode
Pointer to opcode increases by unit uint16_t not byte.

Change-Id: I2986ca5402ad86d80e0eb955478bfbdc5d50e1f5
Signed-off-by: Philipp Hug <philipp@hug.cx>
Reviewed-on: https://review.coreboot.org/29339
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-10-30 02:07:58 +00:00
Philipp Hug bb7f41d85a sifive/fu540: correct cbmem support
Return correct memory location for cbmem instead of incorrectly returning memory size.

Change-Id: If7f490a46edebb04c2280bf317d1adacef08f30d
Signed-off-by: Philipp Hug <philipp@hug.cx>
Reviewed-on: https://review.coreboot.org/29197
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Xiang Wang <wxjstz@126.com>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-10-30 02:07:12 +00:00
Ronald G. Minnich 3d8e53f85a Add selfboot to the romstage
Now that bounce buffers are gone, and we can elide the selfload checking
code at build time, it is safe to add selfboot to the romstage.

Make it so.

This required a few other tweaks to rules.h and selfboot.c
to make it buildon ARM.

Change-Id: Ib6540921ad7cd7d58bfeab881d3978325b303cc2
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/29338
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Hug <philipp@hug.cx>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-30 00:37:04 +00:00
Marshall Dawson 46fc684783 x86/mp_init: Add configurable stack size for SMM relocate
A stack overrun has been observed on AMD64 CPUs during the SMM module
relocation process.  Change the assumed required size from equaling the
save structure's size to a Kconfig symbol.

A value of 0x400 doubles the size used by AMD64 systems and maintains
the size used by EM64T.

BUG=b:118420852
TEST=S3 on Grunt and verify 0x2f000-0x30000 uncorrupted

Change-Id: Ib1d590ee4afb06ca649afd6ad253cdfd969ae777
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29277
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-10-29 18:01:43 +00:00
Shelley Chen bf00401e8a mb/google/poppy/variants/nami: Add field to identify single channel DDR
Variants of Nami need to accommodate single channel DDR.  Will use
GPP_D10 on nami for identification.  GPP_D10 will return 1 when device
is using single channel DDR and 0 when using dual channel DDR.

BUG=b:117194353
BRANCH=None
TEST=dmidecode | grep Channel and make sure that the correct number of
     channels gets returned.

Change-Id: If86ab2c5404c4e818ce496ea935227ab5e51730a
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/29233
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-29 16:49:43 +00:00
Frans Hendriks 6cc937e687 src/drivers/pc80/tpm/tis.c: Dont use port value when invalid.
port is allocated in ACPI, without checking for value.
Don't use port value when zero.

BUG=N/A
TEST=Portwell PQ-M107

Change-Id: Ia44281b82d003b29bffbf985b774ddd661b65c4e
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/29331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-29 14:27:16 +00:00
Peter Lemenkov 9b83f760cd mb/lenovo/t430: Set USB always on when calling SMI sleep
Looks like we must do it in the same way as in l520, t420, t420s,
t430s, t520, t530, x201, x220, x230 models. No idea why t430 should be
handled differently.

Change-Id: Ic4851022267caca267b667b4e3c327838e0a0b66
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29031
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-29 11:26:36 +00:00
Paul Menzel 8950706169 mb/lenovo/t400: Use acpi_s3_resume_allowed()
Apply commit 12d681b2 (intel/i945 gm45: Use acpi_s3_resume_allowed())
also to the Lenovo T400.

See also commit 42ae0bae with Change-Id
I4e1e0ccf2abbe175c0e5ddcbb6ee7bf6afb1ae88 (mb/lenovo/x200: Use
acpi_s3_resume_allowed())

Change-Id: I9d4ac711375977a979a8b3e5606e2197847e88de
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-10-29 11:26:02 +00:00
Patrick Rudolph 82b1e019a5 Documentation: Improve payload fit
* Convert '' to `
* Add example how to use mkimage

Change-Id: Id83db3db51582cb0d6ded7f3152b5549fba1f2e7
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/29319
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-29 11:21:47 +00:00
Jonathan Neuschäfer 84bf089f6a Documentation/mainboard: Add emulation/spike-riscv.md
Move the usage instructions from their ad-hoc place in Kconfig.name to
the Documentation directory, and expand them a bit.

Change-Id: Id6c7bbca40a21ecba00cab736af2f2662a985106
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/28874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Philipp Hug <philipp@hug.cx>
2018-10-29 11:19:34 +00:00
Nico Huber c5f4a8c8f0 tegra210_lp0: make sure to build with compiler.h included
Like in ce1064e (tegra124_lp0: make sure to build with compiler.h
included), fix builds where `compiler.h` is needed.

Change-Id: If4b60a9db4520b58e48339a7e2726f2545cb4102
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/29311
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-10-29 08:40:37 +00:00
Patrick Georgi c6382cd4bf soc/intel/*: Make FSP header path user configurable
Required to compensate for Chrome OS' tree differences

Change-Id: I01fe80b55c69ff57da1c96a76bd1d9b5a2d4a9a8
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/29293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-27 23:58:15 +00:00
Arthur Heymans 40b0fc3f8b mb/lenovo/x200: Link gpio map instead of including a header
Linking should allow to link depending on possible future variants.
E.g. in Makefile.inc romstage-$(CONFIG_'VARIANT0') += gpio_variant0.c
etc.

This commit follows up on commit 7dee9745 with Change-Id
I88b5ef8e12ac606751952a493f626e1b146e98f7 ("mb/lenovo/x201: Link gpio
map instead of including a header").

Change-Id: Ibdb96deafbe422bf50fd2e1fc56a57ae53ccd5a0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29286
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-10-27 13:22:06 +00:00
Nico Huber 5a5f6a76ec build system: Fix FSP downloading
Check for PLATFORM_USES_FSP2_0 instead of MAINBOARD_USES_FSP2_0. The
latter is only valid for Skylake where we decide per mainboard if FSP2.0
is used. PLATFORM_USES_FSP2_0 is the one that actually enables the
FSP2.0 integration.

Change-Id: I3f16e5f4454c0bf02d51db5d1c267a921917f377
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/29291
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
2018-10-27 11:12:09 +00:00
Peter Lemenkov 1effaca4e7 mb/lenovo/*/acpi_tables: Remove comment about IGD displays
IGD display handling was rewritten with commit dd2bc3f8 with Change-Id
I556769e5e28b83e7465e3db689e26c8c0ab44757 ("igd.asl rewrite"). These
comments were removed as well (with some accidentally left behind).

Let's remove them and those who were introduced later with new ports.

Change-Id: I8d3e12d0c3b03b0de38e65f36b94ed706fbf893c
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29271
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-27 10:09:35 +00:00
Peter Lemenkov 037ceda63d mb/lenovo/*/gpio: Remove ifdef guards
These ifdefs are the remains from the following commits:

* fa1d688a with Change-Id I9909a5b2bdb4b59219db6304fa4332802fe0301c
  ("sandy/ivy native: dedup romstage.c main()")
* 7dee9745 with Change-Id I88b5ef8e12ac606751952a493f626e1b146e98f7
  ("mb/lenovo/x201: Link gpio map instead of including a header")

Change-Id: If83189688151f531a05780a87db3409cbacfbeff
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/29283
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-10-27 10:05:15 +00:00
Philipp Deppenwiese 296164e0fe arch/x86/acpi: Add TPM2 table support
* Distinguish between TPM 1.2 and 2.0
  ACPI table support
* Add TPM2 table support for TIS interface only

Change-Id: I030c7ea744bcfe61ebef8d66d1295273b5dccda5
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/29181
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2018-10-26 11:22:58 +00:00
Aamir Bohra 3c37b5a682 mainboard/intel/icelake_rvp: Do initial mainboard commit
Clone entirely from mainboard/intel/cannonlake_rvp
commit id: af89f49b83

List of changes on top off initial cannonlake_rvp clone
 1. Rename "Cannonlake" with "Icelake".
 2. Replace "cannonlake_rvp" with "icelake_rvp".
 3. Rename "cnl" with "icl".
 4. Remove unwanted SPD file, will add correct SPD with mainboard
    patches.
 5. Remove NHLT related implementation.
 6. Remove FSP configs, will add once FSP headers are available.
 7. Removed smihandler.c, will add later if needed.

Change-Id: I875972d1fb2f630bf5eb29bd955c484e7f9aa415
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/29164
Reviewed-by: Naresh Solanki <naresh.solanki@intel.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-26 11:22:04 +00:00
Rizwan Qureshi e9e08ceb3c vendorcode/intel/fsp/icelake: Add icelake FSP header file template
icelake FSP is still under development and hence the FSP header files
and binaries are not available on github. Meanwhile add basic header
files required to compile the SoC and mainboard with FSP2.0.

BUG=None
BRANCH=None
TEST=Build for icelake_rvp board successfull.

Change-Id: I9ab8f180b572ec553e7531f7483d091f6897c462
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/29163
Reviewed-by: Naresh Solanki <naresh.solanki@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-26 11:21:05 +00:00
Aamir Bohra 3ee54bbf94 soc/intel/icelake: Do initial SoC commit
Clone entirely from Cannonlake
commit id: 3487095304

List of changes on top off initial cannonlake clone
1. Replace "Cannonlake" with "Icelake"
2. Replace "cnl" with "icl"
3. Replace "cnp" with "icp"
4. Rename structrue based on Cannonlake with Icelake
5. Remove and clean below files
   5.a. All NHLT blobs and related files.
   5.b. remove cnl_memcfg_init.c file, will be added later.
   5.c. Remove vr_config.c, this is WIP.
   5.d. Clean up upd override in fsp_params.c,
	will be added once FSP available.
   5.e Remove CNL-H based GPIO configuartion.

Ice Lake specific changes will follow in subsequent patches.

Change-Id: I756fa7275c4190aebc0695f14484498aaf5662a5
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/29162
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Naresh Solanki <naresh.solanki@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-26 11:20:54 +00:00
Huayang Duan bb7f4c7a4f mediatek/mt8183: Correct MPU ctrl register address
Remove unused members in emi_mpu_regs and sdram_params. Change
mpu_ctrl_d to array so the offset (0x804) for D1 is corrected.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui, and inits DRAM successfully with related
patches.

Change-Id: I95c002058dc5e1cba868334fecf8f42bd3e497e6
Signed-off-by: Huayang Duan <huayang.duan@mediatek.com>
Reviewed-on: https://review.coreboot.org/29251
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-26 11:20:35 +00:00
Lijian Zhao 0f5d7b9daf soc/intel/cannonlake: Add back PM TIMER EMULATION
ACPI PM timer emulation will be added back as default FSP stops TCO count
for power saving, which will also stop ACPI PM timer within PCH. CPU PM TIMER
EMULATION will help UEFI payload pass, instead of endless loop wait for
ACPI PM timer counter to increase.

BUG=N/A
TEST=Build and boot up fine with whiskey lake rvp board into UEFI shell.

Change-Id: Ie069e815e6244c3f85fabf51e186311621d316fd
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/28937
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-26 11:20:00 +00:00
Ronald G. Minnich c308554c10 selfboot: create selfboot_check function, remove check param
The selfboot function was changed at some point to take a parameter
which meant "check the allocated descriptors to see if they target
regions of real memory."

The region check had to be buried deep in the last step of loading since
that is where those descriptors were created and used.

An issue with the use of the parameter was that it was not possible
for compilers to easily divine whether the check code was used,
and it was hence possible for the code, and its dependencies, to be
compiled in even if never used (which caused problems for the
rampayload code).

Now that bounce buffers are gone, we can hoist the check code
to the outermost level. Further, by creating a selfload_check
and selfload function, we can make it easy for compilers
to discard unused code: if selfload_check is never called, all
the code it uses can be discarded too.

Change-Id: Id5b3f450fd18480d54ffb6e395429fba71edcd77
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/29259
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-10-25 16:57:51 +00:00
Richard Spiegel de332f35da soc/amd/common/def_callouts.c: Prefer using '"%s...", __func__'
In function agesa_GfxGetVbiosImage(), the function name is used in a print
string. Use __func__ instead.

BUG=b:117642170
TEST=Build grunt.

Change-Id: I95a042bd95cc729305a8a008e3bb464f60c2668d
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/29246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-10-25 16:54:39 +00:00
Richard Spiegel bb49bfce67 mb/google/kahlee/irq_tables.c: Prefer using '"%s...", __func__'
In function write_pirq_routing_table(), the function name is used in a print
string. Use __func__ instead.

BUG=b:117642170
TEST=Build grunt.

Change-Id: Ibf8673c5b2cda1105aae1edb46f6589d55208c50
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/29245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-10-25 16:51:08 +00:00
Richard Spiegel 8c614f2017 soc/amd/stoneyridge: Remove "else" after a return
File ramtop.c has one instance of if()/else where the if tests for top mem
in lower 4GiB, and returns just before the "else" statement. These "else"
statements are not needed.

BUG=b:117648025
TEST=Build and boot grunt.

Change-Id: Iba16a416e78dae75a95a11d38179161c5a11b2ad
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/29247
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-25 16:16:25 +00:00
Praveen hodagatta pranesh b66757fc58 soc/intel: Consolidate FSP CAR setup and teardown code
This patch adds following changes,

- APL, CFL, DENVERTON soc's using same implementation to setup and
  teardown FSP CAR. Hence cache_as_ram_fsp.S from soc folder is
  cosolidated into one file and moved to common code CPU car folder.
- exit_car_fsp.S is from APL, DNV soc folder is clubbed into one file
  and moved to common CPU car.
- The new file apollolake/fspcar.c is addded to pass tempraminit
  parameters.

- Coffee lake Soc uses FSPT to support Intel Security features like
  BootGuard verify boot and Measured boot. Add FSP CAR support for CFL
  by programming tempraminit parameters and add FSP_T_XIP default if
  FSP_CAR is selected.

BUG= None
TEST= Build for both CFL RVP11 & RVP8 and verified for successful CAR setup.
      Build for both leafhill and harcuvar platform by selecting CONFIG_FSP_CAR
      without errors.

Change-Id: I98d2dd9711ddc0d7ea7d1672fba700259ee3a3a9
Signed-off-by: Praveen hodagatta pranesh <praveenx.hodagatta.pranesh@intel.com>
Reviewed-on: https://review.coreboot.org/29209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-10-25 09:26:50 +00:00
David Wu ac6a5080ec mb/google/fizz/variants/kalista: Add variant for kalista
Add a new variant of fizz for the kalista board.

Key differences from baseboard include:
- GPIO changes
- devicetree.cb changes

BUG=b:117066935
BRANCH=master
TEST=Build (as initial setup)

Change-Id: I808c5e0883049575cbedd181c249a78a833fa96a
Signed-off-by: David Wu <David_Wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/29205
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-25 09:23:11 +00:00
Furquan Shaikh b87ad06d2d mb/google/fizz: Enable use of override devicetree
This change enables override device tree for Fizz to allow variants to
provide their own overrides and also moves I2C5 realtek node to
fizz/overridetree.cb since it doesn't apply to some variants being
added for Fizz.

Change-Id: Ia1a069fc539b51a22882ef94b55baf5bf7cd302f
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/29242
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2018-10-25 09:22:53 +00:00
Tristan Shieh 156a63881f google/kukui: Support recovery mode
Get recovery mode switch from EC and pass it to payload.

BUG=b:80501386
BRANCH=none
Test: Boots correctly on Kukui.

Change-Id: Ib92afca885e5a97ec4646f55f2279ef56a61af5a
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/29190
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2018-10-25 09:22:12 +00:00
praveen hodagatta pranesh cf04c61170 soc/intel/cannonlake: Enable S4 sleep state support
Add ACPI entry in sleepstates.asl to support S4 (hibernate).

TEST: boot to Windows on CFL RVP11 & RVP8, verified hibernate functionality.

Change-Id: I751c774e6ec7fd89ac3af5a619033bd38a759281
Signed-off-by: praveen hodagatta pranesh <praveenx.hodagatta.pranesh@intel.com>
Reviewed-on: https://review.coreboot.org/28846
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-10-25 09:21:24 +00:00
Marshall Dawson 74258d789c soc/amd/common/pi: Correct top of DRAM reporting by AGESA
Accurately reflect the intention of the syslimit value returned
from AmdInitPost().  Assume FFs for the non-present bits.

BUG=b:118178425
TEST=Boot Grunt and verify reported value = TOM2-1.

Change-Id: Ie8ea4fcbfd52c46ad441890f0decaf0f55816cfd
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/29229
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-10-25 00:05:23 +00:00
chris wang 76118a7d19 mb/google/kahlee: Enable 2T mode for liara
Liara auto restart issue is caused by memory access error and consequent
kernel panic. To solve this issue, revert the CL:1243666 (Disable
NbP-state on Liara) and use 2T mode instead.

BUG=b:116082728
TEST=verify the 2T mode is enabled/boot into ChromeOS and no auto restart/run
memtester passed 10 cycle.

Change-Id: I3a96276d88ffb70530d72b15c07b59a01cc6209a
Signed-off-by: Chris Wang <chris.wang@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/29179
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2018-10-24 15:58:55 +00:00
Arthur Heymans d522db048b nb/intel/*: Use 2M TSEG instead of 8M on pre-arrandale hardware
8M was set in the assumption that at least 4M was needed for IED
(Intel Enhanced Debug) , but this is not true.

The SMRR MTRR's need to have TSEG aligned to its size which is easier when TSEG
is only 2M. Also at most 6M of RAM more becomes available for use.

Change-Id: I4b114c8dc13699b3c034f0a7060181d9d590737b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/27873
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-24 10:04:41 +00:00
Arthur Heymans cf2941aec2 cpu/intel/smm: Don't make assumptions on TSEG_SIZE
Do not assume:
- TSEG is 8M
- IED_REGION_SIZE is set (not needed on older platforms).

Change-Id: I1aadc6f0459a8035864dcf02b0a07e00b284fe2a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/27872
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-24 10:04:17 +00:00
Huayang Duan e19d61b4e8 mediatek/mt8183: Initialize DRAM with a sequence in constant array
The DRAM init sequence is simply setting some values on register
for all DRAM modules, no logic involved;
so we can replace it by an array to configure easily.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui, and inits DRAM successfully with related
     patches.

Change-Id: Iacd3ce909ba7a0bdf699c5bfcb2b97f383d7bb6f
Signed-off-by: Huayang Duan <huayang.duan@mediatek.com>
Reviewed-on: https://review.coreboot.org/28836
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2018-10-24 10:03:32 +00:00
Denis 'GNUtoo' Carikli 48c24ce5ee util/bincfg: code cleanup: convert sym_table to a local variable
Global variables are considered a bad practice.

Change-Id: I652a8da75498f871a53eb7509f6145c4842e3373
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: https://review.coreboot.org/27810
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-10-24 10:02:06 +00:00
Elyes HAOUAS 78d338ccb9 sb/amd: Use 'unsigned int' to bare use of 'unsigned'
Change-Id: I05f9ea97ea80ac7a8f34845c59bd66e424ba2991
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/28709
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-10-24 10:01:55 +00:00
Arthur Heymans 17ad4598e9 nb/intel/*: Account for cbmem_top alignment
Having cbmem floating between two ram regions is a bad idea and some
payloads (e.g. tianocore) even bail out on this. To overcome this issue mark the
region between tom and cbmem as uma.

Change-Id: Ifab37b0003f09a680024d5b155ab0bb157920952
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/27871
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-10-24 10:00:31 +00:00
Arthur Heymans 794f56bdf5 nb/intel/i945: Fix domain resources
Fixed resources have to be registered early during
read_resources() phase, such that device allocator
will avoid them.

Change-Id: Iff5f1426015a908e988ff757055034c87085c0f5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/27119
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-24 10:00:20 +00:00
Lijian Zhao 00fa4f01e4 intel/fsp: Fix license header for MeminfoHob.h
Current header file included a proprietary license, fix that by using
same license shared on public fsp release on fsp.

BUG=https://ticket.coreboot.org/issues/177
TEST=N/A

Change-Id: I129c8a465e702d3885d994f4fab352b34d46f177
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/29224
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ian Kelling <ian@iankelling.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-10-24 09:58:22 +00:00
John Su 75a7862c47 mb/google/octopus/variants/fleex: Update DPTF parameters
1. Update PSV values for cpu and sensers.
2. Change PL1 min value from 3w to 4.5w.
3. Change TSR2 TRT source from charger to CPU.

Refer to 112448519#comment31.

BUG=b:112448519
TEST=Build coreboot for Octopus board

Change-Id: I7c7df0f54374fdaa4cf57d5c255d841d7db38cfc
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/29146
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2018-10-24 09:57:58 +00:00
Furquan Shaikh 6d2f7d24ef mb/google/poppy/var/nocturne: Use CRFP as device name for FP device
This change uses CRFP ACPI name for FP device since user space
utilities expect this name for triggering different actions.

BUG=b:112974410
BRANCH=nocturne

Change-Id: I63309227c916b43917e529c223cf738fc3baa209
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/29231
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-24 09:57:47 +00:00