Allocating more than 4 MB of pinned contiguous memory in the Linux Kernel

前端 未结 2 563
说谎
说谎 2021-01-31 05:25

For some interaction with a PCI device that is being built, we\'d like to create large contiguous pieces of memory that the board can access. As it stands now, the largest piece

相关标签:
2条回答
  • 2021-01-31 05:33

    If you can compile your PCI device driver into the kernel (that is, not linked as a module), you could try allocating the memory at boot time. That should let you bypass the upper bounds on dynamic allocations. Refer to Linux Device Drivers, ed. 3 ch. 8 for details.

    0 讨论(0)
  • 2021-01-31 05:53

    CMA(Contiguous Memory Allocator) are the best solution for your need IMO. You just need to ship to the newest kernel.

    0 讨论(0)
提交回复
热议问题