Ryzen 7000 Testing

backinblackx86

Member
AMD OS X Member
Joined
Nov 10, 2022
Messages
56
I’m making progress!

 

Aluveitie

Donator
Donator
AMD OS X Member
Joined
May 2, 2020
Messages
895
Nice GPU, RTX 6000? Then I can see why you went with a $1K motherboard :D

But it won't be usable on macOS.
 

backinblackx86

Member
AMD OS X Member
Joined
Nov 10, 2022
Messages
56
Yes, the machine is for multi OS purpose. I do have an AMD graphics card as well specifically for MacOS. I’d like to run VMs and pass through the corresponding hardware to each OS.
 

Galve2000

Donator
Donator
AMD OS X Member
Joined
Sep 19, 2020
Messages
234
Yes, the machine is for multi OS purpose. I do have an AMD graphics card as well specifically for MacOS. I’d like to run VMs and pass through the corresponding hardware to each OS.

Is it bad that the graphics cards are running in x8 lanes instead of x16? or am I drinking too much Koolaid?
 

etorix

Active member
AMD OS X Member
Joined
Oct 7, 2022
Messages
72
Is it bad that the graphics cards are running in x8 lanes instead of x16? or am I drinking too much Koolaid?
PCIe4.0 x8 has the same bandwidth as PCIe 3.0 x16 and few workloads manage to make use of all that.

I’d like to run VMs and pass through the corresponding hardware to each OS.
Virtualisation may well solve issues with macOS here. Which hypervisor?
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Interim Update #13:
  • My earlier assertion that base address registers (BAR0) for PCI devices other than GPU and USB were being zeroed out or invalidated is not correct
  • BARs are fine throughout the initialization sequence
  • Something else is causing the PCI devices to become unreadable, but this happens after IOPCIConfigurator has scanned the system and populated IOReg
  • Below are all the "read" operations performed by IOPCIConfigurator on I225 (device 9:0:0).
  • We can see that the device is responding properly; near the end of the list, the Device and Vendor IDs are read: 0x15f38086
Bash:
% cat log-IOPCIConfigure.txt| grep ' 9:0:0'

2022-11-11 12:14:29.473249-0800 0x5b1      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473250-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473255-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473256-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473269-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read16 9:0:0 offset=0x4 valueRead=0x6
2022-11-11 12:14:29.473270-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read16 9:0:0 offset=0x4 valueRead=0x6
2022-11-11 12:14:29.473277-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473278-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473282-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473283-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473289-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473290-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473293-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473294-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473300-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473301-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473305-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473306-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473310-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473311-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473316-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473317-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.475214-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x0 valueRead=0x15f38086
2022-11-11 12:14:29.475216-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x0 valueRead=0x15f38086
2022-11-11 12:14:29.475219-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x8 valueRead=0x2000003
2022-11-11 12:14:29.475220-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x8 valueRead=0x2000003
2022-11-11 12:14:29.475224-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x2c valueRead=0x87d21043
2022-11-11 12:14:29.475225-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x2c valueRead=0x87d21043
  • But soon after IOReg has been populated, the device becomes unreadable, but it's not due to BAR
Bash:
% cat log-Post-Configure.txt| grep ' 9:0:0'

[    3.928470]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    3.929055]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.149859]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.150448]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.372754]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.373407]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.594281]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.594931]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.817570]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.818285]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.040040]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.040798]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.263074]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.263853]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.484857]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.485595]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.709331]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.710143]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.932693]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.933548]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.154652]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.155525]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.376615]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    6.377483]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    6.600105]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.601027]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.822140]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.823052]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.044176]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.045096]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.267789]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.268686]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.489837]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.490746]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.713473]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.714411]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.935575]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.936521]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.157699]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.158622]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.381457]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.382434]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.603637]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.604590]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.827514]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.828510]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    9.049734]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    9.050713]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    9.271825]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    9.272735]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Interim Update #13 continued...
  • When IOPCIFamily begins the process of allocating nub resources, function initializeNub is called, which copies device memory settings (bar0, bar1, etc.) from IOReg into the IOPCIDevice structure
  • From that point onwards, we see the correct BAR0 address
  • So BAR is not the problem!
  • My suspicion is gradually turning to AppleACPIPlatform as being the culprit, not IOPCIFamily
  • But I'm not done yet with IOPCIFamily -- I've traced all configRead calls, but I haven't traced configWrite
    • It's possible that something is being written via configWrite that is powering down PCI devices
Bash:
# before device interrupt allocation process begins
[    9.797848]: Casey configAccess I225 bar0=0x0
[   10.020284]: Casey configAccess I225 bar0=0x0
[   10.022349]: Casey configAccess I225 bar0=0x0
[   10.244730]: Casey configAccess I225 bar0=0x0
[   10.246737]: Casey configAccess I225 bar0=0x0
[   10.469104]: Casey configAccess I225 bar0=0x0
[   10.471076]: Casey configAccess I225 bar0=0x0

# after device interrupt allocation process begins
[   26.821200]: Casey configAccess I225 bar0=0xfc100000
[   26.821200]: Casey configAccess I225 bar0=0xfc100000
[   27.041409]: Casey configAccess I225 bar0=0xfc100000
[   27.041410]: Casey configAccess I225 bar0=0xfc100000
[   28.458209]: Casey configAccess I225 bar0=0xfc100000
[   28.651136]: Casey configAccess I225 bar0=0xfc100000
[   28.874459]: Casey configAccess I225 bar0=0xfc100000
[   28.877230]: Casey configAccess I225 bar0=0xfc100000
[   29.320705]: Casey configAccess I225 bar0=0xfc100000
[   29.323467]: Casey configAccess I225 bar0=0xfc100000
[   29.546731]: Casey configAccess I225 bar0=0xfc100000
[   29.549534]: Casey configAccess I225 bar0=0xfc100000
[   29.772804]: Casey configAccess I225 bar0=0xfc100000
[   29.775492]: Casey configAccess I225 bar0=0xfc100000
[   29.998573]: Casey configAccess I225 bar0=0xfc100000
[   30.001009]: Casey configAccess I225 bar0=0xfc100000
[   30.224031]: Casey configAccess I225 bar0=0xfc100000
[   30.226404]: Casey configAccess I225 bar0=0xfc100000
[   30.449357]: Casey configAccess I225 bar0=0xfc100000
[   30.451701]: Casey configAccess I225 bar0=0xfc100000
[   30.674624]: Casey configAccess I225 bar0=0xfc100000
[   30.676926]: Casey configAccess I225 bar0=0xfc100000
 
Last edited:

backinblackx86

Member
AMD OS X Member
Joined
Nov 10, 2022
Messages
56
Interim Update #13:
  • My earlier assertion that base address registers (BAR0) for PCI devices other than GPU and USB were being zeroed out or invalidated is not correct
  • BARs are fine throughout the initialization sequence
  • Something else is causing the PCI devices to become unreadable, but this happens after IOPCIConfigurator has scanned the system and populated IOReg
  • Below are all the "read" operations performed by IOPCIConfigurator on I225 (device 9:0:0).
  • We can see that the device is responding properly; near the end of the list, the Device and Vendor IDs are read: 0x15f38086
Bash:
% cat log-IOPCIConfigure.txt| grep ' 9:0:0'

2022-11-11 12:14:29.473249-0800 0x5b1      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473250-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473255-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473256-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473269-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read16 9:0:0 offset=0x4 valueRead=0x6
2022-11-11 12:14:29.473270-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read16 9:0:0 offset=0x4 valueRead=0x6
2022-11-11 12:14:29.473277-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473278-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473282-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473283-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x10 valueRead=0xfc100000
2022-11-11 12:14:29.473289-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473290-0800 0x58d      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473293-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473294-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x1c valueRead=0xfc200000
2022-11-11 12:14:29.473300-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473301-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473305-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473306-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0x100006
2022-11-11 12:14:29.473310-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473311-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473316-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.473317-0800 0x5fe      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read8 9:0:0 offset=0xd valueRead=0x0
2022-11-11 12:14:29.475214-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x0 valueRead=0x15f38086
2022-11-11 12:14:29.475216-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x0 valueRead=0x15f38086
2022-11-11 12:14:29.475219-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x8 valueRead=0x2000003
2022-11-11 12:14:29.475220-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x8 valueRead=0x2000003
2022-11-11 12:14:29.475224-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x2c valueRead=0x87d21043
2022-11-11 12:14:29.475225-0800 0x723      Default     0x0                  0      0    kernel: (IOPCIFamily) Casey IOPCIConfig:Read32 9:0:0 offset=0x2c valueRead=0x87d21043
  • But soon after IOReg has been populated, the device becomes unreadable, but it's not due to BAR
