Relative Content

Tag Archive for cmmapmemsetpci-ebus-error

ARM64. The address returned by memset mmap PCIe BAR causes a BUS error

I wrote a very simple test program in the application layer. First, I open the PCIe device, then mmap the starting space of the PCIe BAR. Finally, I use the address returned by mmap, apply an offset, and pass it to memset for zeroing. I found that regardless of how the address is aligned, the maximum size passed to memset is only 240 bytes. When the address alignment is less than 16 bytes, the maximum size passed to memset is reduced to less than 8 bytes. I don’t know why this is happening.