Commit Graph

17246 Commits

Author SHA1 Message Date
Marshall Dawson 7bf860ffed soc/amd/stoneyridge: Clarify BAR mask in SPI base
The format of the D14F3xA0 SPI Base_Addr register is different
than a traditional BAR.  Change the function to preserve any
enables already in place.  Change the AND mask to remove the
reserved field and the enables.

Change-Id: I9a43c029a2e1576703ce9cdc787d18658e9190a5
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/20790
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-27 21:18:39 +00:00
Lijian Zhao 03e44f46b0 soc/intel/cannonlake: Correct gpio definition
The following changes have been applied for GPIO:
1. Correct port id using by GPIO community 3 for CNL-LP.
2. Correct number of doubleword for each pad from 2 to 4.

Change-Id: I717d1ffba8e6722543f4cf8083fe6145fa85e184
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20775
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-27 15:50:36 +00:00
Mario Scheithauer 812f1783bb siemens/mc_apl1: Select skip RAPL configuration
The mc_apl1 mainboard needs to disable the RAPL algorithm for a constant
power management of the processor package. An active RAPL algorithm
leads to negative effects with our real time software.

Change-Id: I09ca56a034fd3896a000e64cac35f12fb507a682
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/20760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-27 13:13:02 +00:00
Mario Scheithauer 38b6100229 soc/intel/apollolake: Make usage of RAPL selectable
Apollo Lake SoC supports configuration of Running Average Power Limits
(RAPL) for package domain. This feature is not required for all APL
mainboards. According to the APL SoC EDS Vol 4 chapter 18.4 Power
Limiting Control it is not necessary to enable the RAPL algorithm per
default. For that reason make the RAPL configuration selectable.

Change-Id: Ib737b162f72b76c15e5768859f9099e2e7ef6426
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/20759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-27 13:12:56 +00:00
Kyösti Mälkki 806ea08bb2 timestamp: Apply factor to recorded stamps
If we dont have a constant TSC rate, timestamp table
has odd leaps and may appear to run backwards. Add
functionality to apply a factor such that all stamps
are in the same timebase.

Change-Id: Idab9c2c00e117c4d247db8cc9a2897640fa01edd
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/19330
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-27 06:55:03 +00:00
V Sowmya 01ea8f1fcc mainboard/google/poppy: Configure GPIO.1 and GPIO.2 for daisy chain mode
Configure GPIO.1 and GPIO.2 as sensor SDA and SCL respectively
for TPS68470 PMIC in daisy chain mode.
* GPIO.1: Sensor SDA in daisy chain mode.
* GPIO.2: Sensor SCL in daisy chain mode.

BUG=b:38326541
BRANCH=none
TEST=Build and boot soraka. Dump and verify that the generated DSDT table
has the required entries. Verified that sensor probe is successful.

Change-Id: I7f9686427772a33c06e4cdaafee9b0349d700639
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/20665
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rajmohan Mani <rajmohan.mani@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-27 00:32:26 +00:00
V Sowmya f19ee0d737 mb/google/kblrvp: Add camera devices power sequencing through ACPI power resources
This patch controls the camera devices power through ACPI power resource.
* Add Opregions for PMIC1 and PMIC2,
	* TI_PMIC_POWER_OPREGION
	* TI_PMIC_VR_VAL_OPREGION
	* TI_PMIC_CLK_OPREGION
	* TI_PMIC_CLK_FREQ_OPREGION
* Add power resources for sensors and VCM,
	* OVTH for CAM0
	* OVFI for CAM1
	* VCMP for VCM
* Implement _ON and _OFF methods for sensor and VCM module's power on
and power off sequences.

BUG=none
BRANCH=none
TEST=Build and boot kblrvp. Dump and verify that the generated DSDT table
has the required entries. Verified that sensor probe is successful.

Change-Id: I02c4784ab3f4d6e1f0e657ad50b727ff11da8b9c
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/20663
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-27 00:31:58 +00:00
V Sowmya 34e92a9be5 mb/google/kblrvp: Configure ports and endpoints for sensor and CIO2 devices
Bind the camera sensor and CIO2 devices through the ports and endpoints
configuration available in _DSD ACPI object.
* Port represents an interface in a device.
* Endpoint represents a connection to that interface.

BUG=none
BRANCH=none
TEST=Build and boot kblrvp. Dump and verify that the generated DSDT table
has the required entries.

Change-Id: If328864dbb61586a4887c7fcae740a12eda7cc92
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/20662
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-27 00:31:51 +00:00
V Sowmya 0f307957b4 mainboard/intel/kblrvp: Add MIPI camera support
This patch adds mipi_camera.asl and enables
I2C2, I2C3, CIO2 and IMGU devices,

* Add TPS68470 PMIC1 and PMIC2  related ACPI objects.
* Add OV cameras related ACPI objects.
* Add Dongwoon AF DAC related ACPI objects.
* SSDB: Sensor specific database for camera sensor.
* CAMD: ACPI object to specify the camera device type.

KBLRVP has two PMIC's sitting on I2C2 and I2C3. CAM0 and
CAM1 power requirements are handled by PMIC1 and PMIC2 respectively.

BUG=none
BRANCH=none
TEST=Build and boot kblrvp. Dump and verify that the generated DSDT table
has the required entries.

Change-Id: Ibaf26dad74ca1e7c9f415ae75c4ed8558ad99e2f
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/20661
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-27 00:31:31 +00:00
Martin Kepplinger 58eb634659 soc/intel/skylake/igd.c: check return value of init_igd_opregion
init_igd_opregion itself is supposed to return cb_err so this adds
error handling, just like other implentations of write_acpi_tables do it.

this had been found by coverity:

*** CID 1378270:  Error handling issues  (CHECKED_RETURN)
/src/soc/intel/skylake/igd.c: 147 in write_acpi_igd_opregion()
141     	/* If IGD is disabled, exit here */
142     	if (pci_read_config16(device, PCI_VENDOR_ID) == 0xFFFF)
143     		return current;
144
145     	printk(BIOS_DEBUG, "ACPI: * IGD OpRegion\n");
146     	opregion = (igd_opregion_t *)current;

CID 1378270:  Error handling issues  (CHECKED_RETURN)
Calling "init_igd_opregion" without checking return value
(as is done elsewhere 5 out of 6 times).

147     	init_igd_opregion(opregion);
148     	update_igd_opregion(opregion);
149     	current += sizeof(igd_opregion_t);
150     	current = acpi_align_current(current);

TEST=Built

Change-Id: If6f5d53037f093607d89cfe8faf193d55de7f6c4
Found-by: Coverity (CID 1378270:  Error handling issues  (CHECKED_RETURN))
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Reviewed-on: https://review.coreboot.org/20766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2017-07-27 00:01:36 +00:00
Lijian Zhao c319bab3cd intel/cannonlake_rvp: Split RVP boards and SPD
Add both Cannonlake U DDR4 RVP and Cannonlake Y LPDDR4 RVP support.
Implement SPD entry to FSPM for both platforms, seperated platform
specific DQ/DQS/Rcomp input to FSPM as well.

Change-Id: If71662353ddba89a9e831503a2d80dd5ebd65de3
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20503
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 21:37:14 +00:00
Cole Nelson 735779cc9a mainboard/intel/glkrvp: configure RAPL PL1 for GLK
Sets RAPL PL1 power to ~6W.

Note: 7.5W setting gives a run-time 6W actual measured power.

Tested on GLK w/kernel 4.11.0 by reading MSR 0x610 at runtime
and comparing to measured power on an instrumented board.

