Commit Graph

31176 Commits

Author SHA1 Message Date
Arthur Heymans 95755dd65d soc/intel/broadwell: Use common INTEL_SB SPI code
Change-Id: Id906733ac3719c8d6835aad52ca87beb81b5771d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-10 22:41:19 +00:00
Arthur Heymans 2abbe46765 soc/intel/broadwell: Use common SB RTC code
Change-Id: Iedb9a8962ac1b4107e9192b0be610fb92d2cfdc6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33202
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-10 22:40:59 +00:00
Arthur Heymans 1d4bdda47f sb/intel/common: Remove the SOUTHBRIDGE_INTEL_COMMON Kconfig symbol
All code in southbridge/intel/common is now properly guarded by a
Kconfig symbol, making SOUTHBRIDGE_INTEL_COMMON obsolete.

Change-Id: Ifeccfaa9534f903e3f3543e1f9f3d5f3345b461e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36438
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-10 22:40:49 +00:00
Arthur Heymans 23a6c79126 sb/intel/common: Make COMMON_RESET optional
Change-Id: Id706919835100903dd4ebac2bbd2f3a44c2b6b60
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36003
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-11-10 22:40:38 +00:00
Arthur Heymans 074730c14c sb/intel/common: Make linking rtc.c conditional
Change-Id: I7321da453c0d9bb4a142c3c93103d8dc0ff416b7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33201
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-10 22:39:46 +00:00
Arthur Heymans 1c54bc4849 lib/cbmem: Remove the cbmem_top_init() hook
This hook is unused and with the need for initializing storage to
share cbmem_top over other stages gone, there is likely no future
need for this.

Change-Id: I4ba9daea61b6d7b8949bbd2c4fb71d0a0fa20d93
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36369
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-11-10 15:39:00 +00:00
Arthur Heymans 8b7cd43d5d arch/x86: Remove EARLY_EBDA_INIT support
This is unused now.

Change-Id: Ie8bc1d6761d66c5e1dda40c34c940cdba90646d2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-11-10 15:38:45 +00:00
Arthur Heymans 005e25de0f soc/intel/common/ebda: Drop code
There is no need to use EBDA to pass cbmem_top from romstage to
later stages.

Change-Id: I46e2459ff3c785f530cabc5930004ef920ffc89a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-10 15:38:25 +00:00
Arthur Heymans cf5af24a94 soc/intel/common/sa: Remove EBDA dependency
Saving cbmem_top across stages is not needed anymore so EBDA should
not be used. The guard to cbmem_top_chipset implementation was
inappropriate.

Change-Id: Ibbb3534b88de4f7b6fc39675a77461265605e56e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36614
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner
2019-11-10 15:38:17 +00:00
Arthur Heymans c4c5d85c22 lib/Kconfig: Remove RAMSTAGE_CBMEM_TOP_ARG
All targets now have the _cbmem_top_ptr symbol populated via calling
arguments or in the nvidia/tegra210 case worked around by populating
it with cbmem_top_chipset explicitly at the start of ramstage, so the
Kconfig guarding this behavior can be removed.

Change-Id: Ie7467629e58700e4d29f6e735840c22ed687f880
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36422
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-10 11:46:29 +00:00
Arthur Heymans 55069d15d8 arch/riscv: Pass cbmem_top to ramstage via calling argument
Tested on the Qemu-Virt target both 32 and 64 bit.

Change-Id: I5c74cd5d3ee292931c5bbd2e4075f88381429f72
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36558
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-10 11:46:10 +00:00
Arthur Heymans 7f22933e98 Kconfig: Remove untrue comment
In the vast majority of cases the bootdevice is the bottleneck and
compression increases bootspeed.

Change-Id: Id0c11cf6d9a605d24e3148abb8d11a65d48a4529
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36675
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-09 22:36:00 +00:00
Kyösti Mälkki 21d6a27ac0 arch/x86: Replace some __SMM__ guards
We generally do not guard source in attempts to reduce
the final object sizes, but rely on garbage collection.

Most of the __unused attributes inserted here will be
removed when remaining __SIMPLE_DEVICE__ guards can
be removed.

