Commit graph

13,380 commits

Author SHA1 Message Date
Lu, Pen-ChunX
f214acd6e5 soc/intel/xeon_sp: Add acpigen_write_PRT_pre_routed
acpigen_write_PRT_pre_routed writes _PRT covering all direct
subordinate child devices based on interrupt line/pin info from
their PCI configuration spaces. It is required that IRQ routing
and PCI configuration space update to be done ahead of time.

TEST=Build and boot on intel/archercity CRB

Change-Id: Ic54888f76d2ec9804442bec5aec54267d9a16d7c
Signed-off-by: Lu, Pen-ChunX <pen-chunx.lu@intel.com>
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/+/82253
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-11-07 10:01:18 +00:00
Yidi Lin
a80461f84b soc/mediatek/common: Use write32p and read32p for tracker
TEST=emerge-geralt coreboot

Change-Id: I9ee64677e9126789a07db1963a2c17a504cb4d9c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84959
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-07 09:38:37 +00:00
Yidi Lin
d9b0f5a577 soc/mediatek/common: Refactor struct tracker
Rather than using a static array size for the `offset` variable, use a
pointer named `offsets` that points to a dynamically allocated array. A
separate variable called `offset_size` stores the size of this array.

TEST=emerge-corsola coreboot && emerge-geralt coreboot

Change-Id: I4b89c27fd693ee08e670c1a9ab4cbdbec220bee7
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84958
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-11-07 09:38:31 +00:00
Karthikeyan Ramasubramanian
1d9bddf163 soc/intel/alderlake: Fix uninitialized usb_cfg pointer
This patch addresses uninitialized usb_cfg pointer warning which is also
an error - src/soc/intel/alderlake/fsp_params.c:936:48: error: 'usb_cfg'
may be used uninitialized in this function [-Werror=maybe-uninitialized]

BUG=None
TEST=./util/abuild/abuild

Change-Id: I764fed561dfe2a571f3404fe505997edd7aa5ff7
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84939
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-06 22:43:16 +00:00
Ronak Kanabar
198a2fcac6 soc/intel/alderlake: select UDK_202305_BINDING for RPL
RPL FSP v5311 uses 202305 Edk2. Select UDK_202305_BINDING Kconfig for
RPL SoC.

BUG=b:281846937
TEST=Able to build and boot google/brox.

Change-Id: I8dcc7d85cddadcce148ded5a81658253e8598413
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84722
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jayvik Desai <jayvik@google.com>
2024-11-06 17:00:20 +00:00
Lawrence Chang
d88eeae616 soc/intel/jasperlake: add support for RP LTR mechanism
Reserve Root Port LTR mechanism in FSP, in case some devices
need to optimize LTR.

BUG=366383364
TEST=Tested on Awasuki with RTL8852BE
use lspci -xxx to get PCIE config space dump, and LTR Mechanism Enable
bit is offset 68h[10].
00:1c.0 PCI bridge: Intel Corporation Device 4dbf (rev 01)
00: 86 80 bf 4d 07 05 10 00 01 00 04 06 10 00 81 00
10: 00 00 00 00 00 00 00 00 00 01 01 00 20 20 00 20
20: c0 7f c0 7f f1 ff 01 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 04 12 00
40: 10 80 42 01 00 80 00 00 00 00 10 00 13 4c 72 08
50: 43 00 11 70 00 b2 3c 00 00 00 40 01 08 00 00 00
60: 00 00 00 00 37 08 00 00 00 04 00 00 0e 00 00 00
70: 03 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 05 90 01 00 38 02 e0 fe 00 00 00 00 00 00 00 00
90: 0d a0 00 00 86 80 bf 4d 00 00 00 00 00 00 00 00
a0: 01 00 03 c8 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 01 10 00 07 42 18 01 40 08 00 9e 09 00 00 00 00
e0: 00 03 e3 00 00 00 00 00 16 00 10 00 00 00 00 00
f0: 50 01 00 00 00 00 00 4c b5 0f 02 01 04 00 00 84

