Commit Graph

48630 Commits

Author SHA1 Message Date
Bill XIE 489aa54913 mb/supermicro/x9sae: Correct mapping of HDMI ports
The two HDMI ports on x9sae(-v) prove to be wired to HDMI2 and HDMI3.

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: I07870fd70612c9ed01a833f173b18053807ad2b7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65146
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-06-17 14:26:26 +00:00
Tyler Wang 3e891cda06 mb/google/nissa/var/craask: Enable Elan touchscreen
Add Elan touchscreen support for craaskvin.

BUG=b:235919755
TEST=Build and test on MB, touchscreen function works.

Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Change-Id: I18e0be688705942647c42ee532fcd32e862fe78c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65103
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-06-17 14:26:03 +00:00
Tyler Wang 3f52aa5518 mb/google/nissa/var/craask: Add ALC5682I-VS codec support
Add ALC5682I-VS related settings. And add codec/amplifier space in
fw_config.

BUG=b:229048361, b:235436515
TEST=emerge-nissa coreboot

Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Change-Id: I567d3567318c810e19ae9e9ba5e0dc8332517866
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65058
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-06-17 14:25:40 +00:00
Tyler Wang 129e6b7c09 mb/google/nissa/var/craask: Disable SD card based on fw_config
Use fw_config Bit 5 to control whether to disable SD card:
Bit 5 = 0 --> enable SD card
Bit 5 = 1 --> disable SD card

BUG=b:229048361
TEST=emerge-nissa coreboot

Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Change-Id: Ib5e92600564e2138e32a0d2e60259b9767516a4c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65129
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-17 14:25:23 +00:00
Frank Wu 3c5a638e32 mb/google/brya/var/banshee: Update gpio configuration
Update gpio configuration based on GPIO_0610b.xlsx.

BUG=b:226182106, b:226182090
BRANCH=firmware-brya-14505.B
TEST=FW_NAME=banshee emerge-brya coreboot chromeos-bootimage

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I2b447629645690e5e97a17fff25860838f4f3344
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2022-06-17 14:24:54 +00:00
Arthur Heymans 241c1c6d94 payloads/LinuxBoot: Use wildcards
If no directory is found then no harm is done either.

Change-Id: I0842ec106f11eca80bf01fd4771e1dfc4588b3fa
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65153
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-06-17 07:12:05 +00:00
Edward O'Callaghan 01dbba5e3d util/cbfstool/common.c: Deduplicate buffer_create() logic
BUG=b:207808292,b:231152447
TEST=builds with vboot_ref uprev.

Change-Id: Id7d9b6f5254b08720eebb37151e12ee68ed7f8d7
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65145
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-16 20:38:53 +00:00
Edward O'Callaghan 774dcffc36 util/cbfstool: Decouple elogtool from vboot_ref flashrom code
Currently elogtool sub-proccesses flashrom as calling libflashrom
requires a missing function from the previous flashrom release.
Pending a new release of flashrom we must continue to use subprocess.

However the current subprocess wrapper implementation lives in
vboot_reference which is a git sub-module of coreboot. This causes
all sorts of grief keeping a subprocess ABI stable from vboot_reference
when the rest of vboot_reference builds of HEAD of the flashrom tree
(i.e., using unreleased libflashrom functions). In order to not keep
finding ourseleves in a bind between the two separately moving trees
with different build environments, decouple elogtool with its own
mini copy of flashrom subprocess wrapping logic.

Squash in,
 util/cbfstool/elogtool.c: Convert args into struct in flashrom helper

  vboot signatures for flashrom r/w helpers changed in the upstream
  commit bd2971326ee94fc5. Reflect the change here to allow vboot ref
  and coreboot to realign.

BUG=b:207808292,b:231152447
TEST=builds with vboot_ref uprev.

Change-Id: I04925e4d9a44b52e4a6fb6f9cec332cab2c7c725
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65055
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-06-16 20:38:41 +00:00
Yu-Ping Wu c1d7d89d48 libpayload/libcbfs: Fix file hash check
Fix the buffer pointer passed to cbfs_file_hash_mismatch().

