On Tue, 25 Aug 2020, 15:04 Heiser, Gernot (Data61, Kensington NSW), <Gernot.Heiser@data61.csiro.au> wrote:
On 25 Aug 2020, at 14:51, Michael Neises <neisesmichael@gmail.com<mailto:neisesmichael@gmail.com>> wrote:
Is there a way for me to use the remaining 1.5GiB to create other kernel objects? It's important not only that I have the two calls I mentioned previously, but also I will later add a third camkes component, which I believe will exacerbate the problem. I don't know much about capDL yet, so any pointers would be greatly appreciated.
Any kernel objects (i.e. kernel metadata objects such as page tables, TCBs, Cnodes etc) must be allocated in 0.5GiB the kernel window to be accessible. However, unless you’re building an extremely unusual system, you shouldn’t need 0.5GiB of kernel objects. Frames that can only be mapped into address spaces can be created from “device untyped”, without using up the 0.5GiB kernel window.
In this case it is most likely the frames from loading the initial ELF binaries (one of which contains the large Linux images in the .data sections). However, there is a limitation on which frames can be created from device untyped as the kernel won't let you perform cache maintenance operations (required for unifying the icache when starting the system) on device untyped as this could cause a kernel abort if a virtual address doesn't correspond to valid memory. There seems to be at least 2 ways for increasing the Linux kernel limit: - Change the Camkes/capDL tooling to try and allocate all non-executable segments in all of the ELFs to device untyped frames - Fix the issue on aarch32 hyp where the kernel window is unnecessarily limited to .5GiB as it executes in its own EL2 address space that isn't shared with User apps and so could use the full 4GiB.
Gernot _______________________________________________ Devel mailing list Devel@sel4.systems https://sel4.systems/lists/listinfo/devel