Commit graph

62,395 commits

Author SHA1 Message Date
Arthur Heymans
00783211c0 arch/arm64: Use -mno-implicit-float with clang
This fixes building inline assembly that uses SIMD registers. This is
for instance the case in the vboot library.

Change-Id: I24fa9d9f81430ea3ecd40de4304a10c6e235fece
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81658
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-10-02 09:19:15 +00:00
Arthur Heymans
8eb59d8122 soc/qualcomm/sc7{1,2}80: Increase early stages size for clang
Clang builds slightly larger binaries so increase the section.

The qcsdi is used for an external blob that is currently not in use so
reducing the size is fine for now.

Change-Id: Ide01233f209613678c5408f1afab19415c1071be
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-10-02 09:18:42 +00:00
Jeremy Compostella
c383dfbcfa soc/intel/pantherlake: Delete duplicated line
BUG=348678529
TEST=Build successful

Change-Id: Iea26d962748116fa84afdb4afcba1098a64b6987
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84607
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-02 03:22:44 +00:00
Subrata Banik
2f8bee7d54 soc/intel: Deprecate SoC-specific global reset status configs
This change removes the SoC-specific `FSP_STATUS_GLOBAL_RESET_REQUIRED_X`
Kconfigs, as they are no longer necessary for handling FSP global reset
requests.

Previously, these Kconfigs were used to select a specific 32-bit reset
status code. However, with the introduction of FSP 2.4 and 64-bit
interfaces, the global reset status code can now vary between
architectures.

To address this, the FSP driver now sets the `FSP_STATUS_GLOBAL_RESET`
config to a common default value (depending upon most commonly used
global reset status code) based on the interface:
- 0x40000003 for 32-bit FSP interfaces
- 0x4000000000000003 for 64-bit FSP interfaces

This default can be overridden if an FSP implementation uses a
different status code (for example: Apollo Lake selects different FSP
reset status code as 0x40000005).

By removing the SoC-specific configurations, this change simplifies
global reset handling and ensures compatibility across different FSP
versions and platforms.

Below table shows the relationship between Platform, FSP and FSP Global
Reset Status:
+-----------------+--------------+-------------------------+
| Platform        |  FSP         |    Global Reset Status  |
+-----------------+--------------+-------------------------+
| Alder Lake      |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Apollo Lake     |  32-bit      |    0x40000005           |
+-----------------+--------------+-------------------------+
| Cannon Lake     |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Elkhart Lake    |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Jasper Lake     |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Meteor Lake     |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Sky Lake        |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Tiger Lake      |  32-bit      |    0x40000003           |
+-----------------+--------------+-------------------------+
| Panther Lake    |  64-bit      |    0x4000000000000003   |
+-----------------+--------------+-------------------------+

BUG=b:347669091
TEST=Verified FSP requested global reset functionality on google/rex0
(32-bit) and google/rex64 (64-bit) platforms.

w/ 32-bit FSP:

```
(Wdt) AllowKnownReset
[FspResetSystem2] FSP Reset Initiated
FSP returning control to Bootloader with reset required return status
40000003
FSPS, status=0x40000003
FSP: handling reset type, status=0x40000003
GLOBAL RESET!
global_reset() called!
HECI: Global Reset(Type:1) Command
```

w/ 64-bit FSP:

```
(Wdt) AllowKnownReset
[FspResetSystem2] FSP Reset Initiated
FSP returning control to Bootloader with reset required return status 3
FSPS, status=0x4000000000000003
FSP: handling reset type, status=0x4000000000000003
GLOBAL RESET!
global_reset() called!
HECI: Global Reset(Type:1) Command
```

Change-Id: I32bdbf7ea6afa7d5e5f91ea96d887719d26a593f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84572
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
2024-10-02 03:06:02 +00:00
Yu-Ping Wu
e5cce00552 libpayload: Remove default empty implementations in mock cache.h
The mock/arch/cache.h file exists for libpayload unit tests. However,
the default implementations (as empty macros) in it make these functions
difficult to mock in unit tests.

