Ryzen 7000 Testing

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
The relevant sections from the header file IOMemoryDescriptor.h are as follows:

Description of various IOOptionBits used by the IOBufferMemoryDescriptor::withOptions(...) function:
C:
@param options
 *       kIOMemoryDirectionMask (options:direction)    This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
 *       kIOMemoryTypeMask (options:type)    kIOMemoryTypeVirtual64, kIOMemoryTypeVirtual, kIOMemoryTypePhysical64, kIOMemoryTypePhysical, kIOMemoryTypeUPL Indicates that what type of memory basic memory descriptor to use.  This sub-field also controls the interpretation of the buffers, count, offset & task parameters.
 *       kIOMemoryAsReference    For options:type = Virtual or Physical this indicate that the memory descriptor need not copy the ranges array into local memory.  This is an optimisation to try to minimise unnecessary allocations.
 *       kIOMemoryBufferPageable    Only used by the IOBufferMemoryDescriptor as an indication that the kernel virtual memory is in fact pageable and we need to use the kernel pageable submap rather than the default map.

Description of various individual flags
C:
enum IODirection
#endif /* !__LP64__ */
{
    kIODirectionNone  = 0x0,//                    same as VM_PROT_NONE
    kIODirectionIn    = 0x1,// User land 'read',  same as VM_PROT_READ
    kIODirectionOut   = 0x2,// User land 'write', same as VM_PROT_WRITE
    kIODirectionOutIn = kIODirectionOut | kIODirectionIn,
    kIODirectionInOut = kIODirectionIn  | kIODirectionOut,

    // these flags are valid for the prepare() method only
    kIODirectionPrepareToPhys32   = 0x00000004,
    kIODirectionPrepareNoFault    = 0x00000008,
    kIODirectionPrepareReserved1  = 0x00000010,
#define IODIRECTIONPREPARENONCOHERENTDEFINED    1
    kIODirectionPrepareNonCoherent = 0x00000020,
#define IODIRECTIONPREPAREAVOIDTHROTTLING       1
    kIODirectionPrepareAvoidThrottling = 0x00000100,

    // these flags are valid for the complete() method only
#define IODIRECTIONCOMPLETEWITHERRORDEFINED             1
    kIODirectionCompleteWithError = 0x00000040,
#define IODIRECTIONCOMPLETEWITHDATAVALIDDEFINED 1
    kIODirectionCompleteWithDataValid = 0x00000080,
};

#ifdef __LP64__
typedef IOOptionBits IODirection;
#endif /* __LP64__ */

/*
 * IOOptionBits used in the withOptions variant
 */
enum {
    kIOMemoryDirectionMask      = 0x00000007,

    kIOMemoryTypeVirtual        = 0x00000010,
    kIOMemoryTypePhysical       = 0x00000020,
    kIOMemoryTypeUPL            = 0x00000030,
    kIOMemoryTypePersistentMD   = 0x00000040,// Persistent Memory Descriptor
    kIOMemoryTypeUIO            = 0x00000050,
#ifdef __LP64__
    kIOMemoryTypeVirtual64      = kIOMemoryTypeVirtual,
    kIOMemoryTypePhysical64     = kIOMemoryTypePhysical,
#else /* !__LP64__ */
    kIOMemoryTypeVirtual64      = 0x00000060,
    kIOMemoryTypePhysical64     = 0x00000070,
#endif /* !__LP64__ */
    kIOMemoryTypeMask           = 0x000000f0,

    kIOMemoryAsReference        = 0x00000100,
    kIOMemoryBufferPageable     = 0x00000400,
    kIOMemoryMapperNone         = 0x00000800,// Shared with Buffer MD
    kIOMemoryHostOnly           = 0x00001000,// Never DMA accessible
    kIOMemoryPersistent         = 0x00010000,
    kIOMemoryMapCopyOnWrite     = 0x00020000,
    kIOMemoryRemote             = 0x00040000,
    kIOMemoryThreadSafe         = 0x00100000,// Shared with Buffer MD
    kIOMemoryClearEncrypt       = 0x00200000,// Shared with Buffer MD
    kIOMemoryUseReserve         = 0x00800000,// Shared with Buffer MD
#define IOMEMORYUSERESERVEDEFINED       1

};
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
OMG, so it does work without the boot argument -- and AVB is also enabled!

