Commit Graph

30222 Commits

Author SHA1 Message Date
David Wu 3221771a72 mb/google/volteer/var/terrador: Add PMC.MUX.CONx devices to devicetree
Add PMC.MUX.CONx devices to devicetree for terrador.

BUG=b:164941862
TEST=FW_NAME=terrador emerge-volteer coreboot chromeos-bootimage

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I3f5ea4c0fbcc0117934a1ec1c350e867d881eb9d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-08-24 21:31:25 +00:00
David Wu 5e5f07ff35 mb/google/volteer/var/todor: Add PMC.MUX.CONx devices to devicetree
Add PMC.MUX.CONx devices to devicetree for todor.

BUG=b:164941862
TEST=FW_NAME=todor emerge-volteer coreboot chromeos-bootimage

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: Iaef603553597685b03e805603352f38d70d65a5a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44542
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-08-24 21:31:17 +00:00
Chris Wang c33d5ad156 mb/google/zork: update telemetry settings for woomax
update telemetry value with the SDLE test result.

BUG=b:158964769
BRANCH=none
TEST=emerge-zork coreboot

Signed-off-by: Chris Wang <chris.wang@amd.corp-partner.google.com>
Change-Id: Ic419ca5ca00e4e8602dbc12212a8a63ed3657e02
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44364
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-24 20:47:47 +00:00
Josie Nordrum 70823a046e soc/amd/common: Move interrupt and wake status clear
Move interrupt status and wake status clearing to after GPIO config so
that configuration does not incorrectly set interrupt or wake status.

i.e. when PULL_UP is configured on a pad, it incorrectly sets in the
interrupt status bit. Thus, the interrupt status bit must be cleared
after initial pad configuration is complete.

BUG=b:164892883, b:165342107
TEST=None
BRANCH=None

Signed-off-by: Josie Nordrum <josienordrum@google.com>
Change-Id: If4a5db4bfa6a2ee9827f38e9595f487a4dcfac2c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44640
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-24 19:58:15 +00:00
Kane Chen 0a859522ed mb/google/zork: Fix GPIO table for v3.6 schematics for woomax
Add board version switch GPIO table on gpio.c.

BUG=b:165887084
BRANCH=Zork
TEST=emerge-zork coreboot

Signed-off-by: Kane Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: I661e16f7b4769e83450f41ff267c0d253441c4cd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44655
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-24 16:53:57 +00:00
Kevin Chiu cc69f7b4e5 vc/google/chromeos: load wifi_sar_defaults.hex as the main WiFi SAR CBFS source
Each variant WiFi SAR CBFS will be added with the default name
"wifi_sar_defaults.hex".
so we just need to look up the default CBFS file as the WiFi SAR
source.

BUG=b:159304570
BRANCH=zork
TEST=1. cros-workon-zork start coreboot-private-files-zork
     2. emerge-zork chromeos-config coreboot-private-files-zork \
        coreboot chromeos-bootimage

Change-Id: Idf859c7bdeb1f41b5144663ba1762e560dcfc789
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44672
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 16:07:21 +00:00
Kevin Chiu 638172b44e mb/google/zork: Enable WiFi SAR configs
BUG=b:159304570
BRANCH=master
TEST=1. cros-workon-zork start coreboot-private-files-zork
     2. emerge-zork chromeos-config coreboot-private-files-zork \
        coreboot chromeos-bootimage

Change-Id: Ibf1cca8a039e37acbbd9f97ee6a35414ceb3ca6e
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44634
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-24 14:25:10 +00:00
Maulik V Vaghela f5b3a49b76 mb/intel/jslrvp: Correct PCI root port mapping
Jasper Lake SoC had PCI root port mapping swap, thats why we were
using swapped mapping earlier for all the boards

Recently, patch was pushed to handle this swap in PCI enumeration code
for Jasper Lake and we need to correct this mapping. Now this mapping
aligns with actual port mapping in the schematics

BUG=None
BRANCH=None
TEST=NVMe and WLAN are getting detected after this changes

Change-Id: Ide5f8419a15f559cefeb6039f155fabf97c279f8
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44391
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2020-08-24 14:05:35 +00:00
Kane Chen bf4e71e1b3 mb/google/dedede: add mainboard_smi_espi_handler for dedede.
By adding mainboard_smi_espi_handler, the espi smi can be handled
properly.

BUG=b:163382105
TEST=Tested lid close smi can be handled properly in depthcharge stage

Signed-off-by: Kane Chen <kane.chen@intel.com>
Change-Id: I8a2ecb52d5f6586f8acd57c4965b4238b95e3b64
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44564
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 13:50:39 +00:00
Kane Chen 000549266e soc/intel/jasperlake: Run pmc_set_acpi_mode() during .init in pmc_ops
pmc_set_acpi_mode will set EC SMI mask to 1 in the end.
However google_chromeec_events_init will clear EC SMI mask.
If google_chromeec_events_init is ran after pmc_set_acpi_mode, the EC SMI mask
will be 0 in depthcharge and causes lidclose function not working.
So, pmc_set_acpi_mode() should run after google_chromeec_events_init.

This code is mainly from CB:42677

BUG=b:16338215
TEST=Close lid in depthcharge and the dut can be shutdown on waddledoo.

Signed-off-by: Kane Chen <kane.chen@intel.com>
Change-Id: I0f06e8b5da00eb05a34a6ce1de6d713005211c08
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44563
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2020-08-24 13:40:15 +00:00
Felix Singer 9f4835ec2b mb/prodrive/hermes: Remove duplicate entry from devicetree
Change-Id: Iad0b28d5ad8339efd5a6055abfd7ced074d248b1
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44692
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 12:17:16 +00:00
Patrick Rudolph 0fc1f2fb6f Revert "cpu/x86/sipi: Add x86_64 support"
This reverts commit 18ad7fa51f.
Breaks Mpinit. The log shows:

SIPI module has no parameters.
MP initialization failure.

Change-Id: Ideed19437667124a02c0f03aa7be8dec042d0f44
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44734
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 11:35:31 +00:00
Kevin Chiu dda2de81c7 mb/google/kukui: Add LPDDR4X MT53E2G32D4NQ-046 8GB support for burnet/esche
Add LPDDR4x DRAM index#6 MT53E2G32D4NQ-046 8GB

BUG=b:159301679
BRANCH=master
TEST=1. emerge-jacuzzi coreboot
     2. MT53E2G32D4NQ-046 8GB M/B boot successfully
     3. check DRAM size: 8GB

Change-Id: I16449591ec576b1c613a5dad511bafac2bb46f04
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44520
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2020-08-24 09:25:09 +00:00
John Su 830c77eede mb/google/volteer: Update settings for FPMCU on Halvor
Configure gpio settings for FPMCU on Halvor.

BUG=b:153680359
TEST=After flash FP MCU FW, during bootup we see spi id spi-PRP0001:01 in dmesg.

Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Change-Id: I5503cfe0fb9933e98ed01afeef8cad1345593ac6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44575
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:24:36 +00:00
Eric Lai d234484f31 mb/google/volteer/var/halvor: Correct USB device tree setting
Halvor uses TBT 0/1/2 for USB type C. We doesn't use PCIE/USB3 port
therefore disable PCIE/USB3 ports and enable TBT 2.
Follow volteer to set USB2 OC_SKIP.

BUG=b:165175296
BRANCH=none
TEST=Check all USB ports USB2 and USB3 both functional

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: Ifb844ce475f3d58f0c95be0f172fc49edb4cd5fe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44649
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2020-08-24 09:24:20 +00:00
Martin Roth 0c12abe462 soc/amd/picasso: Add console & timestamp buffers to psp_verstage
Create areas for console & timestamp data in psp_verstage and pass it to
the x86 to save for use later.

BUG=b:159220781
TEST=Build & Boot trembyle

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I41c8d7a1565e761187e941d7d6021805a9744d06
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42830
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2020-08-24 09:23:05 +00:00
Ren Kuo 3818d03fa2 mb/google/dedede/var/magolor: Add device settings
Add the configuration in device tree:
1. Add HDA,speaker codec and speaker amp setting
2. Add Elan and Goodix touchscreen setting
3. Add user facing camera usb setting
4  Add Synaptics and Elan Touchpad setting
5. Add WiFi configuration

BUG=None
BRANCH=None
TEST=build magolor firmware

Change-Id: Ifc562b4a05c8955d2aec105f2f429f926ad1e702
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44633
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:22:54 +00:00
Ravi Sarawadi 97b4224943 soc/intel/tigerlake: Fix IPU and Vtd config
- FSP enables IPU (Imaging Processing Unit) by default even if its
disabled in devicetree. We need to fill FSP upd based on the device
enablement in devicetree.

- Enable Vtd IPU and IGD settings only if respective IPs are enabled.

BUG=165340186
BRANCH=None
TEST=IPU is disabled and doesn't show in lspci.

Change-Id: Ieff57fb0ebc8522546d6b34da6ca2f2f845bf61d
Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44627
Reviewed-by: Daniel H Kang <daniel.h.kang@intel.corp-partner.google.com>
Reviewed-by: John Zhao <john.zhao@intel.com>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:20:48 +00:00
Caveh Jalali 028e527cbd mb/google/volteer/*/gpio.c: add GPP_D16 to early_gpio_table
GPP_D16 is routed to the main power enable pin on several PCIe SD card
controllers on SD daughterboards. We should enable the power to these
chips as early as possible so they can participate in PCIe
enumeration.

BUG=b:162722965
TEST=Verified RTS5261 and GL9755 daughterboards enumerate on PCI and
	can read SD cards.

Change-Id: Icf5e770f540e5d1e27b40f270bb004f4196bc7be
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44117
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2020-08-24 09:20:38 +00:00
Ronak Kanabar a360aad2bc soc/intel/jasperlake: use UDK_202005_BINDING
JSL FSP support FSP 2.2. FSP 2.2 introduces Multiphase SI init
support through the FSP-S arch UPD. The FSP-S arch UPD structure
is added in edk2 stable 2020 branch. Switching the support for
JSL to edk2-stable202005 to intercept the FSP2.2 related support.

BUG=b:162184827
BRANCH=None
TEST=Build and boot JSLRVP

Cq-Depend: chrome-internal:3221772
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Change-Id: Ieed1b58e491d5a89043c418f0f44f2ee9af111f5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44576
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:18:54 +00:00
Mike Banon 8b7bda40f1 nb/amd/agesa: define DDR3_SPD_SIZE as a common value
Move a size of DDR3 SPD memory (always 256 bytes) to a common define.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I80c89ff6e44526e1d75b0e933b21801ed17c98c0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44498
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-24 09:18:12 +00:00
Elyes HAOUAS d2a00d7a1c mb/asrock: Drop unneeded empty lines
Change-Id: I4385fded02e43f3fd8683dd926d81a59c04d3bd9
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44613
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-24 09:17:57 +00:00
Elyes HAOUAS 3cb8abd1b6 mb/pcengines: Drop unneeded empty lines
Change-Id: Ia1f5c22287be0d228ce1d569f3224d9d63093f3a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44619
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-24 09:17:22 +00:00
Elyes HAOUAS 0a490d246c src/acpi: Drop unneeded empty lines
Change-Id: I561717c9ee3471462ee510f12c821cfe236b23be
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44603
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-24 09:16:59 +00:00
Elyes HAOUAS cbcce2415b soc/sifive: Drop unneeded empty lines
Change-Id: I20008c71d5b573d72a09068626523e10faa2d632
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44602
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-24 09:16:48 +00:00
Elyes HAOUAS c94b38ec13 src/arch: Drop unneeded empty lines
Change-Id: Ic86d2e6ad00cf190a2a728280f1a738486cb18c8
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44591
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-24 09:16:19 +00:00
Ronak Kanabar 78546c5134 edk2-stable202005/IntelFsp2Pkg: Add FSP*_ARCH_UPD.
Introduce FSPT_ARCH_UPD and FSPS_ARCH_UPD to support debug events
and multi-phase silicon initialization.
For backward compatibility the original structures are kept and
new ARCH_UPD structures will be included only when UPD header
revision equal or greater than 2.

ref:
- https://bugzilla.tianocore.org/show_bug.cgi?id=2781

BUG=b:162184827
BRANCH=None
TEST=Build and boot JSLRVP

Cq-Depend: chrome-internal:3221772
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Change-Id: I728aff1df3d361e21e4617647c4ec0e2d345a8c2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44577
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2020-08-24 09:15:27 +00:00
Elyes HAOUAS d3a74bb4fe src/superio: Drop unneeded empty lines
Change-Id: I3fd0cc00f32fa073cb2a6faf2802acdbe7db592c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44614
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:14:42 +00:00
Sumeet R Pawnikar e0ca33ce86 mb/google/dedede/variants/drawcia: add charger input current throttling
Add charger input current throttling for drawcia system

BUG=None
BRANCH=None
TEST=Built and tested on drawcia system

Change-Id: I34fdc23fcd84b5c27c2bada769f7a9049c2a56a5
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44546
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-08-24 09:14:21 +00:00
Rob Barnes bcab8b0a41 soc/amd/picasso: Store ddr_frequency in MT/s
This field eventually gets interpreted as MT/s by SMBIOS instead of MHz. Translate from Mhz to MT/s by multiplying by 2.

BUG=b:154654737
TEST=dmidecode -t 17 matches expected speed

Change-Id: I51b58cb0380f2a2bf000347395ac918ac0717060
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44540
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-24 09:13:54 +00:00
Sridhar Siricilla 2f6d5551b0 soc/intel/common: Add downgrade support for CSE Firmware
Add downgrade support for CSE RW firmware.

When CSE FW is downgraded, CSE may get into data compatibility issues.
To avoid such issues, coreboot sends DATA CLEAR HECI command to CSE to
clear CSE run time data on proactive basis during a downgrade and
when CSE indicates a data mismatch error through GET_BOOT_PARTITION_INFO.

BUG=b:144894771
TEST=Verified on hatch

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I0a3a3036e448e5a743398f6b27e8e62965dbff3c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40561
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:12:34 +00:00
Patrick Rudolph 275f150752 cpu/x86/smm/smm_module_handler: Add x86_64 support
Fix compilation under x86_64.

Tested on HP Z220:
* Still boots on x86_32.

Change-Id: I2a3ac3e44a77792eabb6843673fc6d2e14fda846
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-08-24 07:06:20 +00:00
Patrick Rudolph 3813822886 arch/x86/walkcbfs.S: Mark code as x86_32
The code can only be compiled as x86_32. Mark it as such to fix errors
in the x86_64 assembler. The caller has to make sure to call this code
in protected mode only.

Tested on HP Z220:
* Still boots on x86_32.

Change-Id: I4c0221fb3886b586c22fe05e36109fcdc20b7eed
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44674
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-08-24 07:05:33 +00:00
Patrick Rudolph 18ad7fa51f cpu/x86/sipi: Add x86_64 support
Enter long mode on secondary APs.

Tested on Lenovo T410 with additional x86_64 patches.
Tested on HP Z220 with additional x86_64 patches.

Still boots on x86_32.

Change-Id: I916dd8482d56c7509af9ad0d3b9c28bdc48fd0b1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-08-24 07:04:58 +00:00
Kane Chen c7a7531cee mb/google/zork: Add GPIO_144 in touchscreen power on/off sequence
Add GPIO_144 setting to fix touchscreen function not work.

1. Modify reset pin to stop gpio delay to 200ms.
2. Reset GPIO off delay set to 1ms.
3. Add GPIO_144 as stop GPIO.
4. Stop GPIO off delay set to 1ms.
5. Set disable_gpio_export_in_crs = 1.

BUG=b:160126287
BRANCH=Zork
TEST=emerge-zork coreboot

Signed-off-by: Kane Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: I25299861b91cb7b76e512fad743b80221e6ffb4c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-24 01:53:00 +00:00
Kane Chen 9a3b8bdb5b mb/google/zork: Fix VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS for Woomax
PROTO stage board version =0.
EVT stage board version =1.
Modify "VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS" from 2 to 1 for Woomax
EVT configuration.

BUG=b:165887084
BRANCH=Zork
TEST=emerge-zork coreboot

Signed-off-by: Kane Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: I894049298bc0313df4fe0a527c55f53ffe56dc8d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44657
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-08-24 01:52:44 +00:00
Felix Held 90ca7f491f mb/google/zork: disable non-GPU HD Audio device
The zork devices use the ACP (audio co-processor) and the I2S interface
for audio and not the HDA (HD audio) device and interface.

BUG=b:158535201,b:162302028
BRANCH=zork
TEST=Equivalent change on Mandolin disabled the non-GPU HDA device with
the corresponding FSP change applied.

Change-Id: I6c7de881cff8398fe416151fab219142d4fc904a
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44681
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt Papageorge <matthewpapa07@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-08-23 16:14:16 +00:00
Felix Held eb8e8df92a soc/amd/picasso/romstage: Set HDA disable UPD if controller disabled
FSP has recently added support for a UPD switch to disable the non-GPU
HD Audio controller. This change adds the coreboot side of the feature.
To avoid having two HD Audio enable options, the value of the
hd_audio_enable UPD is determined by the enable state of the non-GPU HD
Audio controller in the platform devicetree.

BUG=b:158535201,b:162302028
BRANCH=zork
TEST=With the corresponding FSP change applied the non-GPU HD Audio
device is hidden when switched off in devicetree and remains present and
functional when switched on in devicetree.

Change-Id: Ib2965e0742f4148e42a44ddad8ee05f0c4c7237e
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44680
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Matt Papageorge <matthewpapa07@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-23 16:14:07 +00:00
Felix Held 85e981c8c9 vc/amd/fsp/picasso: add FSP-M UPD to disable the HD Audio controller
BUG=b:158535201,b:162302028
BRANCH=zork

Change-Id: If4886591b7d73293773e4d36ec653ef42e8b2f54
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44679
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-23 16:13:47 +00:00
Felix Held 762fa823b0 Revert "vc/amd/fsp/picasso: add FSP-M UPD to disable the SATA controller"
This reverts commit 65605276a4.

This patch shouldn't have been merged yet, since the issues on the FSP
side aren't sorted out yet, so the FSP-side changes haven't landed yet.
This byte will be used for an audio-related setting instead to have the
audio settings grouped together.

BRANCH=zork

Change-Id: If79900f3a92fd949d7653001e1ca2faac7061e3c
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44678
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-23 16:13:36 +00:00
Nico Huber 119ace0908 soc/intel/cnl: Configure FSP option PcieRpSlotImplemented
Allow configuring FSP option PcieRpSlotImplemented. Also, update all
related devicetrees and configure PcieRpSlotImplemented to keep the
current behaviour.

Change-Id: I6c57ab0ae50a37cd9a90786134e9056851a86a3c
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39986
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-08-23 09:57:02 +00:00
Felix Singer 2b9035ed6e mb/prodrive/hermes: Add root port numbers to comments
Change-Id: I06bb0493999f1f6954854f872cda46dc38930370
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2020-08-23 09:56:38 +00:00
Edward O'Callaghan bd409ad69f mb/google/puff: Select cse_board_reset() strong symbol
Since Puff uses CSE Lite SKU that supports in-field CSME
updates an additional reset is triggered when jmp from RO
to RW during boot. However this reset is not detected by
the cr50 running older firmware because the strapping
configuration for EFS2 uses PLT_RST_L to assert to cr50
that a AP reset occured. The older cr50 firmware
version of 0.0.22 only monitors AP resets via SYS_RESET_L
and hence never detects the reset.

To mitigate the issue above a modified reset sequence is
required to be performed to signal the reset occured and
hence a board-specific cse_board_reset() strong symbol is
provided to modify the flow accordingly.

V.2: Select CHROMEOS_CSE_BOARD_RESET_OVERRIDE common
     implementation instead of a local variant in mainboard.c

BUG=b:162290856
BRANCH=puff
TEST=none

Change-Id: I27ab9711aedf92b5af7a58f3b5472ce79f78c8fa
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44454
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-22 01:30:42 +00:00
Karthikeyan Ramasubramanian d329417062 mb/google/dedede: Enable CSE Board Reset Override
This will ensure that the cold reset is performed when CSE Lite jumps
from RO to RW.

BUG=b:162386991
TEST=Ensure that Drawcia board boots to OS. Ensure that global reset is
triggered when cr50 is running firmware versions newer than 0.0.22. On
cr50 versions 0.0.22 or older, EC triggers cold reset of AP.

Change-Id: I46a390c71e380328cd7fe70214df09553b2db75c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44645
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-22 01:22:44 +00:00
Karthikeyan Ramasubramanian b9042cb942 vendorcode/google/chromeos: Introduce helper for CSE board reset
When CSE Lite jumps from RO to RW, certain boards need to request
Embedded Controller (EC) to trigger cold reset of SoC. This change
introduces a helper to override the default global reset.

BUG=None
TEST=Ensure that Drawcia board boots to OS. Ensure that global reset is
triggered when cr50 is running firmware versions newer than 0.0.22. On
cr50 versions 0.0.22 or older, EC triggers cold reset of AP.

Change-Id: I8078e2436d1d58a650bf7b0cf38b5bb89a474187
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44646
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2020-08-22 00:31:34 +00:00
Karthikeyan Ramasubramanian 7b58f9413d drivers/spi/tpm: Add helper to get cr50 firmware version
Introduce a helper to get the cached cr50 firmware version. This
information is in turn used to identify the strap configuration
supported by Cr50.

BUG=None
TEST=Ensure that Drawcia board boots to OS. Ensure that the version
cached cr50 firmware version is returned.

Change-Id: Id84b152993f253878a6c133cc433a0da2c990cf2
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44653
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-22 00:30:57 +00:00
Josie Nordrum 4cc87d4e35 mb/google/zork/var/ezkinil: Fix stylus GPIO to enable suspend
Make GPIO_4 and GPIO_5 PAD_NC in ezkinil/gpio.c. None of the Ezkinil SKUs
use internal stylus and hence pen pads are configured as NC.

BUG=b:164892883, b:165342107
TEST=Verified taht pen detect GPIO does not cause spurious wakes.
BRANCH=None

Signed-off-by: Josie Nordrum <josienordrum@google.com>
Change-Id: I7557575cf8b8e0f849e05bda1d69acf61e91a157
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44629
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 22:05:11 +00:00
Michael Büchler 6c5f47b50c superio/ite: delay PWRGD3 during resume
According to the IT8728F datasheet it is possible to add an extra delay
between 3VSBSW# being set and PWRGD3 being set during resume from
Suspend-to-RAM. This is enabled in the special function selection
register, the default being 0.

This is also useful for the IT8720F although this chip does not have the
PWRGD3 output. On the corresponding pin it has PWROK2, which the setting
then seems to apply to.

The datasheet for the IT8720F marks the corresponding bit as reserved,
but the vendor BIOS of an Acer Aspire M3800 sets it anyway. Without
setting the bit, coreboot fails to resume from S3. Oscilloscope
measurements have shown that setting the bit increases the delay between
3VSBSW# being set and PWROK2 being set from around 1 us to 140 ms. The
actual use of PWROK2 on the board design is unclear - the only
destination it seems to reach is a pin header near the SuperIO marked as
"GPIO1".

Signed-off-by: Michael Büchler <michael.buechler@posteo.net>
Change-Id: I51cbf2470dc2b840a647a20090acb5a0cf4f4025
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-08-21 21:51:33 +00:00
Martin Roth 1594e8ff9c lib: Update fmap cache error for psp_verstage
The assumption was that the fmap cache would be initialized in
bootblock, otherwise an error is shown.  This error is showing
up in psp_verstage when the fmap cache is initialized there, so
create a new ENV value for ENV_INITIAL_STAGE.

BUG=None
TEST=Boot, see that error message is gone from psp_verstage

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I142f2092ade7b4327780d423d121728bfbdab247
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43488
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 18:48:06 +00:00
Martin Roth e2d0ba0acb soc/amd/picasso: If using VBOOT, skip the APOB_NV region for RO
When booting from the RO region of a VBOOT enabled ROM, there shouldn't
be a reliance on anything outside of the RO section.  This includes the
APOB_NV region (similar to the MRC cache region).  By skipping the
region when setting up the BIOS Directory table, the PSP won't try to
use the region when booting.

The APOB_NV region is still used for the VBOOT RW sections.

BUG=b:158363448
TEST=Build RO with no APOB_NV region.  Dump the BDT and verify that
it's not in RO, but is in RW_A & RW_B.  Boot into recovery.

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I13c35ba8a2331492744d2acf257db15e4a53102a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44046
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-21 18:47:07 +00:00
Aaron Durbin bb98887522 mb/google/zork: provide full range backlight settings to kernel
Utilize the SOC_AMD_COMMON_BLOCK_GRAPHICS_ATIF option to provide
full range backlight settings to the kernel.

BUG=b:163583825

Change-Id: I3c337fad38e668488800f4d6bc583a82a93659d3
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44643
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-21 16:19:45 +00:00
Aaron Durbin 77a062e98c soc/amd/common: add rudimentary ATIF support
The Linux kenerl driver for AMD gpu currently has a floor
value of 12 for brightness settings (AMDGPU_DM_DEFAULT_MIN_BACKLIGHT).
AMD indicates they did this because they were concerned with certain
panels flickering at lower backlight values. However, for unaffected
panels it's desirable to be able to have the panel "turn off" at
the lowest backlight setting. The only way to do that is to provide
ATIF bindings that indicate backlight range.

Option SOC_AMD_COMMON_BLOCK_GRAPHICS_ATIF is added to provide a full
range for the backlight setting. If needed, this path can be built upon
for fuller support, but for the time being this is the only thing
necessary to make the backlight be full range.

BUG=b:163583825

Change-Id: If76801a8daf6a5e56ba7d118956f3ebce74e567a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44642
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-21 16:19:37 +00:00
Aaron Durbin 80bc091564 acpi: add more AML generation functions
Add the following functions to acpi AML generation code:

acpigen_write_to_integer_from_namestring()
acpigen_write_create_byte_field()
acpigen_write_create_word_field()
acpigen_write_create_dword_field()
acpigen_write_create_qword_field()

BUG=b:163583825

Change-Id: Ida151aff68f90012b16df2383fb96ddb87c3fb9c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44641
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 16:19:30 +00:00
Patrick Rudolph 29ed4f56b5 arch/x86/gdt: Work around assembler bug
The GDT loading did work fine on x86_64 a few months ago, but today it
only works in QEMU, but not on real hardware or KVM-enabled QEMU. This
might be related to toolchain changes.

Use 64bit GDT loading on x86_64 and force the assembler to generate a
64bit address load on the GDT. This will make sure no 32bit (signed)
displacement op is being generated, which points to the wrong address
in longmode.

Verified using readelf and made sure no R_X86_64_32S relocation symbol
is emitted. Disassembled the romstage ELF and made sure the GDT address
is 64bit in size.

Tested on QEMU and KVM-enabled QEMU: Doesn't crash any more on KVM.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Change-Id: Ia824f90d9611e6e8db09bd62a05e6f990581f09a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-21 16:01:42 +00:00
Elyes HAOUAS 69fb7d2a99 include/asan.h: Add missing includes
<stdint.h> and <stddef.h> are missing.

Change-Id: I10520013bb5ceb3aec0d24715f371f77e4300a70
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44656
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2020-08-21 13:36:10 +00:00
Matt DeVillier d32d2c3fdd mb/purism/librem_whl: Convert GPIOs to macros
Convert raw GPIOs to coreboot macros using newly-added support
for Cannon/Whiskey/Coffee/Cometlake SoCs to intelp2m

Test: build/boot Librem Mini, no smoke released.

Change-Id: I6ac747ad4e650c24d2b7e34228ff74140c51a0c1
Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44503
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
2020-08-21 07:54:30 +00:00
John Zhao 3af09bb16f mb/intel/tglrvp: Disable TBT_PCIE3 for UP4
Tiger Lake External Design Specification (Document #575683) states UP4
TBT_PCIE3 is not applicable. Disable TC3 for UP4.

BUG=None
Test=Built UP4 image successfully.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Icff8fccf9ac29c315c2a4dd08a3ec8a8efe9c453
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44572
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 07:52:39 +00:00
Maulik V Vaghela b728e2ccbc mb/google/dedede: Enable IPU for Wdoo and Wdee variants
IPU is required to be enabled for platform supporting MIPI camera.

IPU is by default disabled in devicetree for all variants. Enable
IPU for Waddledoo and Waddledee supporting MIPI camera.

BUG=None
BRANCH=None
TEST=IPU is enabled for platforms and enumerates in lspci.

Change-Id: Ia3cf06d78be4301c68bfa8b1118ddff231d24a66
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44271
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 07:52:06 +00:00
Patrick Rudolph 9f8f11513a SMM: Validate more user-provided pointers
Mitigate issues presented in "Digging Into The Core of Boot" found by
"Yuriy Bulygin" and "Oleksandr Bazhaniuk" at RECON-MTL-2017.

Validate user-provided pointers using the newly-added functions.
This protects SMM from ring0 attacks.

Change-Id: I8a347ccdd20816924bf1bceb3b24bf7b22309312
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41086
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-08-21 07:51:07 +00:00
Elyes HAOUAS 37ac368c78 sb/intel/i82371eb/fadt.c: Use macro for 'flags' instead of magic number
Change-Id: I793afe81fbb9abef0d4178af9dc2e91c612b1b43
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44521
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 07:50:32 +00:00
Jes Klinke e046b71ba6 soc/intel/tigerlake: Enable long cr50 ready pulses
A new Kconfig setting CR50_USE_LONG_INTERRUPT_PULSES controls new code
running in verstage, which will program a new Cr50 register, to
have Cr50 generate longer than default interrupt pulses.
This needs to be selected on all Tiger Lake systems, since Tiger Lake
(and likely future Intel SoCs) require at least 100us interrupt pulses.

TEST=util/abuild/abuild -t GOOGLE_VOLTEER -c max -x
BUG=b:154333137

Change-Id: I20100d72ce426203943c1788d538bb2cd9d82e11
Signed-off-by: Jes Bodi Klinke <jbk@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44626
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-21 07:49:29 +00:00
Harshit Sharma 51593dd0c6 arch/x86: Add support for ASan to memory functions
Compiler's instrumentation cannot insert asan memory checks in
case of memory functions like memset, memcpy and memmove as they
are written in assembly.

So, we need to manually check the memory state before performing
each of these operations to ensure that ASan is triggered in case
of bad access.

Change-Id: I2030437636c77aea7cccda8efe050df4b77c15c7
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44307
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:46:04 +00:00
Harshit Sharma c29c12376f mainboard/emulation/qemu-i440fx: Select HAVE_ASAN_IN_ROMSTAGE
Enable ASan in romstage as it has been tested.

Change-Id: I3b5263f5342a78968d9a1ecf72996fff0946b204
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44282
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:45:37 +00:00
Harshit Sharma 7fe5ea4e6e soc/intel/apollolake: Select HAVE_ASAN_IN_ROMSTAGE
Enable ASan in romstage for apollolake as it has been tested on
Siemens MC-APL3.

Change-Id: I2f2f965151a4ef4672f2f16979a6ad8492879aeb
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44159
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>
2020-08-21 07:45:17 +00:00
Harshit Sharma d196e04e22 cpu/intel/haswell: Select HAVE_ASAN_IN_ROMSTAGE
Enable ASan in romstage for haswell as it has been tested on
Lenovo ThinkPad T440P.

Change-Id: I6eae242c71f41c9159658ae68d61b4036ad42d42
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44160
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:44:51 +00:00
Harshit Sharma 65bec1c996 arch/x86: Select HAVE_ASAN_IN_RAMSTAGE
Enable ASan in ramstage if ASAN is selected in menuconfig for an
x86 platform.

Change-Id: Id5b3dc18368a5da6bdc70c84527b95d1688dc19f
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44259
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-21 07:44:19 +00:00
Harshit Sharma 0b1ec5ad77 Kconfig: Update ASan config options
Instead of enabling ASAN_IN_ROMSTAGE from Kconfig file in a
platform's dedicated directory, let's introduce a new config
option HAVE_ASAN_IN_ROMSTAGE to denote if a given platform
supports ASan in romstage.

Similary, use HAVE_ASAN_IN_RAMSTAGE to indicate
if a given platform supports ASan in ramstage. Consequently, we
no longer have to make ASan x86 specific.

Change-Id: I36b144305465052718f245cacf61d3ca44dfb4b4
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44258
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:42:21 +00:00
Harshit Sharma a6ebe08333 lib: Add ASan support to romstage on x86 arch
This patch adds ASan support to romstage on x86 architecture.
A Kconfig option is added to enable ASan in romstage. Compiler
flags are updated. A memory space representing the shadow region
is reserved in linker section. And a function call to asan_init()
is added to initialize shadow region when romstage loads.

Change-Id: I67ebfb5e8d602e865b1f5c874860861ae4e54381
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43604
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:41:19 +00:00
Harshit Sharma 9c88fb8df0 lib: Add ASan support to ramstage on x86 arch
This patch adds address sanitizer module to the library and reserves
a linker section representing the shadow region for ramstage. Also,
it adds an instruction to initialize shadow region on x86
architecture when ramstage is loaded.

Change-Id: Ica06bd2be78fcfc79fa888721ed920d4e8248f3b
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42496
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:37:52 +00:00
Harshit Sharma 3b9cc859ff lib: Update ASan compiler flags and Kconfig help text
An additional compiler flag is added to make use of the shadow
offset callback feature we introduced in our GCC patch. Also,
a comment is added to tell user that this GCC patch needs to be
applied in order to use ASan.

Change-Id: Ia187e4991bf808f4ae137eff0ffdb9baea0085e9
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43164
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:35:39 +00:00
Harshit Sharma 2bcaba0fd4 lib: Add ASan stub
Add a Kconfig option to enable address sanitizer on x86 architecture.
Create ASan dummy functions. And add relevant gcc flags to compile
ramstage with ASan.

Change-Id: I6d87e48b6786f02dd46ea74e702f294082fd8891
Signed-off-by: Harshit Sharma <harshitsharmajs@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-08-21 07:35:07 +00:00
CK Hu 693f4a4179 mb/google/asurada: Fixup BOOT_DEVICE_SPI_FLASH_BUS default value
On MT8192 the SPI flash is actually using a SPI-NOR controller with
its own bus. The number here should be a virtual value as
(SPI_BUS_NUMBER + 1).

Signed-off-by: CK Hu <ck.hu@mediatek.com>
Change-Id: Ibc269201a34968c8400d2235e8da2ecd88114975
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44452
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2020-08-21 05:59:42 +00:00
Caveh Jalali 9bc041187d cse_lite: Move global reset after MRC writeback
With CSE-lite enabled, we were going through the lengthy memory
training procedure twice on the first power-on boot or after full BIOS
SPI flash update. This moves the global reset performed to achieve the
CSE-lite RO to RW reboot to a later boot phase so that it happens
after the memory training data has been written to the MRC cache. Now,
the 2nd (and subsequent) reboot can utilize the memory training data
established during the 1st boot.

This reduces the first boot time by about 20s on a 16GB system.

Looking at the timing stats form cbmem, the normal boot penalty is
about 300ms - mostly attributed to running FspSiliconInit a 2nd
time. We will get this time back when the mrc_cache refactoring effort
lands (cb:44196, et. al).

BUG=b:162021048
TEST=Booted on volteer, confirmed 20s faster boot time.

Change-Id: Ia42d72fdec41f9792ab8f04205b20a55758a4235
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44430
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2020-08-20 23:01:49 +00:00
Jason Glenesk 1916f8969b soc/amd/acpi: Move ACPI IVRS generation to coreboot
Add code for IVRS generation to coreboot. Publish coreboot generated
structure rather than IVRS generated by FSP binary.

Reference Doc: 48882_IOMMU_3.05_PUB.pdf

BUG=b:155307433
TEST=Boot trembyle to shell and extract and compare IVRS tables and make
sure they cover the same devices.

Change-Id: I693f4399766c71c3ad53539634c65ba59afd0fe1
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43804
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-08-20 19:42:05 +00:00
Jes Klinke dcae8074bf drivers/spi/tpm: Enable long cr50 ready pulses for Tiger Lake systems
For Volteer (and future Tiger Lake boards) we can enable mode S0i3.4
only if we know that the Cr50 is generating 100us interrupt pulses.
We have to do so, because the SoC is not guaranteed to detect pulses
shorter than 100us in S0i3.4 substate.

A new Kconfig setting CR50_USE_LONG_INTERRUPT_PULSES controls new code
running in verstage, which will program a new Cr50 register, provided that
Cr50 firmware is new enough to support the register.

BUG=b:154333137
TEST=util/abuild/abuild -t GOOGLE_VOLTEER -c max -x

Signed-off-by: Jes Bodi Klinke <jbk@chromium.org>
Change-Id: If83188fd09fe69c2cda4ce1a8bf5b2efe1ca86da
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43741
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-08-20 19:34:46 +00:00
Patrick Georgi f290e6298f src/mainboard: Escape variable expansion in Kconfig
Kconfig 5.8 interprets $(...) itself using environment variables, which
generally means that they expand to the empty string. \$(...) works
with both our current and new Kconfig with the desired behavior
(to pass it through unmodified).

Change-Id: I726567eeb61d2035560152677d2b4548c1472be9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44584
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-20 19:30:00 +00:00
Angel Pons 176d005c64 mb/asrock/b85m_pro4: Select PECI function on Super I/O
This allows the Super I/O to know how hot the CPU is.

Change-Id: I9c91136c3bb5aae541bb7ac64bb62be36c3c0b5d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-08-20 08:56:28 +00:00
Angel Pons a151c22b34 sb/intel/lynxpoint: Drop unneeded and rotten Kconfig option
Not selecting `ME_MBP_CLEAR_LATE` results in a build failure. Since both
traditional and ULT platforms are known to be working, drop the option.

Change-Id: I09ce27f812966800e36f6c0624c93759089faf45
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44547
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-08-20 08:56:21 +00:00
Mike Banon 1452c80ee9 mb/asus/am1i-a/buildOpts.c: choose the 1600 MT/s RAM frequency
Together with the "AMD_XMP" changes, now this board with Crucial
BLT8G3D1869DT1TX0 sticks could run at 1600 MT/s CL8 (8-8-9-23) speeds.
Earlier only 1333 MT/s CL9 (9-9-10-27) has been possible with coreboot.

1866 MT/s CL9 is impossible on f16kb without northbridge overclocking.
tRP in "CL-tRCD-tRP-tRAS" gets set 1 point higher by AGESA because of
Errata 638. See more info in a BKDG for AMD Family 16h Models 00h-0Fh.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I7e9f5120421221043f9f9dfe143b51bfa61936be
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44462
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-20 08:55:41 +00:00
Mike Banon ddc2a30737 vc/amd/agesa/f16kb: raise the UDIMM Freq limit 1333MT/s values to 1600MT/s
AMD f16kb boards are perfectly capable of working at 1600MT/s RAM speeds
even with two DDR3 UDIMM modules per channel. AM1I-A only supports a
single-channel operation, with at most two DIMMs per channel, so raising
these limit values is required to let it and similar boards run faster.

Successfully tested on AM1I-A and two Crucial BLT8G3D1869DT1TX0 UDIMMs,
together with related AMD_XMP changes - also required to get a 1600MT/s
with this set of modules which have only 1333MT/s at JEDEC part of SPD.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I2a9da4e594ab3dc38b5ba87520633cbd01c9ce01
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44461
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-20 08:54:41 +00:00
Elyes HAOUAS 86ea251ba0 soc/intel/xeon_sp/cpx/Kconfig: Relocate 'select CACHE_MRC_SETTINGS'
This will remove the warning:
 "src/soc/intel/xeon_sp/cpx/Kconfig:79:warning: config symbol 'CPU_BCLK_MHZ' uses select, but is not boolean or tristate"

Change-Id: I2cfaf347b638e3847caa167e7efda89e9202960a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44548
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2020-08-20 07:46:04 +00:00
Matt Papageorge 9efb7f93e9 mb/google/zork/baseboard: Remove unused reference
Remove references to clk_pm_support which is currently ignored
by Picasso AGESA FSP.

BUG=b:161218965,b:162423378
TEST=Build test Trembyle and Dali, boot to ChromeOS 5 times each

Change-Id: Ic5d6abc56821863b68e45c11763f00d2b6410983
Signed-off-by: Matt Papageorge <matthewpapa07@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44556
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Justin Frodsham <justin.frodsham@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-19 23:30:11 +00:00
Matt Papageorge 8107cef319 vc/amd/fsp/picasso: update pci descriptor comments
Update fsp_dxio_descriptor comments to be more comprehensive
of the currently available data fields. Most of these are not
currently utilized with Zork but may be in future projects.

BUG=b:161218965
TEST=Build test Trembyle

Change-Id: I8eb79fa7807dcf5b28b7b0ec60953ef857d51972
Signed-off-by: Matt Papageorge <matthewpapa07@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44554
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-19 23:30:04 +00:00
Tim Wawrzynczak 6796f4b3cd mb/google/volteer: Implement weak function `cse_board_reset`
Since Volteer also uses the CSE Lite SKU and the cr50, it is subject
to a problem where old cr50 FW will not be able to properly detect an
SoC reset, so the reset on cold boots caused by the CSE Lite RO->RW
jump should instead get an assist from the EC, which can perform a
full cold reset.

BUG=b:162977697
TEST=Verify EC performs the cold reset

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ie8ae21c203da218459d5fd30a23be23520ed0598
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44536
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-08-19 18:02:40 +00:00
Patrick Rudolph 57907fcebf mb/emulation/qemu-q35,qemu-i440fx: Add x86_64 support
* Enable optional x86_64 romstage, postcar and ramstage
* Add Kconfig for x86_64 compilation
* Add documentation for x86 qemu mainboards
* Increase CAR stack as x86_64 uses more than 0x4000 bytes

Working:
* Boots to Linux
* Boots to SeaBIOS
* Drops to protected mode at end of ramstage
* Enumerates PCI devices
* Relocateable ramstage
* SMM

Change-Id: If2f02a95b2f91ab51043d4e81054354f4a6eb5d5
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/29667
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-19 10:50:49 +00:00
Patrick Rudolph e3dd57e106 cpu/x86/64bit/exit32: Add support for ramstage
When compiled in RAMSTAGE use the segments for ramstage.
Allows to call this assembly code in ramstage to exit long mode.
The next commit makes use of this.

Tested on qemu:
Still boots on x86_64.

Change-Id: I8beb31866bd15afc206b480b1ba05df995adc402
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44504
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2020-08-19 09:07:58 +00:00
Patrick Rudolph e563815e05 arch/x86/boot: Jump to payload in protected mode
*   On ARCH_RAMSTAGE_X86_64 jump to the payload in protected mode.
*   Add a helper function to jump to arbitrary code in protected mode,
    similar to the real mode call handler.
*   Doesn't affect existing x86_32 code.
*   Add a macro to cast pointer to uint32_t that dies if it would overflow
    on conversion

Tested on QEMU Q35 using SeaBIOS as payload.
Tested on Lenovo T410 with additional x86_64 patches.

Change-Id: I6552ac30f1b6205e08e16d251328e01ce3fbfd14
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/30118
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-08-19 09:06:43 +00:00
Sam Lewis ad7b2e23ab cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.

This moves all the existing am335x code to soc/ and updates any
references. It also adds a soc.c file as required for the ramstage.

Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44378
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2020-08-19 07:17:37 +00:00
Sam Lewis cb287987a1 arch/arm: Enable FIT payloads
Implements fit_payload_arch for the arm (aarch32) architecture, so that
FIT images can be used. The implementation is very similar to the
existing implementations for arm64 and riscv, and has mostly been
lifted from these other ports.

TEST: Booted Beaglebone Black (in progress port, to be submitted soon!)
with a FIT image containing a 5.4 kernel, dtb and initramfs.

Change-Id: I6b50c6f06b83c00a5b3622b5bbafe67130b6d233
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44377
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-08-19 07:16:59 +00:00
John Su 3b9041a563 mb/google/volteer: Update settings for trackpad on Halvor
Configure gpio settings for trackpad.

BUG=b:153680359
TEST=FW_NAME=halvor emerge-volteer coreboot chromeos-bootimage

Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Change-Id: I525ba688f71b7a1893bcb64c77e02c8e2506d7b0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44524
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-19 07:16:44 +00:00
Aaron Durbin aa8f165b49 soc/amd/picasso: log and print GPIO wake events
Capture the GPIO subsystem wake state and add events to
the eventlog.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I7f10bf4599ea7928cc87b6b10ac11a7c30e58406
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44535
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-19 07:16:32 +00:00
Aaron Durbin e05f4dc7d4 soc/amd/common: add gpio subsystem event reporting
In order to log gpio events for wake purposes the state
of the gpio subsystem should be snapshotted. Add the ability
to capture state of gpio subystem as well as saving up to 16
gpios that indicate their wake status.

Likewise, provide the eventlog additions based on state.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I49fca56c87543aa8aad0eb7da5c5cb570c4349d5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44534
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-19 07:16:23 +00:00
Martin Roth e21698bcb7 soc/amd/picasso: Use cbfs to locate the AMD firmware
Switch from locating the AMD firmware in the RW_A &
RW_B regions with their hardcoded locations to using CBFS to find
them.  They still need to be at the hardcoded locations so that we
can set the location inside the binary, but instead of just setting
the pointer directly to them, we now search for them with cbfs.

BUG=b:154441227
TEST=Boot & verify that binaries are located in both RW-A & RW-B

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I27b0593e0db7a9e6ba9b0633ac93b4d93954f002
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42831
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Eric Peers <epeers@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-19 07:15:55 +00:00
Martin Roth 143c6d8a74 soc/amd/picasso: Remove now unused #define
This #define wasn't removed when the tests were removed, so get rid
of it now.

BUG=None
TEST=Build

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: Ie0005b6ee97037bf3dfb80f0c2408d8bd9ee9633
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2020-08-19 07:15:29 +00:00
Kevin Chiu 13989fadc3 mb/google/zork: remove unused asl files for dirinboz
BUG=b:161579679
BRANCH=master
TEST=1. emerge-zork coreboot chromeos-bootimage
     2. power on proto board successfully

Change-Id: I713ac3a47c2d47035affb32e6c604b9af23aa90e
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-19 07:14:28 +00:00
Kevin Chiu 39fd923b0b mb/google/zork: Adjust Dirinboz I2C values
BUG=b:164757545
BRANCH=master
TEST=1. emerge-zork coreboot chromeos-bootimage
     2. power on proto board successfully
     3. measure i2c freq by scope is close to 400kHz

Change-Id: Icb27ff8a4960caaebc542ee4e507f1611da5a77e
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-19 07:14:11 +00:00
Felix Held 7f94b405be mb/amd/mandolin: enable SoC UARTs 0 and 1 and disable 2 and 3
There are only headers for the SoC's UART 0 and 1 on the board.

BUG=b:165020060
TEST=Linux only detects UART 0 and 1.

Change-Id: I45929f65a5f844ae5cef792b11176f487c80766f
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44530
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 18:47:03 +00:00
Felix Held b69549bb07 mb/amd/mandolin: select ACPI driver for internal memory mapped UARTs
In order for Linux to find and use the SoC's integrated UARTs, they need
to be exposed in ACPI.

BUG=b:165020060
TEST=Linux detects the SoC's integrated UARTs.

Change-Id: Iaa66657b88f62b2067c865c3e1945b7bdbf9be23
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44529
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-18 18:46:53 +00:00
Felix Held d8f461f25a mb/amd/mandolin: use SoC UART for console if LPC UART isn't present
Using the SOC's UART 0 as console requires moving a few resistors on the
Mandolin board.

BUG=b:165020060
TEST=coreboot console works on SoC UART 0 when AMD_LPC_DEBUG_CARD isn't
selected.

Change-Id: Idaf73ae84f54028da2182ce42035f9ecd63f4776
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-18 18:46:33 +00:00
Rob Barnes bb56ad449c mb/google/zork: Clean up bt reset_gpio removal
Clean up of bt reset_gpio removal function.

TEST=Boot and observe log showing bt reset_gpio was removed
BUG=b:157580724 - Add reset_gpio for Bluetooth

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I1d40ad16dd3c624d4be89d9eea1835cc4e72c03d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44273
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 17:17:46 +00:00
Aaron Durbin e87ec095a4 soc/amd/picasso: fix GPE snapshot state
In CB:44488 the cbmem addition was re-filling the object
when it should be memcpy()ing from static object. Correct
that oversight. The side effect from the previous implementation
would be if FSP-M modified the GPE state.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I158a89ae28431896fa9b5789292000fcbf0b066d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44533
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 15:58:01 +00:00
Aaron Durbin b4e28dfbf8 elog: add ELOG_WAKE_SOURCE_GPIO
Provide a GPIO-based wake source event for log caputre.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Iaa15178a392f40156d8d10e9aedfd5a1e758eedb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44532
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 15:57:52 +00:00
John Zhao 90e56267cf mb/google/volteer: Configure DP_HPD as PAD_NC and disable DdiPortHpd
GPP_A19(DP_HPD1) and GPP_A20(DP_HPD2) were configured native function
(NF1) without internal pull-down which wrongly presents HPD interrupts.
DP_HPD had been removed for EVT design as those events are through eSPI.
This change configures GPP_A19 and GPP_A20 to be no connection and
disables DdiPort1Hpd and DdiPort2Hpd.

BUG=b:162566436
TEST=Booted to kernel and verified no kernel HPD pins assertion message
on Volteer EVT board.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ia3245741b776b75073d2b43d36c8ea40b476b3ed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44501
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 15:57:50 +00:00
Aaron Durbin aa902036d0 elog: rename ELOG_WAKE_SOURCE_GPIO to ELOG_WAKE_SOURCE_GPE
The wake source macro for GPE events was using 'GPIO'. However,
current usage is really all GPEs. Therefore, provide clarity
in the naming in order to allow for proper GPIO wake events
that are separate from the ACPI GPE block.

BUG=b:159947207

Change-Id: I27d0ab439c58b1658ed39158eddb1213c24d328f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44527
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-18 15:57:40 +00:00
Meera Ravindranath 819d676fed mb/google/dedede: Fix S3 wake using trackpad
Configure TRACKPAD_INT_ODL pad reset config to DEEP and
map PMC_GPE_DW to PMC_GPP values.

TEST=System should wake from S3 via trackpad

Change-Id: I58ce3720e0fdeefb2c9440bb3006897ef80211ea
Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43949
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2020-08-18 13:56:45 +00:00
Meera Ravindranath d980339aca soc/intel/jasperlake: Fix PMC_GPE_DW mapping
PMC_GPE_DW mapping was not configured correctly and hence
coreboot skipped programming Tier 1 GPIOs resulting in failure of
S3 wake from Trackpad.

TEST=System should wake from S3 via trackpad

Change-Id: I59ce3720e0ffeefb2c9440bb300689def80211ea
Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43673
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2020-08-18 13:56:27 +00:00
Meera Ravindranath 6aa6f1f874 soc/intel/jasperlake: Increase PRERAM_CBMEM_CONSOLE_SIZE to 5KB
Increase the cbmem console size from 3KB to 5KB in order to fix console
overflow.

Change-Id: Id7eb64feb91ec29df5402b2fb1bac3ff73cc5bb3
Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44326
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 13:55:49 +00:00
Elyes HAOUAS cfdcfdb515 src: Remove unused 'include <delay.h>'
Change-Id: I6afea5c102299e570378a1656d3dcd329a373399
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44093
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 12:19:18 +00:00
Elyes HAOUAS ec17902485 src: Remove unused 'include <lib.h>'
Change-Id: Ic09fc4ff4ee5524d89366e28d1d22900dd0c5b4d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44100
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:18:18 +00:00
Elyes HAOUAS 0c1d2eba0d src: Remove unuse '<timestamp.h>
Change-Id: I4fa03c4576bb0256b73f1d36ca840e120b750a74
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:18:04 +00:00
Elyes HAOUAS c06f4f88a4 src: Remove unused '<halt.h>'
Change-Id: I3037edf89c933f4f136ca61d6a5bce41126ec6b9
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44098
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:17:49 +00:00
Elyes HAOUAS 5885ba822c src: Remove unused '<option.h>'
Change-Id: Icb79d60e9ec70a0780d5231698b88cff1db72c9b
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44097
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:17:33 +00:00
Elyes HAOUAS 38819a4507 soc/intel/common/block/pmc/pmclib.c: Remove unused '<pc80/mc146818rtc.h>'
Change-Id: If7e99e1b1be38694ad2fedb528a5c1725b968943
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44096
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 12:17:16 +00:00
Elyes HAOUAS 24230f6cd7 sb/amd/agesa/hudson: Add missing '#include <stddef.h>'
size_t needs <stddef.h>.

Change-Id: I9ccf526df44dbad8568f75bd0506ac686fdb7860
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43939
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 12:16:10 +00:00
Elyes HAOUAS a3759e3a7b src: Remove unused 'include <stddef.h>
Change-Id: Iae1e875b466f8a195653d897efa1b297c61ad0a5
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41912
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 12:15:44 +00:00
Elyes HAOUAS abfacd863d src: Remove unused 'include <boot_device.h>'
Change-Id: I5589fdeade7f69995adf1c983ced13773472be74
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42349
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 12:15:10 +00:00
Elyes HAOUAS 27ce8e3296 sb/intel/lynxpoint/early_pch.c: Use common 'write_pmbase16()'
Change-Id: I1a70eea8c4f835e5673e75282c9cecb24b150e3d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44413
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:14:47 +00:00
Elyes HAOUAS eaa165dfb4 src/southbridge/amd/*/*/fadt.c: Use macro for access_size
Change-Id: I316abf6626adabeecdf9639712ab3bf64e3cbe83
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44519
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:13:57 +00:00
Elyes HAOUAS deff53c8e9 cpu/intel/common: Use macro for access_size
Change-Id: I0388ac41403ff03943c91ba19f6527e7d77e0139
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44518
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:13:38 +00:00
Elyes HAOUAS 721cb8a717 src/acpi/acpigen.c: Use macro for access_size
Change-Id: I677d055b3cd47f760d743a6ecb63cb5738274090
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42727
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:13:30 +00:00
Elyes HAOUAS 653eb15ccd sb/intel/{i82371eb,i82801dx}/fadt.c: Use macro for iapc_boot_arch
Change-Id: Ie5e44be06da8a84c9cff42e07af1a7387faad533
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44522
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:13:12 +00:00
Elyes HAOUAS e912e3ee56 src: Remove unneded whitespace before tab
Also remove unneded tab in 'picasso/Makefile.c' file.