Therefore, we follow what's done for mock/arch/io.h, by only including
function declarations in the header. Each test is expected to implement
mocks for these cache functions when required.

Change-Id: Ie4383bf95435fd7d74d624b19b79b5a117cf6d00
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Hsuan-ting Chen <roccochen@google.com>
2024-10-02 02:30:12 +00:00
Subrata Banik
caefaaa093 util/lint: Use bigint for hexadecimal values in handle_range
The `handle_range` function in `kconfig_lint` was failing to correctly
handle large hexadecimal values (64-bit value) due to limitations with
Perl's handling of standard integers.

This commit modifies the function to use the `bigint` pragma, enabling
it to handle arbitrarily large integers. This prevents issues with
64-bit hexadecimal values and ensures accurate comparisons for range
validation.

Change-Id: I402bb9bec9ba5bfb79b4185f35228c41d4a7b674
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84575
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 21:35:20 +00:00
Subrata Banik
c74de0dea7 soc/intel: Correct return type of fsp_get_pch_reset_status()
The `fsp_get_pch_reset_status()` function returns a FSP reset status
code. This change corrects its return type from `uint32_t` to
`efi_return_status_t` to ensure consistency with the FSP API and
prevent potential issues caused by type mismatch.

This correction is necessary for compatibility with both 32-bit and
64-bit FSP interfaces.  The change also updates all callers of this
function in the Meteor Lake and Panther Lake SoCs to use the correct
return type.

Includes `fsp/api.h` to provide the `efi_return_status_t` definition.

BUG=b:347669091
TEST=Verified global reset functionality on google/rex0 (32-bit) and
     google/rex64 (64-bit) platforms.

Change-Id: I0cdee541506bf424f50fd00833d5ee200a3a8a48
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84571
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 21:34:49 +00:00
Sean Rhodes
2ec9addc30 drivers/usb/acpi: Add a Power Resource for Intel Bluetooth
Add a Power Resource for Intel Bluetooth, that can reset
the Bluetooth using the delay configured in the DSM.

Change-Id: I3b25fd180e21100e3cb001fc6ba0da7f47b2ad12
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84146
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 16:37:51 +00:00
Sean Rhodes
f0e1b8b149 soc/intel/common/cnvi: Add CNMT Mutex
Add "CNMT" Mutex, that will be used by the Bluetooth and CNVi
driver.

Change-Id: I607865458f925d6f4aa713e07cfa34e83b2e5c8f
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84598
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 16:36:41 +00:00
Maxim Polyakov
6b2d756be2 soc/intel/cannonlake: Fix USB port numbers
It should be in HEX.

Change-Id: I15a354bae414ad94a2f76030b3099179022b935c
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84546
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 15:11:14 +00:00
Sean Rhodes
3ba7ab256c mb/starlabs/starbook/adl: Disconnect SCI/SMI GPIOs
The platform uses eSPI so these are not needed.

Change-Id: I507aa59fcf2540ae6170896a51aa952f5e73eee8
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83691
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 15:10:57 +00:00
Patrick Rudolph
77b5eebdc6 mb/ibm/sbp1: Add SMMSTORE
Add SMMSTORE to the default FMAP to allow using UefiPayload on
this board that requires a non-volatile variable store.

TEST: Booted an UEFI compatible OS using EDK2 as payload.

Change-Id: I32fb0a882c62e42da9f3caec54f8d33333fc8598
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84559
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 10:31:29 +00:00
Elyes Haouas
7a9b072b28 tree: Use boolean for dptf_enable
Change-Id: Ic6e578199e7e4ca3a014eecb1eb7a4d9d24893b8
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84161
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-01 09:18:10 +00:00
Jameson Thies
920c0a6045 chromeec/ec_acpi: Define ACPI devices for USB-C ports using UCSI
Add support to define ACPI devices for USB-C ports using UCSI. When
defining the typec configuration do not set mux/retimer information.
cros_ec_ucsi does not support setting USB muxes.

BUG=b:349822718
TEST=emerge-brox coreboot chromeos-bootimage. Boot to OS on brox,
confirmed that there are ACPI devices for each USB-C port and
cros_ec_ucsi correctly matched the ACPI devices ("ls -l
/sys/class/typec" with an update to add an ACPI match table to
the cros_ec_ucsi driver).

Change-Id: Ie7c281fe2a7fab705d3c238dcc4be68c93afd652
Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84404
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 16:54:44 +00:00
Naresh Solanki
460e2173eb device_util: Add support for GICv3 path in device path handling
Change-Id: Ib4004c1f1b854a54dfdf9eaa7f25583dec947302
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79972
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 16:31:37 +00:00
Gang Chen
b161d90f06 arch/x86: Configure EBDA through Kconfig
EBDA (Extended BIOS Data Area) is a memory area below 0xA0000 and
one of the default areas where OS will scan ACPI RSDP pointer from.

coreboot's default EBDA's starting address is 0xF6000, which is in
PAM (Programmable Attribute Map) F-segment's scope. For some platforms
without writeable PAM-F segment (e.g. some simics virtual platforms),
corboot's default EBDA is not writable.

Make DEFAULT_EBDA_LOWMEM, DEFAULT_EBDA_SEGMENT, DEFAULT_EBDA_SIZE
as Kconfig items so that coreboot's EBDA could be relocated to a
writable low memory place.

Change-Id: Icd7ba0c902560f7d498934392685dc2af9c5ce09
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Co-authored-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-09-30 16:25:34 +00:00
Maximilian Brune
540d605f48 soc/amd/glinda: Update pci int defs
Update IRQs according to datasheet/PPR.

source:
PPR #57254 Rev 1.59 Table 137

Change-Id: I843e5e2b01301eb02cb5be347e122cffbe76d80d
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84375
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 16:22:20 +00:00
Maximilian Brune
aed7a871b2 soc/amd/glinda: Update gpp bridge naming scheme
This patch updates the naming scheme used for the GPP bridges.
The naming scheme now matches what we also have on phoenix.

Change-Id: I9f740d75a3561dba2ed65acb16bb4259f632307d
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84378
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-09-30 15:50:16 +00:00
Jincheng Li
16110c0778 mainboard/intel/beechnutcity_crb: Update full IIO configuration
Change-Id: I7f4f5406df8ff82b8d3052ff0f370c280967affd
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84319
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 11:17:18 +00:00
Maximilian Brune
db96c9634e soc/amd/glinda: Update SCI mapping
source: PPR #57254 Rev 1.71

Change-Id: I5eaed888109b89c25bcf0ba91abefa7c36c1851b
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84381
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 11:16:50 +00:00
Maximilian Brune
814f1a4e46 soc/amd/glinda/include/soc/smi.h: Update for glinda
It aligns the names in the datasheet with the one in the code. It also
removes and adds some.

Resource: Document 57254 Chapter 15.3.5

TODO it may very well be that I don't have the full truth, because most
of these register just have a different name and some of these names
like ESPI seem more recent that for example LPC.

Change-Id: Iad848ff400ef80777d0cbb2b582b9b5fa8bf11f3
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84383
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-09-30 11:15:56 +00:00
Maximilian Brune
8775271398 soc/amd/glinda: Remove non-exisiting I2C definitions
Glinda doesn't contain I2C4 and I2C5 like Mendocino it was copied
from. Remove their definitions.

Reference: Document 57254

Change-Id: I676e76aa2309d9ab82d63b48a2dec3c100241131
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84382
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-09-30 11:15:34 +00:00
Shon
ebda9fc16b mb/google/brya/var/bujia: Add Wifi SAR for bujia
Add wifi sar for bujia.

BUG=b:345364452
BRANCH=firmware-brya-14505.B
TEST=emerge-brask coreboot-private-files-baseboard-brya coreboot
chromeos-bootimage