Change-Id: I07caeb2895a579387025d3b0fb7f1d2c3d5e2665
Signed-off-by: Cole Nelson <colex.nelson@intel.com>
Reviewed-on: https://review.coreboot.org/19746
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-26 20:50:49 +00:00
Hannah Williams d59f62bbda mainboard/intel/glkrvp: Add support for GLKRVP
GLKRVP is a reference board for GLK SOC
RVP1 has DDR4 and RVP2 has LPDDR4
RVP2 is enabled by default and CONFIG_IS_GLK_RVP_1 should be selected
if building for RVP1

GLKRVP can work with internal Intel EC or external Chrome EC AIC.
For internal EC, CONFIG_EC_GOOGLE_CHROMEEC will not be selected (
CONFIG_GLK_INTEL_EC should be selected for internal EC config)

By default, CONFIG_GLK_CHROME_EC is selected for  external ChromeEC AIC
config.

Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Change-Id: Iab688aca6a4f5c5e32801215ba3a1a440e50fbef
Reviewed-on: https://review.coreboot.org/19604
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 20:31:24 +00:00
Nico Huber 5ce0fe1176 Port cmos.default handling to C environment bootblock
Gather related code in the new file drivers/pc80/rtc/mc146818rtc_boot.c,
call sanitize_cmos() from C environment bootblock.

Change-Id: Ia5c64de208a5986299c0508d0e11eeb8473deef1
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20768
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 19:30:01 +00:00
Nico Huber a81f321924 drivers/pc80/rtc: Build for bootblock and postcar stages too
Fixes builds with BOOTBLOCK_CONSOLE && USE_OPTION_TABLE.

Change-Id: I1c7e9baa60f33c2c3651e2def0335454f7e20451
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 19:14:16 +00:00
Nico Huber efc0fa09fe soc/intel/skylake/chip.h: Provide enum values for SataMode
The values were verified to be correct with the KabylakeFsp0001 from
github. Skylake FSP documentation disagrees so YMMV.

Change-Id: I1ee04dbbed48d5376dbc24ae70753b059f2646eb
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20765
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 19:12:54 +00:00
Ravi Sarawadi e56939e48e vendorcode/intel/fsp/fsp2_0/glk: Update header files as per v52_27
Update glk header files as per v52_27 FSP code.

Change-Id: I8e313a2b854e60b1ad8a5c6e080641e323de56a8
Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-on: https://review.coreboot.org/20673
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 17:53:38 +00:00
Ravi Sarawadi 09195ac0f9 soc/intel/apollolake: Update memory HOB info save function
SMBIOS memory HOB produced by glk FSP v52_27 has new structure
members, which are not available in current apl FSP. New FSP-m
header file in https://review.coreboot.org/#/c/20673/ lists new
SMBIOS structure members.

Break memory HOB save routine into different functions for glk
and apl to accomodate new changes.

Change-Id: I33c6e4f2842cebbb326b6a05436fa69e3836ffc6
Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-on: https://review.coreboot.org/20674
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-26 17:52:32 +00:00
Werner Zeh ab94ba309e intel/common/block/itss: Extend itss_irq_init() to handle IOSF 1.0
Current implementation of itss_irq_init() uses 8 bit write access to
IRQ routing registers which is not supported on Apollo Lake.

This commit moves the register access from 8 bit to 32 bit so that this
function can be used with every platform.

Change-Id: I15c3c33a16329fd57f0ad7f99d720adbf300d094
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/20680
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 04:37:13 +00:00
Marshall Dawson e4ff2b75fa amd/gardenia: Correct PCIe port settings
Fix the OEM settings for two ports.  Fix and clarify comments to
reflect Rev. B of the board design.

Change-Id: I2812ea5945f67229872e78041c771606047bbbec
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/20744
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-25 17:49:03 +00:00
Arthur Heymans e5c8077c94 sb/intel/i82801jx: Add Interrupt pin and routing RCBA offsets macros
Change-Id: If8e82a291f666d5f310422b100f02d5df17ab74e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19255
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-25 15:15:41 +00:00
Arthur Heymans 87af36ac17 sb/intel/i82801jx: Route all PIRQ to INT11
Interrupt 11 is not used by legacy devices and so can always be used
for PCI interrupts. Full legacy IRQ routing is complicated and hard to
get right.

Change-Id: I6c718f4b9fb91ffcc4a136120581a4fcd7ec7231
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19254
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-25 15:15:28 +00:00
Martin Roth 7d96565190 vendorcode/amd/agesa: f15tn & f16kb: fix assert
Fixes warning by GCC 7.1:
note: did you mean to use logical not?

Change-Id: If8167c6fe88135ae89eb795eeda09e6937b1684f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20698
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-25 15:14:24 +00:00
Marshall Dawson 99428566a6 amd/gardenia: Fix IS_ENABLED for fan control
Convert from #if to if().

Change-Id: I50b3ed9ecd5947ff625536b196d90ebd4e8f1c56
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/20746
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25 15:11:53 +00:00
Patrick Rudolph 0e4f83e7b0 sb/intel/common/gpio: Only set one bit at time
Make sure to set only one bit instead of arbitrary bits set in argument.

Change-Id: I39426193d15d8581f79bc2a45c0edb53b19a2cd3
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20707
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-25 15:11:52 +00:00
Marshall Dawson 87863fd692 amd/gardenia: Fix IS_ENABLED for xHCI
Convert from #if to if().

Change-Id: I7c149856da22b72d2a83bd7f06d031df328dbb35
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/20745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25 15:11:41 +00:00
Martin Roth e203aa1d58 src/vendorcode/amd/agesa/f15tn: Fix bitmask
Fixes GCC 7.1 error:
error: '<<' in boolean context, did you mean '<' ?

Change-Id: I1a28522279982b30d25f1a4a4433a1db767f8a02
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25 15:08:47 +00:00
Nico Huber 3cbd3b0367 soc/intel/skylake: Add IGD id for mobile Xeon with GT2
Change-Id: I2cd210dd0443b854294ce7ee8e267594e3ea1780
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20651
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-07-25 15:01:31 +00:00
Subrata Banik 097bd95837 drivers/intel/fsp2_0: Add NULL check while locating hob list ptr
Assert incase unable to locate hob list pointer due to cbmem
is not available.

Change-Id: I17f54b07ab149ae06d09226ed9063189d829efe2
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20749
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-25 14:59:48 +00:00
Subrata Banik 815417145e soc/intel/skylake: soc/intel/skylake: Initialize struct member to 0
As per GCC 7.1 compiler struct reset_reply is considered
as uninitialized inside send_heci_reset_message function.

Change-Id: Ide53a9267dfba1a00263ada1d7016a48ecb9aad8
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20739
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-25 14:59:07 +00:00
Barnali Sarkar 4859ce0b81 soc/intel/skylake: Skip Spi Flash Lockdown from FSP
coreboot was setting SPI FPR register to protect the
mrc_cache data range stored in flash. This programming was being done
after FSP Notify 1.
But, FSP was locking the SPI by setting FLOCKDN Bit during Notify
phase 1, due to which coreboot was unable to protect that range.

As solution, FSP introduced a new UPD SpiFlashCfgLockDown to skip
the lockdown of flash on interest of bootloader. Set that UPD to 0
to skip the lockdown of FAST_SPI flash from FSP.

The same is being done from coreboot after end of Post at finalize.c
file.

BUG=b:63049493
BRANCH=none
TEST=FPR can be set properly to protect the mrc_cache range. The
issue reported in the bug doesn't come when both software and
hardware WP is enabled with this patch.

Change-Id: I3ffca2f1b05ab2e4ef631275ef7c3a6e23e393aa
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/20645
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-25 14:58:49 +00:00
Barnali Sarkar 50987a7b9e vendercode/intel/fsp/skykabylake: Add new UPD SpiFlashCfgLockDown
A new UPD named SpiFlashCfgLockDown is added in the FSP-S
header file.

