Re: AMD pcidevs updates

2022-12-02 Thread Mike Larkin
On Fri, Dec 02, 2022 at 07:10:43PM +1100, Jonathan Gray wrote:
> On Wed, Nov 30, 2022 at 07:57:33AM +, Laurence Tratt wrote:
> > On Tue, Nov 29, 2022 at 10:42:36PM +, Laurence Tratt wrote:
> > 
> > > The diff below adds some newish AMD elements to pcidevs.
> > 
> > As Mike Larkin kindly pointed out off-list, I sent a diff to the generated
> > file. Sorry!
> 
> With some more of the devices from the dmesg.
> 
> I can't find any documentation from AMD for this.
> 

ok mlarkin


> Index: pcidevs
> ===
> RCS file: /cvs/src/sys/dev/pci/pcidevs,v
> retrieving revision 1.2012
> diff -u -p -r1.2012 pcidevs
> --- pcidevs   2 Dec 2022 07:29:30 -   1.2012
> +++ pcidevs   2 Dec 2022 07:49:20 -
> @@ -780,6 +780,19 @@ product AMD 19_4X_IOMMU  0x14b6  19h/4xh 
>  product AMD 19_4X_HB_1   0x14b7  19h/4xh Host
>  product AMD 19_4X_PCIE_1 0x14b9  19h/4xh PCIE
>  product AMD 19_4X_PCIE_2 0x14ba  19h/4xh PCIE
> +product AMD 19_6X_RC 0x14d8  19h/6xh Root Complex
> +product AMD 19_6X_IOMMU  0x14d9  19h/6xh IOMMU
> +product AMD 19_6X_HB 0x14da  19h/6xh Host
> +product AMD 19_6X_PCIE_1 0x14db  19h/6xh PCIE
> +product AMD 19_6X_PCIE_2 0x14dd  19h/6xh PCIE
> +product AMD 19_6X_DF_1   0x14e0  19h/6xh Data Fabric
> +product AMD 19_6X_DF_2   0x14e1  19h/6xh Data Fabric
> +product AMD 19_6X_DF_3   0x14e2  19h/6xh Data Fabric
> +product AMD 19_6X_DF_4   0x14e3  19h/6xh Data Fabric
> +product AMD 19_6X_DF_5   0x14e4  19h/6xh Data Fabric
> +product AMD 19_6X_DF_6   0x14e5  19h/6xh Data Fabric
> +product AMD 19_6X_DF_7   0x14e6  19h/6xh Data Fabric
> +product AMD 19_6X_DF_8   0x14e7  19h/6xh Data Fabric
>  product AMD 14_HB0x1510  14h Host
>  product AMD 14_PCIE_10x1512  14h PCIE
>  product AMD 14_PCIE_20x1513  14h PCIE
> @@ -814,6 +827,9 @@ product AMD 16_3X_DRAM0x1582  16h DRAM 
>  product AMD 16_3X_MISC   0x1583  16h Misc Cfg
>  product AMD 16_3X_CPU_PM 0x1584  16h CPU Power
>  product AMD 16_3X_MISC_2 0x1585  16h Misc Cfg
> +product AMD 19_6X_XHCI_1 0x15b6  19h/6xh xHCI
> +product AMD 19_6X_XHCI_2 0x15b7  19h/6xh xHCI
> +product AMD 19_6X_XHCI_3 0x15b8  19h/6xh xHCI
>  product AMD 17_1X_RC 0x15d0  17h/1xh Root Complex
>  product AMD 17_1X_IOMMU  0x15d1  17h/1xh IOMMU
>  product AMD 17_1X_PCIE_1 0x15d3  17h/1xh PCIE
> @@ -930,6 +946,10 @@ product AMD 500SERIES_PCIE_1 0x43e9  500 
>  product AMD 500SERIES_PCIE_2 0x43ea  500 Series PCIE
>  product AMD 500SERIES_AHCI   0x43eb  500 Series AHCI
>  product AMD 500SERIES_XHCI   0x43ee  500 Series xHCI
> +product AMD 600SERIES_PCIE_1 0x43f4  600 Series PCIE
> +product AMD 600SERIES_PCIE_2 0x43f5  600 Series PCIE
> +product AMD 600SERIES_AHCI   0x43f6  600 Series AHCI
> +product AMD 600SERIES_XHCI   0x43f7  600 Series xHCI
>  product AMD 500SERIES_PCIE_3 0x57a3  500 Series PCIE
>  product AMD 500SERIES_PCIE_4 0x57a4  500 Series PCIE
>  product AMD 500SERIES_PCIE_5 0x57ad  500 Series PCIE
> 