Change-Id: I5a67f3723a9dc33793a5cd95f9a3a2596c3c1fc6
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84501
Reviewed-by: Jayvik Desai <jayvik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
2024-09-30 11:14:54 +00:00
Arthur Heymans
4a334bc9a1 mb/google/kahlee/var/careena: Make sure bid isn't used uninitialized
GCC with LTO cought this.

Warning:
src/mainboard/google/kahlee/variants/careena/variant.c:44:12: error: 'bid' may be used uninitialized [-Werror=maybe-uninitialized]
   44 |         if (bid == 7)
      |            ^
src/mainboard/google/kahlee/variants/careena/variant.c: In function 'car_stage_entry':
src/mainboard/google/kahlee/variants/careena/variant.c:24:18: note: 'bid' was declared here
   24 |         uint32_t bid;

Change-Id: Ie732b5be5cd9dc0abaf1a5efe023bcb0738dba1d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84206
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 11:12:42 +00:00
Alexander Couzens
544fb8c296 inteltool: elkhartlake: keep the same names as coreboot code uses
coreboot doesn't have a leading zero in gpio < 10.
E.g. G00 -> G0

Change-Id: I4558cec444ae2a081fbc0f49464354df222be6c9
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84190
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
2024-09-30 11:11:21 +00:00
Jarried Lin
ced0c208e4 soc/mediatek/mt8196: Fix timer reset in BL31
After reboot, the system does not need to serve pending IRQ from
systimer. Therefore, clear systimer IRQ pending bits in init_timer().
For that to work, the systimer compensation version 2.0 needs to be
enabled.

TEST=Build pass and timestamp is not reset in ATF and payload
BUG=b:343881008

Change-Id: I520986b81ca153ec3ce56558a80619448cfc0c59
Signed-off-by: Zhanzhan Ge <zhanzhan.ge@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83928
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-09-30 11:11:01 +00:00
Nicholas Sudsgaard
16fe2eec08 drivers/i2c/at24rf08c: Disable DRIVER_LENOVO_SERIALS by default
This should be the sane default, as having this option enabled when the
AT24RF08C (Asset Identification EEPROM) is not present on the mainboard
can cause SMBIOS table entries to become "*INVALID*". This can,
for example, result in strange hostnames when an OS installer uses
SMBIOS information to automatically generate one. On the other hand,
the coreboot generated SMBIOS tables will at least always contain basic
information. Therefore, this driver should be treated as an enhancement
rather than a default.

Currently, the following mainboards have this option disabled:

  - ThinkCentre M710s
  - ThinkCentre M700 / M900 Tiny
  - Haswell ThinkPads
    - ThinkPad T440p
    - ThinkPad W541

Therefore, we can remove this option entirely on these mainboards. Note
that there may be other mainboards which do not have this chip present
but still have the option enabled. However, this requires a more
detailed investigation which would be out of scope of this change.

TESTS=Timeless builds on lenovo mainboards produce the same binary.

config INCLUDE_CONFIG_FILE
	default n

Was temporarily added to `mb/lenovo/Kconfig` during these tests, as
while the configuration does not change, the order of entries do.
Therefore, technically producing a different binary when included.

Change-Id: I5bb101bd6696c39718ee779426d0ec3e721e1b51
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84544
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-09-30 11:09:34 +00:00
David Wu
824071ae67 mb/google/nissa/var/riven: Add 2 memory parts and generate DRAM IDs
Add two new memory parts
1. K3KL8L80CM-MGCT (Samsung)
2. H58G56BK8BX068 (Hynix)

BUG=None
TEST=Run part_id_gen tool and check the generated files.

Change-Id: I557b359d9e639f6c3fac4239eb28aa7e0bed4c0e
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84529
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-30 11:07:58 +00:00
Nicholas Sudsgaard
ae49d5cd4f mb/starlabs/byte_adl/mk_ii: Correct number of jacks in hda_verb.c
This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: Ibb167b8dc379ca331812255c3e7e049556f2b57b
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-09-30 11:07:25 +00:00
Nicholas Sudsgaard
ca83dc2309 mb/google: Correct number of jacks in hda_verb.c
This corrects the mismatch found in the verb tables of Monroe Chromebase
and Link Chromebook.