You can see in my screenshot posted earlier today that AVB is disabled.

I'll re-check this later today.


Saturday at 2:28 AM

also this user has a "107" and AVB is active ( I dont know if @DarkSilentSC tested in his system without boot arg

Confirmed:
The ixgbe boot argument is not necessary when all six Aquantia patches are applied. The port connects and works. I've updated the patch post. A cold boot should be done one time after removing the boot argument.
 
Last edited:

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Confirmed:
The ixgbe boot argument is not necessary when all six Aquantia patches are applied. The port connects and works. I've updated the patch post. A cold boot should be done one time after removing the boot argument.
Does that mean the DEXT attaches properly?
 

etorix

Active member
AMD OS X Member
Joined
Oct 7, 2022
Messages
72
@CaseySJ Many thanks for the above two posts. They make a simple, straightforward matter of summarising what had to be tracked down bit by bit while browsing through Darwin code source for documentation between two sips of coffee by the fireplace. A normal hacking day…

With the Intel-related boot argument removed, it may be time to package the six patches into a new quirk. "VirtualiseAquantiaEthernet" maybe?
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Does that mean the DEXT attaches properly?
I'm still scratching my head over this...

The boot argument seemed necessary to get the driver to sense a cable connection, but that was before we changed the memory type back to Virtual in all 6 places.

Nevertheless, when we look at System Information, the dext is not the one driving the Aquantia. It is AquantiaAqtion that's driving the Aquantia, which makes sense.

And if we look at Info.plist for com.apple.DriverKit-AppleEthernetIXGBE we see that it only applies to Intel Ethernet devices because IOPCIMatch is looking for Vendor 0x8086 and IOPCIClassMatch is only looking for 0x020000. So we can conclude that the name of the driver fits the bill -- it is Intel only.

But in our previous solution to this problem where we were injecting AppleEthernetAquantiaAqtion from Monterey 12.2, we found that the boot argument was necessary to establish an Ethernet connection. Because I'm hesitant to re-litigate the previous experiments, I'm content to accept that ixgbe is not necessary and move on. ;)

XML:
<key>IOKitPersonalities</key>
    <dict>
        <key>DriverKit_AppleEthernetIXGBE</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.apple.DriverKit-AppleEthernetIXGBE</string>
            <key>CFBundleIdentifierKernel</key>
            <string>com.apple.iokit.IOSkywalkFamily</string>
            <key>IOClass</key>
            <string>IOUserNetworkEthernet</string>
            <key>IOPCIClassMatch</key>
            <string>0x02000000&amp;0xffffff00</string>
            <key>IOPCIMatch</key>
            <string>0x00008086&amp;0x0000ffff</string>
            <key>IOPCITunnelCompatible</key>
            <true/>
            <key>IOProviderClass</key>
            <string>IOPCIDevice</string>
            <key>IOUserClass</key>
            <string>DriverKit_AppleEthernetIXGBE</string>
            <key>IOUserServerName</key>
            <string>com.apple.DriverKit-AppleEthernetIXGBE</string>
        </dict>
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
@CaseySJ Many thanks for the above two posts. They make a simple, straightforward matter of summarising what had to be tracked down bit by bit while browsing through Darwin code source for documentation between two sips of coffee by the fireplace. A normal hacking day…
I was staring at rx_pkt_buf for several days trying to understand why the head pointer wasn't incrementing with each received packet. That changed yesterday after capturing network packets with WireShark and seeing that packets of different lengths were arriving. That was the lightbulb moment. My attention changed quickly to alloc_rx_ring instead because it seemed everything was working properly except that we were having difficulty reading data from incoming packets. It wasn't a head or tail pointer issue any longer, but a buffer-read problem.

My silly notes in red boxes, which were best guesses. This is rx_pkt_buf, which is not where the problem lies.

Screen Shot 2022-11-30 at 2.43.58 PM.png

With the Intel-related boot argument removed, it may be time to package the six patches into a new quirk. "VirtualiseAquantiaEthernet" maybe?
We can probably reduce the number of patches by applying masks. Because we're just enabling a single bit in the Replace field, we can use a ReplaceMask. This is tangential to be sure, but I'm intrigued enough to work on it.

