diff options
Diffstat (limited to 'usr/src/uts/intel')
-rw-r--r-- | usr/src/uts/intel/ia32/sys/Makefile | 6 | ||||
-rw-r--r-- | usr/src/uts/intel/ia32/sys/kdi_regs.h | 73 | ||||
-rw-r--r-- | usr/src/uts/intel/ia32/sys/privmregs.h | 67 | ||||
-rw-r--r-- | usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c | 31 | ||||
-rw-r--r-- | usr/src/uts/intel/os/driver_aliases | 5 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/x86_archext.h | 18 |
6 files changed, 195 insertions, 5 deletions
diff --git a/usr/src/uts/intel/ia32/sys/Makefile b/usr/src/uts/intel/ia32/sys/Makefile index 5f4708436f..0ef2320b16 100644 --- a/usr/src/uts/intel/ia32/sys/Makefile +++ b/usr/src/uts/intel/ia32/sys/Makefile @@ -19,17 +19,21 @@ # CDDL HEADER END # # +#pragma ident "%Z%%M% %I% %E% SMI" +# # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Copyright 2020 Joyent, Inc. +# uts/intel/ia32/sys/Makefile # # include global definitions include ../../../../Makefile.master HDRS= \ asm_linkage.h \ + kdi_regs.h \ machtypes.h \ + privmregs.h \ privregs.h \ psw.h \ pte.h \ diff --git a/usr/src/uts/intel/ia32/sys/kdi_regs.h b/usr/src/uts/intel/ia32/sys/kdi_regs.h new file mode 100644 index 0000000000..e87948189a --- /dev/null +++ b/usr/src/uts/intel/ia32/sys/kdi_regs.h @@ -0,0 +1,73 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * Copyright 2018 Joyent, Inc. + */ + +#ifndef _IA32_SYS_KDI_REGS_H +#define _IA32_SYS_KDI_REGS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define KDIREG_NGREG 21 + +/* + * %ss appears in a different place than a typical struct regs, since the + * machine won't save %ss on a trap entry from the same privilege level. + */ + +#define KDIREG_SAVFP 0 +#define KDIREG_SAVPC 1 +#define KDIREG_SS 2 +#define KDIREG_GS 3 +#define KDIREG_FS 4 +#define KDIREG_ES 5 +#define KDIREG_DS 6 +#define KDIREG_EDI 7 +#define KDIREG_ESI 8 +#define KDIREG_EBP 9 +#define KDIREG_ESP 10 +#define KDIREG_EBX 11 +#define KDIREG_EDX 12 +#define KDIREG_ECX 13 +#define KDIREG_EAX 14 +#define KDIREG_TRAPNO 15 +#define KDIREG_ERR 16 +#define KDIREG_EIP 17 +#define KDIREG_CS 18 +#define KDIREG_EFLAGS 19 +#define KDIREG_UESP 20 + +#define KDIREG_PC KDIREG_EIP +#define KDIREG_SP KDIREG_ESP +#define KDIREG_FP KDIREG_EBP + +#ifdef __cplusplus +} +#endif + +#endif /* _IA32_SYS_KDI_REGS_H */ diff --git a/usr/src/uts/intel/ia32/sys/privmregs.h b/usr/src/uts/intel/ia32/sys/privmregs.h new file mode 100644 index 0000000000..87d9b74bfe --- /dev/null +++ b/usr/src/uts/intel/ia32/sys/privmregs.h @@ -0,0 +1,67 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _IA32_SYS_PRIVMREGS_H +#define _IA32_SYS_PRIVMREGS_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(__i386) +#error "non-i386 code depends on i386 privileged header!" +#endif + +#ifndef _ASM + +#define PM_GREGS (1 << 0) +#define PM_CRREGS (1 << 1) +#define PM_DRREGS (1 << 2) + +/* + * This structure is intended to represent a complete machine state for a CPU, + * when that information is available. It is only for use internally between + * KMDB and the kernel, or within MDB. Note that this isn't yet finished. + */ +typedef struct privmregs { + ulong_t pm_flags; + /* general registers */ + struct regs pm_gregs; + /* cr0-8 */ + ulong_t pm_cr[8]; + /* dr0-8 */ + ulong_t pm_dr[8]; +} privmregs_t; + +#endif /* !_ASM */ + +#ifdef __cplusplus +} +#endif + +#endif /* !_IA32_SYS_PRIVMREGS_H */ diff --git a/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c b/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c index 11bddfa515..b1191f8f9e 100644 --- a/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c +++ b/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c @@ -75,9 +75,9 @@ * value in the corresponding data fabric's AMDF17_DF_CFG_ADDR_CTL. * * This means that we can map a northbridge to a data fabric device and a data - * fabric device to a die. Because these are 1:1 mappings, there is a transitive - * relationship and therefore we know which northbridge is associated with which - * processor die. This is summarized in the following image: + * fabric device to a die. Because these are generally 1:1 mappings, there is a + * transitive relationship and therefore we know which northbridge is associated + * with which processor die. This is summarized in the following image: * * +-------+ +----------------------------+ +--------------+ * | Die 0 | ---> | Data Fabric PCI BDF 0/18/0 |-------> | Northbridge | @@ -93,6 +93,17 @@ * of the data fabric accurately models hardware. All of the BDF values are in * hex. * + * Starting with the Rome generation of processors (Family 17h Model 30-3Fh), + * AMD has multiple northbridges that exist on a given die. All of these + * northbridges share the same data fabric and system management network port. + * From our perspective this means that some of the northbridge devices will be + * redundant and that we will no longer have a 1:1 mapping between the + * northbridge and the data fabric devices. Every data fabric will have a + * northbridge, but not every northbridge will have a data fabric device mapped. + * Because we're always trying to map from a die to a northbridge and not the + * reverse, the fact that there are extra northbridge devices hanging around + * that we don't know about shouldn't be a problem. + * * ------------------------------- * Attach and Detach Complications * ------------------------------- @@ -246,6 +257,20 @@ static const amdf17nbdf_table_t amdf17nbdf_dev_map[] = { /* Family 17h Ryzen, Epyc Models 00h-0fh (Zen uarch) */ { 0x1450, AMD_NBDF_TYPE_NORTHBRIDGE }, { 0x1460, AMD_NBDF_TYPE_DATA_FABRIC }, + /* Family 17h Raven Ridge Models 10h-1fh (Zen uarch) */ + { 0x15d0, AMD_NBDF_TYPE_NORTHBRIDGE }, + { 0x15e8, AMD_NBDF_TYPE_DATA_FABRIC }, + /* Family 17h Epyc Models 30h-3fh (Zen 2 uarch) */ + { 0x1480, AMD_NBDF_TYPE_NORTHBRIDGE }, + { 0x1490, AMD_NBDF_TYPE_DATA_FABRIC }, + /* + * Family 17h Ryzen Models 70-7fh (Zen 2 uarch) + * + * While this family has its own PCI ID for the data fabric device, it + * shares the same northbridge ID as the Zen 2 EPYC models 30-3f -- + * 0x1480. + */ + { 0x1440, AMD_NBDF_TYPE_DATA_FABRIC }, { PCI_EINVAL16 } }; diff --git a/usr/src/uts/intel/os/driver_aliases b/usr/src/uts/intel/os/driver_aliases index fdcac2292b..8f4c2f1bf2 100644 --- a/usr/src/uts/intel/os/driver_aliases +++ b/usr/src/uts/intel/os/driver_aliases @@ -67,8 +67,13 @@ amd64_gart "pci1022,1103" amd8111s "pci1022,7462" amd_iommu "pci1002,5a23" amd_iommu "pci1022,11ff" +amdf17nbdf "pci1022,1440,p" amdf17nbdf "pci1022,1450,p" amdf17nbdf "pci1022,1460,p" +amdf17nbdf "pci1022,1480,p" +amdf17nbdf "pci1022,1490,p" +amdf17nbdf "pci1022,15d0,p" +amdf17nbdf "pci1022,15e8,p" amdnbtemp "pci1022,1203,p" amdnbtemp "pci1022,1303,p" amdnbtemp "pci1022,1403,p" diff --git a/usr/src/uts/intel/sys/x86_archext.h b/usr/src/uts/intel/sys/x86_archext.h index bbf8ed2c57..d0efa8c384 100644 --- a/usr/src/uts/intel/sys/x86_archext.h +++ b/usr/src/uts/intel/sys/x86_archext.h @@ -944,6 +944,21 @@ extern "C" { #define X86_CHIPREV_AMD_17_PiR_B2 \ _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x17, 0x0003) +#define X86_CHIPREV_AMD_17_RV_B0 \ + _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x17, 0x0004) + +#define X86_CHIPREV_AMD_17_RV_B1 \ + _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x17, 0x0005) + +#define X86_CHIPREV_AMD_17_PCO_B1 \ + _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x17, 0x0006) + +#define X86_CHIPREV_AMD_17_SSP_A0 \ + _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x17, 0x0007) + +#define X86_CHIPREV_AMD_17_SSP_B0 \ + _X86_CHIPREV_MKREV(X86_VENDOR_AMD, 0x17, 0x0008) + /* * Various socket/package types, extended as the need to distinguish * a new type arises. The top 8 byte identfies the vendor and the @@ -998,7 +1013,8 @@ extern "C" { #define X86_SOCKET_FT3B _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x1e) #define X86_SOCKET_SP3 _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x1f) #define X86_SOCKET_SP3R2 _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x20) -#define X86_NUM_SOCKETS_AMD 0x21 +#define X86_SOCKET_FP5 _X86_SOCKET_MKVAL(X86_VENDOR_AMD, 0x21) +#define X86_NUM_SOCKETS_AMD 0x22 /* |