Commit graph

57,565 commits

Author SHA1 Message Date
Matt DeVillier
dfd5411ea0 mb/google/zork: Ensure eSPI GPIOs programmed w/o vboot
On the non-vboot boot path, eSPI is configured as part of
fch_pre_init(), and we need to ensure that the mainboard sets the
eSPI GPIOs properly before the common SoC code performs eSPI init.
Use the mb_set_up_early_espi() function to set the eSPI GPIOs at
the correct time.

TEST=build/boot google/zork (morphius), verify keyboard functional.

Change-Id: I03efe6def37a018c3de410523be21bf008174e94
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84148
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-02 09:11:05 +00:00
Matt DeVillier
7600132ec6 mb/google/zork: Ensure early GPIOs programmed w/o vboot
Now that zork can boot without vboot, ensure that the GPIOs set in
verstage are programmed in bootblock on the non-vboot path.

The eSPI GPIOs will be set in a subsequent patch using
mb_set_up_early_espi() since setting them in
bootblock_mainboard_early_init() would be too late given when the
SoC eSPI init takes place.

TEST=build/boot google/zork (morphius) w/o vboot

Change-Id: I0bb49678b2d913c447d5bc761a6f0e00fca6334f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-09-02 09:10:55 +00:00
cengjianeng
0c0663b5e8 mb/google/nissa/var/teliks: Add fw_config fields for rtl8852be
Add a new fw config field for wifi category as WIFI_6_8852, which is
PCIe based. Also, enable WIFI_6_8852 for existing PCIe based wifi port
as well as bluetooth port.

BUG=b:356434907
BRANCH=NONE
TEST=Verified Wifi6 module detection

Change-Id: Ib6ba641c23cce7f1253022c9bb78b986b323bcaa
Signed-off-by: Jianeng Ceng <cengjianeng@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84138
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Qinghong Zeng <zengqinghong@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-02 09:10:26 +00:00
cengjianeng
f6bca6b649 mb/google/nissa/var/teliks: Force audio mute to avoid screen flick
Panel CSOT MNB601LS1-3 will flicker once during enter Chrome login
screen, it is because it inserts 12 blank frames if it receives the
unmute in VB-ID.

Always override the mute in VB-ID to avoid Tcon EC detected the
audiomute_flag change.

BUG=b:360243615
BRANCH=firmware-nissa-15217.B
TEST:Verfied on Teliks and cannot reproduce the issue

Change-Id: Iff488f6844c717ef24069c7176e7b8dfb07d8abc
Signed-off-by: Jianeng Ceng <cengjianeng@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84137
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Qinghong Zeng <zengqinghong@huaqin.corp-partner.google.com>
2024-09-02 09:09:22 +00:00
Yuchi Chen
a76640b9ab soc/intel/common/systemagent: read sa resources only from domain 0
Change-Id: Ida4461de6275bdd314f5cba441d3ff631d570305
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84109
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-09-02 09:07:22 +00:00
Yuchi Chen
2b0b2ef9a2 soc/intel/common/systemagent: select CAPID_A, BDSM and BGSM by Kconfig
CAPID_A, BDSM and BGSM registers may not exist on specific platform,
this patch add `HAVE_CAPID_A_REGISTER` and `HAVE_BDSM_BGSM_REGISTER`
to select them.

Change-Id: I4d1197b8b1071aefc2ea1ed2f707d769aabab5e4
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84108
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-09-02 09:07:02 +00:00
Yidi Lin
53be20d37b soc/mediatek: Add EARLY_INIT_PCIE_RESET to early_init_type
Add EARLY_INIT_PCIE_RESET for early PERST# de-assertion.

BUG=b:361728592
TEST=emerge-cherry coreboot

Change-Id: I7ab85694e85a4c3f77fefc22efe16734c347a716
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84116
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Jianjun Wang <jianjun.wang@mediatek.com>
2024-09-02 09:04:45 +00:00
Yidi Lin
62632ebf24 soc/mediatek/common: Move mtk_pcie_reset to common/pcie.c
mtk_pcie_reset can be shared with MT8196. So move it to common/pcie.c.