Bash:
% cat log-Post-Configure.txt| grep ' 9:0:0'

[    3.928470]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    3.929055]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.149859]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.150448]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.372754]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.373407]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.594281]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.594931]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    4.817570]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    4.818285]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.040040]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.040798]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.263074]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.263853]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.484857]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.485595]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.709331]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.710143]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    5.932693]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    5.933548]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.154652]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.155525]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.376615]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    6.377483]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    6.600105]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.601027]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.822140]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    6.823052]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.044176]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.045096]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.267789]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.268686]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.489837]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.490746]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    7.713473]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.714411]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.935575]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    7.936521]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.157699]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.158622]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.381457]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.382434]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.603637]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.604590]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    8.827514]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    8.828510]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    9.049734]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    9.050713]: Casey IOPCIConfig:Read32 9:0:0 offset=0x4 valueRead=0xffffffff
[    9.271825]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
[    9.272735]: Casey IOPCIConfig:Read32 9:0:0 offset=0x34 valueRead=0xffffffff
unrelated but my board would not give BIOs monitor output from the a6000 unless in CSM compatibility mode and neither would the Ubuntu nvme show as a boot device. Ubuntu only would boot in “maintenance mode.” Trying a fresh install of Ubuntu server now. Quirky ASUS bios…
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Last edited:

backinblackx86

Member
AMD OS X Member
Joined
Nov 10, 2022
Messages
56
I updated to the latest bios available from October. CSM is no longer required for the a6000 to display video output. However, my m2_2 slot does NOT register any of my m2 nvme disks. Only m2_1 shows in the bios. Weird. Anyway, fresh Ubuntu server installed 1-2-3, even Wi-Fi and both nics work. Besides the m2_2 issue, everything appears OK. Initially I could not post into BIOs without sticking in my NVIDIA GeForce 1650. Had to press Y to reset a CPU security feature.
 

agent2

Donator
Donator
Joined
May 3, 2020
Messages
160
I updated to the latest bios available from October. CSM is no longer required for the a6000 to display video output. However, my m2_2 slot does NOT register any of my m2 nvme disks. Only m2_1 shows in the bios. Weird. Anyway, fresh Ubuntu server installed 1-2-3, even Wi-Fi and both nics work. Besides the m2_2 issue, everything appears OK. Initially I could not post into BIOs without sticking in my NVIDIA GeForce 1650. Had to press Y to reset a CPU security feature.
Hey man, congrats on the bad-ass mobo purchase! I know the problem to your M2_2 issue. The board bifurcates the 16x GPU lanes from the CPU into x8 for the top x16 slot and into x4 for the second the PCIe x16 slot, which leaves 4 lanes for the M2_2 slot.
But because you probably set the A6000 to 16x lanes in the UEFI, the M.2 drive isn't being read. If you want it to appear either set the second x16 slot to x4 or use the M2_1/Gen-Z.2 card to continue getting the full 16 lanes to the GPU.
I hope this solves your issue, it's kinda weir how Asus makes M.2 slots that sneakily take CPU lanes away even though the chipset has more than enough...
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
After tracing-logging all device reads and writes, we can now see everything that happens to I225 (device 9:0:0:0) during startup.
  • First, IOPCIConfigurator scans the entire bus and reads properties and capabilities of all devices.
  • This part works correctly every time.