Change-Id: Id25b2d308645c449c205b3a946f89b6b6de62a47
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44441
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-18 12:09:40 +00:00
Johnny Lin 91c8ccd99e xeon_sp/cpx: Fix get_system_memory_map to return the correct address
Similar to commit b45ed65, the HOB structure is actually a 8 byte
address pointing to the HOB data.

Tested=Verified the values of the hob fields are the same printed by
soc_display_memmap_hob().

Change-Id: I348d3cd80a56e86d22f20fcadf0316b462b86829
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-18 08:50:00 +00:00
Patrick Rudolph 24bb8036c9 cpu/x86/smm/smm_stub: Add x86_64 support
Enable long mode in SMM handler.
x86_32 isn't affected by this change.

* Enter long mode
* Add 64bit entry to GDT
* Use x86_64 SysV ABI calling conventions for C code entry
* Change smm_module_params' cpu to size_t as 'push' is native integer
* Drop to protected mode after c handler

NOTE: This commit does NOT introduce a new security model. It uses the
      same page tables as the remaining firmware does.
      This can be a security risk if someone is able to manipulate the
      page tables stored in ROM at runtime. USE FOR TESTING ONLY!

Tested on Lenovo T410 with additional x86_64 patches.

Change-Id: I26300492e4be62ddd5d80525022c758a019d63a1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Eugene Myers <cedarhouse1@comcast.net>
2020-08-18 08:49:57 +00:00
Matt DeVillier ceb409a2a6 mb/purism/librem_whl: Add new board Librem Mini (WHL-U)
Add new librem_whl baseboard and Librem Mini variant.