As for the name of a potential new quirk, the word "virtualize" (or 'virtualise") is ambiguous because:
  • We use virtual address in both the old and new drivers
  • The new driver just happens to remap virtual addresses
So it's really a quirk about not remapping the address.
 

Galve2000

Donator
Donator
AMD OS X Member
Joined
Sep 19, 2020
Messages
234
Aquantia Driver Patches:
Can someone screenshot their config.plist in propertree so I can see the exactly what the kernal patches look like so I can copy them manually and make sure they are inputed correctly? otherwise an AML file with the included 6 patches would be most helpful.

sorry i'm a noob. this is all very scary.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,391
See post #1,564 plist containing the patches is attached to this post.
 

mrfatcatt

New member
AMD OS X Member
Joined
Nov 30, 2022
Messages
5
Hi all, Casey you are a wonderboy! I wanted to chime in because i did Casey patch 1-6 in Ventura to use my avid carbon and carbon pre on my ryzentosh. Ive had some success but its not ready for professional use. I applied the patches to my x570s amd. And before i start ...hackerrdom needs to be updated with a few things ASAP. Those things, are the old ethernet kext, and the update amd cpu patches to actually boot into Ventura and have basic network support. They removed the mobo native Ethernet support. TBH i want to rant and I think apple is very stupid to do all these moves, it destroys any sort of creativity for music and im burnt from this stuff. Im so glad this is all about m2 support but really music isnt about your chipset!!!!

moving foward....caseys patch once applied allows the os to see carbon, and carbon pre in avb mode and also in carbon extented mode, however either mode yields a audio loop when the avid core audio is selected and it doesn't matter what buffer or sample rate once applies. To go beyond this, pro tools once launch complains it is corrupted , i have a rme aio and it PT still wont lauch, so dont blame avid, this is seriously some bullshit apple code. Its pretty possible that the os cant deal with any pro studio atm, cause the only thing i can get going is a few standalone audio apps in rme core audio driver. So i have no idea if this is a avb issue . 10g or bad code.
I wont go to montery to try this, this has already costed me enoufgh time.. I am will to test , but if this doesnt get resolved in a point updates i will just go back to a second intel system...
my big sur works 100 with carbon

and for any peeps thats want real time trackign in the box, you got 2 options for dps...uad and carbon or a hdx system...everythign else uses there own out of the box software montioring

sorry about the rant, but every apple os is some new change apple makes and if avb worked in windows i would not be here at all...carbon pre and there units just are seriously great for the end user.
 

DarkSilentSC

Active member
AMD OS X Member
Joined
Jun 4, 2021
Messages
122
** Aquantia 10Gbps Driver Patches for Non-AppleVTD Systems **

Background:
The AppleEthernetAquantiaAqtion driver in Monterey and Ventura requires AppleVTD, which is not available on AMD platforms. Although we are able to import an older non-VTD version of the driver into Monterey, we are currently unable to do so in Ventura. The driver patches and boot argument presented here enable the native driver in both Monterey and Ventura to function properly in the absence of AppleVTD.


Description of Patches:
Refer to "Aquantia Patch Theory" by clicking here.


Procedure:
  1. Install the six Aquantia driver patches shown below
  2. Add boot argument ixgbe=0 30-Nov: Boot argument is not needed
  3. Enable the kernel quirk ForceAquantiaEthernet
  4. One time action: Perform a cold boot, which means:
    • Shutdown the computer
    • Flip power switch on PSU to OFF for 10 seconds
    • Power back up
If you applied the previous method of injecting an older version of the driver, be sure to undo those settings:
  • Uncheck or remove the injection of AppleEthernetAquantiaAqtion.kext from Kernel --> Add
  • Uncheck or remove the blockage of AppleEthernetAquantiaAqtion from Kernel --> Block

Aquantia Driver Patches:
All six of these patches are required. The same patches work in both Monterey 12.6.x and Ventura (any version).

Patch 1: Receive Ring Patch 1
  • Arch: x86_64
  • Identifier: com.apple.driver.AppleEthernetAquantiaAqtion
  • Base: __ZN27AppleEthernetAquantiaAqtion13alloc_rx_ringEj
  • Comment: CaseySJ - Fix alloc_rx_ring #1
  • Find: 4C89EF41 B8030000 00
  • Replace: 4C89EF41 B8130000 00
  • MinKernel: 21.0.0
  • MaxKernel: 22.99.99
  • Count: 1
  • Enabled: True
Patch 2: Receive Ring Patch 2
  • Arch: x86_64
  • Identifier: com.apple.driver.AppleEthernetAquantiaAqtion
  • Base: __ZN27AppleEthernetAquantiaAqtion13alloc_rx_ringEj
  • Comment: CaseySJ - Fix alloc_rx_ring #2
  • Find: BA001000 00BF0100 0000
  • Replace: BA001000 00BF1100 0000
  • MinKernel: 21.0.0
  • MaxKernel: 22.99.99
  • Count: 1
  • Enabled: True
Patch 3: Transmit Ring Patch 1
  • Arch: x86_64
  • Identifier: com.apple.driver.AppleEthernetAquantiaAqtion
  • Base: __ZN27AppleEthernetAquantiaAqtion13alloc_tx_ringEj
  • Comment: CaseySJ - Fix alloc_tx_ring #1
  • Find: 4C89E741 B8030000 00
  • Replace: 4C89E741 B8130000 00
  • MinKernel: 21.0.0
  • MaxKernel: 22.99.99
  • Count: 1
  • Enabled: True
Patch 4: Transmit Ring Patch 2
  • Arch: x86_64
  • Identifier: com.apple.driver.AppleEthernetAquantiaAqtion
  • Base: __ZN27AppleEthernetAquantiaAqtion13alloc_tx_ringEj
  • Comment: CaseySJ - Fix alloc_tx_ring #2
  • Find: BA001000 00BF0200 0000
  • Replace: BA001000 00BF1200 0000
  • MinKernel: 21.0.0
  • MaxKernel: 22.99.99
  • Count: 1
  • Enabled: True
Patch 5: Allocate AVB Packet
  • Arch: x86_64
  • Identifier: com.apple.driver.AppleEthernetAquantiaAqtion
  • Base: __ZN27AppleEthernetAquantiaAqtion14allocAvbPacketEj
  • Comment: CaseySJ - Fix allocAvbPacket
  • Find: 4C89F741 B8030000 00
  • Replace: 4C89F741 B8130000 00
  • MinKernel: 21.0.0
  • MaxKernel: 22.99.99
  • Count: 1
  • Enabled: True
Patch 6: Allocate PTP Packet
  • Arch: x86_64
  • Identifier: com.apple.driver.AppleEthernetAquantiaAqtion
  • Base: __ZN27AppleEthernetAquantiaAqtion14allocPtpPacketEj
  • Comment: CaseySJ - Fix allocPtpPacket
  • Find: BA000200 00BF0300 0000
  • Replace: BA000200 00BF1300 0000
  • MinKernel: 21.0.0
  • MaxKernel: 22.99.99
  • Count: 1
  • Enabled: True

View attachment 8832
HOORAY! Confirmed working in Gigabyte X570 Aorus Xtreme in Monterey 12.6.1!!!

I'll go ahead and update to Ventura and I'll report the results again!
 

Galve2000

Donator
Donator
AMD OS X Member
Joined
Sep 19, 2020
Messages
234
Aquantia Driver Patches:
Can someone screenshot their config.plist in propertree so I can see the exactly what the kernal patches look like so I can copy them manually and make sure they are inputed correctly? otherwise a AML plist file with the included 6 patches would be most helpful.

sorry i'm a noob. this is all very scary.
 
Last edited:

DarkSilentSC

Active member
AMD OS X Member
Joined
Jun 4, 2021
Messages
122
And also happy to report that Aquantia continues to work in Ventura 13.0.1! Thank you CaseySJ!!!Screenshot 2022-11-30 at 9.42.32 PM.png
Screenshot 2022-11-30 at 9.44.29 PM.png
 
Last edited:

mariettosun

Guru
Guru
AMD OS X Member
Joined
Oct 9, 2022
Messages
469
to update with OCAT app (if you can't use properly a plist editor):

Open OCAT and verify you see printed your OpenCore version , if not update OCAT OpenCore database


1) open your config.plist and In kernel/Patch section right click in an empty area and choose preset

Screenshot 2022-12-01 at 7.08.18 AM.png


2) various presets are there and if it is your working config you can only add Aquantia patches Plist and you will have this:
Screenshot 2022-12-01 at 7.14.24 AM.png