BUG=b:361728592
TEST=emerge-cherry coreboot

Change-Id: Ib540cf9cc568206a1e78306624f4df7c5631c128
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jianjun Wang <jianjun.wang@mediatek.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-09-02 09:04:27 +00:00
Yidi Lin
7c71b94984 soc/mediatek/common/pcie: Use clr/setbits32p
Use clr/setbits32p to make code cleaner.

BUG=none
TEST=emerge-cherry coreboot

Change-Id: Id99d5aafdf4d687dbe3a0bef29b148537cf58dd8
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84114
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Jianjun Wang <jianjun.wang@mediatek.com>
2024-09-02 09:03:36 +00:00
Yidi Lin
d86c5bf83b soc/mediatek/common/pcie: Add DEVTREE_CONST qualifier
Currently pcie.c is built into ramstage only, where DEVTREE_CONST is an
empty macro, so there's no problem with that. However, if we would like
to include that file in pre-ramstage, then DEVTREE_CONST would be
'const', leading to the following build error:

```
src/soc/mediatek/common/pcie.c:104:26: error: assignment discards
'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
104 |                 root_dev = pcidev_path_on_root(devfn);
    |                          ^
```

BUG=none
TEST=emerge-cherry coreboot

Change-Id: Ia7c95424019ec0dca50bbc6be7f81b6180d06d6e
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84113
Reviewed-by: Jianjun Wang <jianjun.wang@mediatek.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-09-02 09:02:19 +00:00
Karthikeyan Ramasubramanian
a6b42b6c33 mb/google/brox: Remove ACPI Power Resource for Bluetooth device
Bluetooth driver in kernel requires reset-gpio in current resource
settings (_CRS) and device specific data (_DSD) ACPI objects. Hence
remove ACPI Power Resource for Bluetooth device so that the concerned
ACPI objects get populated.

BUG=b:362817900
TEST=Build Brox Firmware image and boot to OS. Ensure that the _CRS and
_DSP ACPI objects are filled in the SSDT with the required data.

Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
{
    GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
        "\\_SB.PCI0.GPIO", 0x00, ResourceConsumer, ,
        )
        {   // Pin list
            0x004D
        }
})
Name (_DSD, Package (0x02)  // _DSD: Device-Specific Data
{
    ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
    Package (0x01)
    {
        Package (0x02)
        {
            "reset-gpio",
            Package (0x04)
            {
                \_SB.PCI0.XHCI.RHUB.HS10,
                Zero,
                Zero,
                One
            }
        }
    }
})

Change-Id: If6e679aa3f4181e7963ac53d0847b1512959b3a7
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84135
Reviewed-by: Bob Moragues <moragues@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2024-09-02 09:02:00 +00:00
Ren Kuo
c4762af6e0 mb/google/brox/jubilant: Update dptf settings
Update dptf settings from thermal design:
1) Remove fan control and active policy,
   since fan is controlled by EC.
2) Modify TSRs to 0:DRAM, 1:SOC, 2:Charger
3) Update Pl2 min&max values

BUG=None
TEST= Build jubilant firmware
      Generate and check ACPI SSDT.dsl
      $ cat /sys/firmware/acpi/tables/SSDT > SSDT
      $ iasl -d SSDT

Change-Id: I2d59eedea9fb25565709e118abc1a14b4c2a64e7
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-by: Bob Moragues <moragues@google.com>
2024-09-02 09:01:33 +00:00
Felix Singer
cfcb3620ac soc/intel/meteorlake: Hook up microcode from repository
Change-Id: I46021accacbb911d7a7ecfdbb52973a7da78f36e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-02 09:01:18 +00:00
Felix Held
d87321c8a5 mb/cwwk/adl/devicetree: enable all USB ports
The cw-al-4l-v1.0 mainboard has two USB2 ports on a 2x5 pin header on
the mainboard and likely also routes one USB2 port to the m.2 E key slot
which is typically used for Bluetooth support when an E key m.2 WIFI +
Bluetooth card is installed.