Re: AMD pcidevs updates

2022-12-02 Thread Jonathan Gray
On Wed, Nov 30, 2022 at 07:57:33AM +, Laurence Tratt wrote:
> On Tue, Nov 29, 2022 at 10:42:36PM +, Laurence Tratt wrote:
> 
> > The diff below adds some newish AMD elements to pcidevs.
> 
> As Mike Larkin kindly pointed out off-list, I sent a diff to the generated
> file. Sorry!

With some more of the devices from the dmesg.

I can't find any documentation from AMD for this.

Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.2012
diff -u -p -r1.2012 pcidevs
--- pcidevs 2 Dec 2022 07:29:30 -   1.2012
+++ pcidevs 2 Dec 2022 07:49:20 -
@@ -780,6 +780,19 @@ product AMD 19_4X_IOMMU0x14b6  19h/4xh 
 product AMD 19_4X_HB_1 0x14b7  19h/4xh Host
 product AMD 19_4X_PCIE_1   0x14b9  19h/4xh PCIE
 product AMD 19_4X_PCIE_2   0x14ba  19h/4xh PCIE
+product AMD 19_6X_RC   0x14d8  19h/6xh Root Complex
+product AMD 19_6X_IOMMU0x14d9  19h/6xh IOMMU
+product AMD 19_6X_HB   0x14da  19h/6xh Host
+product AMD 19_6X_PCIE_1   0x14db  19h/6xh PCIE
+product AMD 19_6X_PCIE_2   0x14dd  19h/6xh PCIE
+product AMD 19_6X_DF_1 0x14e0  19h/6xh Data Fabric
+product AMD 19_6X_DF_2 0x14e1  19h/6xh Data Fabric
+product AMD 19_6X_DF_3 0x14e2  19h/6xh Data Fabric
+product AMD 19_6X_DF_4 0x14e3  19h/6xh Data Fabric
+product AMD 19_6X_DF_5 0x14e4  19h/6xh Data Fabric
+product AMD 19_6X_DF_6 0x14e5  19h/6xh Data Fabric
+product AMD 19_6X_DF_7 0x14e6  19h/6xh Data Fabric
+product AMD 19_6X_DF_8 0x14e7  19h/6xh Data Fabric
 product AMD 14_HB  0x1510  14h Host
 product AMD 14_PCIE_1  0x1512  14h PCIE
 product AMD 14_PCIE_2  0x1513  14h PCIE
@@ -814,6 +827,9 @@ product AMD 16_3X_DRAM  0x1582  16h DRAM 
 product AMD 16_3X_MISC 0x1583  16h Misc Cfg
 product AMD 16_3X_CPU_PM   0x1584  16h CPU Power
 product AMD 16_3X_MISC_2   0x1585  16h Misc Cfg
+product AMD 19_6X_XHCI_1   0x15b6  19h/6xh xHCI
+product AMD 19_6X_XHCI_2   0x15b7  19h/6xh xHCI
+product AMD 19_6X_XHCI_3   0x15b8  19h/6xh xHCI
 product AMD 17_1X_RC   0x15d0  17h/1xh Root Complex
 product AMD 17_1X_IOMMU0x15d1  17h/1xh IOMMU
 product AMD 17_1X_PCIE_1   0x15d3  17h/1xh PCIE
@@ -930,6 +946,10 @@ product AMD 500SERIES_PCIE_1   0x43e9  500 
 product AMD 500SERIES_PCIE_2   0x43ea  500 Series PCIE
 product AMD 500SERIES_AHCI 0x43eb  500 Series AHCI
 product AMD 500SERIES_XHCI 0x43ee  500 Series xHCI
