Hi David,
Le 4/9/21 à 4:23 AM, David Hildenbrand a écrit :
On 09.04.21 09:14, Alex Ghiti wrote:
Le 4/9/21 à 2:51 AM, Alexandre Ghiti a écrit :
From: Vitaly Wool <vitaly.wool@xxxxxxxxxxxx>I added linux-mm and linux-arch to get feedbacks because I noticed that
Introduce XIP (eXecute In Place) support for RISC-V platforms.
It allows code to be executed directly from non-volatile storage
directly addressable by the CPU, such as QSPI NOR flash which can
be found on many RISC-V platforms. This makes way for significant
optimization of RAM footprint. The XIP kernel is not compressed
since it has to run directly from flash, so it will occupy more
space on the non-volatile storage. The physical flash address used
to link the kernel object files and for storing it has to be known
at compile time and is represented by a Kconfig option.
XIP on RISC-V will for the time being only work on MMU-enabled
kernels.
DEBUG_VM_PGTABLE fails for SPARSEMEM (it works for FLATMEM but I think
it does not do what is expected): the fact that we don't have any struct
page to back the text and rodata in flash is the problem but to which
extent ?
Just wondering, why can't we create a memmap for that memory -- or is it
even desireable to not do that explicity? There might be some nasty side
effects when not having a memmap for text and rodata.
Do you have examples of such effects ? Any feature that will not work
without that ?
Also, will that memory properly be exposed in the resource tree as
System RAM (e.g., /proc/iomem) ? Otherwise some things (/proc/kcore)
won't work as expected - the kernel won't be included in a dump.
I have just checked and it does not appear in /proc/iomem.
Ok your conclusion would be to have struct page, I'm going to implement
this version then using memblock as you described.