Ryzen 7000 Testing

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
** Kernel Patches for macOS Monterey and Ventura **
Purpose:
  • This kernel patch allows PCI devices to function properly on the new AM5 platform with Ryzen 7000 processors
  • There are separate patches for Monterey and Ventura

** Method 1 Patches **
Note that Method 3 patches down below are strongly recommended instead of Methods 1 and 2

Monterey Patch Details:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - fix probeBusGated
  • Find: F605F9DA 0200080F 85A90000 00
  • Replace: F605F9DA 0200080F 84A90000 00
  • Min Kernel: 21.0.0
  • Max Kernel: 21.99.99
  • Count: 1
  • Enabled: True
Ventura Patch Details:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - fix probeBusGated
  • Find: F605BC0B 0300080F 85AF0000 00
  • Replace: F605BC0B 0300080F 84AF0000 00
  • Min Kernel: 22.0.0
  • Max Kernel: 22.99.99
  • Count: 1
  • Enabled: True
Screen Shot 2022-11-12 at 8.50.42 PM.png
** Method 2 Patches **
Note that Method 3 patches down below are strongly recommended instead of Methods 1 and 2

These patches below can be used by themselves or in combination with Method 1 patches above.

Monterey Alternative Patch Details:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - fix bridgeProbeChild
  • Find: 418B5424 3883C224 4889DF4C 89E631C9 E8E1D2FF FF418944 2440
  • Replace: 90909090 90909090 90909090 90909090 90909090 90909090 9090
  • Min Kernel: 21.0.0
  • Max Kernel: 21.99.99
  • Count: 1
  • Enabled: True
Ventura Patch Details:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - fix bridgeProbeChild
  • Find: 8B533883 C2244C89 F74889DE 31C9E83A D0FFFF89 4340
  • Replace: 90909090 90909090 90909090 90909090 90909090 9090
  • Min Kernel: 22.0.0
  • Max Kernel: 22.99.99
  • Count: 1
  • Enabled: True

** Preferred Patch: Method 3 **

After further investigation we believe that the best option for now is the kernel patch below. Although boot argument pci=0x8000000 works, it disables both 8-bit (8b) and 10-bit (10b) ETFs (Extended Tag Fields). The patch below only disables 10-bit (10b) ETFs because only these ETFs cause PCI devices to be zombified.

We can use either the single patch below that works on both Monterey and Ventura, or individual patches.

Consolidated Patch courtesy of @ExtremeXT. Applies to both Monterey and Ventura. If you use this consolidated patch, do not use the two "Alternative Method 3" patches further below.
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Base: __ZN11IOPCIBridge13probeBusGatedEP14probeBusParams
  • Comment: CaseySJ - probeBusGated Disable 10 bit tags 12.x/13.x
  • Find: E6117206
  • Replace: E6117306
  • Min Kernel: 21.0.0
  • Max Kernel: 22.99.99
  • Count: 1
  • Enabled: True

Monterey Alternative Method 3 Patch:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - probeBusGated Disable 10 bit tags
  • Find: F6414201 4C8D75C8 743F
  • Replace: F6414201 4C8D75C8 EB3F
  • Min Kernel: 21.0.0
  • Max Kernel: 21.99.99
  • Count: 1
  • Enabled: True
Ventura Alternative Method 3 Patch:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - probeBusGated Disable 10 bit tags
  • Find: F6414201 4C8D75C8 743C
  • Replace: F6414201 4C8D75C8 EB3C
  • Min Kernel: 22.0.0
  • Max Kernel: 22.99.99
  • Count: 1
  • Enabled: True
 
Last edited:

svan71

Donator
Donator
AMD OS X Member
Joined
Oct 24, 2020
Messages
121
Unbelievable timing and incredible work bravo. I was about to pull the trigger on a 13900 build. I guess the m.2 ssd situation is solved as well ? Is a gigabyte x670 board ok to look at or go with asus?
 
Last edited:

ManuelB

Donator
Donator
AMD OS X Member
Joined
Jul 23, 2021
Messages
204
Ganz hervorragende Leistung vielen Dank. Ich bin ein wenig raus aus dem Thema Hackintosh seid Corona. @CaseySJ Würdest du mire evtl. Deine EFI zu Verfügung stellen . Wir haben die gleiche Hardware.Danke
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
** Kernel Patch for macOS Monterey **
Purpose:
  • This kernel patch allows PCI devices to function properly on the new AM5 platform with Ryzen 7000 processors
  • This patch applies to Monterey only; it does not work with Ventura
  • Will work on a Ventura patch tomorrow
Patch Details:
  • Arch: x86_64
  • Identifier: com.apple.iokit.IOPCIFamily
  • Comment: CaseySJ - fix probeBusGated
  • Find: F605F9DA 0200080F 85A90000 00
  • Replace: F605F9DA 0200080F 84A90000 00
  • Min Kernel: 21.0.0
  • Max Kernel: 21.99.99
  • Count: 1
  • Enabled: True
View attachment 8204
Great work! I'll ask people on MSI motherboards to test it as well, and I'll test it on my own Zen 2 desktop as well. If it doesn't break anything, then maybe @Shaneee could merge it to the patches repo? Also, if you don't mind, what exactly did you change in the source code?
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
Excellent work @CaseySJ. I’ll absolutely add this to the patch repo. Wonder if this will allow AM4 MSI boards to work also now. Again great work.
 

backinblackx86

Member
AMD OS X Member
Joined
Nov 10, 2022
Messages
56
Amazing, how a single digit changed everything
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
@CaseySJ I was going to look at making it one patch via masking but where is the binary for Monterey? :unsure:
Can't seem to locate it.
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Don't think there was ever one uploaded here.
Casey, can you dump the latest IOPCIFamily from both Monterey and Ventura?
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
Don't think there was ever one uploaded here.
Casey, can you dump the latest IOPCIFamily from both Monterey and Ventura?

Can't even find it in macOS lol The kext has no binary.
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
I believe it's within the Kernelcache. I'm unable to extract it but with a debug OC I can see if it's patching it.
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
This is the original IOPCIFamily kext from 13.1 (22C5044e). No binary.
 

Attachments

  • IOPCIFamily.kext.zip
    7.4 KB · Views: 2

mariettosun

