How can I allocate 16K continuous memory in kernel and get the physical address? -


my understand kernel page size 4k. want allocate 16k continuous memory buffer driver. used kmalloc() , returns me pointer (i assume allocation successful).

does mean 16k continuous?

and address kmalloc() virtual address? if need pass address hw register, use virtual address or physical address?

yes - memory allocated kmalloc physically continous , address virtual address. try virt_to_phys() macro obtain physical address.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -