Skip to content

Commit e158856

Browse files
yghannambp3tk0v
authored andcommitted
x86/amd_nb: Add MI200 PCI IDs
The AMD MI200 series accelerators are data center GPUs. They include unified memory controllers and a data fabric similar to those used in AMD x86 CPU products. The memory controllers report errors using MCA, though these errors are generally handled through GPU drivers that directly manage the accelerator device. In some configurations, memory errors from these devices will be reported through MCA and managed by x86 CPUs. The OS is expected to handle these errors in similar fashion to MCA errors originating from memory controllers on the CPUs. In Linux, this flow includes passing MCA errors to a notifier chain with handlers in the EDAC subsystem. The AMD64 EDAC module requires information from the memory controllers and data fabric in order to provide detailed decoding of memory errors. The information is read from hardware registers accessed through interfaces in the data fabric. The accelerator data fabrics are visible to the host x86 CPUs as PCI devices just like x86 CPU data fabrics are already. However, the accelerator fabrics have new and unique PCI IDs. Add PCI IDs for the MI200 series of accelerator devices in order to enable EDAC support. The data fabrics of the accelerator devices will be enumerated as any other fabric already supported. System-specific implementation details will be handled within the AMD64 EDAC module. [ bp: Scrub off marketing speak. ] Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Co-developed-by: Muralidhara M K <muralidhara.mk@amd.com> Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230515113537.1052146-2-muralimk@amd.com
1 parent 2a1d18a commit e158856

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

arch/x86/kernel/amd_nb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#define PCI_DEVICE_ID_AMD_19H_M10H_ROOT 0x14a4
2424
#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8
2525
#define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8
26+
#define PCI_DEVICE_ID_AMD_MI200_ROOT 0x14bb
2627
#define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464
2728
#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
2829
#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
@@ -37,6 +38,7 @@
3738
#define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4
3839
#define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4
3940
#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc
41+
#define PCI_DEVICE_ID_AMD_MI200_DF_F4 0x14d4
4042

4143
/* Protect the PCI config register pairs used for SMN. */
4244
static DEFINE_MUTEX(smn_mutex);
@@ -53,6 +55,7 @@ static const struct pci_device_id amd_root_ids[] = {
5355
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
5456
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_ROOT) },
5557
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_ROOT) },
58+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_ROOT) },
5659
{}
5760
};
5861

@@ -81,6 +84,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
8184
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) },
8285
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) },
8386
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) },
87+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F3) },
8488
{}
8589
};
8690

@@ -101,6 +105,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
101105
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
102106
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
103107
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
108+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F4) },
104109
{}
105110
};
106111

include/linux/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@
568568
#define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3
569569
#define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3
570570
#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb
571+
#define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
571572
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
572573
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
573574
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001

0 commit comments

Comments
 (0)