Using gen32IOVMSegments() will return kIOReturnMessageTooLarge. If I don't set the maximum value of 8M, the result will still be the same, so I think it may not be related to the maximum value. If you haven't already, take a look at my post here. I haven't checked the code to confirm, but I strongly suspect that calling gen32IOVMSegments with a mask of the wrong size (like 0xFFFFF000) will cause kIOReturnMessageTooLarge, as the true mask range you've specified (0x00000000FFFFF000) is too large to fit in 32 bits. Does Apple M silicon not allocate <=32-bit bus addresses to third-party PCIe devices (FPGA)? Quite the opposite. We've actually gone to considerable trouble to ensure that we COULD provide 32-bit addresses to the PCI bus. Quoting Address Translation on 64-Bit System Architectures: Apple solved the problem with address translation which “maps” blocks of memory into the 32-bit address space of a PCI device. In this scheme, the PCI device still sees a 4-gigabyte space, but that space can be made up of
Topic:
App & System Services
SubTopic:
Drivers
Tags: