Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I am not understanding the calculation of physical address in the kmalloc function in JamesM tutorial.
As far as I understand , every address is identity-mapped. So the virtual address of the allocated block (addr) should
equal its physical address. Why is it added to address of the frame ?
I am not understanding the calculation of physical address in the kmalloc function in JamesM tutorial.
As far as I understand , every address is identity-mapped. So the virtual address of the allocated block (addr) should
equal its physical address. Why is it added to address of the frame ?
Sorry I did not think much. Now I got it.
addr is the virtual address of the allocated block so the last 12 bits will be the offset.
Adding these to the physical address of the frame will give the physical address of the block.
Thanks!