Add a test case with LZ4 compression, which would catch the bug we are
fixing.

Change-Id: I36605e2dbc0423fa6743087512f2042b37c49d35
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65149
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-06-16 18:02:34 +00:00
Yu-Ping Wu e3fded3241 mb/google/peach_pit: Select BOOT_DEVICE_NOT_SPI_FLASH
CPU_SAMSUNG_EXYNOS5420 has its own boot device implementation
(src/soc/samsung/exynos5420/alternate_cbfs.c), so
BOOT_DEVICE_NOT_SPI_FLASH should be selected.

Change-Id: I0a9f96ad68b28773ede4e99510bd33867789e185
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65109
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-16 02:12:43 +00:00
eddylu@ami.corp-partner.google.com 244ecad52c mb/google/brya/vell: Implement variant_devtree_update() for audio
Different board versions have different audio layouts, therefore
support both layouts by enabling only the appropriate devices
in the devicetree via board_id().

BUG=b:207333035
BRANCH=none
TEST='FW_NAME=vell emerge-brya coreboot'

Change-Id: If053b8f85933f8fc75589ae175e225cc9c1e3991
Signed-off-by: Eddy Lu <eddylu@ami.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65124
Reviewed-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-16 00:01:50 +00:00
Michał Żygowski 9df95d99dc soc/intel/alderlake: Unselect USB4 and TCSS options for ADL-S
Alder Lake-S CPUs do not have TCSS and USB4 devices. Unselect them.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ifc643d440107754dfe1a0844964f70de670cb1f1
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63500
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-16 00:01:20 +00:00
Michał Żygowski bda2a15113 soc/intel/alderlake/fsp_params.c: Add VccIn Aux Imon IccMax for ADL-S
Based on DOC #619501.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ia95404e717787edbdb67c9e584e749526b973427
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63839
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-16 00:00:28 +00:00
Cliff Huang 82b7d0cf8c mb/intel/adlrvp: Add 5G WWAN ACPI support for ADL-P RVP
Add FM350GL 5G WWAN support using drivers/wwan/fm and additional PM
features from RTD3.

PCIe root port: 6 (1 based)
clock source & request: 5 (0 based)

GPIOs:
WWAN_PERST_N:   GPPC_C5
WWAN_RST_N:     GPPC_F14
WWAN_FCP_OFF_N: GPPC_F15
WWAN_WAKE_N:    GPPC_D18
WWAN_PWREN:     GPPC_F21
WWAN_DISABLE_N: GPPC_D15
CLKREQ5_WWAN_N: GPPC_H23

TEST=Check SSDT table to see if the PXSX device and PowerResource RTD3
are generated under the root port.

BRANCH=firmware-brya-14505.B

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: I10902245e3a5e05cd2af9030394933e936c25396
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63941
Reviewed-by: Jeremy Compostella <jeremy.compostella@intel.corp-partner.google.com>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2022-06-16 00:00:03 +00:00
Eran Mitrani ca741055e6 soc/intel/adl: Add missing claimed memory regions
The Alder Lake chipset has several more reserved memory regions that
are unavailable to the resource allocator than are currently marked
as such in the system agent code. This CL adds the following regions
(documented in Intel docs #626540, #619503):

1. TSEG
2. GSM
3. DSM
4. PCH_RESERVED
5. CRAB_ABORT
6. APIC
7. TPM
8. LT_SECURITY

Claimed regions before this change:
========================================================
base 0        size a0000       // 0 - > 0xa0000
base a0000    size 20000       // legacy VGA
base c0000    size 40000       // RAM
base c0000    size 76f40000    // 0xc0000 -> top_of_ram
base 77000000 size 9400000     // top_of_ram -> TOLUD
base c0000000 size 10000000    // PCIEXBAR
base f8000000 size 2000000     // MMSPI
base fb000000 size 1000        // REGBAR
base fed80000 size 4000        // EDRAMBAR
base fed84000 size 1000        // TBT0BAR
base fed85000 size 1000        // TBT1BAR
base fed86000 size 1000        // TBT2BAR
base fed87000 size 1000        // TBT3BAR
base fed90000 size 1000        // GFXVTBAR
base fed91000 size 1000        // VTVC0BAR
base fed92000 size 1000        // IPUVTBAR
base feda0000 size 1000        // DMIBAR
base feda1000 size 1000        // EPBAR
base fedc0000 size 20000       // MCHBAR
base 100000000 size 17fc00000  // 4GiB -> TOUUD

Claimed regions with this change:
========================================================
base 0        size a0000       // 0 - > 0xa0000
base a0000    size 20000       // legacy VGA
base c0000    size 40000       // RAM
base c0000    size 76f40000    // 0xc0000 -> top_of_ram
base 77000000 size 9400000     // top_of_ram -> TOLUD
base 7b800000 size 800000      // TSEG
base 7c000000 size 800000      // GSM
base 7c800000 size 3c00000     // DSM
base c0000000 size 10000000    // PCIEXBAR
base f8000000 size 2000000     // MMSPI
base fb000000 size 1000        // REGBAR
base fc800000 size 2000000     // PCH_RESERVED
base feb00000 size 80000       // CRAB_ABORT
base fec00000 size 100000      // APIC
base fed40000 size 10000       // TPM
base fed50000 size 20000       // LT_SECURITY
base fed80000 size 4000        // EDRAMBAR
base fed84000 size 1000        // TBT0BAR
base fed85000 size 1000        // TBT1BAR
base fed86000 size 1000        // TBT2BAR
base fed87000 size 1000        // TBT3BAR
base fed90000 size 1000        // GFXVTBAR
base fed91000 size 1000        // VTVC0BAR
base fed92000 size 1000        // IPUVTBAR
base feda0000 size 1000        // DMIBAR
base feda1000 size 1000        // EPBAR
base fedc0000 size 20000       // MCHBAR
base 100000000 size 17fc00000  // 4GiB -> TOUUD

BUG=b:149830546
BRANCH=firmware-brya-14505.B
TEST='emerge-brya coreboot chromeos-bootimage' builds correctly.
Tested on an Anahera device which successfully boots to ChromeOS
with kernel version 5.10.109-15688-g857e654d1705. Also ran dmseg,
and saw the added regions in e820 prints.

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I058a5c1cc59703e35ceddb8a7e26fb22a6a2b75e
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-15 23:59:26 +00:00
Eran Mitrani 400c30005e soc/intel/common: support for configurable memory regions claimed by SA
see https://review.coreboot.org/c/coreboot/+/65072/8

BUG=b:149830546
BRANCH=firmware-brya-14505.B
TEST='emerge-brya coreboot chromeos-bootimage' builds correctly.
Tested on an Anahera device which successfully boots to ChromeOS
with kernel version 5.10.109-15688-g857e654d1705.

Change-Id: I80df95f9146934d6a2d23e525c22be3a9a7e2b9f
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64677
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 23:58:31 +00:00
Jeremy Compostella 14908bf05a soc/intel/alderlake: remove unnecessary test condition
mch_id is set to zero and then unnecessarily tested.

TEST=build and boot image on ADL RVP board

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: I20734e1638714027b976043b3a0457cbf3cd8442
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65121
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 23:57:15 +00:00
Jeremy Compostella 52ab283f00 soc/intel/alderlake: remove unnecessary MSR definition
MSR_VR_MISC_CONFIG2 is not used by AlderLake code.

TEST=compilation check

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: I313acf01c534d0d32620a9dedba7cf3b304ed2ed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65120
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2022-06-15 23:56:36 +00:00
Michał Żygowski 3d1e5621b4 soc/intel/alderlake/Kconfig: Unselect IPU for ADL-S
Alder Lake S CPUs do not have IPU device.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I79b084273f407119d903ed6f0cadf0084e8dda6a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-15 23:56:00 +00:00
Prashant Malani 1e0d2e051b ec/google/chromeec: Add property to denote mux mode switch
On some systems, the Chrome EC controls both the USB Type-C mux as well
as the retimer. Introduce a boolean property "mode-switch" to denote
switches which act as a mode-switch.

BUG=b:235834631
TEST=None
BRANCH=None

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Change-Id: If209a8529ff7ec424f23fd96875ac95a1fe6267d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65116
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-15 23:55:40 +00:00
Nico Huber e1e762716c libpayload/Makefile.payload: Fix CFLAGS
GCC_CFLAGS_<arch> contains only the flags that are GCC specific, iow.
flags that don't work with Clang.

CFLAGS_<arch>, OTOH, contains all flags that should be used and auto-
matically includes GCC_CFLAGS_<arch> if GCC is selected.

Change-Id: I5ec15f169d51c7a32ca86e54a98a2ce0e3b51e6d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62248
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 18:06:39 +00:00
Nico Huber 27c1da6c26 libpayload/Makefile.payload: Include libpayload's .config
It's required to tell xcompile what compiler to use.

Change-Id: I9f1ddef96a20df1d83bfd4883b2e006ba78ce7c4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-06-15 18:06:23 +00:00
Nico Huber 543c79224c libpayload/Makefile.payload: Revise config strategy
Payloads often just use one of the defconfigs for libpayload. When
the `Makefile.payload` was introduced, it also added dependencies
to pass a `make oldconfig` or `make defconfig` for the payload on
to libpayload. Turned out, this creates some dependency madness
when, for instance, `make oldconfig` gets called without a libpay-
load `.config` available, or when we try to include the `.config`
in the `Makefile`.

To make things worse, Kconfig's `Makefile` that is imported from
Linux contains some rarely used paths that are generally incompa-
tible to our environment. So let's get rid of the hard-to-control
automatism.

Payloads that don't want to use a libpayload defconfig need to
clear the `$(LIBPAYLOAD_DEFCONFIG)` variable and manually run
the respective config target to generate a `.config`. To fully
support this, the rule to create a `.config` via `defconfig` is
guarded by `$(LIBPAYLOAD_DEFCONFIG)`. Otherwise we'd have a
spurious, broken recipe when the variable is unset.

We keep the option to call libpayload targets with an `lp-` prefix
for convenience. The existing, explicit targets `lp-defconfig` and
`lp-oldconfig` are replaced with a pattern match, so all config
and other targets should work.

Change-Id: Ie3fcce58d98e248c7182cd47f2a797fe066dd18a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-06-15 18:06:05 +00:00
Varshit B Pandya e381679473 soc/intel/common/acpi: Fix warning in ASL
Warnings are treated as errors in build.
UBAR is declared inside APRT method which throws warning as follows
"Static OperationRegion should be declared outside control method"
Move UBAR outside APRT method to fix warning.

TEST=build brya with following changes without any warnings
1. Select ACPI_CONSOLE
2. Include <soc/intel/common/acpi/acpi_debug.asl>
3. Add APRT function in any asl file.

Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com>
Change-Id: I40c676fd0bbd529bcbded18dd248b918f47324d9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62367
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2022-06-15 18:05:12 +00:00
Terry Chen ef51b6d742 mb/google/brya/var/crota: Enable VNN_1.05v_bypass rail
Some SKUs of crota have VNN 1.05v bypass rails for additional
power savings in S0ix states. This patch uses FW_CONFIG to enable
that feature when run on the applicable SKUs.

BUG=b:233175019
BRANCH=none
TEST=emerge-brya coreboot and verified pass

Signed-off-by: Terry Chen <terry_chen@wistron.corp-partner.google.com>
Change-Id: Iaade50f4fe821b7114b3e2d44bda0747816da11c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65020
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Cyan Yang <cyan.yang@intel.corp-partner.google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-15 18:04:46 +00:00
Elyes Haouas 1f07797d84 cpu/x86/smm/smm_module_loader.c: Fix formatted print
This fixes following errors when building GA-945GCM-S2L with clang 14.0.5.

    CC         ramstage/cpu/x86/smm/smm_module_loader.o
src/cpu/x86/smm/smm_module_loader.c:180:10: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                       region_offset(&cpus[i].stub_code), i);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cpu/x86/smm/smm_module_loader.c:184:20: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                       __func__, region_offset(&cpus[0].stub_code),
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cpu/x86/smm/smm_module_loader.c:185:10: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                       region_offset(&cpus[i].stub_code), size);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cpu/x86/smm/smm_module_loader.c:349:52: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
        printk(BIOS_DEBUG, "%-12s [0x%lx-0x%lx]\n", name, region_offset(&region),
                                     ~~~                  ^~~~~~~~~~~~~~~~~~~~~~
                                     %zx
src/cpu/x86/smm/smm_module_loader.c:350:9: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
               region_end(&region));


Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I59f20aacf91cb50fb194a84082a643b34c6c1ae5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65154
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 16:12:29 +00:00
Varshit B Pandya 15d99c718d mb/google/brya/var/brya4es: Enable CNVi ddr rfim
enable_cnvi_ddr_rfim enables DDR RFI mitigation feature, this feature
needs to be enabled for all brya variants. Currently, it's not enabled
for brya4es.

BUG=b:201724512
TEST=Build, boot brya4es and check function 3 in _DSM method under
\_SB.PCI0.WFA3

Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com>
Change-Id: I6cc9d3e4721188dcbc8584596c9f3f89a737206f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65110
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Meera Ravindranath <meera.ravindranath@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 13:13:08 +00:00
Reka Norman 69c9b01efa mb/google/nissa: Increase I2C bus frequency to around 390 kHz
- Set the speed to I2C_SPEED_FAST in each speed_config so that the
  speed_config is actually applied. Currently, the speed_config isn't
  applied, so the hcnt/lcnt calculation falls back to rise_time_ns and
  fall_time_ns, which are 0 since they're not set. This results in
  frequencies around 300 kHz.
- Move the data hold time to the speed_config, ensuring that the
  resulting sda_hold value remains the same.
- For nivviks and nereid, tune scl_lcnt and scl_hcnt for each bus to
  give a frequency around 390 kHz.
- In the baseboard, keep default scl_lcnt and scl_hcnt values. These
  work well for buses with a rise time around 100 ns, and can be used as
  a starting point before tuning them for a specific variant.

BUG=b:229547183
TEST=Measure the clock frequency, tHIGH, tLOW and tVD;DAT on nivviks
and nereid and check they meet the spec.

nereid clock frequencies:
I2C0 - 387.9 kHz
I2C1 - 392.7 kHz
I2C3 - 386.3 kHz
I2C5 - 383.6 kHz

nivviks clock frequencies:
I2C0 - 387.67 kHz
I2C1 - 380.47 kHz
I2C2 - 388.51 kHz
I2C3 - 384.03 kHz
I2C5 - 389.09 kHz

Change-Id: I88a6cfcc893183385eb85a89489e5d270277e537
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64942
Reviewed-by: Kangheui Won <khwon@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-15 13:12:44 +00:00
Tony Huang 211b64eeeb mb/google/dedede/var/shotzo: Generate SPD ID for supported parts
Add supported memory parts in the mem_list_variant.txt and generate the
SPD ID for the parts. The memory parts being added are:
 - MT53E512M32D2NP-046 WT:E
 - H9HCNNNBKMMLXR-NEE
 - K4U6E3S4AA-MGCR
 - MT53E512M32D1NP-046 WT:B
 - H54G46CYRBX267
 - K4U6E3S4AB-MGCL
 - K4U6E3S4AA-MGCL

BUG=b:235303242
BRANCH=dedede
TEST=build

Change-Id: Ie0ffdfed47b1791b990affd9eee262faede4b0c8
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65081
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Henry Sun <henrysun@google.com>
2022-06-15 13:12:20 +00:00
Lean Sheng Tan 354fbef17b mb/prodrive/hermes: Add BIOS menu control via EEPROM
Introduce a new field in the board settings EEPROM region to control
whether BIOS menu is to be enabled. This field will be used in EDK2
payload.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I0af81c9e70a0088caea6bc7e2b81eab9a123c0f7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65128
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-06-15 08:10:07 +00:00
Won Chung 0c790c81bf mb/google/brya/var/agah: Correct _PLD values
This patch is to denote the correct value of ACPI _PLD for USB ports.

   +----------------+
   |                |
   |     Screen     |
   |                |
   +----------------+
A2 |                | A0
C2 |                | C0
   |                |
   +----------------+

BUG=b:216490477
TEST=emerge-brya coreboot

Signed-off-by: Won Chung <wonchung@google.com>
Change-Id: I8cc7be20988ff3cc3be1fac3c9b143059ff9190c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65088
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 22:12:53 +00:00
Raihow Shi b73cb4b1d2 mb/google/brask/variants/moli: change clk_src and clk_req for LAN_I225V
change clk_src and clk_req to 4 for LAN_I225V based on
ADL_Moli_SC_MB_20220601.pdf.

BUG=b:235768639
TEST=emerge-brask coreboot and check LAN_I225V can connect.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I323726df84d07703402da9da44b1882a0cdc1e33
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65105
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-14 22:12:31 +00:00
Raihow Shi d79bb899c1 mb/google/brask/variants/moli: Remove the cnvi_bt_audio_offload
Remove the cnvi_bt_audio_offload because it is already probed in
variant.c for moli.

BUG=b:235426221
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I15077ca161b6283e764105d1c2fbc59ead1fd761
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-14 22:12:15 +00:00
Raihow Shi b0eef7b4bb mb/google/brask/variants/moli: enable use_custom_pld
enable use_custom_pld to match the custom physical location define.

BUG=b:235426221
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I62d133eed02faf4e5ad054a0901f73b1196c4c6b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Won Chung <wonchung@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-06-14 22:12:02 +00:00
Peter Lemenkov fb2116f106 mb/hp/snb_ivb_laptops/Kconfig: move common option to commons section
Apparently all nine HP Sandy/Ivy laptop variants select
MAINBOARD_USES_IFD_GBE_REGION. So let's move it to the COMMON section.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Change-Id: I48e0d03c59d3ba013b479b59df8a15a0f8d23c50
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-06-14 21:23:34 +00:00
Subrata Banik 13fd3c8dae soc/intel/cmn/cpu: API to initialize core PRMRR
This patch implements API to sync between core
PRMRR(Processor Reserved Memory Range Registers).

Read PRMRR base and limit value from BSP and apply it on the
rest of the cores.

BUG=b:233199592
TEST=Build and boot google/taeko to ChromeOS.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I720669139429afc3d8c8d15c0ce15f1524f22e4c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64976
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-06-14 17:57:51 +00:00
Bora Guvendik 91bc6d1da7 mb/intel/adlrvp: Add new upd setting for ADL RVP with Raptor Lake
Currently, ADL FSP headers and RPL FSP headers differ. Set a RPL only
upd for adlrvp with Raptor Lake silicon. This code can be removed once
ADL and RPL start using the same FSP.

BUG=b:229134437
BRANCH=firmware-brya-14505.B
TEST=build adlrvp_rpl_ext_ec

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I4e69323949233aa8c325a757b28b9d80cbdf4322
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-06-14 17:57:38 +00:00
Felix Held 39c0e15731 mb/amd/chausie/Kconfig: enable PCIe power management
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia24a502994d24f3341273c5e6f768687ad20baf6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65113
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 16:35:43 +00:00
Felix Held 1acb133e2d mb/amd/chausie/devicetree: add PCIe clock output configuration
The general purpose PCIe clock outputs 0, 1 and 3 are used with their
corresponding clock request pins, so set the gpp_clk_config to
GPP_CLK_REQ for those and disable the unused output 2. This matches the
DXIO descriptor in port_descriptors.c.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I38ab8d6d824617509fdd18f06d5593889ec50666
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65112
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 16:35:22 +00:00
Ronak Kanabar 68305aa3b0 soc/intel/common: Remove use of CPUID_EXTENDED_CPU_TOPOLOGY_V2
In x86 processor as per Software Developer's manual there are 2 ways to
get CPU topology by querying the processor. BIOS can use CPUID
instruction using CPUID_EXTENDED_CPU_TOPOLOGY (0x0B) as input or
CPUID_EXTENDED_CPU_TOPOLOGY_V2 (0x1F) as an input. Both will return
valid CPU topology data.

