Commit Graph

53664 Commits

Author SHA1 Message Date
Pratikkumar Prajapati 42f7dc7493 soc/intel/common: Add configs for TME exclusion range and new key gen
Add following config options.

1. TME_GENERATE_NEW_KEY_ON_WARM_BOOT
   Program Intel TME to generate a new key for each warm boot. TME
   always generates a new key on each cold boot. With this option
   enabled TME generates a new key even in warm boot. Without this
   option TME reuses the key for warm boot.

2. TME_EXCLUDE_CBMEM_ENCRYPTION
   This option allows to exclude the CBMEM region from being encrypted
   by Intel TME. When TME is enabled it encrypts whole DRAM. TME
   provides option to carve out a region of physical memory to get
   excluded from encryption. With this config enabled, CBMEM region
   does not get encrypted by TME. If TME is not programmed to generate
   a new key in warm boot, exclusion range does not need be programmed
   due to the fact that TME uses same key in warm boot if
   TME_GENERATE_NEW_KEY_ON_WARM_BOOT is not set. But if TME is
   programmed to generate a new key in warm boot, contents of the CBMEM
   get encrypted with a new key in each warm boot case hence, that leads
   to loss of CBMEM data from previous warm boot. So enabling this
   config allows CBMEM region to get excluded from being encrypted and
   can be accessible irrespective of the type of the platform reset.

Bug=b:276120526
TEST=Able to build rex

Signed-off-by: Pratikkumar Prajapati <pratikkumar.v.prajapati@intel.com>
Change-Id: Id5008fee07b97faadc7dd585f445295425173782
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75625
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-16 14:14:25 +00:00
Rob Barnes 4162654f1b mb/google/myst: Add additional memory configurations
Add additional ram parts and generate strapping ids.

BUG=b:285216975
TEST=Build myst image

Change-Id: I2b3b8c9ffcf81bbd2d6ecfad1b612fbf793857c8
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75821
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-06-16 14:12:56 +00:00
Subrata Banik 82226f6e5c soc/intel/meteorlake: Disable ACPI PM timer using IOE.PMC
This patch disables the ACPI PM timer which is necessary for XTAL OSC
shutdown. Also, disabling ACPI PM timer switches off TCO.

BUG=b:274744845
TEST=Able to boot and verify S0ix is working even with EC reset and
cold boot scenarios.

w/o this cl:
> iotools mmio_read32 0xfe4018fc
  0x0

w/ this cl:
> iotools mmio_read32 0xfe4018fc
  0x2

Change-Id: Ibb6e145f67dba7270e0a322ef414bf1cb09c5eda
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75822
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-06-16 08:04:06 +00:00
Ren Kuo bf8f57d618 mb/google/brya/var/volmar: Add Micron MT53E2G32D4NQ-046 WT:C SPD
Add support for Micron MT53E2G32D4NQ-046 WT:C LP4x DRAM.

BUG=b:216393391
TEST=build pass

Change-Id: I3797de01629fdb5ace4c610943d88db525da112b
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75826
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2023-06-15 23:52:50 +00:00
Elyes Haouas d985e9dbd2 security/intel/cbnt/Makefile: Fix invalid char '*'
It seems that using a wildcard (*) in the import path is not supported
in the context of the Makefile.
This to fix this error:
  malformed import path "cmd/cbnt-prov/*.go": invalid char '*'

Change-Id: I953e06f1ff70a2b61bc5f505f7df9936b7f9b55b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-06-15 21:19:08 +00:00
Ravi Sarawadi 9afa18f0e9 mb/google/rex: Enable audio BT offload
This patch enables BT offload feature on Rex over SSP1.

BT mode is selected via FW_CONFIG and corresponding VGPIOs are
programmed.

BUG=b:275538390
TEST=Verified audio playback using BT speaker/headset in I2S mode on google/rex.

Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Change-Id: I46e9702add37464122ffc78826ebf8a6c5b5b07c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72881
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-15 16:13:23 +00:00
Leo Chou 6eec8beb1b mb/google/nissa/var/pujjo: Set GPIO of WWAN_SAR_DETECT to NC
Pujjo does not support GPIO based D-SAR,
so set GPP_D15 and GPP_H23 to NC.