Bash:
[    0.443247]: Casey IOPCIConfig:Read8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueRead=0x0
[    0.443249]: Casey IOPCIConfig:Read8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueRead=0x0
[    0.443253]: Casey IOPCIConfig:Write8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueWritten=0x40
[    0.443255]: Casey IOPCIConfig:Write8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueWritten=0x40
[    0.443259]: Casey IOPCIConfig:Read8 from writeLatencyTimer2 9:0:0:0 offset=0xd valueRead=0x0
[    0.443261]: Casey IOPCIConfig:Read8 from writeLatencyTimer2 9:0:0:0 offset=0xd valueRead=0x0
[    0.447598]: Casey IOPCIConfig:Read8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueRead=0x0
[    0.447600]: Casey IOPCIConfig:Read8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueRead=0x0
[    0.447603]: Casey IOPCIConfig:Write8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueWritten=0x40
[    0.447606]: Casey IOPCIConfig:Write8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueWritten=0x40
[    0.447609]: Casey IOPCIConfig:Read8 from writeLatencyTimer2 9:0:0:0 offset=0xd valueRead=0x0
[    0.447612]: Casey IOPCIConfig:Read8 from writeLatencyTimer2 9:0:0:0 offset=0xd valueRead=0x0
[    0.447645]: Casey IOPCIConfig:Read16 from disableAccess 9:0:0:0 offset=0x4 valueRead=0x6
[    0.447647]: Casey IOPCIConfig:Read16 from disableAccess 9:0:0:0 offset=0x4 valueRead=0x6
[    0.447651]: Casey IOPCIConfig:Write16 from disableAccess 9:0:0:0 offset=0x4 valueWritten=0x4
[    0.447653]: Casey IOPCIConfig:Write16 from disableAccess 9:0:0:0 offset=0x4 valueWritten=0x4
[    0.447657]: Casey IOPCIConfig:Write32 from deviceApplyConfiguration1 9:0:0:0 offset=0x10 valueWritten=0xfc100000
[    0.447659]: Casey IOPCIConfig:Write32 from deviceApplyConfiguration1 9:0:0:0 offset=0x10 valueWritten=0xfc100000
[    0.447663]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x10 valueRead=0xfc100000
[    0.447665]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x10 valueRead=0xfc100000
[    0.447671]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x10 valueRead=0xfc100000
[    0.447673]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x10 valueRead=0xfc100000
[    0.447679]: Casey IOPCIConfig:Write32 from deviceApplyConfiguration1 9:0:0:0 offset=0x1c valueWritten=0xfc200000
[    0.447681]: Casey IOPCIConfig:Write32 from deviceApplyConfiguration1 9:0:0:0 offset=0x1c valueWritten=0xfc200000
[    0.447685]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x1c valueRead=0xfc200000
[    0.447687]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x1c valueRead=0xfc200000
[    0.447692]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x1c valueRead=0xfc200000
[    0.447695]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration1 9:0:0:0 offset=0x1c valueRead=0xfc200000
[    0.447700]: Casey IOPCIConfig:Write16 from restoreAccess 9:0:0:0 offset=0x4 valueWritten=0x6
[    0.447702]: Casey IOPCIConfig:Write16 from restoreAccess 9:0:0:0 offset=0x4 valueWritten=0x6
[    0.447706]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration3 9:0:0:0 offset=0x4 valueRead=0x100006
[    0.447708]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration3 9:0:0:0 offset=0x4 valueRead=0x100006
[    0.447715]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration3 9:0:0:0 offset=0x4 valueRead=0x100006
[    0.447717]: Casey IOPCIConfig:Read32 from deviceAppleConfiguration3 9:0:0:0 offset=0x4 valueRead=0x100006
[    0.447723]: Casey IOPCIConfig:Read8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueRead=0x0
[    0.447725]: Casey IOPCIConfig:Read8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueRead=0x0
[    0.447729]: Casey IOPCIConfig:Write8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueWritten=0x40
[    0.447731]: Casey IOPCIConfig:Write8 from writeLatencyTimer1 9:0:0:0 offset=0xd valueWritten=0x40
[    0.447735]: Casey IOPCIConfig:Read8 from writeLatencyTimer2 9:0:0:0 offset=0xd valueRead=0x0
[    0.447737]: Casey IOPCIConfig:Read8 from writeLatencyTimer2 9:0:0:0 offset=0xd valueRead=0x0
[    0.449423]: Casey IOPCIConfig:Read32 from constructProp:VendorID 9:0:0:0 offset=0x0 valueRead=0x15f38086
[    0.449425]: Casey IOPCIConfig:Read32 from constructProp:VendorID 9:0:0:0 offset=0x0 valueRead=0x15f38086
[    0.449429]: Casey IOPCIConfig:Read32 from constructProp:RevID 9:0:0:0 offset=0x8 valueRead=0x2000003
[    0.449432]: Casey IOPCIConfig:Read32 from constructProp:RevID 9:0:0:0 offset=0x8 valueRead=0x2000003
[    0.449435]: Casey IOPCIConfig:Read32 from constructProp:SystemVendorID 9:0:0:0 offset=0x2c valueRead=0x87d21043
[    0.449438]: Casey IOPCIConfig:Read32 from constructProp:SystemVendorID 9:0:0:0 offset=0x2c valueRead=0x87d21043
  • Then configuration ends
  • Now IOReg is fully populated