Tested with SeaBIOS, Tianocore, and Heads payloads.

All functions working normally except SATA, which is limited
via a FSP UPD to 3Gbps until the correct HSIO PHY settings
can be determined.

https://puri.sm/products/librem-mini/

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Change-Id: I36af42766f85eb17f86f6ec9b48b87125fb911e6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40278
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-18 08:48:18 +00:00
Jingle Hsu a41b12cd7b xeon_sp/cpx: Enable ACPI P-state support
Implement ACPI P-state support to enable driver acpi_cpufreq.
This patch leverages code from the Skylake project.

Tested=On OCP Delta Lake
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1501000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000

Change-Id: I3bf3ad7f82fbf196a2134a8138b10176fc8be2cc
Signed-off-by: Jingle Hsu <jingle_hsu@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Johnny Lin <Johnny_Lin@wiwynn.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-18 08:48:04 +00:00
Maulik V Vaghela 7749c34a11 soc/intel/jasperlake: Configure IPU based on devicetree
FSP enables IPU (Imaging Processing Unit) by default even if its
disabled in devicetree. We need to fill FSP upd based on the device
enablement in devicetree.

BUG=None
BRANCH=None
TEST=IPU is disabled and doesn't show in lspci.

Change-Id: I0f9a40e85427fd88bb12a40770ecf7b939b1d8cd
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-08-18 08:46:33 +00:00
Patrick Rudolph 7bcef3a406 mb/prodrive/hermes: Enable LPSS ACPI driver
Enable the introduced LPSS ACPI uart driver.