Here a simple video to see how to!

 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
to update with OCAT app (if you can't use properly a plist editor):

Open OCAT and verify you see printed your OpenCore version , if not update OCAT OpenCore database


1) open your config.plist and In kernel/Patch section right click in an empty area and choose preset

View attachment 8857


2) various presets are there and if it is your working config you can only add Aquantia patches Plist and you will have this:
View attachment 8858

Here a simple video to see how to!

Thanks for submitting the patches to OCAT yesterday!
 

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
Can someone screenshot their config.plist in propertree so I can see the exactly what the kernal patches look like so I can copy them manually and make sure they are inputed correctly? otherwise an AML file with the included 6 patches would be most helpful.

sorry i'm a noob. this is all very scary.
One option is to use OCAT as mentioned above. A plist with just the patches is also available.

Alternatively, feel free to post your config.plist in private message and I’ll add the patches.
 
Last edited:

CaseySJ

Guru
Guru
Donator
Joined
May 10, 2020
Messages
1,269
@mrfatcatt

I can sympathize with the issues you posted. Microsoft prioritizes long term compatibility in Windows whereas Apple continues to introduce changes to macOS in annual updates that break something or the other.

With regard to the issues you mentioned:
  1. Audio loop when Avid Core is selected
  2. ProTools fails to launch (complains it is corrupted)
