Commit graph

13,478 commits

Author SHA1 Message Date
Patrick Rudolph
e1a0e6b738 soc/intel/xeon_sp/skx: Fix CPU init
Move CPU init closer to other SoC and CPX.

FSP-S only is aware of socket 0, thus all cores must rerun all
settings already done by FSP, in order to set up socket 1 as well.

FSP sets the following on socket0:
- Set BIT20 in MSR_VR_MISC_CONFIG
- Set LTR_IIO_DISABLE in MSR_POWER_CTL

Lock the following MSRs:
- MSR_SNC_CONFIG
- MSR_CONFIG_TDP_CONTROL
- MSR_FEATURE_CONFIG
- MSR_TURBO_ACTIVATION_RATIO

Also do the following as done on other SoCs:
- Configure VMX and lock it
- Enable LAPIC TPRs (fixes MWAIT support)
- Honor CONFIG_SET_MSR_AESNI_LOCK_BIT
- Set TCC thermal target as set in devicetree

Fixes 8 second wakeup time from LAPIC interrupts when in MWAIT.

TEST: Booted on ocp/tiogapass to Linux 6.9 with all cores in
      ACPI C6, no boot delay or hung tasks could be found.

Change-Id: If08ef5150b104b0c2329fcb64a0476ce641c831c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85289
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-06 20:58:28 +00:00
Michał Kopeć
a7437ca340 soc/intel/common/block/cse: allow CSE telemetry on non-lite CSE SKU
The CSE MKHI_BUP_COMMON_GET_BOOT_PERF_DATA command is also implemented
in non-Lite CSE SKUs. Original CL [1] adding this feature also says
that, but at that point the feature was validated for CSE Lite only.

Move cse_get_boot_performance_data() to shared blk/cse/telemetry.c to
have it compile for mainboards without CSE Lite.

TEST=Boot NovaCustom V540TU (MTL-P / ME Consumer) with
SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY_V2 selected and check `cbmem -t`:

 990:CSME ROM started execution                        0
 944:CSE sent 'Boot Stall Done' to PMC                 34,000
 945:CSE started to handle ICC configuration           172,000 (138,000)
 946:CSE sent 'Host BIOS Prep Done' to PMC             172,000 (0)
 947:CSE received 'CPU Reset Done Ack sent' from PMC   314,000 (142,000)
 991:Die Management Unit (DMU) load completed          360,000 (46,000)
   0:1st timestamp                                     385,844 (25,844)
  11:start of bootblock                                398,796 (12,952)
  12:end of bootblock                                  402,099 (3,302)
  [...]

[1]: https://review.coreboot.org/c/coreboot/+/59507

Change-Id: I3a5b1abd282af9af33cef2371719df4133684a2e
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-12-06 14:38:34 +00:00
Michał Kopeć
0d284bfc36 soc/intel/mtl/acpi/gpio.asl: fix missing gpio.h include
This change fixes building NovaCustom V540TU, which previously errored
out due to missing MISCCFG_GPIO_PM_CONFIG_BITS definition.

Replace soc/gpio_defs.h with gpio.h which includes everything we need,
same as it was done for ADL in change 71266, and other SoCs.

TEST=Build and boot NovaCustom V540TU

Change-Id: I52a495f696258fc63752dd8e66e318e144bb768e
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82674
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2024-12-06 14:38:24 +00:00
Crystal Guo
820c7e06d2 soc/mediatek/mt8196: Set DRAMC_PARAM_HEADER_VERSION to 4
Set DRAMC_PARAM_HEADER_VERSION to 4 for aligning with DRAM blob.

TEST=Bootup pass.
BUG=b:317009620

Change-Id: I45c9ea97e3c015bab7145116e2074b44df5e955c
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85502
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-06 03:43:59 +00:00
Subrata Banik
1b175a64e3 soc/intel/ptl: Populate SMBIOS Type 4 with unique serial number
This commit enhances the SMBIOS Type 4 table by populating the "serial
number" field with the unique SoC QDF information retrieved via PMC
IPC.

This improvement provides more accurate and detailed processor
information for Panther Lake SoCs and onwards, aiding in:

- System identification
- Diagnostics
- Asset management

Previously, the serial number field was not populated.

TEST=Able to build and boot google/fatcat.

Example of SMBIOS Type 4 output:

Before this commit:

  Serial Number: Not Specified
  Asset Tag: Not Specified
  Part Number: Not Specified

After this commit:

  Serial Number: ABCD  (Example SoC QDF information)
  Asset Tag: Not Specified
  Part Number: Not Specified

Change-Id: I38a0bb0e44c619393b8f058ae30fbf2f9719b724
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85456
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-12-06 00:22:56 +00:00
Subrata Banik
4b574281f0 soc/intel/cmn/pmc: Retrieve SoC QDF information via PMC IPC
This commit introduces a new function,
`retrieve_soc_qdf_info_via_pmc_ipc()`, to retrieve the SoC QDF
information string using the PMC IPC mechanism.

This function allows for more flexible use of the SoC QDF information,
enabling its use in various data structures like the SMBIOS Type 4
table.

The existing `pmc_dump_soc_qdf_info()` function is updated to use this
new function to retrieve the QDF information before printing it.

TEST=Able to build and boot google/fatcat.

Change-Id: I91ccf8aae4be9e9bbcad8ef2f422b88edef66376
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85455
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2024-12-06 00:22:51 +00:00
Patrick Rudolph
4ce5304879 soc/intel/xeon_sp: Advertise DIMMs on skylake_sp as well
Add the MEMMAP_DIMM_DEVICE_INFO_STRUCT for skylake_sp and let common
code fill in the SMBIOS type 17 entries for all slots and found DIMMs.

This also allows to build dimm.c unconditionally on all xeon_sp socs.

Test: On ocp/tiogapass all DIMMs and slots are visible in SMBIOS.

Change-Id: I686b1e3ef946240785111f86a5f23a109a6a52ad
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85319
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-12-05 07:40:35 +00:00
Patrick Rudolph
5613f0e6be soc/intel/xeon_sp: Fix debug print
Fix debug prints that use non-thread safe dev_path(). Since the code
is part of MPinit, it's using multiple threads and one threads modifies
the only buffer used, resulting in path being printed that do not belong
to the current thread.

Drop the call since printing the APIC ID is sufficient and thread safe.

Change-Id: I0cbc9cb11da8397ab6c2e8e56414558a8a0db93b
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85288
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-05 07:38:57 +00:00
Patrick Rudolph
0d827a5810 soc/intel/xeon_sp: Drop SOC_INTEL_MMAPVTD_ONLY_FOR_DPR
On 1st and 2nd gen Xeon-SP the VTD PCI device has different PCI IDs,
depending if it's on the CSTACK or PSTACK.

Make sure to handle all VTD device on all stacks the same.

For later SoCs this was already the case since the PCI devices have
the same PCI ID.

Change-Id: I0d726b5ae620282dd4c9036d536e5e51d19a0a0b
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85139
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-12-05 07:38:27 +00:00
Yuchi Chen
5cedebf874 soc/intel/xeon_xp: Remove 1 bytes losing in lower DRAM
Generally the base address of FSP output is already aligned so there is
no need to minus 1. The current code loses 1 byte in the lower DRAM
address space.

Change-Id: Ia8147702aad496c431cf10b896d68a826c9e45b1
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85434
Reviewed-by: Jincheng Li <jincheng.li@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-12-04 11:06:39 +00:00
Yu-Ping Wu
6f2a8ee8cc soc/mediatek/mt8196: Require DRAM blob to exist
The SoC won't be able to boot without dram.elf. Therefore, we should
always expect the file to exist in build time.

BUG=none
TEST=emerge-rauru coreboot
BRANCH=none

Change-Id: Ib902dc4778f34a144dddf847c283fe77d4c776f6
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85441
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-04 07:36:04 +00:00
Felix Held
75424efdc4 soc/amd/common/psp/psp_def.h: increase P2C_BUFFER_MAXSIZE
This matches the size used in the reference code and required by the
corresponding document #55758 Rev. 2.04. This doesn't seem to make any
difference in runtime behavior, but I'd rather waste a kilobyte of SMM
RAM, than debugging possible problems caused from not following the
corresponding specification.