Tested on Hermes using Linux 5.6:
The UART2 appears as /dev/ttyS2.

Change-Id: Ic15be4a807012216e52c848120de7e39522f57b7
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44411
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-18 05:54:09 +00:00
Patrick Rudolph 49ae596a59 soc/intel/common: Add support for LPSS UART in ACPI mode
Emit ACPI code for LPSS UARTs operating in ACPI mode. In this mode the
device vendor ID reads as 0xffff, the PCI devices is still operate.

Add ACPI device IDs for APL, GLK, SPT, SPT_H and CNP_H.

The mainboard's devicetree needs to be adapted to include the chip
driver and the PCI ID when it wouldn't have been hidden.

Example:
 chip soc/intel/common/block/uart
  device pci 19.2 hidden
   register "devid" = "PCI_DEVICE_ID_INTEL_CNP_H_UART2"
  end # UART #2
 end

Tested on Linux 5.6 with Sunrise Point ACPI ID for UART2.
Tested on Windows for all other UARTs.

Change-Id: I838d16322be38f5421c1f63b457a0af552e0ed96
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40405
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-18 05:53:43 +00:00
Aaron Durbin 6dbec2d81b soc/amd/common: add GPE event logs
GPE events were not be recorded in the eventlog. Add those
to the eventlog when the status register indicates those events.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Ifb3167fd24f2171b2baf1a65eb81a318eb3e7a86
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44489
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:41:22 +00:00
Aaron Durbin c30981c952 soc/amd/picasso: snapshot chipset state early in boot sequence
Previously the chipset state was snapshotted very late in the boot
(ramstage). Instead start gathering the state early in romstage
prior to calling any FSP routines so there's a clean snapshot.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Id41686e6cdf5bebc9633b514b4121b0447f9be2d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44488
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:41:01 +00:00
Aaron Durbin d24e5f15f2 soc/amd/stoneyridge: remove unused soc_power_reg object
Now that no one is consuming this object, remove its definition.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Ib5aeec1733b6c9fa49569e30c4c369f70af0939c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44487
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:40:52 +00:00
Aaron Durbin 51c3ae4330 soc/amd/picasso: remove unused soc_power_reg object
Now that no one is consuming this object, remove its definition.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I60e4a9bfdf2752923f46a35aaab7034f9fa9b309
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:40:39 +00:00
Aaron Durbin 9bed96eb56 soc/amd/common: removed unused functions
Now that all users of the functions manipulating global state
and using soc-specific objects are removed remove those functions.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I18c4c8b0c7852dde8cf0b6b3f11e43e15c3ce155
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:40:31 +00:00
Aaron Durbin 404a5c3b60 soc/amd/picasso: use new ACPI helper functions from common
Transition the current call sequence to using the newly added common
ACPI helper functions. Semantically, the expectations are that this
sequence is the equivalent of previous acpi_clear_pm1_status(). However,
in subsequent patches picasso will be snapshotting state way sooner than
ramstage.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I34e2ba7c5cd123b98c39291537e74175ec043e85
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44484
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:40:23 +00:00
Aaron Durbin 5a5e4d05eb soc/amd/stoneyridge: use new ACPI helper functions from common
Transition the current call sequence to using the newly added common
ACPI helper functions. Semantically, the expectations are that this
sequence is the equivalent of previous acpi_clear_pm1_status().

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Id3ae19013c68d2c97b084046f600596ecc462374
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44483
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:40:11 +00:00
Aaron Durbin a244eb3dad soc/amd/common: add acpi_fill_gnvs()
In order to reduce code duplication provide an acpi_fill_gnvs()
helper function. Intent is to move stoneyridge and picasso over
to using this common implementation instead of duplicating it.

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I21c6e2c24eaf42f31ae57c05df7f633d7dc266d9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44482
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:40:01 +00:00
Aaron Durbin 746e598d07 soc/amd/common: add single function ACPI PM1 GPE helpers
The existing code in common/block/acpi is mixing multiple operations:
saving things to cbmem in common code but then soc code uses that
information, reliant upon soc-specific struct soc_power_reg object,
and only saving/snapshotting ACPI registers very deep in ramstage.

