summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/skylake/chip.c
diff options
context:
space:
mode:
authorMAULIK V VAGHELA <maulik.v.vaghela@intel.com>2022-02-14 22:04:03 +0530
committerNico Huber <nico.h@gmx.de>2022-02-25 18:59:51 +0000
commitd9c5b14f1efe82a902a7a4ed543015948364f296 (patch)
treed6acce03807daa5fad6eba3e2f8a253b80743a56 /src/soc/intel/skylake/chip.c
parent811aab358647c2c26f40071bda25e5ac3a214f50 (diff)
downloadcoreboot-d9c5b14f1efe82a902a7a4ed543015948364f296.tar.gz
coreboot-d9c5b14f1efe82a902a7a4ed543015948364f296.tar.bz2
coreboot-d9c5b14f1efe82a902a7a4ed543015948364f296.zip
intelblocks/pcie: Correct mapping between LCAP port and coreboot index
coreboot uses port index which is 0 based for all PCIe root ports. In case of PCIe remapping logic, coreboot reads LCAP register from PCIe configuration space which contains port number (mostly 1 based). This assumption might not be true for all the ports in coreboot. TBT's LCAP registers are returning port index which are based on 2. coreboot's PCIe remapping logic returns port index based on index 1. This patch adds variable to pcie_rp_config to pass lcap_port_base to the pcie remapping function, so coreboot can map any n-based LCAP encoding to 0-based indexing scheme. This patch updates correct lcap_port_base variable for all PCIe root ports for all SOCs, so that function returns correct 0-based index from LCAP port number. BUG=b:210933428 BRANCH=None TEST=Check if code compiles for all ADL boards Change-Id: I7f9c3c8e753b982e2ede1a41bf87d6355b82da0f Signed-off-by: MAULIK V VAGHELA <maulik.v.vaghela@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61936 Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/skylake/chip.c')
-rw-r--r--src/soc/intel/skylake/chip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c
index 5c1cc6113f83..7c77a8966cf7 100644
--- a/src/soc/intel/skylake/chip.c
+++ b/src/soc/intel/skylake/chip.c
@@ -34,18 +34,18 @@
#include "chip.h"
static const struct pcie_rp_group pch_lp_rp_groups[] = {
- { .slot = PCH_DEV_SLOT_PCIE, .count = 8 },
- { .slot = PCH_DEV_SLOT_PCIE_1, .count = 4 },
+ { .slot = PCH_DEV_SLOT_PCIE, .count = 8, .lcap_port_base = 1 },
+ { .slot = PCH_DEV_SLOT_PCIE_1, .count = 4, .lcap_port_base = 1 },
{ 0 }
};
static const struct pcie_rp_group pch_h_rp_groups[] = {
- { .slot = PCH_DEV_SLOT_PCIE, .count = 8 },
- { .slot = PCH_DEV_SLOT_PCIE_1, .count = 8 },
+ { .slot = PCH_DEV_SLOT_PCIE, .count = 8, .lcap_port_base = 1 },
+ { .slot = PCH_DEV_SLOT_PCIE_1, .count = 8, .lcap_port_base = 1 },
/* Sunrise Point PCH-H actually only has 4 ports in the
third group. But that would require a runtime check
and probing 4 non-existent ports shouldn't hurt. */
- { .slot = PCH_DEV_SLOT_PCIE_2, .count = 8 },
+ { .slot = PCH_DEV_SLOT_PCIE_2, .count = 8, .lcap_port_base = 1 },
{ 0 }
};