869ac71483
This reverts commit c04871a398
.
Reason for revert: Many apu2 users reported issues with PCIe modules
detection in mPCIe2 slot (4x GFX PCIe). The regression was not caught
by 3mdeb validation stands and hardware configuration.
Change-Id: I609bf4b27c88a9adf676d576169f5ca26726ee86
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40147
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
81 lines
2.1 KiB
C
81 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* This file is part of the coreboot project. */
|
|
|
|
#include <AGESA.h>
|
|
#include <northbridge/amd/agesa/state_machine.h>
|
|
|
|
static const PCIe_PORT_DESCRIPTOR PortList[] = {
|
|
{
|
|
0,
|
|
PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 3, 3),
|
|
PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled, ChannelTypeExt6db, 2, 5,
|
|
HotplugDisabled,
|
|
PcieGenMaxSupported,
|
|
PcieGenMaxSupported,
|
|
AspmL0sL1,
|
|
0x01,
|
|
0)
|
|
},
|
|
/* Initialize Port descriptor (PCIe port, Lanes 1, PCI Device Number 2, ...) */
|
|
{
|
|
0,
|
|
PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 2, 2),
|
|
PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled, ChannelTypeExt6db, 2, 4,
|
|
HotplugDisabled,
|
|
PcieGenMaxSupported,
|
|
PcieGenMaxSupported,
|
|
AspmL0sL1,
|
|
0x02,
|
|
0)
|
|
},
|
|
/* Initialize Port descriptor (PCIe port, Lanes 2, PCI Device Number 2, ...) */
|
|
{
|
|
0,
|
|
PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 1, 1),
|
|
PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled, ChannelTypeExt6db, 2, 3,
|
|
HotplugDisabled,
|
|
PcieGenMaxSupported,
|
|
PcieGenMaxSupported,
|
|
AspmL0sL1,
|
|
0x03,
|
|
0)
|
|
},
|
|
/* Initialize Port descriptor (PCIe port, Lanes 3, PCI Device Number 2, ...) */
|
|
{
|
|
0,
|
|
PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 0, 0),
|
|
PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled, ChannelTypeExt6db, 2, 2,
|
|
HotplugDisabled,
|
|
PcieGenMaxSupported,
|
|
PcieGenMaxSupported,
|
|
AspmL0sL1,
|
|
0x04,
|
|
0)
|
|
},
|
|
/* Initialize Port descriptor (PCIe port, Lanes 4-7, PCI Device Number 4, ...) */
|
|
{
|
|
DESCRIPTOR_TERMINATE_LIST,
|
|
PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 4, 7),
|
|
PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled, ChannelTypeExt6db, 2, 1,
|
|
HotplugDisabled,
|
|
PcieGenMaxSupported,
|
|
PcieGenMaxSupported,
|
|
AspmL0sL1,
|
|
0x05,
|
|
0)
|
|
}
|
|
};
|
|
|
|
static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
|
|
.Flags = DESCRIPTOR_TERMINATE_LIST,
|
|
.SocketId = 0,
|
|
.PciePortList = PortList,
|
|
.DdiLinkList = NULL,
|
|
};
|
|
|
|
void board_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *InitEarly)
|
|
{
|
|
InitEarly->GnbConfig.PcieComplexList = &PcieComplex;
|
|
InitEarly->PlatformConfig.CStateMode = CStateModeC6;
|
|
InitEarly->PlatformConfig.CpbMode = CpbModeAuto;
|
|
}
|