coreboot/src
Maximilian Brune 4f13239318 mb/prodrive/atlas: Configure PCIe CLKREQ
Intel Client PCIe* controller expects each device should drive the
SRCCLKREQ#. If the GPIO is set to native mode for a device, which does
not support SRCCLKREQ#, then during RTD3 exit link would not be
established. Because controller samples the SRCCLKREQ# before
detecting the device and break L1 as the system might enter L1SS as
controller detects SRCCLKREQ# as de-asserted.
As a workaround the Pins must not be configured in Native Mode (CLKREQ
native function). Therefore here they are not configured at all.
source: 689882 (intel document ID)
So apparently hardware doesn't sample SRCCLKREQ Pin if it's not
configured as such.

That workaround suggestion however also brought a patch to FSP, which
in turn causes the same bug (even if SRCLKREQ are not configured).
Usually in order to make use of root port power saving features (e.g.
clock gating), the Root port must either be disabled or a CLKREQ Pin
must be configured. The patch however removed that check before
enabling power management for the rootport.
Workaround (until FSP is fixed):
pretend to FSP that the rootports have a CLKREQ Pin attached, by
supplying them in the FSP UPDs. That will cause FSP to configure the
CLKREQ Pin and enable power management for said rootport, but it will
not crash on L1 entry/exit. That has been done on the Atlas board
(as workaround) for a short period of time (before applying FSP Fix)
like this:
      // RP 5 (the rootport you want to fix)
    - memupd->FspmConfig.PcieClkSrcUsage[2] = 4;
      // e.g. choose a clkreq pin that is not routed out
    - memupd->FspmConfig.PcieClkSrcClkReq[2] = 0;

Furthermore disable CpuPcieRpClockReqMsgEnable FSP-M options to prevent
the same issue, but for CPU root ports. If not done the following will
happen in coreboot:
[DEBUG]  PCI: 00:06.2 scanning...
[SPEW ]  do_pci_scan_bridge for PCI: 00:06.2
[DEBUG]  PCI: pci_scan_bus for bus 02
[DEBUG]  PCI: 02:00.0 [1344/5410] enabled
[INFO ]  PCIe: Common Clock Configuration already enabled
[INFO ]  PCIE CLK PM is not supported by endpoint
[INFO ]  ASPM: Enabled L1
[EMERG]  CPU Index 9 - APIC 32 Unexpected Exception:18 @ 10:76aeb93f - Halting
[EMERG]  Code: 0 eflags: 00000046 cr2: 00000000
[EMERG]  eax: 00000000 ebx: 00000009 ecx: 00000000 edx: 00000000
[EMERG]  edi: 00000009 esi: 76b218c4 ebp: 00000000 esp: 76b29100
[EMERG]  0x76aeb8f8:    c4 2c 5b 5e 5f 5d c3 56
[EMERG]  0x76aeb900:    53 83 ec 14 65 a1 00 00

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: If2acdc16f37cdae0292f55d210b058f82179bfb4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-03-21 11:36:32 +00:00
..
acpi acpi: Add SRAT x2APIC table support 2023-03-03 17:08:27 +00:00
arch arch/x86/ioapic: Print IOAPIC ID for GSI #0 2023-03-16 15:19:10 +00:00
commonlib security/tpm: add TPM log format as per 2.0 spec 2023-03-04 02:01:48 +00:00
console console: Add SimNow console logging 2023-02-09 10:01:20 +00:00
cpu cpu/x86/cache: CLFLUSH programs to memory before running 2023-03-13 13:42:32 +00:00
device device/Kconfig: explain which PCI ID needs to be used for VGA_BIOS_ID 2023-03-09 22:53:02 +00:00
drivers drivers/intel/fsp2_0: Have provision for caching TOM region 2023-03-13 14:13:42 +00:00
ec Revert "ec/starlabs/merlin: Add support for enabling the mirror flag" 2023-03-09 21:38:26 +00:00
include soc/intel/xeon_sp/spr: Add header files and romstage code 2023-03-19 09:49:03 +00:00
lib lib: set up specific purpose memory as LB_MEM_SOFT_RESERVED 2023-03-03 11:10:38 +00:00
mainboard mb/prodrive/atlas: Configure PCIe CLKREQ 2023-03-21 11:36:32 +00:00
northbridge nb/amd/pi/00730F01/acpi_tables: use existing IO_APIC2_ADDR definition 2023-02-22 22:10:46 +00:00
sbom payloads/Yabits: Remove deprecated Yabits Payload 2023-02-17 01:21:43 +00:00
security security/tpm: add TPM log format as per 2.0 spec 2023-03-04 02:01:48 +00:00
soc soc/intel/elkhartlake: Make PCIe root port speed limit configurable 2023-03-21 11:18:11 +00:00
southbridge util/ifdtool/ifdtool.c: Clean up 2023-03-09 19:36:32 +00:00
superio treewide: Remove useless "_STA: Status" comment 2023-02-19 11:20:37 +00:00
vendorcode soc/amd/mendocino: Consume fsp misc_data hob 2023-03-20 01:33:20 +00:00
Kconfig tree: Drop repeated words 2023-02-07 04:37:31 +00:00