Change-Id: I85e50b01cc9fb5522d457cfce3700b7c85d7012f
Signed-off-by: Lawrence Chang <lawrence.chang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84866
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-06 16:47:25 +00:00
Subrata Banik
b9273a1de1 soc/intel/meteorlake: Remove SOC_INTEL_GFX_MBUS_JOIN config
This patch removes the SOC_INTEL_GFX_MBUS_JOIN configuration option.
Support for fast modeset joining has been added to the mainline i915
kernel driver (https://patchwork.freedesktop.org/series/130480/),
making this coreboot-specific workaround unnecessary.

BUG=b:291885733
TEST=Successful build and boot of google/screebo with single and dual
displays, no redundant boot splash.

Change-Id: Ifb0416df53a453ce16815f9fd52ec6b53fade5e2
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81034
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Paz Zcharya <pazz@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-06 12:47:50 +00:00
Runyang Chen
379729b497 soc/mediatek/mt8196: Disable irq2axi feature
Irq2axi translates wire-based interrupt into message signal interrupt.
Since MT8196 uses legacy wire-based interrupt, this feature needs to be
disabled. If the interrupt is not handled, it will cause the system fail
to boot.

TEST=Build pass, check irq2axi_disable log and the interrupt can be
correctly handled by checking /proc/interrupts.
BUG=b:317009620

Signed-off-by: Runyang Chen <runyang.chen@mediatek.corp-partner.google.com>
Change-Id: I0e89a0ee75e574a4b9e8df0a0f6a5f6e03bba2d6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84896
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-06 04:00:26 +00:00
Yidi Lin
ba0ac93452 soc/mediatek/mt8196: Enable EARLY_MMU_INIT
The boot time is improved by 58ms in bootblock. (78ms -> 20m)

BUG=b:361729697
TEST=check cbmem

Change-Id: I27ce378ba8e3744cfb3921835e34b32bbba991cb
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84897
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-06 04:00:18 +00:00
Yidi Lin
1121a7b9cc mb/google/rauru: Complete PCIe reset in romstage
De-assert PERST# at romstage to reduce the waiting time in ramstage.

BUG=b:361728592
TEST=The boot time improves 62ms

Change-Id: I2cd5cd59e7513b6e4036c3e8013a3c7322d2f787
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84895
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-11-06 04:00:11 +00:00
Felix Held
f48dd16995 soc/amd/common/psp_smi_flash: refactor SPI controller busy check
Since the functions that call 'spi_controller_available' end up checking
if the SPI controller is busy, refactor the function into
'spi_controller_busy' to simplify the logic on the caller's side. Also
move printing of the notice that the SPI controller is busy to
'spi_controller_busy' to not have that duplicated in caller.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibc21ab6eacf07c4adffdb4658142c2f9dfcbf2a1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84920
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-05 15:02:59 +00:00
Felix Held
7571044f9d soc/amd/common/psp_smi_flash: factor out get_flash_device
Since the RPMC-related functions will only need the spi_flash struct,
but not the region_device struct of the store region corresponding to
the 'target_nv_id', factor out 'get_flash_device' from
'find_psp_spi_flash_device_region'.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia99d3454df2c1c4182c193da7de1bbb4eef18313
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84905
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ana Carolina Cabral
2024-11-05 15:02:29 +00:00
Subrata Banik
5e580c79df soc/intel/alderlake: Disable UFS controllers only on S5 resume
Disable UFS controllers during romstage initialization only when
resuming from S5 (full power off).

On warm reboot, the UFS controllers are already disabled by the
previous boot cycle, so disabling them again is unnecessary.

TEST=Able to ensure UFS controller is already disabled in warm reboot
path and not causing any problem during S0ix cycle test.

Change-Id: Ia27d2156a002cef032d5f57d212cf4eb520b3bdf
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jayvik Desai <jayvik@google.com>
2024-11-05 03:35:04 +00:00
Subrata Banik
e3e4eb9989 soc/intel/meteorlake: Disable eSOL for Ovis/Deku
Disable the `FSP_UGOP_EARLY_SIGN_OF_LIFE` option (eSOL) for the
Ovis baseboard.

eSOL currently only supports display output over eDP and HDMI.

Ovis/Deku exclusively use Type-C for display, and eSOL cannot render
output over Type-C during early boot because it depends on Type-C
firmware loaded in a later stage.

TEST=Able to build and boot google/deku.

Change-Id: I5ddbd340f667b1631a42d130a793f0b1831aa0ba
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84981
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2024-11-05 03:33:54 +00:00
Yu-Ping Wu
4873b6bc7a soc/mediatek/mt8188/spi: Fix out-of-bound array access for pad_funcs
The size of the inner array of the 2-dimensional array pad_funcs should
be 4 instead of SPI_BUS_NUMBER (6). This bug leads to two extra
gpio_set_mode() calls with unexpected GPIOs.

Inspecting spi.o, the data immediately after the .rodata.pad_funcs
section is .rodata.spi_ctrlr_bus_map, with the following data:

 00000428  00 00 00 00 00 00 00 00  00 00 00 00 05 00 00 00
 00000438  00 00 00 00 00 00 00 00  ...

This is equivalent to the following calls:

 gpio_set_mode(GPIO(GPIO05), 0);
 gpio_set_mode(GPIO(GPIO00), 0);

The second call is already included in the pad_funcs array, so the first
call is the only practical impact of this bug.

Change-Id: I9c44f09b3cdadbbf039b95efca7144f213672092
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84950
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-11-04 00:09:03 +00:00
Karthikeyan Ramasubramanian
cb11ad06c2 soc/intel/alderlake: Do lazy reset after disabling UFS
If the mainboard expects upcoming reset, then skip the reset after
disabling UFS. This will reduce the number of resets during firmware
update.

BUG=b:375444631
TEST=Build Brox BIOS image and boot to OS. Perform a firmware update and
confirm that the number of reset is reduced by 2 resets.

Change-Id: I4399555302ec23a76f89f406f437f311eea0ef99
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84935
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-11-03 06:45:02 +00:00
Subrata Banik
bc8cc46055 soc/intel/pantherlake: Populate and pass DRAM info for SMBIOS
This patch implements the `save_dimm_info()` API to populate and pass
DRAM-related information to the next stage. This information
is used to generate the SMBIOS memory table, providing details about
installed DIMMs.

This addresses the issue where SMBIOS lacked detailed DIMM information.

Verified that `dmidecode` correctly dumps the DIMM information from the
SMBIOS table after this change.

BUG=b:376103463
TEST=Built and booted successfully. Verified DIMM info in SMBIOS using
`dmidecode`.

> dmidecode -t 17

```
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x000B, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x000A
        Error Information Handle: Not Provided
        Total Width: 16 bits
        Data Width: 16 bits
        Size: 2 GB
        Form Factor: Row Of Chips
        Set: None
        Locator: Channel-0-DIMM-0
        Bank Locator: BANK 0
        Type: LPDDR5
        Type Detail: Unknown Synchronous
        Speed: 6400 MT/s
        Manufacturer: Hynix
        Serial Number: 00000000
        Asset Tag: Channel-0-DIMM-0-AssetTag
        Part Number: H58G56BK7BX068
        Rank: 1
        Configured Memory Speed: 6400 MT/s
        Minimum Voltage: 0.5 V
        Maximum Voltage: 0.5 V
        Configured Voltage: 0.5 V
...
...

Handle 0x0012, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x000A
        Error Information Handle: Not Provided
        Total Width: 16 bits
        Data Width: 16 bits
        Size: 2 GB
        Form Factor: Row Of Chips
        Set: None
        Locator: Channel-3-DIMM-0
        Bank Locator: BANK 0
        Type: LPDDR5
        Type Detail: Unknown Synchronous
        Speed: 6400 MT/s
        Manufacturer: Hynix
        Serial Number: 00000000
        Asset Tag: Channel-3-DIMM-0-AssetTag
        Part Number: H58G56BK7BX068
        Rank: 1
        Configured Memory Speed: 6400 MT/s
        Minimum Voltage: 0.5 V
        Maximum Voltage: 0.5 V
        Configured Voltage: 0.5 V
```

Change-Id: I3b942610272de401589ee0463de9cd0985974774
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84903
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-10-30 07:22:23 +00:00
Subrata Banik
59bf7dd62f soc/intel/pantherlake: Add ACPI names for missing devices
This patch adds ACPI names for the following devices:

- THC0 (PCI: 00:10.0)
- THC1 (PCI: 00:10.1)
- SRAM (PCI: 00:14.2)
- FSPI (PCI: 00:1f.5)

TEST=Able to build and boot google/fatcat without any error.

w/o this patch:

    [ERROR]  Missing ACPI Name for PCI: 00:10.0
    [ERROR]  Missing ACPI Name for PCI: 00:10.1
    [ERROR]  Missing ACPI Name for PCI: 00:14.2
    [ERROR]  Missing ACPI Name for PCI: 00:1f.5

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I474089607522a4bd13375cc34b8f8645ca3663d9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84910
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-10-30 07:21:06 +00:00
Subrata Banik
9ae146df58 soc/intel/pantherlake: Set SMBUS device ACPI min sleep state as D0
This change sets the SMBUS device to min sleep state D0 in the ACPI
sleep state table.

TEST=Able to build and boot google/fatcat.

w/o this patch:

    [WARN ]  Unknown min d_state for PCI: 00:1f.4

w/ this patch:

No Error or Warning.

Change-Id: If84d2ee8abfef34f6411e01e6c37d4e2008a3666
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84909
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-30 07:19:57 +00:00
Elyes Haouas
686b36bab8 tree: Fix cast an object of type 'nullptr_t' to 'uintptr_t' error
This to fix the error when using C23:
cannot cast an object of type 'nullptr_t' to 'uintptr_t' (aka 'unsigned long')
return (uintptr_t)NULL;
                  ^

Change-Id: Ibdc8794513a508fc61a5046692f854183c36b781
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-10-29 01:41:41 +00:00
Patrick Rudolph
9dc9ef3082 uncore_acpi: Clean up resource code
Use the resource size to determine Vtd BAR size and drop the code to
calculate the Vtd BAR size.
While on it do not truncate the resource address to 32-bit, since the
DMAR entry is 64-bit wide anyway.

TEST: Booted on intel/archercity_crb

Change-Id: Ibaadc25c44345ba2eb9e6f75989d32b43d00d7a5
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84829
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-10-28 22:06:41 +00:00
Patrick Rudolph
485f51cf73 soc/intel/xeon_sp: Fix iiostack.asl
Align DSDT names with SSDT naming scheme, as provided by
iio_domain_set_acpi_name() and hide unused devices by implementing
the _STA method as done on newer platforms.

Change-Id: I8488907f28a78a6f71046dba54ba9cbd4b0652eb
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84795
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-10-28 22:06:35 +00:00
Patrick Rudolph
3625b0e0ee soc/intel/xeon_sp: Add SAD PCI driver
Get rid of some helper functions by properly using a pci_driver.

Configure SAD if necessary and lock SAD if necessary in the newly added
SAD PCI driver. This allows to drop lock_pam0123(), unlock_pam_regions()
and socket0_get_ubox_busno().

- Fixes SAD instance on secondary sockets not decoding the C-F segments
  as DRAM, which would prevent those sockets to access the ACPI/SMBIOS
  table anchor
- Adds PCI multi segment support
  (SKX and CPX only, other were working properly already)
- Moves locking of PAM0123_CSR and PAM456_CSR from SoC to driver code

Change-Id: I167b6ce48631fe3f97359ee33704f52ca854dbd1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84794
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-28 22:06:29 +00:00
Felix Held
d5764b8a5a soc/amd/common/psp: add RPMC provisioning code
Add the code to request the provisioning of the RPMC root key from the
PSP. When RPMC hasn't already been provisioned enabled and the PSP has
detected a SPI flash chip that both supports RPMC and has monotonic
counters that can still be provisioned, we send the PSP mailbox command
to request the RPMC provisioning and then reset the system, so the PSP
can do the actual provisioning.

TEST=On an out of tree AMD reference board using the Cezanne SoC code,
provisioning RPMC works as expected when selecting the corresponding
PERFORM_RPMC_PROVISIONING Kconfig option:

1st boot to initiate the RPMC provisioning:

[DEBUG]  PSP: Querying PSP capabilities...OK
[DEBUG]  PSP: Querying HSTI state...OK
[SPEW ]  RPMC isn't provisioned
[SPEW ]  SPI flash supports RPMC
[SPEW ]  RPMC revision 0
[SPEW ]  PSP NVRAM isn't healthy
[SPEW ]  PSP NVRAM is using RPMC protection
[SPEW ]  SPI flash RPMC counter 0 can still be provisioned
[SPEW ]  SPI flash RPMC counter 1 can still be provisioned
[SPEW ]  SPI flash RPMC counter 2 can still be provisioned
[SPEW ]  SPI flash RPMC counter 3 can still be provisioned
[SPEW ]  SPI flash RPMC counter 0 is in use
[SPEW ]  SPI flash RPMC counter 1 is not in use
[SPEW ]  SPI flash RPMC counter 2 is not in use
[SPEW ]  SPI flash RPMC counter 3 is not in use
[SPEW ]  SoC RPMC slot 0 can still be provisioned
[SPEW ]  SoC RPMC slot 1 can still be provisioned
[SPEW ]  SoC RPMC slot 2 can still be provisioned
[SPEW ]  SoC RPMC slot 3 can still be provisioned
[DEBUG]  RPMC: perform fusing using RPMC counter address 0
[DEBUG]  OK
[NOTE ]  RPMC: Rebooting
[INFO ]  warm_reset() called!

2nd boot after the provisioning is done:

[DEBUG]  PSP: Querying PSP capabilities...OK
[DEBUG]  PSP: Querying HSTI state...OK
[SPEW ]  RPMC is provisioned
[SPEW ]  SPI flash supports RPMC
[SPEW ]  RPMC revision 0
[SPEW ]  PSP NVRAM isn't healthy
[SPEW ]  PSP NVRAM is using RPMC protection
[SPEW ]  SPI flash RPMC counter 0 has already been provisioned
[SPEW ]  SPI flash RPMC counter 1 can still be provisioned
[SPEW ]  SPI flash RPMC counter 2 can still be provisioned
[SPEW ]  SPI flash RPMC counter 3 can still be provisioned
[SPEW ]  SPI flash RPMC counter 0 is in use
[SPEW ]  SPI flash RPMC counter 1 is not in use
[SPEW ]  SPI flash RPMC counter 2 is not in use
[SPEW ]  SPI flash RPMC counter 3 is not in use
[SPEW ]  SoC RPMC slot 0 has already been provisioned
[SPEW ]  SoC RPMC slot 1 can still be provisioned
[SPEW ]  SoC RPMC slot 2 can still be provisioned
[SPEW ]  SoC RPMC slot 3 can still be provisioned

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia7760c0bf7618ca60ef160329d0110ac8109032a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84707
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-28 21:17:48 +00:00
Felix Held
c914e747e7 soc/amd/common/psp: add code for reporting RPMC status
Add the code to query the status of the replay-protected monotonic
counter (RPMC) infrastructure from the PSP and display it in a decoded
form.

Certain SPI flash chips have 4 32-bit monotonic counters in addition to
the actual flash storage. During the RPMC root key provisioning process,
which is done at the end of manufacturing, a 256 bit RPMC root key is
generated by the PSP and programmed into both SoC fuses and the RPMC SPI
flash chip. After that, commands to read or increment the monotonic
counters can be sent to the SPI flash which are protected by a
HMAC-SHA-256 signature using a key derived from the provisioned RPMC
root key.

The code to do the RPMC provisioning is added in a follow-up patch.

TEST=On an out of tree AMD reference board using the Cezanne SoC code
and with the SOC_AMD_COMMON_BLOCK_PSP_RPMC Kconfig option selected, the
newly added code prints this on the console after the provisioning was
done:

[DEBUG]  PSP: Querying PSP capabilities...OK
[DEBUG]  PSP: Querying HSTI state...OK
[SPEW ]  RPMC is provisioned
[SPEW ]  SPI flash supports RPMC
[SPEW ]  RPMC revision 0
[SPEW ]  PSP NVRAM isn't healthy
[SPEW ]  PSP NVRAM is using RPMC protection
[SPEW ]  SPI flash RPMC counter 0 has already been provisioned
[SPEW ]  SPI flash RPMC counter 1 can still be provisioned
[SPEW ]  SPI flash RPMC counter 2 can still be provisioned
[SPEW ]  SPI flash RPMC counter 3 can still be provisioned
[SPEW ]  SPI flash RPMC counter 0 is in use
[SPEW ]  SPI flash RPMC counter 1 is not in use
[SPEW ]  SPI flash RPMC counter 2 is not in use
[SPEW ]  SPI flash RPMC counter 3 is not in use
[SPEW ]  SoC RPMC slot 0 has already been provisioned
[SPEW ]  SoC RPMC slot 1 can still be provisioned
[SPEW ]  SoC RPMC slot 2 can still be provisioned
[SPEW ]  SoC RPMC slot 3 can still be provisioned

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I498eec58189da710b725ac6575c68ba7ab0bcc43
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84706
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-28 21:17:24 +00:00
Felix Held
555551c988 soc/amd/common/block/psp: fix logic bug in psp_get_* functions
The functions psp_get_ftpm_capabilties, psp_get_hsti_state, and
psp_get_psp_capabilities which were added in commit 5e7ab1a233
("soc/amd/common/psp: add helper functions to retrieve capability bits")
have a bug in the 'cmd_status' error handling logic. In case of an
error, 'cmd_status' is non-zero, while the check somehow expected the
opposite. Fix the bug by returning an error if 'cmd_status' is non-zero.

Change-Id: Iafcd185ec4a8a4c0e463b0ac5bac3ef78a0af305
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84836
Reviewed-by: Ana Carolina Cabral
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-10-28 14:24:32 +00:00
Jianjun Wang
61e3815a25 soc/mediatek/mt8196: Enable PCIe support
Enable PCIe support for mt8196.

TEST=Build pass, show pcie init pass log:
mtk_pcie_domain_enable: PCIe link up success (1)
BUG=b:317009620

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: I9c0aaa1c6da8c247b319e7ed2317dd871e276461
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84698
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-28 03:36:27 +00:00
Jianjun Wang
97be4e7209 soc/mediatek/mt8196: Add PCIe driver and early init support
Add PCIe driver for MT8196 platform.

According to the PCIe CEM specification, the deassertion of PERST#
should occur at least 100ms after the assertion. To ensure the 100ms
delay requirement is met and to save delay time in the ramstage, add
an early init data region to store the elapsed time since assertion.
This will speed up the boot time by 100ms.

PCIe port 1 and port 2 share the same PCIe resources, but PCIe port 2 is
not used. Therefore, in mtk_pcie_pre_init(), make sure PCIe port 2 is
reset to prevent interference with PCIe port 1.

TEST=Build pass, show pcie init pass log:
mtk_pcie_domain_enable: PCIe link up success (1)
BUG=b:317009620

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: I826a96822e88972bcd4966b6681797a646adf3d6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84696
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-10-28 03:35:46 +00:00
Jarried Lin
186916ca1e soc/mediatek/common: Move PCIe definition to the common directory
To reduce duplicate pcie.h in other SOC folder, mocw pcie.h to
mediatek/common folder

TEST=Build pass
BUG=b:317009620

Change-Id: I8e29ed4027433700652b07b3461eeb8546d45c9b
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84853
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-10-28 03:35:29 +00:00
Felix Singer
84088853d7 soc/intel/skylake/Makefile: Remove dead code
This code is never reached since the hardware uses different SoCs.
Besides, mainboard specific code should not be added to SoC code.

Change-Id: Id82d5d0b829442c35c093974c06a029259838a9a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-10-27 14:34:11 +00:00
Subrata Banik
043d9ec693 soc/intel/cmn/fast_spi: Improve debug message for SPI flash windows
This commit improves the debug messages when initializing SPI flash
windows by adding the window type (Fixed Decode or Extended Decode)
to the log output.

This makes it easier to understand which window is being initialized
and can help with debugging issues related to SPI flash access.

w/o this patch:

[INFO ]  MMAP window: SPI flash base=0x1000000, Host base=0xff000000, Size=0x1000000
[INFO ]  MMAP window: SPI flash base=0x900000, Host base=0xf9900000, Size=0x700000

w/ this patch:

[INFO ]  Fixed Decode Window: SPI flash base=0x1000000, Host base=0xff000000, Size=0x1000000
[INFO ]  Extended Decode Window: SPI flash base=0x900000, Host base=0xf9900000, Size=0x700000

Change-Id: I904f70f42fa70ea06e6f49bd44631a8491463207
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84868
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-10-26 03:21:10 +00:00
Yuchi Chen
5e901d4d76 soc/intel/common: Add PCIe device IDs for Snow Ridge
This patch adds SPI and some accelerator device IDs for SNR platform.
IDs are from Intel Atom Processor C5100, C5300, P5300 and P5700 Product
Families EDS, doc No. 575160 rev 2.0.

Change-Id: I7bd135d788816e4c3c42ac937450cf8cdcea00bc
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84782
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-24 09:18:50 +00:00
Elyes Haouas
d4ac047c78 soc/intel/broadwell; Use boolean for pch_is_wpt_xx
Use boolean for pch_is_wpt() and pch_is_wpt_ulx().

Change-Id: Ifd1a46ebdbe08df6cc21ada100b94930b02cd7de
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83903
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: coreboot org <coreboot.org@gmail.com>
2024-10-23 23:41:26 +00:00
Patrick Rudolph
5d6355efcf device/pciexp: Add hot-plug capable helper function
Add and use a new helper function to determine if a device is
1) a PCIe device
2) it's mark hot-plug capable

Change-Id: I61cc013844024b43808cd2f054310cb6676ba69e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-10-23 11:49:30 +00:00
Jincheng Li
407799f879 soc/intel/xeon_sp: Report PCIe integrated end points under DRHD
In case of a PCH-less platform, no DRHD_INCLUDE_PCI_ALL flags are
used, all PCIe integrated end points should be explicitly listed
under the DRHD they are affiliated to. Otherwise, the device MSI
setting could fail.

TESTED = Build and boot on intel/beechnutcity CRB

In CentOS Stream (5.14.0-479.el9.x86_64) 9 5.14.0-479.el9.x86_64,
without the changes, below failure logs will occur,

[    6.908347] ------------[ cut here ]------------
[    6.908353] WARNING: CPU: 0 PID: 8 at drivers/pci/msi/msi.h:121 pci_msi_setup_msi_irqs+0x27/0x40
[    6.908374] Modules linked in:
[    6.908379] CPU: 0 PID: 8 Comm: kworker/0:0 Not tainted 5.14.0-479.el9.x86_64 #1
[    6.908385] Hardware name: Intel Beechnut City CRB/Beechnut City CRB, BIOS c1e9362c93be-dirty 09/25/2024
[    6.908389] Workqueue: events work_for_cpu_fn
[    6.908401] RIP: 0010:pci_msi_setup_msi_irqs+0x27/0x40
[    6.908411] Code: 90 90 90 0f 1f 44 00 00 48 8b 87 00 03 00 00 89 f2 48 85 c0 74 14 f6 40 28 01 74 0e 48 81 c7 c8 00 00 00 31 f6 e9 19 de ac ff <0f> 0b b8 ed ff ff ff c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00
[    6.908417] RSP: 0000:ffffac47c0137c80 EFLAGS: 00010246
[    6.908423] RAX: 0000000000000000 RBX: ffff9a0a874e2000 RCX: 000000000000009c
[    6.908428] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff9a0a874e2000
[    6.908433] RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000001
[    6.908437] R10: ffff9a0a8adcb258 R11: 0000000000000000 R12: 0000000000000001
[    6.908440] R13: 0000000000000001 R14: ffff9a0a8738be00 R15: ffff9a0a874e20c8
[    6.908443] FS:  0000000000000000(0000) GS:ffff9a0ded000000(0000) knlGS:0000000000000000
[    6.908448] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.908451] CR2: ffff9a11fffff000 CR3: 00000003cd410001 CR4: 0000000000770ef0
[    6.908455] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    6.908457] DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
[    6.908460] PKRU: 55555554
[    6.908462] Call Trace:
[    6.908465]  <TASK>
[    6.908470]  ? show_trace_log_lvl+0x1c4/0x2df
[    6.908484]  ? show_trace_log_lvl+0x1c4/0x2df
[    6.908492]  ? msi_capability_init+0x193/0x280
[    6.908501]  ? pci_msi_setup_msi_irqs+0x27/0x40
[    6.908509]  ? __warn+0x7e/0xd0
[    6.908519]  ? pci_msi_setup_msi_irqs+0x27/0x40
[    6.908527]  ? report_bug+0x100/0x140
[    6.908537]  ? handle_bug+0x3c/0x70
[    6.908545]  ? exc_invalid_op+0x14/0x70
[    6.908551]  ? asm_exc_invalid_op+0x16/0x20
[    6.908561]  ? pci_msi_setup_msi_irqs+0x27/0x40
[    6.908569]  msi_capability_init+0x193/0x280
[    6.908577]  __pci_enable_msi_range+0x1a3/0x230
[    6.908586]  pci_alloc_irq_vectors_affinity+0xc3/0x110
[    6.908594]  pcie_port_enable_irq_vec+0x3f/0x250
[    6.908604]  ? __pci_set_master+0x31/0xd0
[    6.908614]  pcie_portdrv_probe+0xdf/0x300
[    6.908620]  local_pci_probe+0x4c/0xa0
[    6.908627]  work_for_cpu_fn+0x13/0x20
[    6.908635]  process_one_work+0x194/0x380
[    6.908643]  worker_thread+0x2fe/0x410
[    6.908649]  ? __pfx_worker_thread+0x10/0x10
[    6.908655]  kthread+0xdd/0x100
[    6.908665]  ? __pfx_kthread+0x10/0x10
[    6.908673]  ret_from_fork+0x29/0x50
[    6.908686]  </TASK>
[    6.908688] ---[ end trace 0000000000000000 ]---

Change-Id: Ib015b002f2c077f50d48c046513504bdbd5b35aa
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84315
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-23 11:49:03 +00:00
Jincheng Li
374c9e09c1 soc/intel/xeon_sp/ibl: Remove unused logics
Change-Id: I79b08630753b3aceb94becc8b9d682a3d3ca8310
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84308
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-10-23 10:00:33 +00:00
Shuo Liu
51d7434687 soc/intel/xeon_sp/ibl: Update registers for reach bootable
Change-Id: Id2a2946b7fdfd7fd245835afe6abc9a3f7e1a508
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Co-authored-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84307
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-10-23 10:00:15 +00:00
Shuo Liu
86d09d93a7 soc/intel/xeon_sp: Add Kconfig SUPPORT_SIMICS_SIMULATION
Xeon-SP simics doesn't provide simulation of writable PAM-F
(Programmable Attribute Map) segment and hence coreboot needs to
enable SHADOW_ROM_TABLE_TO_EBDA to write system table pointers to
EBDA (Extended BIOS Data Area).

Change-Id: I216204987ad646a5d1655323d2725cfd3415a2d7
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-10-23 09:59:03 +00:00
Yidi Lin
573cc4a27a soc/mediatek/common: Add more definitions for SPMI
The newly added enums and struct members will be used by MT8196.