Change-Id: I2ee30d6d1255317efcd3960016069dfe50885aa7
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85357
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-12-03 17:41:58 +00:00
Felix Held
179945291c soc/amd/common/psp/rpmc: fix printk format string
While gcc didn't seem to care about that mismatch, clang didn't like
that '%ld' was used in the printk format string to print a size_t
variable. Replace the correct '%zu' instead of '%ld' to fix that.

Change-Id: I32bc584abe835c9c1d732c12311881345b8f0cdf
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85251
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-03 17:41:46 +00:00
Felix Held
9b308f4d54 soc/amd/common/psp/psp_smi: report errors in 'handle_psp_command'
To see if things went wrong in the 'handle_psp_command' function, print
the status code in case it's not MBOX_PSP_SUCCESS.

Change-Id: I8c02e8e29ab5619282e5b864a8cea6f0703f6ef2
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85238
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-03 17:41:33 +00:00
Felix Held
5613f209c7 soc/amd/common/psp_smi_flash: implement SPI flash RPMC command handling
Extend the 'psp_smi_spi_rpmc_inc_mc' and 'psp_smi_spi_rpmc_req_mc'
function stubs that now implement the actual functionality by calling
'spi_flash_rpmc_increment' and 'spi_flash_rpmc_request' after doing some
sanity checks.

TEST=When selecting both 'SOC_AMD_COMMON_BLOCK_PSP_RPMC' and
'SOC_AMD_COMMON_BLOCK_PSP_SMI' Kconfig options on a board with an RPMC-
capable SPI flash, the PSP SMI handler can successfully service not only
the already working SPI flash write command, but also the increment
monotonic counter RPMC command:

[NOTE ]  coreboot-[...] x86_32 smm starting (log level: 8)...

[SPEW ]  SMI# #0
[SPEW ]  PSP: SPI write request
[DEBUG]  FMAP: area PSP_NVRAM found @ f20000 (131072 bytes)
[SPEW ]  PSP: SPI write 0x400 bytes at 0x0

[NOTE ]  coreboot-[...] x86_32 smm starting (log level: 8)...

[SPEW ]  SMI# #0
[SPEW ]  PSP: SPI write request
[DEBUG]  FMAP: area PSP_NVRAM found @ f20000 (131072 bytes)
[SPEW ]  PSP: SPI write 0x400 bytes at 0x400

[NOTE ]  coreboot-[...] x86_32 smm starting (log level: 8)...

[SPEW ]  SMI# #8
[SPEW ]  PSP: SPI write request
[DEBUG]  FMAP: area PSP_NVRAM found @ f20000 (131072 bytes)
[SPEW ]  PSP: SPI write 0x310 bytes at 0x800

[NOTE ]  coreboot-[...] x86_32 smm starting (log level: 8)...

[SPEW ]  SMI# #1
[SPEW ]  PSP: SPI write request
[DEBUG]  FMAP: area PSP_RPMC_NVRAM found @ f40000 (262144 bytes)
[SPEW ]  PSP: SPI write 0x70 bytes at 0x100

[NOTE ]  coreboot-[...] x86_32 smm starting (log level: 8)...

[SPEW ]  SMI# #0
[SPEW ]  PSP: SPI RPMC increment monotonic counter request

This requires the PSP_RPMC_NVRAM FMAP section to have the correct size
which in case of Renoir is 256 kByte. Having this large enough size also
makes the PSP report that the PSP RPMC NVRAM is healthy which wasn't the
case in previous tests when the region was too small.