This is untested, since I only have the cw-al-4l-v2.0 mainboard, but
from looking at the documentation of the version 1 and looking at how
things are done on the version 2 this should be correct.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7059a3f2d9cde0086382a4484c09d5ef33dc906d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83910
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-09-02 08:57:03 +00:00
Cliff Huang
105b5d376f soc/intel/common/gpio: support 16-bit CPU Port ID
- Add Kconfig: SOC_INTEL_COMMON_BLOCK_GPIO_16BIT_CPU_PORTID.
- Change cpu_port field to 16-bit width if the Kconfig is set.

BUG=none
TEST=boot to OS and use iotools to read the registers that use 16-bit
port ID such as IOM AUX Bias Ctrl register to verify the 16-bit group
ID field. The bit 15:8 of the returned port ID value should be 0xF2
instead of zero.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: I8c1a48d587bd41178b0c6bb0144fda93e292423d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83981
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-02 03:53:50 +00:00
Subrata Banik
f51885d370 mb/google/brya: Add romstage early graphics for trulo baseboard
1) Add all required changes for eSOL support.
2) Select MAINBOARD_USE_EARLY_LIBGFXINIT for Trulo.

The CSOT (MNC207QS1-1) panel is used for the devicetree.

BUG=b:362895813
TEST=On-screen text message seen during MRC training on Trulo SKU1.

MRC: no data in 'RW_MRC_CACHE'
bootmode is set to: 0
DP PHY mode status not complete
DP PHY mode status not complete
DP PHY mode status not complete
...
Informing user on-display of memory training

Change-Id: Ic34a8601b3084aa5f780d358fb0b15b7e820d375
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84128
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
2024-09-02 03:51:11 +00:00
Subrata Banik
09ea33cdd8 soc/intel/alderlake: Prevent overlapping boot screens
Previously, `early_graphics_stop()` was skipped unconditionally if
`CONFIG(SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE)` was enabled. This led
to overlapping screens when CSE sync was not triggered in ramstage,
as both the eSOL message and the firmware splash screen would be
displayed.

This change refactors the condition for calling `early_graphics_stop()`
to ensure it is only skipped if a CSE firmware update is actually
required *and* `CONFIG(SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE)` is set.

This allows eSOL to display its message during CSE sync, but tears
down early graphics programming in other cases to prevent overlapping
screens.

Additionally, this change ensures that `early_graphics_stop()` is the
last function called by the romstage to guarantee proper cleanup.

BUG=b:362895813
TEST=Able to boot google/tivviks_ufs without overlapping screens.

Change-Id: Idc01bfc8963d65fcb0441300e7c9267eaaefefb9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-09-02 03:37:32 +00:00
Jian Tong
6f07ca9471 mb/google/brox/var/lotso: Update verb table
Update verb table provided by Realtek on 20240710.

Restults: SNR > 90 (spec>=90).

BUG=b:349996984
TEST=emerge-brox sys-boot/coreboot sys-boot/chromeos-bootimage

Change-Id: Ic4f03d09010efa7e32713b2697d5832255f64317
Signed-off-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83920
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-09-02 03:36:48 +00:00
Elyes Haouas
35ac087630 acpi/sata.c: Fix Wunterminated-string-initialization error on port_name
src/acpi/sata.c: In function 'generate_sata_ssdt_ports':
src/acpi/sata.c:27:29: error: initializer-string for array of 'char' is too long [-Werror=unterminated-string-initialization]
   27 |         char port_name[4] = "PR00";
      |                             ^~~~~~