These problems are happening in Ventura, but not in Big Sur?

The latest versions of these apps are installed?

In System Settings —> Ethernet (Ventura), if you click on the Aquantia card, does it say that AVB is available (it should say “yes” if available).

This coming Monday we expect to see OpenCore 0.8.7. That version has a TSC/FSB frequency fix for all recent AMD processors that imparts a specific fix for audio garbling issues. Even though your board does not suffer from this, the fix may (or may not) help with one or more of the issues you’re experiencing.
 
Last edited:

ovenlite1

Active member
AMD OS X Member
Joined
Jun 22, 2020
Messages
106
Hey @mrfatcatt so sorry to hear the trouble you're having! Sounds like you've got an awesome studio setup:)

Unfortunately, I've been seeing and hearing some compatibility issues with Pro Tools and Ventura: Officially, I don't believe Pro Tools is supported on MacOS Ventura yet, at least, according to Avid's website. Anecdotally, for friends I know who use Pro Tools, they've been able to update to Ventura and launch Pro Tools just fine (on real macs), but take that with a grain of salt because we are definitely just home hobby musicians and I've seen evidence online for folks who can launch, but many features and devices are not working upon updating to Ventura.

I'm wondering if it's a software compatibility issue, a hardware compatibility issue, or a combination of both. Do you have access to any other DAW software you can try? Or maybe giving one of the free ones a shot, maybe Garage Band? In addition to the Avid and RME devices you have, do you also happen to have access to some sort of USB interface you could try? I am definitely no expert, but I'm wondering if this might also help with narrowing down where the issue is originating from, in addition to all the fine help @CaseySJ is providing! Of course, Casey's question regarding these problems happening in Ventura and not other versions of MacOS would be a great place to start too!
 

Galve2000

Donator
Donator
AMD OS X Member
Joined
Sep 19, 2020
Messages
234
Open OCAT and verify you see printed your OpenCore version , if not update OCAT OpenCore database

I don't see Aquantia Patches plist in the kernel patches section.

do I need OC 0.87? I'm using 0.86

here's what my available kernel patches list looks like:

Screenshot 2022-12-01 at 12.39.33 PM.png
 
Last edited:

mariettosun

Guru
Guru
AMD OS X Member
Joined
Oct 9, 2022
Messages
469
I don't see Aquantia Patches plist in the kernel patches section.

do I need OC 0.87? I'm using 0.86

you have to download in action of that site
it is not a release
I have done a PR yesterday and they have accepted it
in link above you can find all you need
 
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.