Change-Id: I2440931fab4f41d7e8249c082e6c9b5a9cd0ef13
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36641
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-09 11:03:03 +00:00
Kyösti Mälkki be5317f6d0 ELOG: Avoid some preprocessor use
Change-Id: I8daf8868af2e8c2b07b0dda0eeaf863f2f550c59
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36648
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-09 10:50:12 +00:00
Kyösti Mälkki 9dd1a12f9c ELOG: Introduce elog_gsmi variants
This avoids a lot of if (CONFIG(ELOG_GSMI)) boilerplate.

Change-Id: I87d25c820daedeb33b3b474a6632a89ea80b0867
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36647
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-09 10:49:47 +00:00
Arthur Heymans 7e4bfe4b91 mb/asus/p5ql-em: Add mainboard
Tested, working:
- First dimm slot of each channel
- USB, SATA
- CPU FSB at 800, 1067 and 1333MHz
- Libgfxinit on DVI and VGA slot
- PCI slot
- Realtek NIC (configure MAC address in Kconfig)
- PEG slot
- PS2 keyboard

Tested, not working:
- second dimm slot for each channel. Those are hooked up to the second
  rank of the channel, instead of rank 3 and 4. The raminit does not
  support such setups.

Untested:
- PCIe x1 slot, likely works fine
- HDMI

Tested using SeaBIOS 1.12, Linux 4.19.

Change-Id: I88fe9c66dae079cd7eedcc9736c5922defbc0e5a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-11-09 05:37:09 +00:00
Subrata Banik b8df689a6a soc/intel/tigerlake/acpi: Copy acpi directory from icelake
Clone entirely from Icelake

List of changes on top off initial icelake clone
1. Removed Descriptor Name for Memory mapped SPI flash and
local APIC in northbridge.asl
2. Rearranged code in gpio.asl to move RBUF object under _CRS
and made the file use ASL2.0 syntax.
3. Make use of absolute path for scs.asl
4. Remove unused smbus.asl
5. Rearranged code in nothbridge.asl to move MCRS object under _CRS,
use absolute variable path and added TODO for further clean up.
6. Refer absolute variable path in scs.asl

Change-Id: If967cb5904f543ce21eb6e89421df0e5673d2238
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-11-09 03:26:54 +00:00
Subrata Banik 91e89c5393 soc/intel/tigerlake: Do initial SoC commit till ramstage
Clone entirely from Icelake

List of changes on top off initial icelake clone
1. Replace "Icelake" with "Tigerlake"
2. Replace "icl" with "tgl"
3. Replace "icp" with "tgp"
4. Rename structure based on Icelake with Tigerlake
5. Remove and clean below files
   5.a Clean up upd override in fsp_params.c,
	will be added once FSP available.
   5.b Remove __weak functions from fsp_params.c
   5.c Remove dGPU over PCIE enable Kconfig option
6. Add CPU/PCH/SA EDS document number and chapter number
7. Remove unnecessary headers from .c files based on review

Tiger Lake specific changes will follow in subsequent patches.
1. Include GPIO controller delta over ICL
2. FSP-S related UPD overrides as applicable

Change-Id: Id95e2fa9b7a7c6b3b9233d2c438b25a6c4904bbb
Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36087
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-09 03:26:34 +00:00
Subrata Banik baf6d6e203 soc/intel/tigerlake/romstage: Do initial SoC commit till romstage
Clone entirely from Icelake

List of changes on top off initial icelake clone
1. Replace "Icelake" with "Tigerlake"
2. Replace "icl" with "tgl"
3. Replace "icp" with "tgp"
4. Rename structure based on Icelake with Tigerlake
5. Remove and clean below files
   5.a Clean up upd override in fsp_params.c,
	will be added once FSP available.
   5.b Remove __weak functions from fsp_params.c
6. Add CPU/PCH/SA EDS document number and chapter number
7. Add required headers into include/soc/ from ICL directory

Change-Id: I24980c196efb2c5569996ca4fb315c256cf9de87
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36552
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-09 03:26:23 +00:00
Subrata Banik 930c31c63a soc/intel/tigerlake/bootblock: Do initial SoC commit till bootblock
Clone entirely from Icelake

