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

node.js - StackOverflow API not returning JSON -

python - Subclassed QStyledItemDelegate ignores Stylesheet -

sql server - TFS 2012 TF255062 Error after removing 'Active Directory' Role -