How to allocate physical memory without caching in the kernel?

if you want to allocate non-cached physical memory (DRAM) for use in the driver, (i.e. do not want the data to be cached in the CPU data cache when accessing the data), how can I do this?

There are functions like kmalloc (), get_free_pages, vmalloc, etc. but it seems like I cannot indicate whether the data can be cached or not use these functions? any suggestion on how to do this?

thanks!

+4
source share
1 answer

In short, there is no easy way to do this, it is very platform dependent.
If you want to upgrade to it, read the /char/mem.c drivers and chapter 15 of the 3rd edition of Linux device drivers.

+1
source

Source: https://habr.com/ru/post/1397709/


All Articles