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
Post a Comment