Change-Id: Ie80c2329c4a2698bd9e72ba1b36c1c05e37b214b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84166
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Reviewed-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
2024-09-01 05:34:38 +00:00
Elyes Haouas
b1ae6ca7ef tree: Use boolean for s0ix_enable
Change-Id: Id0ab5e641684e03da555a127808c0def5a53cbe6
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84159
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-09-01 04:58:51 +00:00
Elyes Haouas
f3d54feef4 tree: Use eist_enable as bool for newly merged files
Change-Id: Icc01852dc5bd04cfa151e8fa7c5bcc160ed978c6
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84156
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-01 04:58:14 +00:00
Sergii Dmytruk
e68c6542fe configs/config.msi_ms7d25_ddr4: enable UEFI capsule updates
The file is updated significantly because it wasn't regenerated for a
while.

Change-Id: I2b18cb614f5fc38f2a417f7595475fdedfb6d625
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83423
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-08-30 15:49:27 +00:00
Sergii Dmytruk
bd9370d775 drivers/efi/uefi_capsules.c: coalesce and store UEFI capsules
How it approximately works:

(During a normal system run):
1. OS puts a capsule into RAM and calls UpdateCapsule() function of EFI
   runtime
2. If applying the update requires a reboot, EFI implementation creates
   a new CapsuleUpdateData* EFI variable pointing at the beginning of
   capsules description (not data, but description of the data) and does
   a warm reboot leaving capsule data and its description in RAM to be
   picked by firmware on the next boot process

(After DEV_INIT:)
3. Capsules are discovered by checking for CapsuleUpdateData* variables
4. Capsule description in memory and capsule data is validated for
   sanity
5. Capsule data is coalesced into a continuous piece of memory

(On BS_WRITE_TABLES via dasharo_add_capsules_to_bootmem() hook:)
6. Buffer with coalesced capsules is marked as reserved

(On BS_WRITE_TABLES via lb_uefi_capsules() hook:)
7. coreboot table entry is added for each of the discovered capsules

(In UEFI payload:)
8. CapsuleUpdateData* get removed
9. coreboot table is checked for any update capsules which are then
   applied

Change-Id: I162d678ae5c504906084b59c1a8d8c26dadb9433
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83422
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-08-30 15:48:25 +00:00
Krystian Hebel
42c8ae73a3 mb/qemu-{i440fx,q35}: reduce default ROM size to 8 MiB
By default, QEMU bails when trying to use bigger images mounted with
'-drive if=pflash', which is required to make use of writable flash
introduced in CB:82555. This changes both default size in Kconfig as
well as FMAP layouts.

Since QEMU 5.0.0 it is possible to change the limit of firmware size
with `max-fw-size` machine configuration option, up to 16 MiB, as bigger
sizes would overlap with IO APIC memory range. Default is still 8 MiB,
so it makes sense to have identical default in coreboot.

Error thrown by QEMU when trying to use too big ROM:

qemu-system-x86_64: combined size of system firmware exceeds 8388608 bytes

Change-Id: If36cb754a8e75e23bce49ff568dd88e5db279bb8
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82639
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-08-30 15:44:33 +00:00
Krystian Hebel
77d1a0d77f mb/qemu-q35/smihandler.c: add support for SMIs on QEMU
qemu-system-x86_64 uses AMD64 SMM save state format, despite emulating
Intel chipset. In addition, even though it implements SMI_STS register,
QEMU never sets any bits in it. As there is little emulated hardware
that can be generating SMI, assume that all SMIs come from APM. This
source is used e.g. to disable ACPI (which wasn't working until now on
QEMU) and SMMSTORE.

Tested by invoking SMMSTORE commands from the payload with SMM logging.

Change-Id: I2fc7b74bdc13be8d76bc536283ab5a14fffec45f
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82558
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-30 15:44:23 +00:00
Yu-Ping Wu
f28c6dd636 soc/mediatek/mt8196: Enable VBOOT_DEFINE_WIDEVINE_COUNTERS
To support Widevine DRM, enable VBOOT_DEFINE_WIDEVINE_COUNTERS.

