The 2MiB large page used for BBL is protected by Physical Memory Protection, 
preventing any part of that region of physical memory being used by supervisor 
or user modes.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: porter....@osu.edu <porter....@osu.edu>
Sent: Tuesday, January 19, 2021 9:00:49 AM
To: devel@sel4.systems <devel@sel4.systems>
Subject: [seL4] Re: Reducing memory footprint - RISC-V

I still have some questions regarding this project:

I'm still a little confused about the starting point: 0x80200000. I see that I 
need to add 0x80200000 to the image size/memory usage to get the end point. One 
of the builds the end point is 0x80396F48. That's about 3.58 MB. Am I 
understanding correctly that there is 2 MB reserved for the BBL and then 
another ~1.6 MB for the image/application? Is it possible to move this up in 
memory? That means give the BBL less than 2 MB and put the payload after that 
before 0x80200000? I did give this a try and ran into alignment issues. So I 
don't know if this is possible.

I've made some progress on my efforts to reduce the memory footprint (< 2 MB). 
Here are some items I've found:

1. In shoehorn.py lines 207-209 
(https://github.com/seL4/seL4_tools/blob/2f97243012afb42975d29a24752675bf68f0a67a/cmake-tool/helpers/shoehorn.py#L207)
 add 4 MB for seL4test. These lines can be commented and this immediately 
reduced the footprint from ~7 MB default, to ~3.5 MB.

2. The items in the archive.o are the kernel.elf, kernel.dtb, and hello.elf 
(rootserver). The two elf files can be stripped after the build and this 
reduces the footprint further. Additionally, the elfloader can be stripped 
before putting this into Berkeley Boot Loader for RISC-V. This again reduces 
the footprint a little.

3. I've noticed that the memory footprint of hello the rootserver application, 
takes about 1.18 MB. This lines up exactly with what is in the ELF files 
PT_LOAD mem_sz fields.
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to