Since on `ARM64` we map all of the peripherals' I/O space statically,
make sure that we do not map the regions in the list that are outside
our globally declared unmap memory region descriptor.
Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #848
return prot;
}
+extern struct ukplat_memregion_desc bpt_unmap_mrd;
+
int ukplat_paging_init(void)
{
struct ukplat_memregion_desc *mrd;
vaddr = PAGE_ALIGN_DOWN(mrd->vbase);
paddr = PAGE_ALIGN_DOWN(mrd->pbase);
len = PAGE_ALIGN_UP(mrd->len + (mrd->vbase - vaddr));
+
+#if defined(CONFIG_ARCH_ARM_64)
+ if (!RANGE_CONTAIN(bpt_unmap_mrd.pbase, bpt_unmap_mrd.len,
+ paddr, len))
+ continue;
+#endif
+
prot = bootinfo_to_page_attr(mrd->flags);
rc = ukplat_page_map(&kernel_pt, vaddr, paddr,