BUG=b:357976379
TEST=emerge-rauru coreboot
BRANCH=none

Change-Id: I3760c30b175338165f8e11b59c7cfa830070a19e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84121
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-08-30 14:52:02 +00:00
Arthur Heymans
c1ca6588bd nb/intel/sandybridge: Fix uninitialised variable
GCC with LTO caught this.

Change-Id: I9f78b9973729bdedb40bd63b8989e94c9c498814
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84055
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-30 07:37:29 +00:00
Arthur Heymans
bf4e28484a arch/x86/car.ld: Fix overlapping regions
The fspm_rc_heap is already accounted for inside .car.data. Some linkers
like LLD do not like overlapping regions so remove this.

Change-Id: I058bd6790afc313e06f1888e5b783d97b7e93b1e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84048
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-30 07:36:26 +00:00
Arthur Heymans
f4e4118fd6 soc/intel/apl: Fix building with clang & LTO
LTO does not like that assert on a constant, so use the more appropriate
static assertion.

Change-Id: I52094ec825fcec56a9b9fb6b9abc58644c2bf9cb
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84047
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-30 07:36:06 +00:00
Arthur Heymans
de50a3f94b soc/intel/pmclib.c: Work around compiler bug -Werror=stringop-overread
On xeon-sp this is a zero length array. With GCC LTO this triggers the
stringop-overread warning. To work around this change the signature of
the function from an array to a pointer.

Change-Id: Ieee6e9bddc4e738eb560dd0e69dc3087ac9f5da6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84042
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-30 07:35:53 +00:00
Arthur Heymans
b571e54173 soc/intel/meteorlake: Configure DDR5 Physical channel width to 64
A DDR5 DIMM internally has two channels each of width 32 bit.
But the total physical channel width is 64 bit.

This is the same fix as be5dc3daa "soc/intel/alderlake: Configure DDR5
Physical channel width to 64"

Building with GCC LTO cought this buffer overflow when assigning SPD
addresses to a buffer.

Change-Id: Ief6018e4dcce6b26804ff864cdfe116f0f90d545
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84085
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-08-30 07:35:24 +00:00
Arthur Heymans
77ab151460 ext_stage_cache: Make sure variables are initialized
GCC LTO incorrectly warns about this it seems.

This also exits gracefully from stage-cache code if no smm region is
found.

Change-Id: Ib1851295646258e97c489dc7402b9df3fcf092c1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84040
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-30 07:35:10 +00:00
Arthur Heymans
e5742fbd97 soc/cavium: Fix non matching types
There is no struct device *dev equivalent of this function. Clang LTO
warns about mismatching types.

Change-Id: I22c8c9b9f350c53469a5d386db211969c8a41cf0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84084
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-30 07:34:47 +00:00
Shuo Liu
5e521d7e62 soc/intel/xeon_sp: Add PCIe root port driver
The driver sets ACPI names for PCIe root ports and its subordinate
devices, and fill SSDT for them accordingly. SPR PCIe root port
devices are initially supported.

TEST=Build and boot on intel/archercity CRB

Change-Id: I81bd5d5a2e62301543a332162a5a789e0793e18e
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-08-29 20:12:24 +00:00
Felix Singer
f373188e64 soc/intel/raptorlake: Use updated microcode from blobs repo
This updated microcode fixes the recent voltage issues on the Raptor
Lake S platform. Intel provided this specific microcode just as an
attachment [1]. Thus, we've uploaded it to our own blobs repository,
which is why the path is changed.

Microcode signature:

  sig 0x000b0671, pf_mask 0x32, 2024-07-18, rev 0x0129

[1] https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/81

Change-Id: I6d01e38476b0d3dc5281ea1d85bac87043d122dd
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84132
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-29 14:42:16 +00:00
Felix Singer
610c0d0e71 3rdparty/blobs: Update submodule to upstream main
Updating from commit id a8db7df:
2023-07-24 16:05:01 +0000 - (mb/google: amd projects: Add signed verstage files)

