Skip to content

Commit 9ad08c1

Browse files
qzhuo2aegl
authored andcommitted
EDAC/i10nm: Add Intel Granite Rapids-D support
The Granite Rapids-D CPU model uses memory controller registers similar to those of the Granite Rapids server CPU but with a different memory controller MMIO base. Add the Granite Rapids-D CPU model ID and use the new memory controller MMIO base for EDAC support. Signed-off-by: Qiuxu Zhuo <[email protected]> Signed-off-by: Tony Luck <[email protected]> Tested-by: VikasX Chougule <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 815703e commit 9ad08c1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

drivers/edac/i10nm_base.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
((GET_BITFIELD(reg, 0, 10) << 12) + 0x140000)
6363

6464
#define I10NM_GNR_IMC_MMIO_OFFSET 0x24c000
65+
#define I10NM_GNR_D_IMC_MMIO_OFFSET 0x206000
6566
#define I10NM_GNR_IMC_MMIO_SIZE 0x4000
6667
#define I10NM_HBM_IMC_MMIO_SIZE 0x9000
6768
#define I10NM_DDR_IMC_CH_CNT(reg) GET_BITFIELD(reg, 21, 24)
@@ -687,6 +688,14 @@ static struct pci_dev *get_gnr_mdev(struct skx_dev *d, int logical_idx, int *phy
687688
return NULL;
688689
}
689690

691+
static u32 get_gnr_imc_mmio_offset(void)
692+
{
693+
if (boot_cpu_data.x86_vfm == INTEL_GRANITERAPIDS_D)
694+
return I10NM_GNR_D_IMC_MMIO_OFFSET;
695+
696+
return I10NM_GNR_IMC_MMIO_OFFSET;
697+
}
698+
690699
/**
691700
* get_ddr_munit() - Get the resource of the i-th DDR memory controller.
692701
*
@@ -715,7 +724,7 @@ static struct pci_dev *get_ddr_munit(struct skx_dev *d, int i, u32 *offset, unsi
715724
return NULL;
716725

717726
*offset = I10NM_GET_IMC_MMIO_OFFSET(reg) +
718-
I10NM_GNR_IMC_MMIO_OFFSET +
727+
get_gnr_imc_mmio_offset() +
719728
physical_idx * I10NM_GNR_IMC_MMIO_SIZE;
720729
*size = I10NM_GNR_IMC_MMIO_SIZE;
721730

@@ -1030,6 +1039,7 @@ static const struct x86_cpu_id i10nm_cpuids[] = {
10301039
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, &spr_cfg),
10311040
X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, &spr_cfg),
10321041
X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, &gnr_cfg),
1042+
X86_MATCH_VFM(INTEL_GRANITERAPIDS_D, &gnr_cfg),
10331043
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, &gnr_cfg),
10341044
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, &gnr_cfg),
10351045
X86_MATCH_VFM(INTEL_ATOM_DARKMONT_X, &gnr_cfg),

0 commit comments

Comments
 (0)