To unwind the above provide some functions that are more targeted:
- Add struct acpi_pm_gpe_state object
- Add acpi_fill_pm_gpe_state()
- Add acpi_pm_gpe_add_events_print_events()
- Add acpi_clear_pm_gpe_status()

BUG=b:159947207

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Ia7afed2861343802b3c78728784f7cfaf6f53f62
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44481
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-17 17:39:54 +00:00
Mike Banon 367298b2b4 vc/amd/agesa/f15tn: add 933 MHz to GfxMemClockFrequencyDefinitionTable
This fix is required to avoid the division-by-zero error described at
https://mail.coreboot.org/pipermail/coreboot/2014-March/077418.html
while trying to run the DDR3 memory at 1866 MT/s (933 MHz).

With this fix in place, ASUS A88XM-E boots fine with RAM at 1866 MT/s.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I8e7d00e362879b1247ecf2ab828936268bf9075f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40485
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 07:14:03 +00:00
Mike Banon d5ffa6e1b3 nb/amd/agesa: read 256 bytes to SPD buffer instead of 128
Required for adding the XMP profiles support. SPD buffer is
already 256 bytes at AMD AGESA vendorcode, so this is fine.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I7340b110477a4cc1ecb1c239181436e51952568f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40484
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 07:13:05 +00:00
Benjamin Doron 2875df1c9e soc/intel/skylake/acpi.c: Name devices on secondary bus
Naming a device allows an ACPI _ROM method to be written for it. GPUs
may require this to make the configuration data contained within
available to an OS driver. This may be required for GPUs that do not
contain their vBIOS, or perhaps the drivers require it in this form/fashion.