to commit id 45f1b75:
2024-08-29 11:51:27 +0200 - (soc/intel/raptorlake: Add microcode for 06-b7-01)

This brings in 7 new commits:
45f1b75 soc/intel/raptorlake: Add microcode for 06-b7-01
a0fdf22 soc/mediatek/mt8186: Update DRAM binary from 0.1.0 to 0.1.1
c641a81 mb/erying/tgl: Add blobs necessary for platform bring-up
30e541a soc/mediatek/mt8192: Update dram.elf from 1.6.3 to 1.8.3
ba6e8a4 soc/intel: Remove Quark blobs
1f31acc soc/mediatek/mt8188: Update DRAM blob to 0.1.2
542c27d mb/starlabs/starbook: Consolidate version history

Change-Id: I7553ea2112cb336866bdff3c24c02f8a7fd15811
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84129
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-29 14:42:12 +00:00
Arthur Heymans
aa75ee1a71 cbmem.h: Change return type of cbmem_get_region
The underlying IMD function already returns an integer which indicates
success or failure.

This removes the need to have initialized variables that need to be
checked for NULL later. In some cases this actually adds the appropriate
check for returned values.

Dying is appropriate if cbmem is not found as it is essential to the
bootflow.

Change-Id: Ib3e09a75380faf9f533601368993261f042422ef
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84039
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-29 13:58:21 +00:00
Arthur Heymans
86dadcd52a lib/rmodules: Add support for LTO
Change-Id: I9cdda036f330486370e8c4120be5b6a0fd982e99
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84038
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-29 13:56:39 +00:00
Arthur Heymans
af0da957f5 cpu/x86/smm: Don't do partial linking
For LTO we want to link everything in one go.

Change-Id: If2c186eb87072e0b80c7e8998b2a0d9bdfddf740
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84037
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-29 13:55:32 +00:00
Arthur Heymans
f48bf2e5e6 cpu/x86/64bit: Specify linker to be used for cbfs PT
When clang supports linking bare metal targets it defaults to LLD for
linking which linking those raw data structures used to generate CBFS
page tables does not fare well.

Change-Id: I66fb374a456ea752a97a41426c5a98e6747f3a92
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-29 13:54:12 +00:00
Yidi Lin
35852c97a3 mb/google/rauru: Reset USB hub in bootblock
We have to reset the USB hub as early as possible. Otherwise the USB3
hub may not be usable in the payload. This design has been introduced
since Cherry.

TEST=build pass.
BUG=b:317009620

Change-Id: Iea793b4b04bd009d0354e2331604bccf30466a23
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84024
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-29 13:53:16 +00:00
Mingjin Ge
368b1a30e5 mb/google/rauru: Setup USB host in ramstage
Add usb host function support.

TEST=read usb data successfully.
BUG=b:317009620

Signed-off-by: Mingjin Ge <mingjin.ge@mediatek.corp-partner.google.com>
Change-Id: I5d081ff3e7367b87fab5ebdcb148c9005ab583f5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84022
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-08-29 13:52:53 +00:00
Mingjin Ge
1b0ef438db soc/mediatek/mt8196: Add USB host support
Add USB host function support.

TEST=read usb data successfully.
BUG=b:317009620

Signed-off-by: Mingjin Ge <mingjin.ge@mediatek.corp-partner.google.com>
Change-Id: Ia4efcddac9bf5e04e688648a5c22384075a0b026
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84023
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-08-29 13:52:39 +00:00
Sean Rhodes
ab663c3cb9 Update fsp submodule to upstream main
Updating from commit id 800c857:
2024-06-25 15:47:28 +0800 - (Update Fsp.fd)

to commit id 68328e2:
2024-08-05 16:00:43 +0800 - (NEX ADL-PS IPU 2024.4 (5045_03) FSP)

This brings in 10 new commits:
* NEX ADL-PS IPU 2024.4 (5045_03) FSP
* NEX ADL-P IPU 2024.4 (5045_03) FSP
* NEX ADL-S IPU 2024.4 (5045_03) FSP
* IoT MTL-UH_MTL-PS MR1 (4053_57) FSP
* NEX RPL-S MR4/RPL-S Refresh MR2 (5134_02) FSP
* NEX RPL-P MR2 (5134_02) FSP
* NEX ADL-P IPU 2024.3 (5045_02) FSP
* NEX MTL-UH & MTL-PS Post PV
* Iot ADL-N MR5 (5132_00)
* remove file

Change-Id: Ief40f675556bce662601d7d8db6660f72dc35961
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84111
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-29 12:33:24 +00:00
Sean Rhodes
853b90343d Update intel-microcode submodule to upstream main
Updating from commit id 5278dfc:
2024-05-31 18:42:47 -0600 - (microcode-20240531 Release)

to commit id 2f56505:
2024-08-14 19:59:27 -0600 - (microcode-20240813 Release)

This brings in 1 new commits:
2f56505 microcode-20240813 Release

Change-Id: I5cf5d78bcda07f742a8282b84a1c8336e6a23594
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84110
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-29 12:33:04 +00:00
Maxim Polyakov
7f68483e28 util/hda-decoder: Protect 'fields' slice if empty string
This avoids panic if the file contains an empty string or an incorrect
configuration:

goroutine 1 [running]:
main.decodeFile({0x7ffd63da92a0?, 0xc000014070?}, 0x8?)
	/path/to/coreboot/util/hda-decoder/main.go:72 +0x2ef
main.main()
	/path/to/coreboot/util/hda-decoder/main.go:158 +0x2a5

Change-Id: I9ae8544e52d82e8d8a82a88a85a2de7d2f295ec1
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84101
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-29 12:32:01 +00:00
Kenneth Chan
00610d57fa mb/google/brya/var/nova: Configure scaler I2C GPIOs
According to schematics, add GPP_H4/H5 configuration for scaler I2C pins (PCH_I2C_SCALER_SDA/SDL).

BUG=b:358439747
TEST=emerge-constitution coreboot chromeos-bootimage. Build successfully and boot to verify I2C.

Change-Id: Id831f594d6a57ed10867ae5ba05ae98c90ac7d9b
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84091
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-08-29 12:31:10 +00:00
Simon Yang
40867e7b47 soc/intel/alderlake: Add Vccin Aux Imon Iccmax setting
According to RDC#646929 Power Map, there are two expected values of
VccInAuxImonIccImax and the value has to align with HW design.

But in current code, vccin_aux_imon_iccmax is hard code to 27000 (27A),
hence, provide a config for projects modification.

BUG=b:330117043
BRANCH=firmware-nissa-15217.B
TEST=Modify the register and add a printk to output a debug message
     to observe whether the value is changing as expected.

Change-Id: I0651f0eb8a5c32b27c524e43bbf6f2a184b95657
Signed-off-by: Simon Yang <simon1.yang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82682
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
2024-08-29 12:30:29 +00:00
Martin Roth
ced2a017f2 util/scripts: Add script to capture commands from build
This allows better debugging of the build by writing all the commands
run by the build into a file by replacing the standard shell.

Run with:
make SHELL="${PWD}/util/scripts/capture_commands.sh"

This will allow us to verify that the commands being run are posix
compliant.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I67efc5096747c2e746642639f88273132e070e49
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83442
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-28 17:14:28 +00:00
Karthikeyan Ramasubramanian
d15c1035b9 mb/google/brox/var/lotso: Remove STORAGE_UNKNOWN fw_config option
With `probe unprovisioned` fw_config rule, there is no need to define an
explicit STORAGE_UNKNOWN option. Hence remove it.

BUG=None
TEST=Build Lotso FW image.

Change-Id: Ia170a6e006cb51e95fbaf3efe1106ca907165eca
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84094
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Bob Moragues <moragues@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-28 16:46:39 +00:00