This change is going to come in FSP in the next FSP release.
This patch is pushed to urgently fix the SPI FPR locking issue.

CQ-DEPEND=CL:*414049
BUG=b:63049493
BRANCH=none
TEST=Built and boot poppy

Change-Id: I4725506103781a358b18ee70f4fdd56bf4ab3d96
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/20644
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-25 14:58:10 +00:00
Barnali Sarkar 8e51319b03 soc/intel/common/block: Modify fast_spi_lock_bar function
Use 16bit write to avoid touching the upper two bytes that may cause
write cycle to fail in case a prior transaction has not completed.

This function sets the WRSDIS(Bit 11) and FLOCKDN (Bit 15) of the
SPIBAR + BIOS_HSFSTS_CTL. While WRSDIS is lockable with FLOCKDN,
writing both in the same cycle is guaranteed to work by design.

Avoid read->modify->write operation not to clear the RW1C bits
unintentionally.

Change-Id: Ia7880aaca0ed64150c994d49786a0a008bbaa98b
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/20643
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-25 14:56:13 +00:00
Martin Roth 4635787895 src/arch: Fix checkpatch warning: no spaces at the start of a line
Change-Id: Id9846ceb714dceaea12ea33ce2aa2b8e5bb6f4df
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20728
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25 14:26:30 +00:00
Martin Roth 7f35d3aa16 src/device: Fix checkpatch warning: no spaces at the start of a line
This excludes some files in the device/oprom/x86emu folder which
are mostly spaces, and which I felt should be handled separately.
debug.c, decode.c, fpu.c, ops.c, ops2.c, & prim_ops.c

Change-Id: I5c12d3fc942c9ad99bbe6e6e54db93e5a8402392
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20730
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25 14:26:20 +00:00
Martin Roth 1d5e240ea3 src/lib: Fix checkpatch warning: no spaces at the start of a line
Change-Id: I332c44c6db0a5ea05db076474caf77d6c50d4673
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20732
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25 14:26:07 +00:00
Barnali Sarkar 130f266c6e soc/intel/common/block: Add max SPI transaction time-out as 5 sec
Earlier 15ms time-out was kept for SPI transactions which was not
enough for SPI Erase transactions.

Increase the max time-out time to 5 secs which was present in SKL
before common code.
This increase in time-out won't disturb other SPI transactions like
Read, Write or Read Status, since, for those it will come out of
the loop once FDONE bit or FCERR bit is set.

BUG=b:63959637
BRANCH=none
TEST=Built and booted poppy and all SPI transactions succeeded.

Change-Id: I1c015d80b33677de11755fb2097373631d1fa8c4
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/20738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-24 23:59:51 +00:00
Patrick Georgi 695576799b google/reef: Configure EN_PP3300_DX_LTE on coral
BUG=b:63876329
BRANCH=none
TEST=none

Change-Id: I98c700d5b928c031129cf0138d22652a28d1ad1d
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/20752
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-24 18:19:21 +00:00
Patrick Georgi 5266c3b778 google/reef: copy gpio.c for coral
It requires changes to match the hardware. Except for the weak
attributes that are now removed in coral's copy, the file is identical
to the baseboard version.

BUG=b:63876329
BRANCH=none
TEST=none

Change-Id: Ib0c5f0ecae9919f20631dacef0253416989fb011
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/20751
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-24 18:19:14 +00:00
Martin Roth e1695e2cd4 nb/intel/i440bx: Add final newline to raminit.c
The newline lint check just went in, and immediately broke the build
due to a commit that went in earlier today.
This fixes the build.

Change-Id: Ic4ba8ce0c8085861bc6c654afdee3fea9f4621fc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20754
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-24 17:48:54 +00:00
Patrick Rudolph 0cce14341a mb/lenovo/t430: Disable `usb_always_on` by default in CMOS
Fix regression introduced by commit 7ffb329f.

The default value for usb_always_on is no longer sane and is replaced
by the same default that is used on all other boards (disabled).

Change-Id: Ia8854a8491bc56507d01e08e1ca1e195a1d62bfc
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20575
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-24 16:49:12 +00:00
Patrick Rudolph c1055ab07a soc/intel/skylake: Use common opregion implementation
Enable SOC_INTEL_COMMON_GFX_OPREGION for all FSP versions.
Allows to get rid of opregion.c, as it's no longer needed.

Change-Id: I39190488e12917a09dbf7ee3947a33940ebc290b
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20222
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2017-07-24 16:48:30 +00:00
Arthur Heymans ad5014952b sb/intel/i82801jx: Generate default fadt and madt
Function copied from i82801gx with offsets fixed for i82801lx.

Change-Id: Ib420c69470c3190cc1eac234ce68a18382fbc04a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19253
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-24 15:09:27 +00:00
Martin Roth b4560cd523 Update files with no newline at the end
Change-Id: I8febb8d74e2463622cab0313c543ceebec71fdf4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20705
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-24 15:08:16 +00:00
Martin Roth 467a87abce Fix files with multiple newlines at the end.
Change-Id: Iaab26033e947cb9cf299faf1ce6d40a90a9facbe
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20704
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-24 15:08:08 +00:00
Wisley Chen fa1d383f93 mainboard/google/soraka: pull high TOUCHSCREEN_STOP_L pin
After updating to Wacom Firmware version 501, touchscreen can't work.
Wacom FW (ver. 501) enables STOP function.
STOP Pin:
  High: Normal Operation
  Low: Stop Scanning
So pull TOUCHSCREEN_STOP_L high

BUG=b:37007801, b:37265219
BRANCH=none
TEST=manual testing on Soraka board and touchscreen works at boot
and after suspend/resume.

Change-Id: I8a2bdce1554fd99dea30cf91fa48d0529f40b7b0
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/20664
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-24 06:07:04 +00:00
Arthur Heymans 41114650d0 sb/intel/i82801jx: Add function to detect s3 resume
File copied from i82801gx.

Change-Id: I107087b6448f18b6a5ae21c2ae0392c057dd23b2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19252
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:34:11 +00:00
Arthur Heymans e5dcaf1269 sb/intel/i82801jx: Add addition IO resources
Adapted from i82801gx.

Change-Id: I9108a45135908b7c4e74e9df3bb8f89f55893299
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19251
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:33:34 +00:00
Keith Hui 899577676b asus/p2b-d: Use romstage from asus/p2b-ds.
The romstage for both is line-for-line identical.
Merge both into P2B-DS so it benefits from my
modernization efforts.

Change-Id: Idd964f4c5c4dfd9e2e0ac4a4f41e4ee9a84a729c
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20691
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:22:55 +00:00
Keith Hui 7654a0db7e asus/p2b-f: Use romstage from asus/p2b-ls.
The romstage for both is line-for-line identical.
Merge both into P2B-LS so it benefits from my
modernization efforts.

Change-Id: I2d1a46236f83a4955ceb5e98b576cce0560f28df
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20690
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:22:46 +00:00
Keith Hui fb0984d30f 440BX boards: Drop unused #includes from romstage
Romstage of many 440BX boards included headers that are not used.
Remove them as part of a bigger cleanup effort.

Change-Id: I89ddeda3c90e1a4907c05851185b69f3b29e54ba
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20693
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:22:29 +00:00
Keith Hui c903b9376e asus/p2b-ls: Drop onboard LAN from devicetree.cb
I am able to complete a	board-status run over onboard ethernet
(ie. it works) without this entry, so it's not necessary.

Change-Id: Iabdf1a1ff3c904bea1b7b5eaefb1d23831dd2cb9
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20683
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:20:31 +00:00
Keith Hui 078e324080 northbridge/intel/i440bx: Merge RAM init routines
There are 4 routines used in RAM init that most if not all
i440bx mainboards call in the same order. Implements a single
RAM init routine for them to allow for future consolidation.
Boards to be changed to use this one routine in a future change.

Change-Id: Ib553b07b117de12b7982586bce0f9355f55013a0
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-23 20:20:26 +00:00
Rajat Jain 2671afcbbc mainboard/google/{poppy,soraka}: Enable S0ix
Enable S0ix for poppy and soraka in their device trees respectively.

BUG=b:36630881
BRANCH=none
TEST=Verified S0ix and S3 operation on Poppy and Soraka (250+ iterations).

Change-Id: I9ba91499e54f729970448af6f71804ad5b3cb836
Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/20689
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-23 04:01:04 +00:00
Keith Hui 9aa45e6952 northbridge/intel/i440bx: Move NB macro to i440bx.h
This move makes the NB macro more widely available,
in preparation for implementing get_top_of_ram().

Change-Id: Icd8e82cfdfdccb662b2139d0e5d1d5af72cbae7f
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20675
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-22 22:50:08 +00:00
Martin Roth 3f6421e1fa soc/intel/cannonlake: Keep variable from going out of scope
The variable p was going out of scope while still being pointed to by
*cpu_name.

Fix coverity ID 1378215 (Pointer to local outside scope)

Change-Id: I6ad7b1919104b4d97869efe5065e39c2a43de638
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20682
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2017-07-22 22:49:46 +00:00
Furquan Shaikh 4a1d450d07 mainboard/google/poppy/variants/soraka: Update GPP_{D1,D2,B7} config
GPP_B7, GPP_D1 and GPP_D2 are not used going forward. Mark them as NC
in gpio table.

BUG=b:62322846,b:62240755

Change-Id: I7aee08314e6ce96d5913ae315bf75f5c04ab7370
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/20672
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-22 05:25:01 +00:00
Furquan Shaikh 907a0cfc30 mainboard/google/poppy/variants/soraka: Define separate gpio tables
Now that soraka is starting to deviate from the baseboard w.r.t. gpio
settings, make a new copy of gpio table before we make any
variant-specific changes in it.

BUG=b:62240755,b:62322846
BRANCH=None
TEST=Verified with gpio_debug=1 in skylake/gpio.c that the gpio
configuration before and after this change remains same.

Change-Id: I448d18f18b63e9bfb739c518d599de3b9b602dc2
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/20671
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-22 05:24:57 +00:00
Logan Carlson 50522254fb arch/arm/armv7: Correct checkpatch errors
- Correct whitespace issues with files under arch/arm/armv7.
- Fix comments and remove unnecessary line continuations in mmu.c

Change-Id: I69d50030b07b1919555feca44967472922176a81
Signed-off-by: Logan Carlson <logancarlson@google.com>
Reviewed-on: https://review.coreboot.org/19996
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-21 20:40:27 +00:00
Martin Roth 80358a1f47 Revert "soc/intel/cannonlake: Add postcar stage support"
This reverts commit 399c022a8c.

This was merged too early.  I'll repost it.

Change-Id: Iabac0aaa0a16404c885875137cf34bf64bf956f7
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20686
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-21 17:39:10 +00:00
Martin Roth 70de396958 Revert "soc/intel/cannonlake: Call into FSP siliconinit"
This reverts commit dbe7f893c0.

This was merged too early.  I'll repost it.

Change-Id: Ife56f45e91c0b961d0fad0e1872c6df3f9e18973
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20685
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-21 17:32:07 +00:00
Martin Roth b137c13e57 I82801JX: Add IS_ENABLED around config options
This chipset was just added and had a few places that needed to be
fixed.

Change-Id: Ief048c4876c5a2cb538c9cb4b295aba46a4fff62
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20684
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-21 17:00:01 +00:00
Hannah Williams 837afb0938 soc/intel/apollolake: Add pci device id for GLK IGD
Change-Id: Id2c94afed8976687524a0913ea1c13aeddd98333
Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-on: https://review.coreboot.org/20654
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-21 15:56:48 +00:00
Lijian Zhao dbe7f893c0 soc/intel/cannonlake: Call into FSP siliconinit
The following changes can make system call into FSP siliconinit and exit
from that until payloads.

1. Add frame to call fspsinit.
2. Temporarily set all the USB OC pin to 0 to pass FSP siliconinit.

Change-Id: I1c9c35ececf3c28d7a024f10a5d326700cc8ac49
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20581
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-21 15:56:16 +00:00
Lijian Zhao 399c022a8c soc/intel/cannonlake: Add postcar stage support
Initialize postcar frame once finish FSP memoryinit

Change-Id: I888d471fa620b7fc9f8975524a31f662e1fc5079
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20534
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-21 15:55:40 +00:00
Arthur Heymans 3876f24221 nb/intel/x4x: Rework programming DQ and DQS DLL timings
This does the following:
* Clarify that settings are set to the same value for each rank;
* Allows to program coarse
* Fix some style issues like white spaces between arithmetic
  operators.

Change-Id: I3a9e28cfec915a0bb15789c23bea259f621b5096
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/20136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-21 15:45:16 +00:00
Arthur Heymans 12a4e98cea nb/intel/pineview/raminit: Refactor timings selection
This does not use loops to compute timings but uses DIV_ROUND_UP.

Another thing affected by this patch are minimum timings. Presumably
those only need to be guarded against on DDR3. With this change
timings are set up like vendor (with tWTR below previous minimum)

TESTED on Intel D510MO

Change-Id: Ia374f26e5bbb8b90d90c24ae6c20412ba53bd7b6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19495
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-21 15:45:05 +00:00
Arthur Heymans 349e08535a sb/intel/i82801jx: Add correct PCI ids and change names
Change-Id: Ic9226098dafa2465aa5fccc72c442de2b94e44c7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-21 15:44:19 +00:00
Arthur Heymans 7b9c139ac2 sb/intel/i82801jx: Copy i82801ix
Change-Id: I878960e7e0f992426382ca717b8b42787f01ebc6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19248
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-21 15:43:18 +00:00
Subrata Banik c3198543b6 soc/intel/skylake: Perform LPC offset read after lockdown operation
This patch is to provide an additional read LPC pci offset register
BIOS_CONTROL (BC) - offset 0xDC to ensure that the last write is
successful.

Change-Id: I308c0622d348fc96c410a04ab4081bb6af98e874
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20678
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-21 14:46:13 +00:00
Subrata Banik 8e39009c57 common/block/fast_spi: Perform SPI offset read after lock down operation
This patch is to provide an additional read SPI pci offset register
BIOS_CONTROL (BC) - offset 0xDC to ensure that the last write is
successful.

Change-Id: I3b36c1a51ac059227631a04eb62b9a6807ed37b1
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20615
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-21 14:45:31 +00:00
Subrata Banik ba3ae3eead soc/intel/skylake: Rectify LPC Lock Enable (LE) bit definition
LPC pci config register BIOS Control (BC) - offset 0xDC bit 1
is for Lock Down.

Change-Id: I838dd946b8cdb7114f58ccc5d02159f241f0bad0
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20614
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-21 14:44:22 +00:00
Hannah Williams 3ff14a0c85 soc/intel/apollolake: Bring in delta for GLK SOC
Change-Id: I3e76726bb77f0277ab5776ae9d3d42b7eb389fe3
Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-on: https://review.coreboot.org/19603
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-21 03:59:09 +00:00
Lijian Zhao a77c68adf3 soc/intel/cannonlake: Make ramstage relocatable
Relocate ramstage into CBMEM.

Change-Id: I0543d25d722c5872f4f139a98e5125a41cc40653
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20640
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-20 21:57:10 +00:00
Aaron Durbin 65943e1670 soc/intel/common/gpio: add helpers for relative pin calcuations
The gpio numbers are global, but they have their respective place
within each community and the group within their community. For
all the calculations open coding this calculation convert them to
use the helpers.

