]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/kvm/arm: Hardcode a memory region descriptor for unmappings
authorSergiu Moga <sergiu.moga@protonmail.com>
Mon, 15 May 2023 05:58:44 +0000 (08:58 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 10:18:45 +0000 (10:18 +0000)
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

plat/kvm/arm/bpt64.S

index 275477748ce6ede67156d2b0284120f2f31957e3..ffe252c5b7a9ed3abfaad1358c45830eec62ad53 100644 (file)
  * 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