BUG=b:275264095
TEST=boot on pujjo and no impact WWAN dynamic SAR function

Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Change-Id: I4fe40b32a572a8d914e01e5cd7927766ccf17c02
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75403
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-15 16:12:16 +00:00
Karthikeyan Ramasubramanian 5b5ee5830f mb/google/myst: Add PSP verstage callbacks
Lay the groundwork to prepare for enabling PSP verstage. This change
adds PSP verstage callback to enable eSPI, TPM etc.

BUG=b:284984667
TEST=Build Myst BIOS image with PSP verstage enabled.

Change-Id: Ifc800e8bb27cc4c3fbccc2ab9f51138a7c4b03a6
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75585
Reviewed-by: Tim Van Patten <timvp@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-06-15 15:57:52 +00:00
Eric Lai b15946d72c soc/intel: Add max memory speed into dimm info
Add MaximumMemoryClockSpeed if FSP have it, otherwise pass 0.

TEST=check dmidecode dump the max speed.
Handle 0x000C, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x000A
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 16 GB
        Form Factor: SODIMM
        Set: None
        Locator: Channel-0-DIMM-0
        Bank Locator: BANK 0
        Type: DDR5
        Type Detail: Unknown Synchronous
        Speed: 5600 MT/s
        Manufacturer: Micron
        Serial Number: 3f064d84
        Asset Tag: Channel-0-DIMM-0-AssetTag
        Part Number: MTC8C1084S1SC56BG1
        Rank: 1
        Configured Memory Speed: 5200 MT/s
        Minimum Voltage: 1.1 V
        Maximum Voltage: 1.1 V
        Configured Voltage: 1.1 V

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: I854474bce8d6ed02f47f6dce8585b3ddfae73f80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75810
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-15 15:08:12 +00:00
Jan Samek 0acb78b21f drv/i2c/pi608gp: Fix style
In commit e59f18bf29 ("drivers/i2c: Add PI7C9X2G608GP PCIe switch
driver (pi608gp)"), there were some suggestions after it's been already
merged.

This patch addresses the points regarding the code style and comments.

BUG=none
TEST=Build OK, no behavioral changes in the pi608gp driver, console logs
without changes.

Change-Id: I5fc54708e0085fea4bd1f2fbf2afb400d2ccbd46
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75806
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Himanshu Sahdev <himanshu.sahdev@intel.com>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-06-15 15:00:12 +00:00
Jan Samek 872e84fe30 drv/i2c/pi608gp: Fix types
In commit e59f18bf29 ("drivers/i2c: Add PI7C9X2G608GP PCIe switch
driver (pi608gp)"), there were some suggestions after it's been already
merged.

This patch addresses the points regarding the number types - fix of the
printk format strings, inclusion of 'stdint.h' and marking the set of
allowed values as constant.

BUG=none
TEST=Build OK, no behavioral changes in the pi608gp driver, console logs
without changes.

Change-Id: I34c664f6a8a257b260facdbf9043825ff4a4c932
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75500
Reviewed-by: Himanshu Sahdev <himanshu.sahdev@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2023-06-15 14:59:53 +00:00
Michał Żygowski 3d51e83347 soc/intel/*/include/soc/pmc.h: Add missing periodic SMI rate bits
Based on:

- Apollo Lake datasheet Vol. 3 Revision 005:
  https://cdrdv2.intel.com/v1/dl/getContent/334819
- 7th Generation Intel Processor Families I/O for U/Y Platforms
  Datasheet Vol.2 August 2017:
  https://cdrdv2.intel.com/v1/dl/getContent/334659
- edk2-platforms source for Whitley and Purley platforms (Xeon SP)

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ic600d39d49135808dd1f571c9eff3cdb98682796
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69871
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2023-06-15 14:14:05 +00:00
Michał Żygowski c68456ee4b soc/intel/apollolake: Select PERIODIC_SMI_RATE_SELECTION_IN_GEN_PMCON_B
Certain chipsets/SoCs like Apollo Lake use GEN_PMCON_B for periodic SMI
rate selection unlike other chipsets which use GEN_PMCON_A. Select
PERIODIC_SMI_RATE_SELECTION_IN_GEN_PMCON_B to indicate the register
difference.

Based on Apollo Lake datasheet Vol. 3 Revision 005:
https://cdrdv2.intel.com/v1/dl/getContent/334819

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: If182e1285ad6bd3f7c54760440010c50f57f7013
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72072
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-15 13:58:44 +00:00
Michał Żygowski 0d28b978e5 intel/cmn/smm: Introduce PERIODIC_SMI_RATE_SELECTION_IN_GEN_PMCON_B
Certain chipsets/SoCs like Apollo Lake use GEN_PMCON_B for periodic SMI
rate selection unlike other chipsets which use GEN_PMCON_A. Introduce new Kconfig option PERIODIC_SMI_RATE_SELECTION_IN_GEN_PMCON_B to
indicate the register difference.

Based on Apollo Lake datasheet Vol. 3 Revision 005:
https://cdrdv2.intel.com/v1/dl/getContent/334819

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I11241836ecc9066d323977b030686567c87ed256
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69870
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2023-06-15 13:57:29 +00:00
Felix Held 12a448224f soc/amd/*/root_complex: reserve IOMMU MMIO area
This makes sure that the resource allocator won't use this address range
for anything else. In the systems I looked at, this was between the end
of the above 4GB memory and the beginning of the above 4GB PCI BAR MMIO
region, but better reserve it here so nothing else will get allocated
there if this expectation isn't met.

TEST=Reserved region is printed in the console logs:
update_constraints: PCI: 00:00.0 09 base fd00000000 limit fdffffffff mem (fixed)

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5a8150873cb019ca1d903ed269e18d6f9fabb871
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-06-15 08:20:50 +00:00
Jan Samek d0627c7595 mb/siemens/mc_ehl3/devicetree.cb: Disable USB 3.0 port 1
It's been decided not to use the USB 3.0 port 1 on this board anymore,
so disable it also with the corresponding USB 2.0 lane.

BUG=none
TEST=USB 3.0 port 1 not functional anymore after boot, while others
continue working.

Change-Id: I2799e3d9d7232743c9480dd9611d94ed3249f53b
Signed-off-by: Jan Samek <jan.samek@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75702
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-06-15 07:49:03 +00:00
Subrata Banik f27a41f207 soc/intel/cmn/cse: Read ISH FW version if avilable in CSE partition
This patch reduces the redundant config check to understand if an ISH FW
partition is available and to fetch the ISH FW version.

The goal is to fetch the ISH FW version if the ISH FW belongs to the CSE
firmware partition table.

Change-Id: I689a71377e7aea0fa3bc1835f355708c33c2caea
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75811
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-15 07:39:38 +00:00
Dinesh Gehlot 225d9c1af4 soc/intel/cmd/blk/cse: Hook get CSE RW version into `.final`
This patch calls get CSE RW version function from .final hook if
the platform has required config (`SOC_INTEL_CSE_LITE_SKU`) selected.

BUG=b:280722061
TEST=Able to build and boot google/rex.

> cbmem -c | grep "CSE RW Firmware Version:"
[DEBUG]  CSE RW Firmware Version: 18.0.0.1682

Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Change-Id: Ifdb82c180b64fbb4575932427be54f544e1c98d4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75749
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-15 07:39:11 +00:00
Subrata Banik 3c06f1e522 soc/intel/cmn/cse: Always save CSE RW version to CBMEM
This patch renames `cse_store_rw_fw_version` function that store
currently running CSE RW FW version inside CBMEM.

Additionally, perform the CSE RW FW storing operation unconditionally.

TEST=Able to build and boot google/marasov.

Change-Id: Iba85807b7d9e6f067b5b628c6fa062fab5c485e0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75768
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-06-15 07:38:59 +00:00
Subrata Banik 272ce9a579 {driver, mb, soc}: Rename Intel CSE FPT config to ISH FW version config
This patch renames `SOC_INTEL_STORE_CSE_FPT_PARTITION_VERSION` config
to `SOC_INTEL_STORE_ISH_FW_VERSION` to ensure the usage of this config
is clear.

Any platform would like to fetch the currently running ISH firmware
version should select this configuration.

TEST=Able to build and boot google/marasov.

Change-Id: Ie503d6a5bf5bd0d3d561355b592e75b22c910bf5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75767
Reviewed-by: Kangheui Won <khwon@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-06-15 07:38:47 +00:00
Kevin Yang cacdb85979 mb/google/dedede/var/boxy: Update audio codec HID to use correct ALC5682I-VD
Boxy audio codec chip uses ALC5682I-VD, not ALC5682I-VS.
It needs to modify codec HID to "10EC5682" in coreboot to fix audio no 
output sound issue.

BUG=b:286970886
BRANCH=dedede
TEST=confirm audio soundcard can be list by command "aplay -l"

Change-Id: Icd69a9d757ba817b586a703a17375682db684224
Signed-off-by: Kevin Yang <kevin3.yang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75813
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2023-06-15 06:56:49 +00:00
Eran Mitrani 113a1bb255 mb/google/rex: add Elan HID over SPI ASL for Rex0
This patch enables adding variant specific ASL code

TEST=Kernel driver is able to communicate with device

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I231482d56dd4afa150766c07cfde105158e5e124
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74886
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-06-15 05:18:40 +00:00
Eran Mitrani 3ed0b977eb mb/google/rex/var/rex0: add HID over SPI ACPI driver
Add driver to support ELAN touchscreen using SPI for rex

* See "HID Over SPI Protocol Specification" section 5.2 - ACPI enum
* https://www.microsoft.com/en-us/download/details.aspx?id=103325

BUG=b:278783755
TEST=Kernel driver is able to communicate with device. Also tested
S0ix, ran 'suspend_stress_test -c 1' - no issues in suspend/resume.

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: Id51d385ce350cef23da4184b044c74569f4dd3f0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74885
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-06-14 22:26:09 +00:00
Karthikeyan Ramasubramanian 0507e069b0 soc|vc/amd/phoenix: Prepare for PSP verstage
Update all the required sources to lay the ground work to enable PSP
verstage.

BUG=b:284984667
TEST=Build Myst BIOS image with PSP verstage enabled.

Change-Id: I6fbb1f835ac2ad6ff47f843321e1bd380af7ce33
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75584
Reviewed-by: Tim Van Patten <timvp@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-06-14 21:20:11 +00:00
Michał Żygowski 2fffb5df88 soc/intel/alderlake/vr_config.c: Fix GT domain TDC current
Alder Lake-S 2+0 SKUs and 35W SKUs have 20A GT TDC, all other Alder
Lake-S SKUs have GT TDC of 22A.

Based on the default settings of ADL-S FSP.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ie6851d322fc9354d019a76503c3d35b5e6eca48b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2023-06-14 21:16:15 +00:00
Arthur Heymans f9ee87ffbf acpi/acpi.h: Remove global acpi_fill_ivrs_ioapic()
In soc/amd this function is unused so drop it and rename
_acpi_fill_ivrs_ioapic().

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ic403fd84cb9cd5805fbc6f0c5a64cefbf4b0cd81
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75711
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Naresh <naresh.solanki.2011@gmail.com>
2023-06-14 21:13:09 +00:00
Arthur Heymans ce179729f0 soc/amd/acpi/ivrs: Use specific IOMMU resource index on all SOC
By adding all DXIO IOAPIC with the same resource index, the IVRS code
can always pick that resource which simplifies the code.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I10345e2337dcb709c2c1a8e57a1b7dd9c04adb9e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75710
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Naresh <naresh.solanki.2011@gmail.com>
2023-06-14 21:11:12 +00:00
Arthur Heymans 0ad766c0d5 acpi: Add a debug option to print out tables in ACPICA compatible hex
Sometimes systems don't boot to the OS due to wrong ACPI tables.
Printing the tables in an ACPICA compatible format makes analysis of
ACPI tables easier.

The ACPICA format (acpidump, acpixtract) is the following:
"
FACS @ 0x0000000000000000
    0000: 46 41 43 53 40 00 00 00 E8 24 00 00 00 00 00 00  FACS@....$......
    0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

"

To achieve analyze ACPI tables capture the coreboot log between
"Printing ACPI in ACPICA compatible table" and "Done printing ACPI in
ACPICA compatible table". Remove the prefix "[SPEW ]  " and then call
'acpixtract -a dump' to extract all the tables. Then use 'iasl -d' on
the .dat files to decompile the tables.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I7b5d879014563f7a2e1f70c45cf871ba72f142dc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75677
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-14 19:27:19 +00:00
Kyösti Mälkki 6656f3151f util/abuild: Improve elapsed time measurement
Time elapsed for a single board build with ccache typically measures
well below 10 seconds. Improve the measurements to milliseconds
resolution using bash EPOCHREALTIME (pseudo) environment variable.

Change-Id: Iaedc470bb45cf9bb6f14ff8b37cd6f7ae3818a08
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75802
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-06-14 19:25:56 +00:00
Matt DeVillier 74d9dac51e mb/google/skyrim: Use CMOS bit to toggle ABL WA for Hynix DRAM
One specific Hynix LPDDR5x DRAM part requires an ABL workaround to
eliminate DRAM-related failures during a FAFT test, but due to the
use of generic/common SPDs, there is no way for the ABL to determine
the DRAM part # itself.

Consequently, we will have coreboot check the DRAM part #, and set/clear
a CMOS bit as appropriate, which the ABL will check in order to apply
(or not apply) the workaround.

The ABL already uses byte 0xD of the extended CMOS ports 72/73 for
memory context related toggles, so we will use a spare bit there.

BUG=b:270499009, b:281614369, b:286338775
BRANCH=skyrim
TEST=run FAFT bios tests on frostflow, markarth, and whiterun without
any failures.

Change-Id: Ibb6e145f6cdba7270e0a322ef414bf1cb09c5eaa
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75698
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
2023-06-14 16:09:09 +00:00
Felix Singer 592700b5a6 util/docker: Add Alpine Dockerfile
Add a Dockerfile for Alpine to build-test with musl-libc.

Change-Id: If90412146acc94f01a89cd681539aad48e92dd2e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
2023-06-14 12:43:32 +00:00
Jeff Li 575eb73951 soc/intel/xeon_sp: Fix HEST table length
"current" points to the start of HEST table, so "next - current" already
includes the size of its header, no need for increment here. This issue
was found on SPR-SP platform. The length of HEST table is now correct
with this patch.

Change-Id: I6ff1e8e24612b7356772d582ff9a7e53863419db
Signed-off-by: Jeff Li <lijinfeng01@inspur.com>
Signed-off-by: Ziang Wang <ziang.wang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75738
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-06-14 09:53:57 +00:00
Mark Hsieh 7fb661fa8a mb/google/nissa/var/joxer: Add DmaProperty for ISH
On nissa, the ISH is running closed source firmware, so the ChromeOS
security requirements specify it must be behind an IOMMU. Add
DmaProperty to the ISH _DSD on joxer.

BUG=b:285477026
TEST=Kernel marks ISH (PCI device 12.0) as untrusted, and changes the
IOMMU group type to "DMA". Also, device still goes to S0i3.

Before:
$ cat /sys/devices/pci0000\:00/0000\:00\:12.0/untrusted
0
$ ls /sys/kernel/iommu_groups/5/devices
0000:00:12.0
0000:00:12.7
$ cat /sys/kernel/iommu_groups/5/type
DMA-FQ

After:
$ cat /sys/devices/pci0000\:00/0000\:00\:12.0/untrusted
1
$ ls /sys/kernel/iommu_groups/5/devices
0000:00:12.0
0000:00:12.7
$ cat /sys/kernel/iommu_groups/5/type
DMA

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I69b00f0281f4493db157783840d9cdcbb138017f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75758
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-14 08:25:59 +00:00
Jakub Czapiga 2af14fee52 mb/google/rex/variants/ovis: Add basic DTT
Add default Intel DPTF.

BUG=b:274421383
TEST=util/abuild/abuild -p none -t google/rex -x -a -b ovis

Change-Id: Ib023f6d6d184f6935a6a454250755502a46b707f
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75580
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-06-14 08:13:05 +00:00
Jakub Czapiga 4fe0b40e1b mb/google/rex/variants/ovis: Add USB and TCSS configuration
+-------------+----------------+------------+---------------------------------+
| PCH USB 2.0 | Connector Type | OC Mapping | Remarks                         |
+-------------+----------------+------------+---------------------------------+
| 1           | Type-C         | OC_0       | Type C port - TCP1              |
| 2           | Type-C         | OC_0       | Type C port - TCP0              |
| 3           | Type-C         | OC_0       | Type C port - TCP2              |
| 4           | Type-A         | OC_3       | USB3.2 Gen2x1 Type-A Port – TAP0|
| 7           | Type-A         | OC_3       | TAP1                            |
| 8           | Type-A         | OC_3       | TAP2                            |
| 9           | Type-A         | OC_3       | TAP3                            |
+-------------+----------------+------------+---------------------------------+

+---------------------+-------------------+------------+---------+
| PCH USB 3.1 Gen 2x1 | Connector Details | OC Mapping | Remarks |
+---------------------+-------------------+------------+---------+
| 1                   | Type-A            | OC_3       | TAP0    |
| 2                   | Type-A            | OC_3       | TAP1    |
+---------------------+-------------------+------------+---------+

+------+-------------------+------------+-----------------------------+
| TCPx | Connector Details | OC Mapping | Remarks                     |
+------+-------------------+------------+-----------------------------+
| 1    | Type C port 0     | OC_0       | To onboard Type-C connector |
| 2    | Type C port 1     | OC_0       | To onboard Type-C connector |
| 3    | Type C port 2     | OC_0       | To onboard Type-C connector |
+------+-------------------+------------+-----------------------------+

BUG=b:274421383
TEST=util/abuild/abuild -p none -t google/rex -x -a -b ovis

Change-Id: Icc81f12ec6cc4af37bcc1fcf3164cbfa5612a443
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75578
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-06-14 08:12:12 +00:00
Mark Hsieh 07046ca217 mb/google/nissa/var/joxer: Remove fw_config probe for storage devices
When fw_config is unprovisioned, devicetree will disable all probed
devices. However, boot-critical devices such as storage devices need to
be enabled.

As a temporary workaround while adding devicetree support for this,
remove the fw_config probe for storage devices so that all storage
devices are always enabled. On eMMC SKUs, UFS and ISH will be disabled
by the PCI scan anyway. On UFS SKUs, eMMC is not disabled by the PCI
scan, but keeping it enabled should have no functional impact, only a
possible power impact.

BUG=b:285477026
TEST=On joxer eMMC and UFS SKUs, boot to OS and
`suspend_stress_test -c 10`

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I834bd81ce636a6f32d50434cbf07b1d572620492
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75757
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-14 07:36:14 +00:00
Jamie Ryu 6c0961ae43 drivers/wwan/fm: Fix format string vulnerability with snprintf
This fixes format string vulnerability issues with snprintf statement
found by klocwork scan.

Foundby=klocwork
BUG=NONE
TEST=Boot to OS on Meteor Lake rex platform and run klocwork scan.
Check related ACPI tables and modem driver behavior after changes.

Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Change-Id: Ia6b7d70c0b2b86d0918e58348dccd206a7ee9193
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75733
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-14 07:33:13 +00:00
Subrata Banik b6f45efd64 vc/intel/fsp/fsp20/meteorlake: Add VR config entries
This patch adds UPD entries into the FSP header file to configure VRs
(IA, GT and SA).
- `IccLimit` : VR Fast Vmode ICC Limit support
- `EnableFastVmode` : Enable/Disable VR FastVmode
- `CepEnable` : Enable/Disable CEP (Current Excursion Protection

BUG=b:286809233
TEST=Able to build google/rex.

Change-Id: I477ab7e4c07156759962bd2eab9dff28a0a3f006
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75761
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
2023-06-14 07:25:41 +00:00
Jon Murphy 5da5156ce3 mb/google/myst: Update PCIE_RST_L drive
PCIE_RST_L is attached to a pull down, change the init to NC.

BUG=None
TEST=Boot to OS

Change-Id: I3f7a548a33eb18327139f033d7c0d6a1843f1639
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75700
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-13 23:55:48 +00:00
Jon Murphy 86e05e8e73 mb/google/myst: Update PCIe romstage gpios
Update PCIe GPIOs during rom stage to properly initialize the
PCIe devices and allow the NVMe/eMMC to be properly detected.

BUG=b:284213391
TEST=Boot to OS

Change-Id: I24ad6c1addedb414afade2512b6628022d000a47
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-06-13 23:55:27 +00:00
Felix Held 7866166fb4 soc/amd/common/cpu/noncar/cpu: rename get_smee_reserved_address_bits
Rename get_smee_reserved_address_bits to get_sme_reserved_address_bits
since the feature is called secure memory encryption and the last 'e' in
SMEE bit in the SYSCFG MSR just stands for enable. The function will
return a valid number of reserved address bits no matter if this is
enabled or not, so drop the second 'e'.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3795f7a861e39cb6c8209fee10191f233cbcd308
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-06-13 22:13:00 +00:00
Tarun Tuli 6b89089b0c mb/google/brya/variants/hades: Set WP signal to GPP_E12
Move the WP signal to GPP_E12 from the current GPP_E15 to
match the design.

BUG=b:285084125
TEST=WP signal reports as we expect
Signed-off-by: Tarun Tuli <taruntuli@google.com>
Change-Id: I8772173fcdcabf78b0c7d605cd495ebe04b63242
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75536
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-06-13 15:55:16 +00:00
Felix Singer aa1efece74 doc/mb/starlabs: Fix references to documents
Some references are pointing to non-existing paths. Fix that.

Change-Id: I298370c69edc41a50c859684cc5a2c1dbfc85559
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75800
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-06-13 05:23:39 +00:00
Felix Singer 71707e8ffb doc/mb/starlabs: Add missing closing backticks for eval_rst blocks
Change-Id: I4cffd141ef74e20ef13b204955b44c07acd88edf
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75805
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-06-13 05:23:25 +00:00
David Wu 3f88086c27 mb/google/brya/var/osiris: Add Micron MT53E2G32D4NQ-046 WT:C SPD
Add support for Micron MT53E2G32D4NQ-046 WT:C LP4x DRAM.

BUG=b:216393391
TEST=build pass

Change-Id: I8c66a18fd94d9a013710fbc6dc7f1533d808392e
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2023-06-13 00:52:35 +00:00
Zheng Bao 2d2c27e4c0 soc/amd/stoney: Expand the SMM region for cache
Currently the data to be put to cache region is 0x14FF90. With the
limit size 0x150000, the data for S3 can not be put into. So we expand
it a little.

Change-Id: If6b03b713059c54c7dae8f2db0f6426d8aa1aab1
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69782
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-12 17:29:18 +00:00
Nico Huber edcde0ba7a libpayload/uhci: Re-write UHCI RH driver w/ generic_hub API
This is a complete rewrite of the UHCI root-hub driver, based on
the xHCI one. We are doing things by the book as far as possible.
One special case is uhci_rh_reset_port() which does the reset se-
quencing that usually the hardware would do.

This abandons some quirks of the old driver:
* Ports are not disabled/re-enabled for every attachment anymore.
* We solely rely on the Connect Status Change bit to track changes.
* Further status changes are now deferred to the next polling round.

The latter fixes endless loops in combination with commit 7faff543da
(libpayload: usb: Detach unused USB devices).

Change-Id: I5211728775eb94dfc23fa82ebf00fe5c99039709
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75504
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-06-12 17:00:28 +00:00
Hsiao Chien Sung 4c0dc4ee91 soc/mediatek/mt8188: Support 4K resolution display
The original clock rate 416MHz is insufficient for 4K resolution and
causing the screen to glitch. Set the clock rate to 594MHz to support
4K resolution.

BUG=b:236328487
TEST=Glitching screen was fixed after applying this patch

Change-Id: Ic40dd28264d03ef7218ff4edd8d4182e0fe74ea3
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Signed-off-by: Jason Chen <Jason-ch.Chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75661
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-12 15:31:53 +00:00
Jonathon Hall a4f701e114 mb/purism/librem_cnl: Define CMOS layout for Librem Mini v1/v2
Define a CMOS layout for Librem Mini v1/v2 spanning both banks.  The
only setting provided is the automatic power-on setting, which is
implemented by the EC.  This can now be configured in a firmware image
by replacing cmos.default in CBFS.

Since cmos.default is applied early in bootblock, the EC BRAM interface
must now be configured in bootblock, including opening the LPC I/O
range.

Change-Id: Ib0a4ea02d71f6f99e344484726a629e0552e4941
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74363
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-12 15:31:25 +00:00
Yidi Lin 37e83250e8 soc/mediatek/common: Disable DRAM scramble by default
Geralt SoC does not support 'persist certain regions' across reboots.
Considering the impact of missing ramoops for debugging, set
MEDIATEK_DRAM_SCRAMBLE to default n to disable this feature in
production FW image.

BUG=b:269049451,b:278478563
TEST=emerge-geralt coreboot and confirm CONFIG_MEDIATEK_DRAM_SCRAMBLE=n

Signed-off-by: Yidi Lin <yidilin@chromium.org>
Change-Id: I109634d811a928e3e6f7f56e706a5b61a52a21ab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75562
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-12 15:30:32 +00:00