Bash:
[    0.452030]: [ PCI configuration end, bridges 20, devices 30 ]

...continued...
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
  • Then begins the process of creating an IOPCIDevice / IOPCIBridge tree from IOReg when the kernel calls IOPCIBridge::start()
  • One IOPCIDevice and IOPCIBridge instance is created for each device and bridge in IOReg
  • During this process, each device and bridge is re-queried to obtain device properties and capabilities
  • But this stage fails at the outset for all PCI devices other than GPU and USB
  • Because our devices do not respond at this point, it means all further configuration of those device, including interrupt mapping, fails
Bash:
[    0.685851]: Casey extendedConfigRead8 I225 (9:0:0:0) from probeBusGated:HeaderType offset=0xe valueRead=0xff
[    0.685856]: Casey extendedConfigRead8 I225 (9:0:0:0) from probeBusGated:HeaderType offset=0xe valueRead=0xff
[    0.906066]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    0.906069]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    1.126605]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    1.126608]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    1.347350]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    1.347353]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    1.567564]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    1.567567]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    1.788041]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    1.788047]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    2.008518]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    2.008520]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    2.229008]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    2.229009]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    2.449492]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    2.449493]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    2.669988]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    2.669990]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    2.890454]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    2.890455]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.110926]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.110927]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.331404]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    3.331406]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    3.552149]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.552151]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.772362]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.772364]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    3.992838]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    3.992839]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    4.213315]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    4.213317]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    4.433787]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    4.433789]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    4.654272]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    4.654274]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    4.875013]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    4.875014]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    5.095225]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    5.095226]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    5.315440]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    5.315441]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    5.535924]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    5.535926]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    5.756667]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    5.756669]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    5.976881]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    5.976883]: Casey IOPCIConfig:Read32 from findPCICapability1 9:0:0:0 offset=0x4 valueRead=0xffffffff
[    6.197356]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
[    6.197358]: Casey IOPCIConfig:Read32 from findPCICapability3 9:0:0:0 offset=0x34 valueRead=0xffffffff
 

Attachments

  • dmesg55.txt.zip
    57.6 KB · Views: 0
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
  • To confirm whether our PCI devices are accessible at the very end of PCI Configuration, I added some code to re-query three devices for their Device/Vendor IDs
  • The code is shown below -- this code runs just before leaving IOPCIConfigurator
  • We can see that the new code occurs after [ PCI configuration end, bridges xx, devices yy ]
  • This is at the end of IOPCIConfigurator::configure function
  • This means all devices have been scanned and populated into IORegistry
C:
    // Casey
    if (bootConfig)
    {
        IOLog("[ PCI configuration end, bridges %d, devices %d ]\n", fBridgeCount, fDeviceCount);
        if (this->fFlags & (kIOPCIConfiguratorIOLog | kIOPCIConfiguratorKPrintf))
        {
            uint32_t data = 0;

            if (fI225)
            {
                data = configRead32( fI225, kIOPCIConfigurationOffsetVendorID, NULL, "Check I225" );
                DLOG( "Casey recheck device %u - value = %08x \n", fI225->space.s.busNum, data);
            }
            if (fWifi)
            {
                data = configRead32( fWifi, kIOPCIConfigurationOffsetVendorID, NULL, "Check WIFI" );
                DLOG( "Casey recheck device %u - value = %08x \n", fWifi->space.s.busNum, data);
            }
            if (fXHC1)
            {
                data = configRead32( fXHC1, kIOPCIConfigurationOffsetVendorID, NULL, "Check XHC1" );
                DLOG( "Casey recheck device %u - value = %08x \n", fXHC1->space.s.busNum, data);
            }
        }
    }
  • When this runs, each of the three devices is successfully queried
  • Below we can see the Device|Vendor IDs:
    • 0x15f38086 for i225 (bus 9)
    • 0x27258086 for Intel WiFi (bus 10)
    • 0x43f71022 for AMD USB controller (bus 14)
