I can confirm the Presonus Quantum now works with my i9 7940 Hackintosh. That line of code in the driver fixed it... You fixed it.
That's great. I'm still curious about their logging system but I guess it doesn't matter now.
Back to the VRS8 problem.
I tried creating a AppleACPIPlatformExpert override but it seems to cause a crash even if the overridden methods (init, probe, start) don't do anything but call the super (AppleACPIPlatformExpert).
Then I tried creating a standalone kext similar in positioning to AppleEFIRuntime, but it is unable to allocate the 192K in the first 256 MB (28 address bits) of memory. It is able to allocate all the other physically contiguous buffers that are not address space limited. I should try smaller buffers (down to a single 4K page) in the 256 MB space to see if anything can be allocated there.
Also of note is the AppleVTD driver which is the IOMapper for Macs that use VT-d. I think this reads the DMAR ACPI table. Source code is at
https://opensource.apple.com/source/IOPCIFamily
I was thinking it might be possible to alter the driver so it uses a full 32 bit address space, but the datasheet I found for VT1712 shows why the driver limits the DMA buffer to the first 256 MB of memory. The chip has some registers that are only 28 bit (bits 27:0 or 27:2) and has a statement in the description of some registers that says "up to 256 MB address space supported" and "Address space beyond 256MB is not supported".
There is a message in the boot log that says something like "Available physical space from 0x16bad000 to 0x89efff000" (this message might be kprintf only and therefore require a serial port or FireWire kprintf to see). Those addresses are outside the 28 bits. The message is part of the xnu kernel, so it might help to build your own kernel to see what that message means - if it truly means that no physical allocations can be made outside that range.
Some research into macOS memory and virtual memory is required:
Essential information for programming in the OS X kernel. Includes a high-level overview.
developer.apple.com
There is a boot_args parameter passed from EFI to the Apple kernel that has a MemoryMap which is an array of EfiMemoryRange (or EFI_MEMORY_DESCRIPTOR in EFI) that describes the virtual and physical ranges used in EFI. I think AptioMemoryFix might affect this table? There is also a slide value in boot_args which moves the kernel. These are are discussed at
I thought it was worth making a separate thread for our AptioFix discussions.Some links to relevant posts (suggest us gather stuff here):1. Information about APTIO V nvram bugs2. Z97 NvramSmi code & boot.efi memory move code3. KASLR slide calculation & usage 4. Slide calculation formula 5...
www.insanelymac.com
There is a MemoryMap command in EFI Shell. I suppose the results of that compared with the MemoryMap seen by the kernel might be interesting.