Skip to content

Commit 4e591c0

Browse files
qzhuo2aegl
authored andcommitted
EDAC/igen6: Add Intel ICL-NNPI SoC support
The Ice Lake Neural Network Processor for Deep Learning Inference (ICL-NNPI) SoC shares the same memory controller and In-Band ECC with Elkhart Lake SoC. Add the ICL-NNPI compute die IDs for EDAC support. Signed-off-by: Qiuxu Zhuo <[email protected]> Signed-off-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c945088 commit 4e591c0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

drivers/edac/igen6_edac.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ static struct work_struct ecclog_work;
183183
#define DID_EHL_SKU14 0x4534
184184
#define DID_EHL_SKU15 0x4536
185185

186+
/* Compute die IDs for ICL-NNPI with IBECC */
187+
#define DID_ICL_SKU8 0x4581
188+
#define DID_ICL_SKU10 0x4585
189+
#define DID_ICL_SKU11 0x4589
190+
#define DID_ICL_SKU12 0x458d
191+
186192
static bool ehl_ibecc_available(struct pci_dev *pdev)
187193
{
188194
u32 v;
@@ -212,6 +218,17 @@ static u64 ehl_err_addr_to_imc_addr(u64 eaddr)
212218
return eaddr;
213219
}
214220

221+
static bool icl_ibecc_available(struct pci_dev *pdev)
222+
{
223+
u32 v;
224+
225+
if (pci_read_config_dword(pdev, CAPID_C_OFFSET, &v))
226+
return false;
227+
228+
return !(CAPID_C_IBECC & v) &&
229+
(boot_cpu_data.x86_stepping >= 1);
230+
}
231+
215232
static struct res_config ehl_cfg = {
216233
.num_imc = 1,
217234
.ibecc_base = 0xdc00,
@@ -220,6 +237,14 @@ static struct res_config ehl_cfg = {
220237
.err_addr_to_imc_addr = ehl_err_addr_to_imc_addr,
221238
};
222239

240+
static struct res_config icl_cfg = {
241+
.num_imc = 1,
242+
.ibecc_base = 0xd800,
243+
.ibecc_available = icl_ibecc_available,
244+
.err_addr_to_sys_addr = ehl_err_addr_to_sys_addr,
245+
.err_addr_to_imc_addr = ehl_err_addr_to_imc_addr,
246+
};
247+
223248
static const struct pci_device_id igen6_pci_tbl[] = {
224249
{ PCI_VDEVICE(INTEL, DID_EHL_SKU5), (kernel_ulong_t)&ehl_cfg },
225250
{ PCI_VDEVICE(INTEL, DID_EHL_SKU6), (kernel_ulong_t)&ehl_cfg },
@@ -232,6 +257,10 @@ static const struct pci_device_id igen6_pci_tbl[] = {
232257
{ PCI_VDEVICE(INTEL, DID_EHL_SKU13), (kernel_ulong_t)&ehl_cfg },
233258
{ PCI_VDEVICE(INTEL, DID_EHL_SKU14), (kernel_ulong_t)&ehl_cfg },
234259
{ PCI_VDEVICE(INTEL, DID_EHL_SKU15), (kernel_ulong_t)&ehl_cfg },
260+
{ PCI_VDEVICE(INTEL, DID_ICL_SKU8), (kernel_ulong_t)&icl_cfg },
261+
{ PCI_VDEVICE(INTEL, DID_ICL_SKU10), (kernel_ulong_t)&icl_cfg },
262+
{ PCI_VDEVICE(INTEL, DID_ICL_SKU11), (kernel_ulong_t)&icl_cfg },
263+
{ PCI_VDEVICE(INTEL, DID_ICL_SKU12), (kernel_ulong_t)&icl_cfg },
235264
{ },
236265
};
237266
MODULE_DEVICE_TABLE(pci, igen6_pci_tbl);

0 commit comments

Comments
 (0)