List of changes on top off initial icelake clone
1. Replace "Icelake" with "Tigerlake"
2. Replace "icl" with "tgl"
3. Replace "icp" with "tgp"
4. Rename structure based on Icelake with Tigerlake
5. Add CPU/PCH/SA EDS document number and chapter number
6. Add required headers into include/soc/ from ICL directory

Tiger Lake specific changes will follow in subsequent patches.
1. Add Tigerlake specific device IDs (CPU/PCH/SA)

Change-Id: Id7a05f4b183028550d805f02a8078ab69862a62e
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36550
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2019-11-09 03:26:10 +00:00
Kyösti Mälkki f307ffbe47 google/stout: Remove ELOG_GSMI from EC
EC_HOST_EVENT_xxx are only defined with ec/chromeec.

Change-Id: Ie0a1349ab460142dc2744155a422b5ee22528e4c
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36663
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-11-08 20:57:47 +00:00
Frans Hendriks 76ffa88e1e configs/config.facebook_fbg1701: Add config file
Enable vendorcode measured and verified boot.
Use VBOOT test key for VENDORCODE_ELTAN_VBOOT_KEY_FILE

BUG=N/A
TEST=booting Embedded Linux 4.20 kernel on Facebook FBG1701

Change-Id: Ia2cb3bb873b2d5e7e9031e5b249d86605d8e0945
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34343
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-11-08 09:19:03 +00:00
Kyösti Mälkki 254933fba7 google/parrot: Remove ELOG_GSMI from EC
EC_HOST_EVENT_xxx are only defined with ec/chromeec.

Change-Id: Idf7b04edc3fce147f7857691ce7d6a0ce03f43fe
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36649
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-11-08 07:52:03 +00:00
Kyösti Mälkki 056fbe49ff ELOG, soc/intel: Avoid some preprocessor use
Change-Id: I5378573f37daa4f09db332023027deda677c7aeb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36646
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-08 07:51:18 +00:00
Kyösti Mälkki c86fc8e63d sb,soc/intel: Reduce preprocessor use with ME debugging
Change-Id: Iedd54730f140b6a7a40834f00d558ed99a345077
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-11-08 07:49:15 +00:00
Kyösti Mälkki 82c0e7e3d5 arch/x86: Drop some __SMM__ guards
Change-Id: I64063bbae5b44f1f24566609a7f770c6d5f69fac
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36637
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-11-08 07:46:23 +00:00
Kyösti Mälkki 44f1af2996 intel/braswell: Remove duplicate set_max_freq() prototypes
Change-Id: I13ec9f477c64831848fb0e80b97bfbc10896c195
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36640
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2019-11-08 07:45:00 +00:00
Kyösti Mälkki c7fa911279 eltan/security: Replace __PRE_RAM__ with ENV_ROMSTAGE_OR_BEFORE
Change-Id: Id56a63a67b7eb70dce6687bb9c2734a711f611b3
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36635
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-08 07:44:12 +00:00
Kyösti Mälkki bf43f9ef13 eltan/security: Replace __BOOTBLOCK__ with ENV_BOOTBLOCK
Change-Id: I6ec5a33cd6a6342adfe73c050e0c376bbefad96a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36634
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2019-11-08 07:43:43 +00:00
Kyösti Mälkki ed8eaab08a eltan/security: Remove some preprocessor guards
We generally let garbage-collection take care of unused functions.
While at it, move some related variable declarations in to the
header file and declare them const like they should be.

Change-Id: I7c6fa15bd45f861f13b6123ccb14c55415e42bc7
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36632
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-08 07:43:09 +00:00
Kyösti Mälkki dd227a7d97 mb/facebook/fbg1701: Remove some preprocessor guards
Change-Id: Ia7289fa8337e1a93e620a52a67ca8cbdd78a66bc
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2019-11-08 07:41:35 +00:00
Peichao Wang 07f798d74c mb/google/hatch/var/akemi: disable unused USB port for Akemi platform
Akemi platform dosen't support WWAN device and unused USB2 port 3, 4,
5, 7, 8 and USB3 port 3, 4, 5 so close them.

BUG=None
TEST=FW_NAME="akemi" emerge-hatch coreboot chromeos-ec
chromeos-bootimage