Working on an Acer Aspire VN7-572G (Skylake-U). nouveau successfully
obtains the vBIOS via ACPI (kernel 5.7.11).

Change-Id: Ida87aebf8fdf341ab350c2bb3704d2ef695cf8f0
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43074
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2020-08-17 07:12:46 +00:00
Jes Klinke 6fd87ffe2e soc/intel/tigerlake: Allow fine grained control of S0iX states
Expose devicetree parameter to enable/disable each individual substate.

See https://review.coreboot.org/c/coreboot/+/43741 for context.

TEST=util/abuild/abuild -t GOOGLE_VOLTEER -c max -x
BUG=b:154333137

Change-Id: I8a0cf820e20961486813067c6945fe07bc4899f7
Signed-off-by: jbk@chromium.org
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44355
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 07:11:19 +00:00
Brandon Breitenstein 1df3b70c6a mb/google/volteer: Make devicetree default as Aux Orientation retimer controlled
With new board designs being introduced it does not make sense for the default
devicetree setting to be retimer disabled on port 0 for Aux Orientation.
Change the default to be Aux Orintation retimer controlled on all ports and
move the SOC controlled overrides to the corresponding overridetree files.

BUG=NONE
BRANCH=NONE
TEST=Built image for delbin and verified that port 0 flip is working.

Change-Id: I5ff59493472db096c027d223f2fd61545dc935e2
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44358
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2020-08-17 07:11:02 +00:00
Furquan Shaikh ad8cf6209f mb/google/zork: Switch to normal read mode for EM100
This change sets the EFS config for SPI read mode to normal read mode
when using em100. With this, the boot is stable again without any
random hangs in PSP.

BUG=b:164429022

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I4cd3673dcc44a61905719a57f734df2fb9f4e6e2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44464
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt Papageorge <matthewpapa07@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-08-17 07:09:53 +00:00
Pandya, Varshit B b6feee0c74 mb/intel/jasperlake_rvp: Configure GPIOs related to UFC
This change configures user facing camera related GPIOs
as per schematics.
1. GPP_D5 pwr_en
2. GPP_B14 reset
3. GPP_E0 clock
4. GPP_D12 I2C4b
5. GPP_D13 I2C4b

Signed-off-by: Pandya, Varshit B <varshit.b.pandya@intel.com>
Change-Id: I026c16f73cf597614efaea3e0f0ab1e2cfe1e211
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44416
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 07:09:27 +00:00
Elyes HAOUAS a4dd33cc8b src: Use PCI_BASE_ADDRESS_* macros instead of magic numbers
Change-Id: Id3390c5ac6a9517ffc2d202f41802e6f4d2e314c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44371
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 07:00:37 +00:00
Elyes HAOUAS a3022056a2 {soc/intel/common,sb/intel/lynxpoint}/hda_verb.c: Reduce differences
Change-Id: Ie63d7671eb19f0d4c4f67dfe242193e7949afdea
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-17 06:59:24 +00:00
Elyes HAOUAS 6ea24ffa8f {sb/intel/*/azalia.c,device/azalia_device.c}: Reduce differences
Remaining notable differences at function 'codec_detect(u8 *base)'.

Change-Id: Ia64e0ba10f145cf2eae0cb2ff4951b1455963d5d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44370
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-08-17 06:58:45 +00:00
Elyes HAOUAS 59236d526a sb/intel/ibexpeak: Use <device/azalia_device.h> registers
Change-Id: Ic257a11ec2a2f8b1809ed40ae0f9468574dfd009
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44131
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 06:46:25 +00:00
Elyes HAOUAS 388c88b72c sb/intel/i82801jx: Use <device/azalia_device.h> registers
Change-Id: Ic661a1339892dad668ad3f9e68cab70bf380505f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44130
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-17 06:46:08 +00:00