mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
This adds a new function prototype for arch_page_phys_get() which will be used to translate mapped virtual addresses back to physical memory addresses. This is needed for the future k_mem_unmap() function which requires this to find the corresponding page frame. It is faster to look through the page tables instead of doing linear search of the page frame array. A weak function is provided in case arch_page_phys_get() is not implemented at the arch level. This simply goes through all the page frame and find the one which has mapped to the virtual address. Signed-off-by: Daniel Leung <daniel.leung@intel.com>