Bash:
[    0.455714]: [ PCI configuration end, bridges 20, devices 30 ]
[    0.458178]: Casey IOPCIConfig:Read32 from Check I225 9:0:0:0 offset=0x0 valueRead=0x15f38086
[    0.460482]: Casey IOPCIConfig:Read32 from Check I225 9:0:0:0 offset=0x0 valueRead=0x15f38086
[    0.460484]: Casey recheck device 9 - value = 15f38086
[    0.462671]: Casey recheck device 9 - value = 15f38086
[    0.462999]: Casey IOPCIConfig:Read32 from Check WIFI 10:0:0:0 offset=0x0 valueRead=0x27258086
[    0.465329]: Casey IOPCIConfig:Read32 from Check WIFI 10:0:0:0 offset=0x0 valueRead=0x27258086
[    0.465331]: Casey recheck device 10 - value = 27258086
[    0.467551]: Casey recheck device 10 - value = 27258086
[    0.467880]: Casey IOPCIConfig:Read32 from Check XHC1 14:0:0:0 offset=0x0 valueRead=0x43f71022
[    0.470243]: Casey IOPCIConfig:Read32 from Check XHC1 14:0:0:0 offset=0x0 valueRead=0x43f71022
[    0.470245]: Casey recheck device 14 - value = 43f71022
[    0.472499]: Casey recheck device 14 - value = 43f71022
  • Now let's see what happens to these three devices the moment we exit IOPCIConfigurtor and invoke IOPCIBridge::start
  • First, let's see the code added to query the same three devices directly from the IOPCIConfigurator class that was used above
  • This code resides in IOPCIBridge:: probeBusGated, which is called by IOPCIBridge::start
C:
                // Casey
                if (gIOPCIFlags & (kIOPCIConfiguratorIOLog | kIOPCIConfiguratorKPrintf))
                {
                    uint32_t thisBus = nub->space.s.busNum;
                    if (thisBus == 9 || thisBus == 10 || thisBus == 14)
                    {
                        uint32_t data = 0;
                        IOPCIConfigEntry *entry = NULL;
                 
                        if (thisBus == 9)
                            entry = reserved->hostBridgeData->_configurator->fI225;
                        else if (thisBus == 10)
                            entry = reserved->hostBridgeData->_configurator->fWifi;
                        else if (thisBus == 14)
                            entry = reserved->hostBridgeData->_configurator->fXHC1;
                 
                        if (entry)
                        {
                            data = reserved->hostBridgeData->_configurator->configRead32( entry, kIOPCIConfigurationOffsetVendorID, NULL, "Check Again" );
                            DLOG( "Casey double-check device %u - value = %08x \n", entry->space.s.busNum, data);
                        }
                    }
                }
  • The result of this? No good
  • The first two devices are still inaccessible (I225 and WIFI), but the USB controller (bus 14) is still okay
Bash:
[    0.703839]: Casey double-check device 9 - value = ffffffff
[    0.703840]: Casey double-check device 9 - value = ffffffff
[   10.404336]: Casey double-check device 10 - value = ffffffff
[   10.404338]: Casey double-check device 10 - value = ffffffff
[   19.882499]: Casey double-check device 14 - value = 43f71022
[   19.882499]: Casey double-check device 14 - value = 43f71022
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
** What This Tells Us **

Some fact-based conclusions (I always wanted to say 'fact-based' ;) ):
  1. macOS first calls IOPCIConfigurator::configure to scan the PCI bus and populate IORegistry
    • Every bridge and device is queried for its properties and capabilities
    • These properties and capabilities are inserted into IORegistry
    • This is called the PCI configuration phase, where macOS queries for the computer's hardware configuration
    • During this phase all bridges and devices are accessible
  2. When PCI configuration ends, control returns back to the kernel -- or to another kext that is driving IOPCIFamily
    • Now something unexplained happens that causes some of our PCI devices to become inaccessible
  3. When control returns to IOPCIFamily, it goes to IOPCIBridge::start, which in turn calls probeBusGated
    • probeBusGated does two things:
      • For each bridge and device in IORegistry, it creates a corresponding IOPCIBridge and IOPCIDevice instance and adds it to the root tree
      • It re-queries each bridge and device to obtain its properties and capabilities
        • Even though properties and capabilities were already queried and saved in IORegistry, they are re-queried here
    • But it's too late for our PCI devices other than GPU and USB
      • Our PCI devices are no longer accessible
      • Something seems to occur in Step 2 that kills those devices
So now the questions are:
  • What operations take place during Step 2?
  • Is AppleACPIPlatform doing something?
  • We know that by replacing both AppleACPIPlatform and IOPCIFamily from Big Sur, there is no problem with any PCI device (i.e. there is no problem in Step 2)
  • This means Monterey kernel itself is most likely not causing the problem at Step 2
  • Can we replace just AppleACPIPlatform in Monterey with the version from Big Sur?
    • I can try soon, but I vaguely recall some mismatch error when rebuilding kernel cache
  • We don't have the source code for AppleACPIPlatform -- so if the problem lies here it will be harder to identify and patch
  • Because Monterey and Ventura run fine on the AM4 platform, another possibility is the presence of a BIOS/firmware change that is causing these device to turn off on AM5
My latest modified source code for IOPCIFamily is located here: https://github.com/CaseySJ/IOPCIFamily-484.140.2-V2/tree/Original
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
** Corrections to Above Post **

After taking a break and re-examining the code, I must correct some unfortunate mistakes in my previous post.
  • IOPCIBridge is in full control throughout the entire PCI configuration process
  • This means IOPCIBridge actually does this:
    • Calls IOPCIConfigurator to scan PCI bus and populate IORegistry via IOPCIBridge::start
    • IOPCIBridge::start calls IOPCIBridge::configOp with the operation (op) parameter kConfigOpAddHostBridge
    • This invokes IOPCIConfigurator::configOp with the same op parameter
    • IOPCIConfigurator::configOp then calls IOPCIConfigurator::addHostBridge, which in turn calls IOPCIConfigurator::configure(kIOPCIConfiguratorBoot)
    • This call to IOPCIConfigurator::configure performs the entire PCI configuration discovery and IORegistry population tasks
    • All PCI devices are functioning at this time
  • Then control actually returns back to IOPCIBridge::start, which calls IOPCIBridge:: probeBus
    • And IOPCIBridge:: probeBus in turn calls IOPCIBridge:: probeBusGated
    • Our PCI devices are no longer functioning
  • So there is no Step 2
  • This means we might have a chance to find the problem within IOPCIFamily itself, but let's keep expectations at bay...
 

backinblackx86

Member
AMD OS X Member
Joined
Nov 10, 2022
Messages
56
Great research Casey. Meanwhile, this a6000 is ticking along here running a stable diffusion training model. Hot to the touch but everything else is cool. I’d like to pop in the Radeon card and attempt booting my bigsur ssd if you can share an efi.
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
** PCI Problem on AM5 with Monterey & Ventura Has Been Identified **
A one-line change in IOPCIBridge fixes the AM5 PCI problem

  • It took a while, but the problem has been identified in IOPCIFamily, specifically in IOPCIBridge:: probeBusGated
  • Here's Vanilla Monterey on Ryzen 7 7700X with both Intel I225-V and Fenvi FV-T919 working properly
  • Now let me see if a patch is viable; update: yes it is -- see post below

Screen Shot 2022-11-12 at 6.43.48 PM.png
 
Last edited:

craighazan

Donator
Donator
Joined
Nov 22, 2021
Messages
344
** PCI Problem on AM5 with Monterey & Ventura Has Been Identified **
A one-line change in IOPCIBridge fixes the AM5 PCI problem

  • It took a while, but the problem has been identified in IOPCIFamily
  • Here's Vanilla Monterey on Risen 7 7700X with both Intel I225-V and Fenvi FV-T919 working properly:

Incredible!, I bow before you sir, amazing achievement. Only two steps in AMD power tool?..
 
Last edited:
Back
Top Bottom
  AdBlock Detected
Sure, ad-blocking software does a great job at blocking ads, but it also blocks some useful and important features of our website. For the best possible site experience please take a moment to disable your AdBlocker.