+product AMD 600SERIES_PCIE_1   0x43f4  600 Series PCIE
+product AMD 600SERIES_PCIE_2   0x43f5  600 Series PCIE
+product AMD 600SERIES_AHCI 0x43f6  600 Series AHCI
+product AMD 600SERIES_XHCI 0x43f7  600 Series xHCI
 product AMD 500SERIES_PCIE_3   0x57a3  500 Series PCIE
 product AMD 500SERIES_PCIE_4   0x57a4  500 Series PCIE
 product AMD 500SERIES_PCIE_5   0x57ad  500 Series PCIE



Re: AMD pcidevs updates

2022-11-29 Thread Laurence Tratt
On Tue, Nov 29, 2022 at 10:42:36PM +, Laurence Tratt wrote:

> The diff below adds some newish AMD elements to pcidevs.

As Mike Larkin kindly pointed out off-list, I sent a diff to the generated
file. Sorry!


Laurie

diff --git sys/dev/pci/pcidevs sys/dev/pci/pcidevs
index 2a395ab413a..158a3cc7640 100644
--- sys/dev/pci/pcidevs
+++ sys/dev/pci/pcidevs
@@ -780,6 +780,16 @@ product AMD 19_4X_IOMMU0x14b6  19h/4xh IOMMU
 product AMD 19_4X_HB_1 0x14b7  19h/4xh Host
 product AMD 19_4X_PCIE_1   0x14b9  19h/4xh PCIE
 product AMD 19_4X_PCIE_2   0x14ba  19h/4xh PCIE
+product AMD 19_6X_RC   0x14d8  19h/6xh Root Complex
+product AMD 19_6X_IOMMU0x14d9  19h/6xh IOMMU
+product AMD 19_6X_DF_1 0x14e0  19h Data Fabric
+product AMD 19_6X_DF_2 0x14e1  19h Data Fabric
+product AMD 19_6X_DF_3 0x14e2  19h Data Fabric
+product AMD 19_6X_DF_4 0x14e3  19h Data Fabric
+product AMD 19_6X_DF_5 0x14e4  19h Data Fabric
+product AMD 19_6X_DF_6 0x14e5  19h Data Fabric
+product AMD 19_6X_DF_7 0x14e6  19h Data Fabric
+product AMD 19_6X_DF_8 0x14e7  19h Data Fabric
 product AMD 14_HB  0x1510  14h Host
 product AMD 14_PCIE_1  0x1512  14h PCIE
 product AMD 14_PCIE_2  0x1513  14h PCIE



AMD pcidevs updates

2022-11-29 Thread Laurence Tratt
The diff below adds some newish AMD elements to pcidevs. Here's the diff of
them on my MSI board:

  -pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x14d8 rev 0x00
  -vendor "AMD", unknown product 0x14d9 (class system subclass IOMMU, rev 0x00) 
at pci0 dev 0 function 2 not configured
  +pchb0 at pci0 dev 0 function 0 "AMD 19h/6xh Root Complex" rev 0x00
  +"AMD 19h/6xh IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured
  -pchb6 at pci0 dev 24 function 0 vendor "AMD", unknown product 0x14e0 rev 0x00
  -pchb7 at pci0 dev 24 function 1 vendor "AMD", unknown product 0x14e1 rev 0x00
  -pchb8 at pci0 dev 24 function 2 vendor "AMD", unknown product 0x14e2 rev 0x00
  -pchb9 at pci0 dev 24 function 3 vendor "AMD", unknown product 0x14e3 rev 0x00
  -pchb10 at pci0 dev 24 function 4 vendor "AMD", unknown product 0x14e4 rev 
0x00
  -pchb11 at pci0 dev 24 function 5 vendor "AMD", unknown product 0x14e5 rev 
0x00
  -pchb12 at pci0 dev 24 function 6 vendor "AMD", unknown product 0x14e6 rev 
0x00
  -pchb13 at pci0 dev 24 function 7 vendor "AMD", unknown product 0x14e7 rev 