BUG=none
TEST=emerge-corsola coreboot; emerge-geralt coreboot

Change-Id: I32e758cc4244114073606c418a69e0467cdf1039
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84773
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-23 06:36:01 +00:00
Yidi Lin
ba4d2ec8c5 soc/mediatek/common: Maintain common pmif data in pmif_init.c
MT8196 has different pmif_spmi_arb and pmif_spi_arb configurations. Move
the common pmif data to a separate file in order to reuse common/pmif.c
as much as possible.

BUG=none
TEST=emerge-corsola coreboot; emerge-geralt coreboot

Change-Id: I24643ce58a57b9cc3c5220bc06a85b141b366eee
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84772
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-10-23 06:35:55 +00:00
Yidi Lin
af3f8298d6 soc/mediatek/common: Config CAL_TOL_RATE and CAL_MAX_VAL in SoC folder
MT8196 has differenet configurations from other platforms. Make
CAL_TOL_RATE and CAL_MAX_VAL as per SoC configuration in order to reuse
common/pmif_clk.c

BUG=none
TEST=emerge-corsola coreboot; emerge-geralt coreboot

Change-Id: Iefc8180e1719d9796df7457b619a8792ceb762b2
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84771
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-23 06:35:46 +00:00
Jamie Ryu
16062b582a soc/intel/pantherlake: Update PlatformDebugOption to Trace Ready
This enables SOC_INTEL_DEBUG_CONSENT to set PlatformDebugOption
to Trace Ready to have the safe configurations for Panther Lake
ES SoC.
This safe configuration will be removed once the feature is fully
verified and safe to be set to the default value.