Guru
Guru
AMD OS X Member
Joined
Oct 9, 2022
Messages
469
1668338538524.png
in Monterey it was found but in a not 7xxx system produce a reboot before login
Code:
{"bug_type":"210","timestamp":"2022-11-13 12:19:29.00 +0100","os_version":"macOS 13.1 (22C5044e)","roots_installed":0,"incident_id":"09753E06-5BFF-4A4A-B599-E7A4786912B0"}
{"macOSProcessedStackshotData":"bm8gb24gZGlzayBwYW5pYyBzdGFja3Nob3QgZm91bmQgaW4gY29yZWZpbGU=","macOSPanicString":"panic(cpu 48 caller 0xffffff80121ae3da): Invalid queue element linkage for 0xffffff95ef877de0: next 0xffffff95f05445d0 next->prev 0xffffff95ef877de0 prev 0xffffff95ead26030 prev->next 0 @queue.h:255\nPanicked task 0xffffff912a4966a0: 1 threads: pid 414: com.apple.ColorS\nBacktrace (CPU 48), panicked thread: 0xffffff9ab99e1540, Frame : Return Address\n0xffffffd15ac13690 : 0xffffff801207de9d \n0xffffffd15ac136e0 : 0xffffff80121e0556 \n0xffffffd15ac13720 : 0xffffff80121cf8c3 \n0xffffffd15ac13770 : 0xffffff801201da70 \n0xffffffd15ac13790 : 0xffffff801207e26d \n0xffffffd15ac138b0 : 0xffffff801207da26 \n0xffffffd15ac13910 : 0xffffff80129145e3 \n0xffffffd15ac13a00 : 0xffffff80121ae3da \n0xffffffd15ac13ae0 : 0xffffff80121ae7e1 \n0xffffffd15ac13b30 : 0xffffff80121378fb \n0xffffffd15ac13b80 : 0xffffff80121366cf \n0xffffffd15ac13cb0 : 0xffffff80121359a9 \n0xffffffd15ac13d10 : 0xffffff801213e647 \n0xffffffd15ac13d60 : 0xffffff80120b83b1 \n0xffffffd15ac13da0 : 0xffffff8012647094 \n0xffffffd15ac13e10 : 0xffffff80126661ac \n0xffffffd15ac13e80 : 0xffffff80126665a7 \n0xffffffd15ac13ec0 : 0xffffff8012073f7d \n0xffffffd15ac13ef0 : 0xffffff801201da3c \n\nProcess name corresponding to current thread (0xffffff9ab99e1540): com.apple.ColorSyncXPCAgent\nBoot args: chunklist-security-epoch=0 -chunklist-no-rev2-dev chunklist-security-epoch=0 -chunklist-no-rev2-dev\n\nMac OS version:\n21G217\n\nKernel version:\nDarwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1\/RELEASE_X86_64\nKernel UUID: 54B44BAE-1625-30CC-80B0-29E4966EFFDC\nKernelCache slide: 0x0000000011e00000\nKernelCache base:  0xffffff8012000000\nKernel slide:      0x0000000011e10000\nKernel text base:  0xffffff8012010000\n__HIB  text base: 0xffffff8011f00000\nSystem model name: MacPro7,1 (Mac-27AD2F918AE68F61)\nSystem shutdown begun: NO\nPanic diags file available: YES (0x0)\nHibernation exit count: 0\n\nSystem uptime in nanoseconds: 22623281484\nLast Sleep:           absolute           base_tsc          base_nano\n  Uptime  : 0x000000054473e3cc\n  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000\n  Wake    : 0x0000000000000000 0x000000215972611f 0x0000000000000000\nCompressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space\nZone info:\n  Zone map: 0xffffff811a42f000 - 0xffffffa11a42f000\n  . PGZ   : 0xffffff811a42f000 - 0xffffff813a42c000\n  . VM    : 0xffffff813a42c000 - 0xffffff860242c000\n  . RO    : 0xffffff860242c000 - 0xffffff879a42c000\n  . GEN0  : 0xffffff879a42c000 - 0xffffff8c6242c000\n  . GEN1  : 0xffffff8c6242c000 - 0xffffff912a42c000\n  . GEN2  : 0xffffff912a42c000 - 0xffffff95f242c000\n  . GEN3  : 0xffffff95f242c000 - 0xffffff9aba42d000\n  . DATA  : 0xffffff9aba42d000 - 0xffffffa11a42f000\n  Metadata: 0xffffffffbb89e000 - 0xffffffffdb89e000\n  Bitmaps : 0xffffffffdb89e000 - 0xfffffffffb89e000\n\nlast started kext at 20075181031: >driverkit.serial\t6.0.0 (addr 0xffffff7fab2b5000, size 28672)\nloaded kexts:\nas.vit9696.VirtualSMC\t1.3.1\nwtf.spinach.AMDRyzenCPUPowerManagement\t0.7.1\nas.vit9696.Lilu\t1.6.3\n@filesystems.exfat\t1.4\n>AudioAUUC\t1.70\n>!AUpstreamUserClient\t3.6.9\n>!AMCCSControl\t1.16\n@kext.AMDRadeonX6000\t4.0.8\n>eficheck\t1\n@kext.AMDRadeonServiceManager\t4.0.8\n>!APlatformEnabler\t2.7.0d0\n>!ALPC\t3.1\n>AGPM\t129\n>X86PlatformShim\t1.0.0\n>!AGFXHDA\t140.3\n@filesystems.autofs\t3.0\n>!AGraphicsDevicePolicy\t6.5.7\n@AGDCPluginDisplayMetrics\t6.5.7\n>ACPI_SMC_PlatformPlugin\t1.0.0\n>pmtelemetry\t1\n|IOUserEthernet\t1.0.1\n>usb.!UUserHCI\t1\n>!AHV\t1\n>!ADiskImages2\t126.141.2\n>!AFIVRDriver\t4.1.0\n>!A!IMCEReporter\t115\n>!A!ISlowAdaptiveClocking\t4.0.0\n>!AThunderboltIP\t4.0.3\n>!ARAID\t5.1.0\n|SCSITaskUserClient\t456.140.3\n>PioneerSuperDrive\t533.120.2\n@private.KextAudit\t1.0\n>AirPort.BrcmNIC\t1400.1.1\n>!AAHCIPort\t351.100.4\n>!AFileSystemDriver\t3.0.1\n@filesystems.tmpfs\t1\n@filesystems.lifs\t1\n@filesystems.apfs\t1934.141.2\n@filesystems.hfs.kext\t583.100.10\n@BootCache\t40\n@!AFSCompression.!AFSCompressionTypeZlib\t1.0.0\n@!AFSCompression.!AFSCompressionTypeDataless\t1.0.0d1\n>!AHPET\t1.8\n>!AACPIButtons\t6.1\n>!ARTC\t2.0.1\n>!ASMBIOS\t2.1\n>!AAPIC\t1.7\n@!ASystemPolicy\t2.0.0\n@nke.applicationfirewall\t402\n|IOKitRegistryCompatibility\t1\n|EndpointSecurity\t1\n@Dont_Steal_Mac_OS_X\t7.0.0\n>!A!ICPUPowerManagement\t222.0.0\n@kec.!AEncryptedArchive\t1\n>driverkit.serial\t6.0.0\n|IOSerial!F\t11\n|IOAccelerator!F2\t462.8\n>!ASMBus!C\t1.0.18d1\n|IOSMBus!F\t1.1\n@kext.AMDRadeonX6000HWLibs\t1.0\n>!UAudio\t416.2\n>!AAudioClockLibs\t140.1\n>!ASMBusPCI\t1.0.14d1\n@kext.AMDRadeonX6000HWServices\t4.0.8\n>!AHDA!C\t340.2\n|IOHDA!F\t340.2\n|IOAudio!F\t340.2\n@vecLib.kext\t1.2.0\n@kext.triggers\t1.0\n>!AGraphicsControl\t6.5.7\n|IONDRVSupport\t597\n@kext.AMDRadeonX6000Framebuffer\t4.0.8\n@kext.AMDSupport\t4.0.8\n>IOPlatformPluginLegacy\t1.0.0\n|IO!BSerialManager\t9.0.0\n|IO!BPacketLogger\t9.0.0\n|IO!BHost!CUSBTransport\t9.0.0\n|IO!BHost!CUARTTransport\t9.0.0\n|IO!BHost!CTransport\t9.0.0\n>IO!BHost!CPCIeTransport\t9.0.0\n|IOAVB!F\t1040.6\n@plugin.IOgPTPPlugin\t1040.3\n|IOEthernetAVB!C\t1.1.0\n|CSR!BHost!CUSBTransport\t9.0.0\n|Broadcom!BHost!CUSBTransport\t9.0.0\n|Broadcom!B20703USBTransport\t9.0.0\n>!AIPAppender\t1.0\n>X86PlatformPlugin\t1.0.0\n>IOPlatformPlugin!F\t6.0.0d8\n@!AGPUWrangler\t6.5.7\n@!AGraphicsDeviceControl\t6.5.7\n|IOGraphics!F\t597\n|IOSlowAdaptiveClocking!F\t1.0.0\n>!AThunderboltEDMSink\t5.0.3\n>!AThunderboltPCIUpAdapter\t4.1.1\n>!AThunderboltPCIDownAdapter\t4.1.1\n>!AThunderboltDPInAdapter\t8.5.1\n>!AThunderboltDPOutAdapter\t8.5.1\n>!AThunderboltDPAdapter!F\t8.5.1\n>!AHPM\t3.4.4\n>!A!ILpssI2C!C\t3.0.60\n>!A!ILpssI2C\t3.0.60\n>!A!ILpssDmac\t3.0.60\n>usb.IOUSBHostHIDDevice\t1.2\n>usb.cdc\t5.0.0\n>usb.networking\t5.0.0\n>usb.!UHostCompositeDevice\t1.2\n>usb.!UHub\t1.2\n|IOSCSIMultimediaCommandsDevice\t456.140.3\n|IOBD!S!F\t1.8\n|IODVD!S!F\t1.8\n|IOCD!S!F\t1.8\n|IOAHCIBlock!S\t333.140.2\n|IOAHCISerialATAPI\t270\n>!A!ILpssGspi\t3.0.60\n|IO80211!FLegacy\t1200.12.2b1\n|IOSkywalk!F\t1.0\n>mDNSOffloadUserClient\t1.0.1b8\n>corecapture\t1.0.4\n|IOAHCI!F\t297\n>!AThunderboltNHI\t7.2.81\n|IOThunderbolt!F\t9.3.3\n>!AXsanScheme\t3\n>usb.!UXHCIPCI\t1.2\n>usb.!UXHCI\t1.2\n|IONVMe!F\t2.1.0\n>!ABSDKextStarter\t3\n|IOSurface\t302.14\n@filesystems.hfs.encodings.kext\t1\n>usb.!UHostPacketFilter\t1.0\n|IOUSB!F\t900.4.2\n>!AEFINVRAM\t2.1\n|IOHID!F\t2.0.0\n>!AEFIRuntime\t2.1\n|IOTimeSync!F\t1040.3\n|IONetworking!F\t3.4\n>DiskImages\t493.0.0\n|IO!B!F\t9.0.0\n|IOReport!F\t47\n$quarantine\t4\n$sandbox\t300.0\n@kext.!AMatch\t1.0.0d1\n|CoreAnalytics!F\t1\n>!ASSE\t1.0\n>!AKeyStore\t2\n>!UTDM\t533.120.2\n|IOUSBMass!SDriver\t210.120.3\n|IOSCSIBlockCommandsDevice\t456.140.3\n|IO!S!F\t2.1\n|IOSCSIArchitectureModel!F\t456.140.3\n>!AMobileFileIntegrity\t1.0.5\n$!AImage4\t4.2.0\n@kext.CoreTrust\t1\n>!AFDEKeyStore\t28.30\n>!AEffaceable!S\t1.0\n>!ACredentialManager\t1.0\n>KernelRelayHost\t1\n|IOUSBHost!F\t1.2\n>!UHostMergeProperties\t1.2\n>usb.!UCommon\t1.0\n>!ABusPower!C\t1.0\n>!ASEPManager\t1.0.1\n>IOSlaveProcessor\t1\n>!AACPIPlatform\t6.1\n>!ASMC\t3.1.9\n|IOPCI!F\t2.9\n|IOACPI!F\t1.4\n>watchdog\t1\n@kec.pthread\t1\n@kec.Libm\t1\n@kec.corecrypto\t12.0\n\n\n"}
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
@CaseySJ I was going to look at making it one patch via masking but where is the binary for Monterey? :unsure:
Can't seem to locate it.
That would be great! The binary for Monterey is in /S/L/E —> IOPCIFamily.kext/Contents

I’ll post the vanilla Monterey and Ventura binaries shortly (just woke up).

In Ventura, nearly all kext binaries are excluded from /S/L/E, but included in the KDK.
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Great work! I'll ask people on MSI motherboards to test it as well, and I'll test it on my own Zen 2 desktop as well. If it doesn't break anything, then maybe @Shaneee could merge it to the patches repo? Also, if you don't mind, what exactly did you change in the source code?
Thank you again for your suggestions throughout the process — and for asking @alyxferrari to post a kernel build guide. This would not have happened otherwise!

Yes, it would be good to see if this helps in other situations, though @mariettosun may have given us an early answer!

I’ll provide a write up of the fix today.
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Outstanding work!
On behalf of the mere mortals among us who cannot read compiled binary code, may I ask what this decompiles to and what this code is doing?
Certainly — will post an explanation of the patch today.
 

mariettosun

Guru
Guru
AMD OS X Member
Joined
Oct 9, 2022
Messages
469
disabling AppleIGB ethernet kext I am testing for i211 I reach desktop (and both monitor are at their correct resolutions
some screen corruption and before to insert login password reboot with KP
 
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.