Signed-off-by: Peichao.Wang <peichao.wang@bitland.corp-partner.google.com>
Change-Id: I7eff4da77caea7d4fe46597320be134d34d78a22
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36644
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2019-11-08 07:41:09 +00:00
Mario Scheithauer 4e074033de soc/intel/{apl,dnv,quark}: Use strip_quotes for FSP options
The commit 8fc523e3 (drivers/intel/fsp2_0: Use strip_quotes for cbfs
filenames) breaks the Siemens APL mainboards as FSP-M never returns once
it is called. The reason for this is that the -b option is missing when
adding the FSP package to cbfs via cbfstool.
This patch fixes this issue.

TEST=tested on siemens/mc_apl5

Change-Id: I48e5fa36e1ad799d09714f53a3041f73b8ec3550
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36645
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: David Guckian
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-07 14:14:20 +00:00
Subrata Banik 1b1a26acdc soc/intel/icelake: Refactor pch_early_init() code
This patch keeps required pch_early_init() function like ABASE programming,
GPE and RTC init into bootblock and moves remaining functions like
TCO configuration and SMBUS init into romstage/pch.c in order to maintain
only required chipset programming for bootblock and verstage.

TEST=Able to build and boot ICL DE system.

Change-Id: I4f0914242c3215f6bf76e41c468f544361a740d8
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36627
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-07 14:14:11 +00:00
Wim Vervoorn 114e2e8830 lib/cbfs: Add fallback to RO region to cbfs_boot_locate
With this change cbfs_boot_locate will check the RO (COREBOOT) region if
a file can not be found in the active RW region. By doing so it is not
required to duplicate static files that are not intended to be updated
to the RW regions.

The coreboot image can still be updated by adding the file to the RW
region.

This change is intended to support VBOOT on systems with a small flash
device.

BUG=N/A
TEST=tested on facebook fbg1701

Change-Id: I81ceaf927280cef9a3f09621c796c451e9115211
Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36545
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-07 14:12:00 +00:00
Kyösti Mälkki 32c8de10b0 Rangeley: Fix incorrect BCLK
Not all Rangeley SKUs have a fixed 100MHz BCLK.

As per BIOS Writer's Guide, BCLK is available in MSR_FSB_FREQ 0xCD[1:0].
Using fixed BCLK was causing wrong values of core frequencies in _PSS table
for SKUs that do not have BCLK=100MHz.

Change-Id: Id8e0244fab0283b74870950cb00a95aab2a7201f
Signed-off-by: Hannah Williams <hannah.williams@dell.com>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35348
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-07 14:08:46 +00:00
Edward O'Callaghan 3042af6256 hatch: Create puff variant
Includes:
 - gpio mappings,
 - overridetree.cb,
 - kconfig adjustments for reading spd over smbus.

V.2: Rework devicetree with comments and drop some useless gpio maps.

BUG=b:141658115
TEST=./util/abuild/abuild -p none -t google/hatch -x -a

Change-Id: I6449c4fcc1df702ed4f0d35afd7b0981e4c72323
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36452
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-11-07 06:24:03 +00:00
Edward O'Callaghan 881f9cb715 mainboard/google: Allow Hatch variants to read SPD data over SMBus
All Hatch variants so far embed static SPD data encoded within the
firmware image. However we wish the flexibility for romstage
implementations that allow for reading the SPD data dynamically over
SMBus. This romstage variant allows for reading the SPD data over
SMBus.

V.2: Dispence with memcpy().
V.3: Revert back to previous patch with memcpy().
V.4: Rewrite again to avoid memcpy().

BRANCH=none
BUG=b:143134702
TEST=./util/abuild/abuild -p none -t google/hatch -x -a

Change-Id: I3516a46b91840a9f6d1f4cffb2553d939d79cda2
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36449
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-07 06:23:55 +00:00
Kane Chen 46b125ab6b mb/google/hatch/variants/helios: Modify touchscreen power on sequence
The previous values do not affect the touchscreen function.  But, the
previous values cause the power leakage in S0ix.

from b/142368161:

1. Modify GPP_D: The specification define T1 >= 10ms. We change it to
   12ms for a safety and low impact value in our mind.  Enable pin as
   GPP_D9 is define to be AVDD in specification. Set it to 10ms to
   make it to be the final one to pull low during power off sequence .

2. Add GPP_C4: If we set stop_off_delay_ms to be 1.  The true T4 we
   got will be 300us . Set stop_off_delay_ms to be 2 . True T4 will be
   500us . So we change it to 5 to be a low impact value in our mind
   according to the true T4 value we got .

BUG=b:142368161
BRANCH=Master
TEST=emerge-hatch coreboot chromeos-bootimage
     ./util/abuild/abuild -p none -t google/hatch -x -a

Signed-off-by: YenLu Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: I86c920ff1d5c0b510adde8a37f60003072d5f4e7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35907
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-07 02:08:40 +00:00
Kyösti Mälkki 2d90cb1547 arch/x86: Create preprocessed __ROMCC__ bootblock source
Output file is used only as a debugging aid.

Change-Id: Iea9e1a66409659b47dfa3945c63fa1a7874de1ca
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35602
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-11-06 14:06:51 +00:00
Arthur Heymans 585786b696 drivers/intel/fsp2_0: Hide the Kconfig option to run FSP-M XIP
This is a property of the FSP, not something the user can decide.

Change-Id: I2086e67d39e88215ee0f124583b810f7df072f80
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36170
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-06 14:05:34 +00:00
Arthur Heymans 08aeda6c14 soc/intel/common: Make native and FSP-T CAR init mutually exclusive
postcar stage does not consume cpulib.c, so don't include it there.

Change-Id: Ie723412dcf09151cdbb41e357ad9c2e4f393cb47
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36168
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-06 14:02:21 +00:00
Arthur Heymans 71bd7e439f drivers/intel/fsp2_0: Move Debug options to "Debugging"
Change-Id: I8e07c8186baf3d8e91b77c5afb731d26a1abfbaf
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36165
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-11-06 14:01:48 +00:00
Arthur Heymans aae81906b9 Kconfig: Organize debugging options per file extensions
Change-Id: Ia4553fb4cd95d2f1fa86eecbf382e6e6dec52b92
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36616
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-06 14:01:30 +00:00
Arthur Heymans 55f01326cc util/lint/kconfig_lint: Handle glob prefix and suffix
Change-Id: I9067a95ff171d6da58583b3d4f15596b4584d937
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36626
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>
2019-11-06 14:01:00 +00:00
Xiang Wang 4e39c824e0 lib: add calculate crc byte by byte
Change-Id: I5cab1f90452b08a464ad7a2d7e75d97187452992
Signed-off-by: Xiang Wang <merle@hardenedlinux.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36624
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-11-06 13:58:53 +00:00
Mathew King a0218958a0 mb/g/drallion: Override smbios enclosure type for drallion
Drallion can be either a clamshell or convertible depending on the
presence of the 360 sensor board. Set the smbios type 3 enclosure type
to either CONVERTIBLE or LAPTOP accordingly.

BUG=b:143701965
TEST='dmidecode -t 3'
     Type = Convertible with sensor board connected
     Type = Laptop with sensor board disconnected

Change-Id: I766e9a4b22a490bc8252670a06504437e82f72d5
Signed-off-by: Mathew King <mathewk@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36512
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-06 13:58:08 +00:00
Mathew King 51b1fc6e39 mb/g/drallion: Consolidate 360 sensor board detection
Create a single function to determine if the 360 sensor board is present
on a device.

BUG=b:143701965
TEST='emerge-drallion coreboot'

Change-Id: I4100a9fdcfe6b7134fb238cb291cb5b0af4ec169
Signed-off-by: Mathew King <mathewk@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2019-11-06 13:58:00 +00:00
Arthur Heymans 763eeecb30 arch/riscv: Use FDT from calling argument when using FIT
Only FIT payloads provide their own FDT.

Change-Id: Id08a12ad7b72ad539e934a133acf2c4a5bcdf1f9
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36599
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-11-06 13:57:25 +00:00
Nico Huber c01d0920bb arch/riscv: Rename `stages.c` to `romstage.c`
It's only used for romstage and is incompatible to ramstages. The latter
get `cbmem_top` passed as a third argument now.

Also drop comments that don't apply to this file anymore.

Change-Id: Ibabb022860f5d141ab35922f30e856da8473b529
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-11-06 13:57:12 +00:00