BUG=b:373915085
TEST=Build fatcat and check the platform boots without an issue.

Change-Id: I1eaabcb2e2aaff16ee4e64d1c7709b229de18459
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84823
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-10-23 03:05:50 +00:00
Simon Yang
5775ed215e soc/intel/alderlake_n: Fix display flicker issue when using internal FIVR
If project set configure_ext_fivr = 0 will cause
PchFivrVccstIccMaxControl do not set correctly.

BUG=b:361831628
TEST=Verified on Teliks360 that affected DUTs.

Change-Id: I816de9c0c507aad3b73ab29e9f72048704f4662d
Signed-off-by: Simon Yang <simon1.yang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84812
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Qinghong Zeng <zengqinghong@huaqin.corp-partner.google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2024-10-22 04:24:28 +00:00
Jeremy Compostella
5a5f39ce86 soc/intel: Use NEM+ effective way size for for ADL, MTL and PTL
Alder Lake, Meteor Lake and Panther Lake use the effective way size
when setting up the Enhanced No-Eviction Mode (cf.
`INTEL_CAR_ENEM_USE_EFFECTIVE_WAY_SIZE').

BUG=b:360332771
TEST=Verified on PTL Intel reference platform

Change-Id: I5cb66da0aa977eecb64a0021268a6827747c521b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83947
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
2024-10-21 17:00:10 +00:00
Jeremy Compostella
8974055855 soc/intel/common/block/cpu: Add Kconfig for effective way size for NEM+
On Alder Lake, Meteor Lake and Panther Lake platforms the way size to
consider for NEM+ computation is the effective way size.

On Alder Lake, the External Design Specification #627270 "3.5.2
No-Eviction Mode (NEM) Sizes" provides a way to compute the effective
way size by reading the number of CBO. Unfortunately, reading the
number of CBO is not possible on Meteor Lake and Panther
Lake. Therefore, we instead compute the effective way size as the
biggest of power of two of the way size which works across all three
platforms.

The Kconfig `INTEL_CAR_ENEM_USE_EFFECTIVE_WAY_SIZE' is introduced to
control this behavior.

The issue addressed by this commit can be observed with the following
experiment: using a 18 MB LLC SKU, set `DCACHE_RAM_SIZE` to
0x400000 (4 MB).

The number of ways that used to be computed is round(0x400000 /
0x180000) = round(2.66) = 3. 3 ways were mapped to cover the 0x400000
NEM+ region. When the bootblock code accesses memory between 3 MB and
4 MB, the core would raise a page fault exception.

The right computation is: 0x400000 / eff_way_size(0x180000) = 4. 4
ways needs to be mapped to cover the entire 0x400000 NEM+ region.

BUG=b:360332771
TEST=Verified on PTL Intel reference platform

Change-Id: I5cb66da0aa977eecb64a0021268a6827747c521c
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-10-21 16:59:58 +00:00
Shuo Liu
1a82871cc0 soc/xeon_sp: Initially add N-1 IBL codes
N-1 IBL (Integrated Boot Logic) codes are initially forked from
EBG (Emmitsburg PCH) codes (src/soc/intel/xeon_sp/ebg). N-1 IBL
codes are a set of stub codes to fulfill build sanity check for GNR
SoC and CRB codes before the formal codes are published.

Change-Id: I6bd5a2ed973ff91750c5ed1f9a57d30e41d8b97e
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-10-18 16:44:47 +00:00
Naresh Solanki
1d18513ad5 soc/intel/xeon_sp: Allow Memory POR independent of RMT
TEST=Build & boot in IBM SBP1 system. Verified the settings are effective in FSP logs.

Change-Id: I4341ead89a2683f64c834a6981ba316fcfef4f9a
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84741
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-10-16 15:27:03 +00:00
Sean Rhodes
d842e94d35 soc/intel/*: Add debug prints for misaligned FSP and driver settings
Print a warning when the FSP UPD for CNVi Audio Offload is enabled
without the corresponding USB ACPI driver being enabled.

Throw an error when the USB ACPI driver is enabled without the
corresponding UPD being enabled.

Change-Id: I449c43998dd379dc68a33db47a2fe51cfe5cda2f
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84716
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-10-14 15:33:32 +00:00
Shuo Liu
177bb5e9b9 soc/intel/xeon_sp: Revise IIO domain ACPI name encoding
GNR/SRF supports up to 18 logical IIO stacks. Revise IIO domain
ACPI name encoding in below form to support GNR/SRF,

prefix (16 bit) | socket (3-bit) | stack (5-bit)

Change-Id: I6f4c3c22980f2797dd47c8e0d684e0a3175030b7
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/+/84310
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-10-11 19:37:14 +00:00
Felix Held
b9bf4464f2 soc/amd/common/block/psp/Kconfig: drop some 'default n'
Since the Kconfig default for boolean options is already 'n', there's no
need to add that default to the option. Still kept the 'default n' for
the 3 options that result in fuses inside the SoC to be burnt
(PERFORM_RPMC_PROVISIONING, PERFORM_SPL_FUSING and
PSP_PLATFORM_SECURE_BOOT) to point out the fact that that's not selected
by default more clearly.

Change-Id: I55971f1f130d8ec23d4572a215008d9465e1520a
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84719
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-10-11 13:29:03 +00:00