Add a memory region descriptor to indicate the range we are meant to
unmap when paging is initialized and we are getting rid of the
initial static boot page tables.
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
* Notice: The page tables below use the Unikraft indexing convention (x86).
*/
.section .data
+.align 4
+.global bpt_unmap_mrd
+bpt_unmap_mrd:
+ .quad 0x0000000040000000 /* 1 GiB */
+ .quad 0x0000000040000000 /* 1 GiB */
+ /* QEMU-VIRT's legacy RAM max is 255 GiB, but it can also depend on the
+ * settings, see QEMU upstream commit:
+ * 50a17297e2f0c ("hw/arm/virt: Bump the 255GB initial RAM limit").
+ * In our case, here we assume that the RAM can only go up to the PCIe
+ * high memory.
+ */
+ .quad (255 - 1) * 0x0000000040000000
+ .short 0x0000000000000000
+ .short 0x0000000000000010 /* UKPLAT_MEMRF_UNMAP */
+ .space 36
.global arm64_bpt_l3_pt0