The verb data was not aligned to a multiple of 4, therefore an entry was
repeated as padding.

This was found due to the `_Static_assert()` from CB:84360 failing.

TEST=Tested on LINK under Linux and Win11, audio working properly under both.

Change-Id: Id377281af310642a6ba77e5a0002ca1dfca38827
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84414
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 11:07:11 +00:00
Nicholas Sudsgaard
6638b40691 mb/samsung/lumpy: Correct number of jacks in hda_verb.c
The verb data was not aligned to a multiple of 4, therefore an entry was
repeated as padding. This has not been tested.

This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: I3a40e6229419ee7d1a238916ee6d49cf9314f6ab
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84395
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 11:01:42 +00:00
Nico Huber
520f20ef52 libgfxinit: Allow to configure screen rotation
This allows to configure a default screen rotation in 90-degree
steps. The framebuffer contents will then be displayed rotated,
by the same amount in the other direction; i.e. if you turn the
screen to the left, the picture has to be rotated to the right
to accommodate.

This is only supported by libgfxinit from Skylake / Apollo Lake
on (earlier GPUs didn't support the 90-degree steps anyway) and
it only works with the linear-framebuffer option.

Change-Id: Iac75cefbd34f28c55ec20ee152fe67351cc48653
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38922
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-09-30 11:01:09 +00:00
Paul Menzel
ec7e41dd75 soc/intel/common: systemagent: Fix typo in HAVE_BDSM_BGSM_REGISTER help text
regist*re*s → regist*er*s

Change-Id: Ie5f5cb481f0fac335e592fd3f1f56d5462e37c1e
Fixes: 2b0b2ef9a2 ("soc/intel/common/systemagent: select CAPID_A, BDSM and BGSM by Kconfig")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84492
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
2024-09-30 11:00:45 +00:00
Michał Żygowski
dd5676e6e5 util/superiotool/ite: Add extra dumps for IT8613E EC
IT8613E EC space is divided into 3 banks selectable by EC index 0x06
bits 6:5. Bank0 mostly contains the ITE EC registers known by
coreboot's ITE EC driver. Bank1 contains SB_TSI and PECI temperature
reading registers. Bank2, however, contains additional registers used
to select the temperature source reported in TMPIN reading registers,
PECI bridge registers as well as FAN2-5 controls and extra vectors.

Dump the additional banks using extra-selectors.

Based on non-public IT8613E Preliminary Specification V0.3.

TEST=Perform the IT8613E dump on Hardkernel ODROID H4+.

Change-Id: Ic8fdc56d1b0fbe811e13bc6b800512af654c1cb6
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Maxim <max.senia.poliak@gmail.com>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marvin Drees <marvin.drees@9elements.com>
2024-09-30 10:53:50 +00:00
Kun Liu
9a9191cf2f mb/google/brox/var/lotso: Fix goodix touchscreen power off sequence
Poweroff does not seem to use the ACPI _OFF function, but rather the
smihandler.  Creating variant_smi_sleep function for nami to handle
the power off sequence during reboot/poweroff.

BUG=b:364193909
TEST=emerge-brox coreboot

Change-Id: I0108be4e5e7c0265aae0f16fd4e2b7cbe5936112
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84412
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 08:11:53 +00:00
Kun Liu
bda33e1585 mb/google/brox/var/lotso: Update DTT settings for thermal control
Update DTT settings according to b:348285763#comment20 in
order to increase the limit of the charging current to 3A.

BUG=b:348285763
TEST=emerge-brox coreboot, and thermal engineer verifies OK.

Change-Id: I24978afd819666f635c85f2be9b71d39e0a39f27
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84527
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30 08:11:33 +00:00
Ren Kuo
4f94337f4f mb/google/brox/jubilant: Modify start-up timing for WWAN RW101R-GL
Modify start-up timing for WWAN RW101R-GL to follow spec:
PWR_EN	 H     H    H
FCPO#    Tpr   H    H
RESET#   L    Ton   H

Tpr: delay for Power stable (>0ms)
Ton: delay for reset time   (>20ms)

BUG=b:349698817
BRANCH=None
TEST= Build firmware and verify on jubilant with RW101R-GL
      Measure the start-up timing sequence to meet spec
      Boot up in OS, and confirm WWAN can connect to cell site

Change-Id: I7aa3e7a172143ff1cebea7f48bda45d4fb2c77f7
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84413
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-09-30 04:24:41 +00:00
Nicholas Chin
a0dc215c9b Makefile: Fix no-op incremental build
If make is ran a second time after an initial clean compile, the entire
rom will be rebuilt. Subsequent calls to make will not rebuild the rom.
This initial rebuild was due to build/util/kconfig/conf being newer than
config.h, and the subsequent rebuild of the header marked everything
else as out of date. The reason conf was newer than config.h is because
it was being treated as an intermediate file [1]. In the rule for
config.h, conf is a prerequisite, but since it is treated as an
intermediate, its rule will not be run if config.h exists and all the
prerequisites of conf (i.e. its source files) are also up to date.

On a clean build after a make menuconfig, config.h exists, satisfying
these conditions. In this case, config.h is treated as being up to date
even though conf does not exist. However, if another target does not
exist and also has conf as a prerequisite, conf will then be built so
that the target can be built. This caused conf to be newer than
config.h, but by default GNU Make deletes intermediate files after a
build which would prevent conf from affecting config.h on subsequent
rebuilds.

However, commit dd6efce934 ("Makefile: Add .SECONDARY") adds the
.SECONDARY special target, which prevents intermediate files from being
deleted after the build [2]. Thus, conf persists to the first no-op
build, making config.h out of date. Since config.h is updated during
this first rebuild, conf is no longer newer than it, and thus subsequent
no-op builds behave as expected.

Fix this by preventing conf from being treated as an intermediate file
by adding it as a prerequisite of the .NOTINTERMEDIATE special target,
which causes conf to always be rebuilt if it does not exist. Thus, on
the initial clean compile, config.h will be updated after building conf
as a prerequisite, preventing config.h from being marked out of date on
a subsequent rebuild.

[1] https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html
[2] https://www.gnu.org/software/make/manual/html_node/Special-Targets.html

Change-Id: I98c49d47f811e5cceebce7b7d54b282c773734e3
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84385
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-28 20:46:07 +00:00
Nicholas Chin
8651731537 sconfig: Move config_of_soc from device.h to static.h
Many sources include device.h and thus static.h, but many only need the
function declarations and type definitions, not the compiled devicetree
from sconfig. This causes many unnecessary recompiles whenever the
devicetree is updated due to the dependency. Address this by moving the
config_of_soc macro directly into the generated static.h header, as it
seems to be the only line in device.h that actually requires static.h.
For now, static.h remains included in device.h so that the build is not
affected. Subsequent commits will include static.h directly into sources
that actually need it, after which it can be dropped from device.h.

Some statistics for C objects:

Dell Latitude E6400 (GM45/ICH9):
669 total objects
181 depend on static.h
2 require static.h

Dell Latitude E6430 (Ivy Bridge/Panther Point):
693 total objects
199 depend on static.h
3 require static.h

Lenovo ThinkCentre M700 / M900 Tiny (Kaby Lake):
794 total objects
298 depend on static.h
23 objects require static.h

MSI PRO Z690-A (WIFI) DDR4 (Alder Lake):
959 total objects
319 depend on static.h
25 require static.h

The number of objects was determined by grepping the build log for
calls to CC, the number of objects that depend on static.h was
determined by grepping for calls to CC after touching static.h, and the
number of objects that actually require the static.h related lines from
device.h was determined by grepping for objects that failed to build
after removing the static.h lines from device.h and running make with
the --keep-going flag.

Change-Id: I7c40135bf2815093b81e47201c38b7d0a6ac8fa8
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-28 20:44:40 +00:00
Jeremy Compostella
be5745f79f soc/intel/pantherlake: Add FSP-M programming
FSP-M UPDs are programmed according to the configuration (Kconfig and
device tree).

BUG=348678529
TEST=Memory is initialized successfully and hardware is programmed as
     desired on Intel pantherlake reference board.

Change-Id: Iea26d962748116fa84afdb4afcba1098a64b6988
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84443
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-28 18:52:38 +00:00
Ronak Kanabar
7e5765710a vc/intel/fsp: Update PTL FSP headers from dummy headers to v2382_01
Update generated FSP headers for Panther Lake from v2382_01

Changes include:
- Update FspmUpd.h, FspsUpd.h, MemInfoHob.h and FirmwareVersionInfo.h

BUG=b:348678529
TEST=Able to build google/fatcat

Change-Id: Ibe382615db1a7c7a0841d8fe4ae43c226e2c2020
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-28 18:09:34 +00:00
YH Lin
76a16f8e8a mb/google/fatcat/var/fatcat: add support for wifi sar table
Add wifi sar table support for fatcat. Bit 4-5 in CBI/FW_CONFIG
is used to select different sar table (index 0 to 3).

BUG=b:348678529
TEST=emerge-fatcat coreboot chromeos-bootimage

Change-Id: I2d82f76d7c11378ee5c221a6b9621b4cba83720d
Signed-off-by: YH Lin <yueherngl@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84556
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-09-27 21:10:00 +00:00
Jeremy Compostella
2a3b9b2ad5 soc/intel/pantherlake: Comply with the no typedef coding style rule
As https://doc.coreboot.org/contributing/coding_style.html#typedefs
states: "In general, a pointer, or a struct that has elements that can
reasonably be directly accessed should never be a typedef". This
commit makes the Intel Panther Lake SoC code comply with this by using
explicitly `struct soc_intel_pantherlake_config' in the
soc/intel/pantherlake code as I have been suggested to for the
`fsp_params.c' files. The rule being the rule and consistency across
a project matters more than personal preferences.

The documentation lists five exceptions and none on them cover the use
of `config_t' instead `struct soc_intel_pantherlake' but I believe it
does not make the code better for the following three reasons:

1. It is repetitive, make the line longer and the code is in
   soc/intel/pantherlake so obviously the config_t data structure is
   the pantherlake soc configuration.

2. It makes re-usability from one generation to another unnecessarily
   harder.

3. This config_t abstraction is required for and used by some common
   block code anyway. Hence, we end-up with some code using `config_t'
   and other using the final structure which break the consistency of
   the code when the project in looked as a whole.

BUG=348678529
TEST=Google fatcat mainboard compiles

Change-Id: Ibe382615db1a7c7a0841d8fe4ae43c226e2c2021
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84561
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
2024-09-27 17:04:24 +00:00
David Milosevic
b29b66c5f5 mb/hardkernel/odroid-h4: Add support for ODROID-H4 series
Add support for the ODROID-H4 family of boards. Tested on an ODROID-H4+
board, but all of them use the same PCB (with different components).

The four SATA ports on the mainboard are provided by an onboard ASMedia
ASM1064B PCIe-to-SATA bridge. Unlike other mainboards in the tree using
an ASMedia ASM1061 or ASM1062 PCIe-to-SATA bridge, the ODROID-H4+ comes
with a SPI flash chip for the ASM1064B and does not seem to have issues
regarding PCIe power management (e.g. ASPM) or unusable SATA AHCI mode.

The ODROID-H4 comes with a single 16 MiB SPI flash chip. The ODROID-H4+
and the ODROID-H4 Ultra feature Dual BIOS, consisting of another 16 MiB
SPI flash chip and a 3-pin header to select between them. The board can
be flashed internally or using a SOIC-8 clip, but the M.2 slot may need
to be empty for the clip to fit.

Working:

 - DDR5 SO-DIMM slot
 - All SATA ports on ASMedia ASM1064B PCIe-to-SATA controller
 - UART to emit spam
 - All video outputs (FSP GOP only lights up one output at a time)
 - All USB ports (on the Ethernet connectors and on EXT_HDR1)
 - M.2 M connector (PCIe only)
 - PCIe power management
 - Ethernet NICs
 - eMMC
 - HD audio codec and display audio
 - S3 suspend/resume
 - SeaBIOS <current version>
 - MrChromebox edk2 <current version>
 - Super I/O HWM on Linux (using out-of-tree it87 kernel module)
 - Booting Arch Linux from NVMe and SATA
 - Booting Windows 10 from NVMe

Not working:

 - PECI: undocumented protocol and undocumented Super I/O
 - Resuming on Windows 10 BSODs with `VIDEO_TDR_FAILURE`

Untested:

 - Fan curves: may need to lower the temperature limits a bit

Change-Id: I7e0d395ba3d15dfcf6d47a222b90499ca371e4eb
Signed-off-by: David Milosevic <David.Milosevic@9elements.com>
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83979
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-09-27 11:35:23 +00:00
Jayvik Desai
235c603a33 mb/google/brya: enable config DRIVER_INTEL_ISH_HAS_MAIN_FW for trulo
Trulo ISH uses the MAIN FW loaded by the kernel driver. This commit
enables DRIVER_INTEL_ISH_HAS_MAIN_FW for trulo, which skips printing the
ISH BUP version.

BUG=b:360144613
TEST=Local build successful and tested on trulo by toggling the
config. enabling this config skips printing the ISH version in cbmem.
1. CONFIG enabled
```
trulo-rev1 ~ # cbmem -c | grep ISH
[INFO ]  \_SB.PCI0.ISHB: Set firmware-name: ish_fw.bin
```
2. CONFIG disabled
```
trulo-rev1 ~ # cbmem -c | grep ISH
[DEBUG]  ISH version: 5.4.2.36864
[INFO ]  \_SB.PCI0.ISHB: Set firmware-name: ish_fw.bin
```

Change-Id: Ifebd563ec8ddb0378e1215a90396687857f3f71d
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84494
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-27 05:47:53 +00:00
Jayvik Desai
220d8e009b driver/intel/ish: Add config to indicate the presence of ISH MAIN firmware
This commit introduces a new config DRIVER_INTEL_ISH_HAS_MAIN_FW to
indicate that the Intel Sensor Hub (ISH) is using the ISH MAIN firmware.
The ISH MAIN firmware is located in rootfs, hence we no longer need to
store the ISH BUP version in the CSE partition.

When this config is enabled, fetching the ISH BUP version from the CSE
firmware partition is skipped.

BUG=b:360144613
TEST=Local build successful and tested on trulo by toggling the
config. Enabling this config skips printing the ISH version in cbmem.

Change-Id: I6cacf7b44ce6895ecb96db295d184c7b7d5a872c
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84493
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-09-27 05:47:48 +00:00
Subrata Banik
7d8ad558bc mb/google/fatcat/var/fatcat: Add initial FW_CONFIG
BUG=b:348678529
TEST=Able to build google/fatcat.

Change-Id: I5c90aac4873dcc57e65e641656dca3a96f84d6b8
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84543
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-27 04:13:05 +00:00
Maximilian Brune
643b28f518 soc/amd/glinda/chipset.cb: Add missing devices
Source: Document 57254

Change-Id: I9675d45eba257e52d9a870a4cc153b925267f840
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84377
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-09-26 21:53:15 +00:00
Maximilian Brune
bd1887ddd4 mb/amd/birman*/devicetree_glinda.cb: Add usb3_port1
Change-Id: Ida2499d9894aa99f341c7a6ef2cd93b3f8ea61fe
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84437
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-09-26 21:52:43 +00:00
Satya SreenivasL
f3d95fb75c soc/amd/glinda/chipset.cb: Update for glinda
This also updates the mainboards depending on it.

Change-Id: I1138f27bfd47f6fa70a0c2afcc65a5553a609d57
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84376
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-26 21:52:12 +00:00