While CPUID_EXTENDED_CPU_TOPOLOGY (0x0B) returns data related to number
of threads, core and package, CPUID_EXTENDED_CPU_TOPOLOGY_V2 (0x1F)
provides more granular information regarding Die, package etc.

coreboot uses V2 to in order to query and return CPU topology data as of
now since that's the highest instruction of CPUID which is supported,
there is a mismatch in the way FSP processes the data.

FSP queries coreboot MP services to get CPU topology data which uses
structure which is either compatible with CPUID_EXTENDED_CPU_TOPOLOGY or
CPUID_EXTENDED_CPU_TOPOLOGY_V2. Since coreboot returns V2 data in
structure which is expecting data for CPUID_EXTENDED_CPU_TOPOLOGY, there
is hang observed on ADL_N CPUs.

To solve this problem coreboot should assign CPUID_EXTENDED_CPU_TOPOLOGY
data to processor_info_buffer->Location structure so remove use of
CPUID_EXTENDED_CPU_TOPOLOGY_V2

Ref EDK2 code: https://github.com/tianocore/edk2/tree/edk2-stable202202
Files:
MdePkg/Include/Protocol/MpService.h#L182
UefiCpuPkg/Library/MpInitLib/MpLib.c#L2127
UefiCpuPkg/Library/MpInitLib/MpLib.c#L2120
Ref doc: Software Developer’s Manual volume 3 CH 8.9

BUG=b:220652104
TEST=Build and boot ADL-N RVP with debug FSP and verify CPU topology
value and observe system boots (no hang).

Change-Id: I1e6832fb03fcc59d33df0ba1664019727185d10a
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-06-14 13:37:31 +00:00
Patrik Tesarik f5c2f253a7 external/LinuxBoot: Fix cleanup mechanism
`make clean` never thoroughly removed LinuxBoot build artifacts. This
change checks for kernel directories present in the project directory
and deletes all of them, if found.

Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com>
Change-Id: Ia056ac6608e3631dfc270ba5c2f32216c3e1ac50
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65098
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 13:35:54 +00:00
Patrik Tesarik ed8aef9ccd external/LinuxBoot: Kconfig defaults to systemboot
In addition to change CB:40316 this commit proposes a change of default
behavior inside of the LinuxBoot toolchain.

Currently the defaults build a LinuxBoot payload which boots into the
u-root shell and waits for input. In fact it does not deliver any
bootloader with it, but the build image is on the other hand rather
small.

This commit changes the defaults in a way that the LinuxBoot
bootloader will actually be able to boot a local or remote system image.
In consequence the build payload size is rather big, but accepted for a
working out-of-the-box startup behavior.

See discussion on that topic in the above mentioned change.

Signed-off-by: Patrik Tesarik <mail@patrik-tesarik.de>
Change-Id: Ieaba7e523aef10c467a8bea29ae323e22324b225
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40527
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-14 13:35:28 +00:00
Shou-Chieh Hsu 446bacd2f4 util/mb/google: add support for nissa
Add the file template for creating a new variant of Nissa.

BUG=b:229550821

Signed-off-by: Shou-Chieh Hsu <shouchieh@google.com>
Change-Id: I04f75ff91f9851b82641f703ba950b04c22e2e72
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64045
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-06-14 00:53:14 +00:00
Derek Huang 930df1a6fb mb/google/volteer: Fix wrong Type-C port for retimer
This change fixes wrong type-C port number for voxel. Voxel
uses tcss_usb3_port1 not tcss_usb3_port3.