0x00
  +pchb6 at pci0 dev 24 function 0 "AMD 19h Data Fabric" rev 0x00
  +pchb7 at pci0 dev 24 function 1 "AMD 19h Data Fabric" rev 0x00
  +pchb8 at pci0 dev 24 function 2 "AMD 19h Data Fabric" rev 0x00
  +pchb9 at pci0 dev 24 function 3 "AMD 19h Data Fabric" rev 0x00
  +pchb10 at pci0 dev 24 function 4 "AMD 19h Data Fabric" rev 0x00
  +pchb11 at pci0 dev 24 function 5 "AMD 19h Data Fabric" rev 0x00
  +pchb12 at pci0 dev 24 function 6 "AMD 19h Data Fabric" rev 0x00
  +pchb13 at pci0 dev 24 function 7 "AMD 19h Data Fabric" rev 0x00

As the dmesg shows, there are several remaining unknown elements, and
several unconfigured, on this machine. The machine is, unfortunately, not
really usable as it loses wireless access and/or input to X (mouse/keyboard
stop working, but the display is fine) after about 15-45 minutes, at which
point only a hard reboot will restore them. Still, fewer "unknown products"
is a start!


Laurie

diff --git sys/dev/pci/pcidevs.h sys/dev/pci/pcidevs.h
index cb1f344909a..7df027538cd 100644
--- sys/dev/pci/pcidevs.h
+++ sys/dev/pci/pcidevs.h
@@ -785,6 +785,16 @@
 #definePCI_PRODUCT_AMD_19_4X_HB_1  0x14b7  /* 19h/4xh Host 
*/
 #definePCI_PRODUCT_AMD_19_4X_PCIE_10x14b9  /* 19h/4xh PCIE 
*/
 #definePCI_PRODUCT_AMD_19_4X_PCIE_20x14ba  /* 19h/4xh PCIE 
*/
+#definePCI_PRODUCT_AMD_19_6X_RC0x14d8  /* 19h/6xh Root 
Complex */
+#definePCI_PRODUCT_AMD_19_6X_IOMMU 0x14d9  /* 19h/6xh 
IOMMU */
+#definePCI_PRODUCT_AMD_19_6X_DF_1  0x14e0  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_2  0x14e1  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_3  0x14e2  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_4  0x14e3  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_5  0x14e4  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_6  0x14e5  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_7  0x14e6  /* 19h Data 
Fabric */
+#definePCI_PRODUCT_AMD_19_6X_DF_8  0x14e7  /* 19h Data 
Fabric */
 #definePCI_PRODUCT_AMD_14_HB   0x1510  /* 14h Host */
 #definePCI_PRODUCT_AMD_14_PCIE_1   0x1512  /* 14h PCIE */
 #definePCI_PRODUCT_AMD_14_PCIE_2   0x1513  /* 14h PCIE */



OpenBSD 7.2-current (GENERIC.MP) #15: Tue Nov 29 22:26:24 GMT 2022
ltr...@phase.tratt.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 33390379008 (31843MB)
avail mem = 32360992768 (30861MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.5 @ 0xa9b2a000 (43 entries)
bios0: vendor American Megatrends International, LLC. version "1.30" date 
10/12/2022
bios0: Micro-Star International Co., Ltd. MS-7D67
efi0 at bios0: UEFI 2.8
efi0: American Megatrends rev 0x5001a
acpi0 at bios0: ACPI 6.4Undefined scope: \\_SB_.PCI0.GPP7.UP00.DP40.UP00.DP68

acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP IVRS SSDT SSDT FIDT MCFG HPET WDRT UEFI FPDT VFCT TPM2 
SSDT CRAT CDIT BGRT SSDT SSDT SSDT SSDT WSMT APIC SSDT SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT
acpi0: wakeup devices GPP3(S4) GPP4(S4) GPP5(S4) GPP6(S4) GP17(S4) XHC0(S4) 
XHC1(S4) XHC2(S4) GPP0(S4) GPP1(S4) GPP2(S4) GPP7(S4) GPP8(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xf000, bus 0-127
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 9 7900X 12-Core Processor, 4700.00 MHz, 19-61-02
cpu0: