Is there a way to insert an arbitrary virtual to physical address mapping?
I have a physical page that is not in the efi mem map. So its not known to linux/not mapped as a kernel page.
I'd like to map it in the hardware tables, from my kernel module, so I can access it from my kernel module.
Is there an interface in linux that can do this?
I see in arch/ia64/mm/init.c the internal interfaces pgd_offset_k(), pud_alloc(), pmd_alloc(), pte_alloc_kernel(), mk_pte(), and set_pte() are used to create mappings.
However, these internal interfaces are not exported for kernel modules to use.
Alternatively, I can pick a page that is reported in the efi mem map and mapped by arch/ia64/kernel/efi.c, for example, one of the PAL pages, then I can access it from my kernel module. However, I'd prefer the ability to insert arbitrary mappings.
|