BUG=b:231344977
BRANCH=volteer
TEST=Check the transactions are happening on correct port. Also checked
retimer firmware update on both the ports.

Signed-off-by: Derek Huang <derek.huang@intel.corp-partner.google.com>
Change-Id: Iba7b3b15296bed99d3626a6d53dfd59e8d20fe5f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64022
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-13 21:29:41 +00:00
Felix Singer 3e94068508 util/liveiso: Update to NixOS 22.05
Update configs for NixOS 22.05.

pulseaudio-modules-bt has been abandoned, and is superseded by
pulseaudio's native Bluetooth functionality. Thus, remove it.

Change-Id: Ic3b1dbc3c2ab092b576ba2151c93c74d4f298efc
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64969
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-06-13 20:12:33 +00:00
Felix Held a05f518dea soc/amd/sabrina: only make the available clock outputs configurable
Sabrina only has 4 PCIe clock outputs with corresponding clock request
pins available, so only make those 4 configurable in devicetree and
disable the rest unconditionally.

TEST=None

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5d34fa680dd20a6eec86cc278c1c901b3231df83
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65089
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-06-13 15:53:32 +00:00
Patrik Tesarik 868282e195 payloads/external/LinuxBoot: Adopt u-root change
The u-root toolkit dropped the original uinit bootloader in the master
branch and respectively the systemboot-option in templates.go. In
consequence the LinuxBoot builds will boot into the u-root shell and
waiting for input. This commit enables the reuse of the -uinitcmd flag
to specify a command, which runs after the u-root init-process.

Systemboot as a bootloader wrapper will mimic a BIOS/UEFI boot device
selection. Other preselections, i.e. stboot and boot2 are implemented as
well. Custom strings or programs can be set as well, but they cannot
contain program flags. E.g. 'fbnetboot -class linuxboot' will not work,
because they aren't symlinkable.

This commit and its respective LinuxBoot builds with systemboot, none
and one custom option have been tested successfully on a UP squared
single board computer with the intended behavior.

Change-Id: I4ac3409040ea77a1836f90f43fba07d2cd05a952
Signed-off-by: Patrik Tesarik <mail@patrik-tesarik.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40316
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-06-13 13:16:01 +00:00
Patrik Tesarik b35c1f45a9 external/LinuxBoot: Deprecate GOPATH in u-root
This is a breaking change for now when using latest u-root main, which
is the default behavior in LinuxBoot.
u-root switched to golang modules and therefore `go get` is not the
standard behavior anymore. The workaround for this is to pull the
repository and build directly in the directory for now. Another apporach
would be to use `go install $pkg@latest` to install the binary at that
particular version into the golang binary path.

Currently missing is a control structure to enable the build process for
legacy versions <v0.8.0.

Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com>
Change-Id: Ifa03504da6fa321ffc6d2506b27ebd2e3ed9961b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65090
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-06-13 13:15:23 +00:00
Teddy Shih eb05560fe1 mb/google/dedede/beadrix: Update SoC gpio pin of I2C camera
Update SoC GPIO setting of unused I2C camera pins according to beadrix
schematics.

GPP_H6 : NF1 -> NC (AP_I2C_CAM_SDA)
GPP_H7 : NF1 -> NC (AP_I2C_CAM_SCL)

BRANCH=dedede
BUG=b:235005592
TEST=on beadrix, validated by beadrix's camera still working properly.

Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com>
Change-Id: I8be57406a44096c764c1faa8f45267d08c4694fb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64971
Reviewed-by: Super Ni <super.ni@intel.corp-partner.google.com>
Reviewed-by: Ivan Chen <yulunchen@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-13 13:14:47 +00:00
Arthur Heymans e4459b3961 soc/intel/lpc: Set up default LPC decode ranges
Intel LPC devices have generic and fix IO decode ranges. This CL is
smarter about using generic ones, by using the fixed ones first.

Change-Id: Ifd98bcc639ee08d068956a33b0e12cc70211ca2d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65097
Reviewed-by: Marvin Drees <marvin.drees@9elements.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-12 22:44:44 +00:00