Change-Id: I0423490ae1740ef59225a70fea80a7d91ac2a39a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-20 21:08:35 +00:00
Aaron Durbin ac8e4db246 soc/intel/common/gpio: fix gpi_status_get()
A pad number is passed into gpi_status_get() to determine if its
associated bit is set from a generated event. However, the
implementation wasn't taking into account the gpi_status_offset
which dictates the starting offset for each community. Additionally,
the max_pads_per_group field is per community as well -- not global.
Fix the code to properly take into account the community's
gpi_status_offset as well as the max_pads_per_group.

Change-Id: Ia18ac6cbac31e3da3ae0ce3764ac33aa9286ac63
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20652
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hannah Williams <hannah.williams@intel.com>
2017-07-20 17:06:48 +00:00
Nico Huber ea864f4a2d soc/intel/skylake: Remove dead `CONFIG_PRE_GRAPHICS_DELAY`
`CONFIG_PRE_GRAPHICS_DELAY` was only applied on a dead code path in
`igd.c` that is guarded by always selected `CONFIG_ADD_VBT_DATA_FILE`.
Nobody missed it for nearly a year, plus, it's not applied on the GOP
path, let's drop it.

Change-Id: I0b70cce3a3f2b50cb4e72c4d927b35510ff362a2
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20111
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-20 15:45:20 +00:00
Nico Huber 959ac071d4 soc/intel/skylake/igd: Remove dead quirk from dead code path
This quirk was superseded a view lines above. Also the whole path is
guarded by `CONFIG_ADD_VBT_DATA_FILE` which is always selected for
nearly a year now.

Change-Id: I7fc5184d6e81e4588616e0302dee410e74bdab5a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20110
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2017-07-20 15:45:11 +00:00
Nico Huber 9dc62ea133 soc/intel/skylake: Fix broken memory info HOB scanning
It looks like this code was written with completely different semantics
in mind. Controllers, channels and DIMMs are all presented in their phy-
sical order (i.e. gaps are not closed). So we have to look at the whole
structure and not only the first n respective entries.

Change-Id: I8a9039f73f1befdd09c1fc8e17cd3f6e08e0cd47
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20650
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-20 15:44:59 +00:00
Marshall Dawson fb66e81e6c x86/lapic/secondary.S: Align stack for _secondary_start
At a process _start, the stack is expected to be aligned to a
16-byte boundary.  Upon entry to any function the stack frame
must have the end of any arguments also aligned.  In other words
the value of %esp+4 or %rsp+8 is always a multiple of 16 (1).

Align the stack down inside _secondary_start and preserve proper
alignment for the call to secondary_cpu_init.

Although 4-byte alignment is the minimum requirement for i386,
some AMD platforms use SSE instructions which expect 16-byte.

1) http://wiki.osdev.org/System_V_ABI
   See "Initial Stack and Register State" and "The Stack Frame"
   in the supplements.

BUG=chrome-os-partner:62841664

Change-Id: I72b7a474013e5caf67aedfabeb8d8d2553499b73
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/20537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-20 15:34:21 +00:00
Nico Huber fb95a52b6e soc/intel/common/smbios: Amend debug message
Change-Id: I6fcee760eb32b797430eb363ce0202557b74a126
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20649
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-20 15:23:11 +00:00
Naresh G Solanki 14deaeec61 intel/common/block/i2c: Fix clock programming of i2c
When configuring i2c frequency to I2C_SPEED_FAST_PLUS, observed frequency
was I2C_SPEED_FAST.

This was due to incorrect register programming.

TEST= Build for Soraka, I2C frequency during firmware execution was
I2C_SPEED_FAST_PLUS when configured for I2C_SPEED_FAST_PLUS.

Change-Id: Ib0e08afe0e1b6d8c9961d5e3039b07ada9d30aa3
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/20646
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-20 05:01:14 +00:00
Mario Scheithauer 05a2b1aacd siemens/mc_apl1: Activate ECC for DRAM
This mainboard is equipped with DDR3L modules which support ECC. The
BWG says that for activating ECC the FSP-M parameter MemoryDown must be
set to 5.

Change-Id: Idc68df1e2bae2396c9b9788d4a026a75b7d9119b
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/20634
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-07-20 04:44:58 +00:00
Mario Scheithauer d27a565211 siemens/mc_apl1: Include platform.asl
The OS of this mainboard needs the _PIC method for the selection of the
type of interrupt routing.

Change-Id: Ic82ba1b368aff0030422d9602ebc882247a2191b
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/20618
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-07-20 04:44:45 +00:00
Mario Scheithauer c2363d0fa4 soc/intel/apollolake: Implement _PIC method into ACPI
The _PIC method is called by the OS to choose between interrupt routing
via the i8259 interrupt controller or the APIC.

Change-Id: I2bc16f9c096c095c02de3692e76c0906cec54cb5
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/20617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-20 04:44:41 +00:00
Lijian Zhao 0ade3133a0 soc/intel/cannonlake: Add minimal changes to call FSP Memoryinit
The following minimal changes are needed to make system boot until FSP
memoryinit got called.
1. Program SA BARs
2. Assume previous power state is S0.

Change-Id: Iab96b27d4220acf4089b901bca28018eaba940a1
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-19 23:06:07 +00:00
Andrey Petrov 59e0834f52 mainboard/intel/cannonlake_rvp: Add initial board files
Initial board files needed to selected to build cannonlake rvp.

Change-Id: I82bd5c785e451f02b827765c54d432517afd7de0
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20075
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-19 21:54:54 +00:00
Julius Werner 6486e7819c google/gru: Add support for Scarlet rev1
This patch adds the necessary changes to support Scarlet revision 1.
Since the differences to revision 0 are so deep, we have decided not to
continue support for it in the same image. Therefore, this patch will
break Scarlet rev0.

All the deviations from other Gru boards are currently guarded by
CONFIG_BOARD_GOOGLE_SCARLET. This should be changed later if we
introduce more variants based on the newer Scarlet board design.

Change-Id: I7a7cc11d9387ac1d856663326e35cfa5371e0af2
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/20587
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Schneider <dnschneid@chromium.org>
2017-07-19 18:15:15 +00:00
Julius Werner 4ed8b30553 rockchip/rk3399: Adjust gpio_t format to match ARM TF
Our structure packing for Rockchip's gpio_t was chosen arbitrarily. ARM
Trusted Firmware has since become a thing and chosen a slightly
different way to represent GPIOs in a 32-bit word. Let's align our
format to them so we don't need to remember to convert the values every
time we pass them through.

CQ-DEPEND=CL:572228

Change-Id: I9ce33da28ee8a34d2d944bee010d8bfc06fe879b
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/20586
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-19 18:15:10 +00:00
Kevin Chiu 1642e13158 google/snappy: Add keyboard backlight support
BUG=none
BRANCH=reef
TEST=emerge-snappy coreboot chromeos-bootimage and verify the keyboard
backlight can be bright and alt+f6, alt+f7 function keys can be used.
Change-Id: I6d06f72e1ccc66292b4e5f867314d84c309af885
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/20633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-19 16:33:50 +00:00
Lijian Zhao acfc149f7b soc/intel/cannonlake: Add microcode support
Microcode needs to be loaded prior to FSP initialization.