Change-Id: I20e4f60d4e35d33e560fc43212b320e817e13004
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84906
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2024-12-03 17:41:20 +00:00
Felix Held
b1f954bc6c soc/amd/common/block/psp/psp_smi_flash.h: fix struct element types
Commit ee93b35bc3 ("soc/amd/common/psp_smi_flash: add RPMC command-
specific data structures") added the 'psp_spi_rpmc_inc_mc' and
'psp_smi_rpmc_req_mc' structs, but added the counter data as uint32_t
while it should have been an array of 4 uint8_t, since the bytes in that
buffer are already in the order in which they need to be sent over to
the SPI flash which is different than the byte order of a uint32_t. This
was only noticed after getting the code that uses these structs was
tested.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6c290535a1896c080b74d892cb289e6e122d4525
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85236
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-03 17:41:02 +00:00
Yu-Ping Wu
0a7c3ed514 soc/mediatek/mt8195: Fix SCP register address
The parentheses are missing in the mtk_scp macro definition.

The only usage is

 SET32_BITFIELDS(&mtk_scp->scp_clk_on_ctrl,
                 SCP_CLK_ON_CTRL, 1);

I guess that bit is already set by default, so there's no ULPOSC clock
issue found so far.

BUG=none
TEST=none
BRANCH=cherry

Change-Id: I2dbb5c465ee60f0c4dce8ff77b8d3a39db42e4f5
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85436
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-12-03 10:20:39 +00:00
Jarried Lin
ac83b48cba soc/mediatek/mt8196: Add audio base address definition
Add audio base address definition.

TEST=build pass
BUG=b:357969183

Change-Id: I07d272fddfe50e73adc6f4c7d401f3391b0c145d
Signed-off-by: Darren Ye <darren.ye@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85361
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-12-03 08:54:15 +00:00
Yidi Lin
c661933a24 soc/mediatek/common: Add read16/write16 support for PMIF
This patch is prepared for MT8196 PMIF driver.

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

Change-Id: I3adbbaaf247a8bbd99627cf089b5b55fcf4fb115
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84774
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-12-03 07:17:08 +00:00
Maximilian Brune
d095f1ea45 soc/amd/glinda: Update MCA banks
source:
PPR 57254 Rev 1.59 Table "Non-core MCA Bank to Block Mapping"

Change-Id: I16f5f9db08ab3232caa64fcdc90b8fc062869fcc
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-12-02 18:17:03 +00:00
Crystal Guo
8df4eefd44 soc/mediatek/mt8196: Reserve DRAM buffers for HW TX TRACKING
HW TX tracking works by writing a pattern to the designated DRAM buffer
and then reading it back automatically to calculate the appropriate TX
time delay. To avoid writing the pattern to system-used memory, we need
to permanently reserve last 64KB memory on each rank for the HW TX
tracking feature.

BUG=b:317009620
TEST=Reserve memory ok
Firmware shows the following log with 12GB DDR board:
00000001ffff0000-00000001ffffffff: RESERVED
000000037fff0000-000000037fffffff: RESERVED

Change-Id: I042a74c7fbdc0d3dc19dd6bfd2bf021fe1c2b5fc
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85124
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-12-02 04:24:55 +00:00
Martin Roth
c91553d3a3 Treewide: Remove unused header files
These header files do not seem to be used in coreboot. Presumably
they're left over after the code that used them was removed.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ide70239c7c2e93fff548d989735450396308c62b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85370
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-11-30 04:44:06 +00:00
Jarried Lin
758174c61b soc/mediatek/mt8196: Reserve 70 MB memory for OP-TEE
Reserve 70MB memory space for running the OP-TEE image.

BUG=b:317009620
TEST=build pass

Change-Id: I6f75870bdd76e89866508d351b04a0921f30fe4d
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85249
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-29 07:08:50 +00:00
Yidi Lin
7f36241461 soc/mediatek: Eliminate redundant calls to get_pmif_controller()
It is unnecessary to look up PMIF controller by mstid in multiple
functions. Just pass `arb` to these functions in order to avoid
redundant calls to get_pmif_controller().

BUG=none
TEST=compiled

Change-Id: I907d6ff029827e4afe4f1d05e39c8dd662c7c45e
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85327
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-28 13:41:40 +00:00
Yuchi Chen
78fa36d050 soc/intel/snowridge: Add support for Intel Atom Snow Ridge SoC
This change adds support for Intel Atom Processors P5300, P5700
product families (known as Snow Ridge NS and Snow Ridge NX).

Change-Id: I32ad836dfaaff0d1816eac41e5a7d19ece11080f
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Tested-by: Vasiliy Khoruzhick <vasilykh@arista.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-27 09:31:52 +00:00
Cliff Huang
35741f35ee soc/intel/ptl: Change ACPI name for IPU
Change IPU name to 4 characters: IPU0

While the ACPI device name is 'IPU', some part of generated SSDT looks
for 'IPU_', since by convention, the names less than 4 characters is
padded with underscope ("_"). Please see APCI spec 5.3 ACPI Namespace.

BUG=none
TEST=Boot fatcat board to OS and check that IPU device name is IPU0 in
the SSDT.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: I60ce2998cb1d97589c0f7544ce8dc92c12a2b8c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85274
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-25 04:35:35 +00:00
Subrata Banik
acbde33513 soc/intel/pantherlake: Add option to enable UFS controller
This patch adds a Kconfig option to enable the UFS controller for
mainboards using the Intel Panther Lake-UH SoC.

By default, the UFS controller is disabled as it is not supported by
other SoC configurations. This prevents accidental enabling of the
UFS controller on unsupported platforms.

BUG=b:379828045
TEST=Built google/fatcat with and without UFS enabled.

Change-Id: Ica89ae85582367809128fc6cf0cd5fe5d40a2235
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85191
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-22 02:49:25 +00:00
Subrata Banik
e7264110a6 soc/intel/cmn/acpi: Use Kconfig guards for UFS workarounds
This change introduces Kconfig guards around the UFS workaround code
in the common ACPI ASL file. This ensures that these workarounds are
only applied when necessary, allowing future SoCs with UFS controllers
to reuse the common ASL file without modification.

By using Kconfig, we can enable or disable the workarounds based on
the specific SoC configuration, providing greater flexibility and
maintainability.

BUG=b:379828045
TEST=Able to compile google/fatcat.

Change-Id: I968b8811e508378a36648bd8234ff0fd7237b00d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85208
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-22 02:49:19 +00:00
Yu-Ping Wu
37d4d7ab11 soc/mediatek: Rename FREQ_*MHZ to PMIF_TARGET_FREQ_MHZ
Enum is useful for improving readability because of the meaningful enum
names. Names such as "FREQ_260MHZ = 260", however, don't provide any
extra information of the value itself. Therefore, rename those enums to
PMIF_TARGET_FREQ_MHZ to better reflect its usage.

Change-Id: I420b909a76973a040b96feb2bcb93d3640b086b5
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85204
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-21 16:13:48 +00:00
Yu-Ping Wu
4ed67d92eb soc/mediatek: Rename pmif_ulposc_* function arguments
Rename the arguments of pmif_ulposc_check() and pmif_ulposc_cali()
to make the frequency unit clearer.

Change-Id: I7719fd4dc43edd47bf014af13fb57ad38f43778c
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-11-21 16:13:42 +00:00
Crystal Guo
feddd37297 soc/mediatek: Rename dpm to dpm_v1
MT8196 equips new DPM hardware which is different from precedent SoCs.
Therefore, we need implement a new DPM loader (said version 2) to run
the blob. Considering the version iteration, rename the original dpm to
dpm_v1.

TEST=Build pass.
BUG=b:317009620

Change-Id: I07afb8f5c23e96aad3c6cb0887cb7efd16ebf296
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85211
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-21 13:46:47 +00:00
Jarried Lin
992e09a1d5 soc/mediatek/mt8196: Add version two DPM driver
Add version two of the DPM driver for DVFS and DRAM low power feature.

MT8196 equips new DPM hardware which is different from precedent SoCs.
Therefore, we implement a new DPM loader (said version 2) to run the
blob. The new DPM driver includes following features.
- Simplify the DPM loading flow without the needs of waking DPM SRAM up
  and initializing bootargs.
- Use the broadcast function to ensure that the DPM load and reset
  operations performed on channel A will be synchronized to the other
  three channels.

TEST=Full calibration pass.
BUG=b:317009620

Change-Id: I77e1ac252b00ab9c4864cc308f20da4a79714e4c
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85121
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-11-21 13:46:24 +00:00
Jarried Lin
e8c7be5394 soc/mediatek/mt8196: Set DRAMC_PARAM_HEADER_VERSION to 3
Set DRAMC_PARAM_HEADER_VERSION to 3 for aligning with DRAM blob.

Test=Bootup pass
BUG=b:317009620

Change-Id: I17062bc3b79f60552981d7c604bb5350d8f6199f
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85119
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-11-21 13:45:58 +00:00
Patrick Rudolph
22fc6d10d5 soc/intel/xeon_sp: Fix SRAT debug prints
- Drop duplicated fields
- Drop fields filled with constant values
- Drop SRAT prefix for sysmemmap entries
- Print all zeros when concatenating two hex numbers

Change-Id: I379aeb6fcd2e28665c7d592b0639db3c1b4caa9b
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85189
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-21 08:37:07 +00:00
Elyes Haouas
a12c8de14b tree: Remove unused <bootstate.h>
Remove "include <bootstate.h>" when it is not used.

Change-Id: Ic27acf9f8dfbbccb8f48a139032b1463e7185030
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85216
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-21 04:27:13 +00:00
Bora Guvendik
73d1980d23 soc/intel/pantherlake/acpi: Update camera_clock_ctl.asl
Fix ISCLK register definitions

Reference: 813032 - Panther Lake H I/O Registers

BUG=b:357011633
TEST=check camera functionality on fatcat

Change-Id: Ie9f1f639970344eb359dee37914ee26a02dcfb4b
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85058
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-11-20 10:25:05 +00:00
Pranava Y N
7d44e341b5 soc/intel/ptl: Update ME specification version to 21
This patch updates Kconfig that selects ME specification version for
Pantherlake SoC from version 18 to version 21.

BUG=b:362647201
TEST=Able to build fatcat with SOC_INTEL_COMMON_ME_SPEC_21 selected.

Change-Id: Ibfebd7c093240aa7f1d6337f3e4dd6e5d34bed1d
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85187
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-11-20 10:24:45 +00:00
Pranava Y N
d44ccf841b common/block/cse: Add Kconfig to support ME specification version 21
This patch introduces Kconfig support for Intel's Management Engine
(ME), version 21. When 'SOC_INTEL_COMMON_BLOCK_ME_SPEC_21' is selected
it sets the ME_SPEC configuration to 18 because ME version 21 is
compatible with version 18 in terms of Host Firmware status registers.

BUG=b:362647201
TEST=Able to build fatcat after selecting SOC_INTEL_COMMON_ME_SPEC_21

Change-Id: I90c946751ac530dac1af4ff9c3c921b5faf82448
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85186
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-11-20 10:24:40 +00:00
Subrata Banik
d22078a3c3 soc/intel/pantherlake: Enable CPU feature programming in coreboot
This patch enables coreboot to perform CPU feature programming for both
the Boot Strap Processor (BSP) and Application Processors (APs) on
Intel Panther Lake platforms.

This change eliminates the need for the following FSP modules:

- CpuMpPpi
- CpuFeature

By handling CPU feature programming within coreboot, we reduce reliance
on external FSP binaries and improve code maintainability.

BUG=b:376092389, b/364822529
TEST=Built and booted google/fatcat successfully. Verified CPU features
are correctly programmed.

Change-Id: I73321485327f6a02ec8338fcfa1faf1e71008ba6
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
2024-11-20 03:55:00 +00:00
Patrick Rudolph
3a891aff8c soc/intel/xeon_sp: Walk devicetree to find IOAPICs
Walk the devicetree to collect all PCI IOAPICs. When found read
the IOAPIC base address from hardware.

TEST: On ocp/tiogapass all IOAPICs are found and advertised.

Change-Id: I2835c202e56849655795b96bc83862cb18e83fc0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84851
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-19 15:16:16 +00:00
Patrick Rudolph
6179cce714 soc/intel/xeon_sp/cpx: Fix PCU device IDs
CPX uses the same PCU IDs as SKX.

Change-Id: I1bc96232e120b9cd9cb4f5b7b5df7d7db62fcbc4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84852
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-19 11:57:09 +00:00
Patrick Rudolph
d7846fb2ff soc/intel/xeon_sp: Fix VTD address
On 1st and 2nd gen Xeon-SP the VTD PCI device is not at DEVFN 0.0.
Fix the DEVFN address and thus fix an assertion in vtd_probe_bar_size().

Change-Id: Ie879e95436af92fca1fee49135938ca2b005d579
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-19 11:51:13 +00:00
Patrick Rudolph
5ca1683b32 soc/intel/xeon_sp: Drop DMAR_X2APIC_OPT_OUT
Drop DMAR_X2APIC_OPT_OUT since coreboot is able to enable X2APIC.

TEST: Works fine on OCP/tiogapass, thus drop the opt out.

Change-Id: Ia0443a39a9bf392976cfd1a7ccf6a335d5f0bd70
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85173
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-19 11:22:50 +00:00
Patrick Rudolph
c2c00f2a45 soc/intel/xeon_sp/acpi/gen1: Properly set _PXM
Set _PXM in ACPI to indicate which socket the PCI domain belongs to.
TEST: Booted on 2S ocp/tiogapass and checked dmesg that PCI domains are
      advertised in the correct Proximity Domain.

Change-Id: I39cec0307b0dce0a4da5df5be5095b8d90758997
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85172
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-19 11:22:02 +00:00
Patrick Rudolph
dd46eb3c7c soc/intel/xeon_sp: Read IOAPIC ID from hardware
Currently coreboot hardcodes the same IOAPIC IDs as used on UEFI native,
however FSP does not program the IOAPIC IDs, except for PCH IOAPIC.

Drop existing code that hardcodes PCI addresses and IOAPIC IDs and
detect the IOAPIC inside the domain automatically, read the IOAPIC
base address and let existing code figure out the IOAPIC ID by reading
it back from HW.

Change-Id: I2543a46dcc4a98ec8629530ca87882a7106c9ed1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84850
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-19 10:35:34 +00:00
Patrick Rudolph
488e7bd9e4 soc/intel/xeon_sp: Drop unused code
Drop soc_get_stack_for_port() and move a comment.

Change-Id: I9d7615b633b344783150b3e1f3d98634630ed354
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84844
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-19 10:34:29 +00:00
Yuchi Chen
7cfdb3bc1a soc/intel/common/block/gpmr: Disable GPMR regs if ext-BIOS is disabled
General Purpose Memory Range registers are only used if extended BIOS
region is enabled now, this patch wraps the related code with Kconfig
item `CONFIG_FAST_SPI_SUPPORTS_EXT_BIOS_WINDOW`.

Change-Id: I975840684b3dd9e9e76ec6a08de12d8dd3c8f08a
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85041
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-19 10:33:03 +00:00
Yuchi Chen
26be949137 soc/intel/common/block/itss: Route PCI INT pin to PIRQ using PIR
ITSS has PCI Interrupt Route (PIR) registers to map PCI INTA-D to one
of PIRQA-H. This patch adds a function itss_get_dev_pirq() returning
PIRQ for a given device and INT pin.

Change-Id: If911b34c506a4a3657b873baab33814c1a7d674b
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-11-19 10:32:38 +00:00
Elyes Haouas
006887b688 tree: Remove unused <assert.h>
Remove <assert.h> when it is not used.

Change-Id: Icb8ee7dcfd05e0a3131d02d1bc8fe150bbf9527b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85164
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-11-19 00:40:04 +00:00
Elyes Haouas
1e0ce7a9d8 soc/qualcomm/sc7280/socinfo: Add missing <console/console.h>
This to fix Wimplicit-function-declaration error:
src/soc/qualcomm/sc7280/socinfo.c:67:2: error: call to undeclared function 'die'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   67 |         die("could not match jtagid\n");
      |         ^
src/soc/qualcomm/sc7280/socinfo.c:81:2: error: call to undeclared function 'die'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   81 |         die("could not match jtagid\n");
      |         ^

Change-Id: If930e39d0c7231975c1a11179fa7dbd9fcc0d1d1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85166
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-19 00:39:54 +00:00