Change-Id: Idd70bd3e6555866d9bb232e8904aed4120c79fe7
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20484
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-19 16:16:44 +00:00
Julius Werner 959cab4f1f vboot: Remove get_sw_write_protect_state callback
We've just decided to remove the only known use of the VBSD_SW_WP flag
in vboot (https://chromium-review.googlesource.com/c/575389), since it
was unused and never reliable on all platforms anyway. Therefore, we can
now also remove the coreboot infrastructure that supported it. It
doesn't really hurt anyone, but removing it saves a small bit of effort
for future platforms.

Change-Id: I6706eba2761a73482e03f3bf46343cf1d84f154b
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/20628
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-18 23:24:01 +00:00
Naresh G Solanki ff48b3b1ec soc/intel/skylake: Enable SMBus based on mainboard config
Enable SMBus controller based on config in mainboard devicetree.cb

BUG=None
TEST= Build for Soraka, Verify that SMBus is enabled or disabled (run
lspci in OS) based on board devicetree.cb config 'SmbusEnable'.

Change-Id: I04c8bc30c03fd8dc7cc8ae239885e740b09e9bc1
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/20546
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2017-07-18 22:10:19 +00:00
Aaron Durbin 27db0dd790 arch/x86: select RELOCATABLE_MODULES when POSTCAR is selected
The postcar relies on the relocatable modules support. Specifically
select that dependency.

Change-Id: If19c39c3f153cd5a526fdad6fe09b8c309ef024f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20635
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-18 21:29:18 +00:00
Patrick Rudolph a959a1456b ec/lenovo/h8/h8: Always enable tp-smapi and thermal
Always enable tp-smapi and thermal managment.

The devicetree already configures the correct values. This patch makes
sure that invalid user-settings are ignored.

The tp-smapi bit is required for the SMM handler.
The thermal bit should be set to allow the EC to monitor thermal state
of the platform.

Change-Id: Ia5aa50e0b1148a7cc8e51480623368ee62edb849
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/19864
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-18 19:23:26 +00:00
Balaji Manigandan B 6771645678 KBL: Update FSP headers - upgrade to FSP 2.5.0
Additional UPDs included with FSP 2.5.0:
     FspsUpd.h:
       *SataRstOptaneMemory
       *Additional Upds for Core Ratio limit
     FspmUpd.h:
       *RingDownBin
       *PcdDebugInterfaceFlags
       *PcdSerialDebugBaudRate
       *PcdSerialDebugLevel
       *GtPllVoltageOffset
       *RingPllVoltageOffset
       *SaPllVoltageOffset
       *McPllVoltageOffset
       *RealtimeMemoryTiming
       *EvLoader
       *Avx3RatioOffset

CQ-DEPEND=CL:*388108,CL:*388109
BUG=None
BRANCH=None
TEST=Build and test on Soraka

Signed-off-by: Balaji Manigandan B <balaji.manigandan@intel.com>
Change-Id: Id31ddd4595e36c91ba7c888688114c4dbe4db86a
Reviewed-on: https://review.coreboot.org/20123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-18 19:21:24 +00:00
Stefan Reinauer 935ff1b208 soc/intel: Fix SPI driver compilation with CONFIG_DEBUG_SPI
write[8|16|32] wants volatile pointers, not const pointers.

Change-Id: I92010516e8e01c870b60107e20a576a75d491e4e
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13566
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-18 19:18:50 +00:00
Lijian Zhao 6dc125f0e3 soc/intel/cannonlake: Fix Build break
1.Replace outdated defination of TCO_EN to TCO_BASE_EN
2.Remove setmaxfreq() as not needed any more.

Change-Id: Id54fdfd14f1abaa592132195e6f9acfa5807626e
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20568
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-18 19:17:04 +00:00
Andrey Petrov c854b49db9 soc/intel/cannonlake: Use common GPIO driver
Change-Id: I0bbdd641244f0c7baaa2146dcfde6431bde387c5
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20074
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-18 19:16:56 +00:00
Mario Scheithauer fc8eaf579e siemens/mc_apl1: Disable SDCARD
SDCARD is not used on this mainboard.

Change-Id: I28d23cdb3652bf736b19daf67c7057c396230e24
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/20611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-18 19:09:45 +00:00
Subrata Banik 48f96739ed soc/intel/skylake: Remove Heci2 and Heci3 from wake resource list
HECI2 and HECI3 devices are “function disable” during FSP
Silicon Init phase. Device will not be visible over PCI bus
hence removing these devices from wake source list.

Change-Id: I0de665e039d74e49e5a22db9714bc9fee734e681
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20613
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-18 19:07:52 +00:00
Martin Roth a271b1d13d sb/amd/cs5536: Remove includes of C files
The romstage for CS5536 platforms were including early_smbus.c and
early_setup.c.  Build these into romstage from the makefile, and remove
the #includes.

Add a Kconfig option for platforms that do not use the
early smbus code.

Change-Id: I2e6a9cd859292b4dd4720b547d1ff0bbb6c319cf
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-18 19:03:28 +00:00
Andrey Petrov 60a7e78de2 soc/intel/cannonlake: Add PMC headers
Add register definitions used in PMC block.

Change-Id: I963f402a59d49dfc7b76224f719a315e1cc6dc74
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20071
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-18 15:53:07 +00:00
Kyösti Mälkki 8a303b7865 AGESA: Add guard for acpi_get_sleep_type()
With EARLY_CBMEM_INIT, this is defined from ACPI layer
instead for ENV_RAMSTAGE.

Change-Id: Ia9c1be4d3acaa0fa8827350558e6578c39b71602
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20595
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-17 19:33:41 +00:00
Kyösti Mälkki 5df9df55b7 binaryPI: Drop unused agesawrapper include
Change-Id: I67c682f79834bed334f26a4c7473eaf463262a85
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20592
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-17 19:31:34 +00:00
Kyösti Mälkki 517cab97fd binaryPI: Drop unused agesawrapper include
Change-Id: Ie17cc7367fc8561e2ecb357d4f8282c1cd444b7f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20591
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-17 19:31:22 +00:00
Kyösti Mälkki bebd766f16 binaryPI: 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.

While we still preserve cache contents (there is wbinvd deep
inside AMD_DISABLE_STACK macro), we now actually do a stack
switch and much more closely meet the specification of CAR
teardown sequence in AGESA specifications.

We now somewhat incorrectly include files from agesa/ tree,
but the whole agesawrapper.c file removal will address the
issue of overall directory layout.

Change-Id: I2bac098099c1caffea181356c63924f4b5a93b54
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/18525
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-17 19:31:09 +00:00
Kyösti Mälkki 9de82612fe binaryPI: Switch to agesa/def_callouts.c
Change-Id: Id20a49385aeb336461acd0bd186a4ab7f3fb95b8
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/19274
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-17 19:30:46 +00:00
Kyösti Mälkki 044dec27b4 binaryPI: Switch to agesa/heapmanager.c
Essentially squashes following commits from AGESA side.

45ff9cb AGESA: Reduce typecasting in heapmanager calls
bceccec AGESA: Handle HEAP_CALLOUT_RUNTIME allocation more cleanly
4240277 AGESA: Adjust heap location for S3 resume path
424c639 AGESA: Refactor S3 support functions
50e6daf AGESA: Log heap initialisation
da74041 AGESA: Move heap allocator declarations
c74b53f AGESA: Reduce SPI use by 24kB for S3 support
b1fcbf3 AGESA: Separate HeapManager declarations from BiosCallOuts
f728408 AGESA: Split S3 backup in CBMEM
82fbda7 AGESA: Use same HeapManager for all BiosCallOuts

Change-Id: I537bd05a3e06ff6896f1ac8be93eed5321ca472b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/19271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-17 19:25:57 +00:00
Kyösti Mälkki b6a0fe59fc AGESA boards: Fix regressions with LATE_CBMEM_INIT
Some configurations of AGESA boards fail to boot after commit
  61be360 AGESA: Fix UMA calculations

Implementation of cbmem_find() for ENV_ROMSTAGE expects
that CBMEM has already been initialized. In the case of
LATE_CBMEM_INIT boards, this is not the case and cbmem_top()
returned NULL prior to the offending commmit.

By definition LATE_CBMEM_INIT does not have known cbmem_top()
in ENV_ROMSTAGE except for possible ACPI S3 resume path.

Change-Id: Icb8f44661d479e5ad43b123600305dcbc3ce11e1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20590
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-17 19:25:34 +00:00
Subrata Banik 0755ab98a5 intel/fsp: Add and use new post codes for FSP phase indication
New post codes are 
POST_FSP_MEMORY_EXIT
POST_FSP_SILICON_EXIT

This patch will make it more consistent to debug FSP hang
and reset issues.

Bug=none
Branch=none
TEST=Build and Boot on eve

Change-Id: I93004a09c2a3a97ac9458a0f686ab42415af19fb
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20541
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-17 15:16:37 +00:00
Subrata Banik 0beac81f64 intel/fsp1_1: Don't consume FSP_SMBIOS_MEMORY_INFO_HOB in S3 resume path
FSP doesn't publish smbios_memory_info_guid during S3 resume
path. Hence it's recommended to skip consuming this HOB in
S3 resume.

Bug=none
Branch=none
TEST=Build and boot Lars system with this patch.

Change-Id: I321751523b1ea3326ffc23f4d4c53d5362482674
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/20540
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-17 15:16:30 +00:00
Aaron Durbin b5a5aa6450 soc/intel/common/gpio: clean up logical to chipset mapping
1. Explicitly add LOGICAL to the reset macro name to make it explicit
   that the values are logical.
2. Reword some of the comments and combine them into single comment
   instead of scattering the comments throughout.
3. Use c99 struct initializers for the reset mapping array.
4. For the chipset specific values use literals that match the hardware.
5. Use 'U' suffixes on the literals so we don't trip up compiler being
   over zealous on undefined behavior.
6. Use unsigned and fixed-width types for the reset mapping structure
   since the code is reliant on matching up with a register definition.
7. Fix formatting that can fit < 80 cols.

Change-Id: Iaa23a319832c05b8a023f6e45c4ee5ac06dd7066
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20589
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-17 15:00:30 +00:00
Aaron Durbin aa2504a10e soc/intel/common/gpio: distingiush single vs multi acpi devices
Sadly, small core and big core are not aligned with the OS driver's
expectation on the number of ACPI devices used for each community.
Big core uses a single device while small cores use one ACPI device
per community. Allow for this distinction within the common gpio
implementation and ensure apollolake is utilizing the new option
to retain the correct behavior.

Change-Id: I7c7535c36221139ad6c9adde2df10b80eb5c596a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20588
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2017-07-17 15:00:07 +00:00
Aaron Durbin 2c628f1652 soc/intel/skylake: remove top_of_32bit_ram() declaration
It should never be globally exposed. Remove the global symbol
and make it static.

Change-Id: I3b85f3bbf6a73d480cdefdcdec26e137e3a3f75f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2017-07-17 14:59:56 +00:00
Aaron Durbin 3c874e9d04 soc/intel/cannonlake: remove top_of_32bit_ram() declaration
It should never be globally exposed. Remove it.

Change-Id: I90e201ddd4df2cda89e7d3e4cb81bdc2a81cac83
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20583
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-17 14:59:51 +00:00
Werner Zeh 52793444be drivers/intel/fsp1_1: Handle errors in find_fsp()
The function find_fsp() parses the FSP header and returns either a valid
pointer to the FSP_INFO_HEADER or an error code. The caller of
find_fsp() only takes care about a NULL-pointer but not about a possible
error code. This leads to memory access violations in case of error when
FspTempRamInit is called.

To avoid this and to let the user know that there was an error while
parsing the FSP header show an error message and the error code.

Change-Id: I67fef0a53fb04c8ba5d18b5d4ef2fdc1aeba869e
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/20560
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-17 03:18:03 +00:00
Stefan Reinauer 0e660873bf drivers: Drop level of indirection for MMIO HW access
We don't need another level of indirection for these
hardware accesses.

Change-Id: Ic567d8272e5dd943ce19babbd7ad57ba5d86c354
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20580
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-16 23:57:21 +00:00
Julius Werner b8534f767c assert: Add new dead_code() macro to assert dead code paths
This patch adds a new kind of compile-time assertion based on Linux'
compiletime_assert(). The difference to the existing use of
_Static_assert() in coreboot (which should continue to be used where
appropriate) is that this new assertion only hits if the call to it is
not optimized out at compile time. It is therefore ideal to assert that
certain code paths are not included in the image if a certain Kconfig
option is (not) set. For example,

 assert(!IS_ENABLED(CONFIG_THAT_MAKES_THIS_INAPPROPRIATE));

can be rewritten as

 if (!IS_ENABLED(CONFIG_THAT_MAKES_THIS_INAPPROPRIATE))
   dead_code("This code shouldn't be built for config X");

to turn it into a compile-time check.

Change-Id: Ida2911e2e4b3191a00d09231b493bf755e6f0fcb
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/20585
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-16 23:56:34 +00:00
Martin Roth 5998198f0c soc/amd/stoneyridge:Fix IS_ENABLED() around Kconfig symbol references
- Update files that were added since the IS_ENABLED() fix patches
- Remove extra XHCI controller.

Change-Id: I7028942ce54b06cd048029f7b93f064beba579ad
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20565
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-16 19:22:33 +00:00
Martin Roth 99aa6ce053 src/soc: add IS_ENABLED() around Kconfig symbol references
Change-Id: I2e7b756296e861e08cea846297f687a880daaf45
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-16 19:22:25 +00:00
Martin Roth 7a1a3ad2ce southbridge/intel: add IS_ENABLED() around Kconfig symbol references
Change-Id: I2b532522938123bb7844cef94cda0b44bcb98e45
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20350
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-16 19:22:18 +00:00
Werner Zeh d5960c4674 siemens/nc_fpga: Fix wrong type cast
As "var" is not a pointer but a variable there is no need to cast it to
a pointer before using the value.

Change-Id: I7f8e3ceadaa4301c50c5f5480cccab2be904aa9a
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/20572
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-15 22:11:17 +00:00
Arthur Heymans 330c46b963 device/pciexp_device.c: Terminate CLK PM message with newline
Change-Id: I746e2cc47a83cb04fd404851d3644b8341761022
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/20544
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-15 21:54:23 +00:00
Patrick Rudolph e16f1d7810 drv/intel/gma/i915: Get rid of unused function prototype
The function prototype isn't used any more, remove it.

Change-Id: Ie5bd4e4ec8f28bc0768d5427cf734ef77855a15e
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20545
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-15 21:53:50 +00:00
Kyösti Mälkki fec6fa799c vendorcode/amd/agesa: Tidy up gcccar.inc
Change register preservations and fix comments about register
usage accordingly. Do this to avoid use of %mm0-2 registers inside
macros defined in gcccar.inc, as future implementation of
C_BOOTBLOCK_ENVIRONMENT will use them as well.

Adjust caller side accordingly.

Change-Id: Ic76fcc31ae714baf5259d17c41b62a3610aa947b
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-07-15 16:10:19 +00:00
Marc Jones 5a0d29d460 vendorcode/amd/agesa: Clarify CAR disable
Clean up commentary on AMD_DISABLE_STACK to be clear that
it does a wbinvd to preserve coreboot CBMEM and
value of car_migrated.

Change-Id: I0f5e9c807f7990fcd5ca85f77b9d92312e775d3e
Signed-off-by: Marc Jones <marcj303@gmail.com>
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20578
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-15 16:09:46 +00:00
Kyösti Mälkki acd13985b5 vendorcode/amd/agesa: Sync irrelevant differences
After modifications:

  f12 and f14 are identical
  f10 is f14 with invd -> wbinvd modification added to HOOK_F10
  f15 is f10 with invd -> wbinvd modification added to HOOK_F15
  f15tn is f15 modified to use with TN / KV / KM

Change-Id: I4006fe09c134e5b51f3ee3772d6d150321d27b57
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20577
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-07-15 16:09:14 +00:00
Kyösti Mälkki bfe6bcab74 vendorcode/amd/pi: Tidy up gcccar.inc
Remove register preservations that are not required and
fix comments about register usage accordingly.

Change-Id: Ibc9ed982ac55e947c100739250db122033348a82
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20576
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-15 16:08:59 +00:00
Marc Jones 7f5d0f3c92 vendorcode/amd/pi: Clarify CAR disable
Clean up commentary on AMD_DISABLE_STACK to be clear that
it does a wbinvd to preserve coreboot CBMEM and
value of car_migrated.

Change-Id: I1265ed3d1bdf4b22f1a56f68bc53e18cfadc44b2
Signed-off-by: Marc Jones <marcj303@gmail.com>
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/19269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-15 16:08:38 +00:00
Shelley Chen 8c81c6ac43 google/fizz: Override PL2 and SysPL2 values
Set PL2 and SysPL2 for Fizz based on cpu id.

BUG=b:7473486, b:35775024
BRANCH=None
TEST=On bootup make sure PL2 and PsysPL2 values set
     properly (through debug output)

Change-Id: I5c46667fdae9d8eed5346a481753bb69f98a071b
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://review.coreboot.org/20420
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-14 22:47:31 +00:00
Shelley Chen 20c3ea5c4f soc/intel/skylake: Set PsysPL2 MSR
BUG=b:7473486, b:35775024
BRANCH=None
TEST=On bootup make sure PL2 and PsysPL2 values set
     properly (through debug output)

Change-Id: I847a8458382e7db1689b426f32ff2dcbc5a0899c
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://review.coreboot.org/20418
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-14 22:47:25 +00:00
Kyösti Mälkki 2a7fbea3f1 K8: Fix indirect includes
Change-Id: I370285aa52776170a32b6dd36c0eef74eea9400c
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20562
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-14 07:23:18 +00:00
Kyösti Mälkki d1c1a382f3 geode_lx: Move declaration to another header
Change-Id: I1dc51c5171e04e8ba917429e74a23887989d9619
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20561
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-14 07:23:00 +00:00
Matt DeVillier 6543d9a4f0 drivers/fsp1_1: remove VBT function defs from util.h
Including <fsp/gop.h> in util.h causes issues with
redeclarations when using SOC_INTEL_COMMON_GFX_OPREGION
along with FSP 1.1.  Separating it out and including
directly in vbt.c has no negative side effects.

Change-Id: I2d82c2da40b067272d876929fc73b97f490146a7
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/20448
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-14 00:00:11 +00:00
Martin Roth d3bb09d9f4 src: add IS_ENABLED() around Kconfig symbol references
These are places that were missed on the first pass.

Change-Id: Ia6511f0325433ab020946078923bf7ad6f0362a3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20358
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-13 23:57:07 +00:00
Martin Roth 0fa92b31b0 src/cpu: add IS_ENABLED() around Kconfig symbol references
Some of these can be changed from #if to if(), but that will happen
in a follow-on commmit.

Change-Id: I4e5e585c3f98a129d89ef38b26d828d3bfeac7cf
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-13 23:55:25 +00:00
Martin Roth 9634547eae src/include: add IS_ENABLED() around Kconfig symbol references
Change-Id: I2fbe6376a1cf98d328464556917638a5679641d2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-07-13 23:55:05 +00:00
Martin Roth 1858d6a90a src/southbridge: add IS_ENABLED() around Kconfig symbol references
Change-Id: Ie965cbcf7f7b6f6c9e9a69e2a1ff0ba491246cbe
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20353
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-13 23:54:56 +00:00
Martin Roth 32c27c2f85 src/drivers: add IS_ENABLED() around Kconfig symbol references
Some of these can be changed from #if to if(), but that will happen
in a follow-on commmit.

Change-Id: Ib3a1cf04482a8f19b159c31cfb16a7b492748d91
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20352
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-13 23:54:48 +00:00
Martin Roth e6ff1596e7 soc/intel: add IS_ENABLED() around Kconfig symbol references
Change-Id: I3c5f9e0d3d1efdd83442ce724043729c8648ea64
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20348
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-13 23:54:32 +00:00
Andrey Petrov fed4303b45 soc/intel/cannonlake: Add reset.c
Add reset functionality. This implementation relies on CSE to trigger
global reset.

Change-Id: I7e6ae07a48f1cdc3d2f4cdb74246627d27253adf
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20070
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-13 21:04:47 +00:00
Stefan Reinauer 6a00113de8 Rename __attribute__((packed)) --> __packed
Also unify __attribute__ ((..)) to __attribute__((..)) and
handle ((__packed__)) like ((packed))

Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/15921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-13 19:45:59 +00:00
Andrey Petrov 9f244a5494 soc/intel/cannonlake: Add Makefile
This enables building working bootblock and non-functional romstage
and ramstage.

Change-Id: I580cd2c3279d742f202b2adfbe55c814cfb48f99
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20073
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-13 19:28:53 +00:00
Andrey Petrov f35804ba6f soc/intel/cannonlake: Add bootblock PCH
Add essential initialization needed for PCH in bootblock.

Change-Id: I3694e099e78c2989f7192c550cbba098e5df2032
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20067
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-13 19:28:34 +00:00
Andrey Petrov 3e2e0508c2 soc/intel/cannonlake: Add early CPU initialization
Add basic CPU initialization for bootblock, as well as relevant headers.

Change-Id: I318b7ea0f3aa5b5d28bf70784ccd20f2fe28cd86
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/20066
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-13 19:28:27 +00:00
Aaron Durbin 4dc9fb026c soc/intel/skylake: reduce postcar stack usage for fsp 2.0
The FSP 2.0 path uses postcar to decompress ramstage. Since postcar
is entirely RAM based there's no need to have an excessively large
stack for the lzma decompression buffer. Therefore, reduce the stack
required to 1 KiB like apollolake.

Change-Id: I45e5c283f8ae87e701c94d6a123463dddde3f221
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20536
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-07-13 16:49:19 +00:00
Marshall Dawson ce9c88348c arch/x86/assembly_entry: Align stack for car_stage_entry
At process _start, the stack is expected to be aligned to a
16-byte boundary.  Upon entry to any function the stack frame
must have the end of any arguments also aligned.  In other words
the value of %esp+4 or %rsp+8 is always a multiple of 16 (1).

Align the stack down and change the method for executing
car_stage_entry from jmp to call which should preserve proper
alignment regardless of a 32- or 64-bit build.

Although 4-byte alignment is the minimum requirement for i386,
some AMD platforms use SSE instructions which expect 16-byte.

1) http://wiki.osdev.org/System_V_ABI
   See "Initial Stack and Register State" and "The Stack Frame"
   in the supplements.

BUG=chrome-os-partner:62841664

Change-Id: I8a15514f551a8e17e9fe77b8402fe0d2b106972e
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/20528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-13 16:48:22 +00:00
Matt DeVillier c35a1e8887 google/butterfly: add function needed for MRC raminit
All other Sandy/IvyBridge google boards have this function,
which is required by nb/sandybridge/raminit_mrc.c. Without it,
compilation fails when using MRC vs native ram init.

Change-Id: I3318700c540e97baf0a75aafb73f160aaae6703f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/20538
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-13 16:44:44 +00:00
Kyösti Mälkki 7ecb538209 AGESA binaryPI: Unify agesawrapper header
AMD_S3_PARAMS is no longer defined with all binaryPI.
Guard these as a build fix to share the header nevertheless.

Change-Id: I725ed43991dc1c3e30d236bde4282176819f4cf4
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/19984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-13 13:07:31 +00:00