Skip to content

Commit e134583

Browse files
manual: document memory region data prefilling
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
1 parent d83fa50 commit e134583

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/manual.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ The mapping has a number of attributes, which include:
245245
**Note:** When a memory region is mapped into multiple protection
246246
domains, the attributes used for different mappings may vary.
247247

248+
### Prefilling
249+
250+
A *memory region* may be prefilled with data from a file at build time
251+
by specifying the file's name in the [System Description File]{#sysdesc}.
252+
253+
In this case, specifying the memory region's size become optional. If
254+
a size isn't specified, the memory region will be sized by the length
255+
of the prefill file, rounded up to the smallest page size or the user
256+
specified page size.
257+
248258
## Channels {#channels}
249259

250260
A *channel* enables two protection domains to interact using protected procedures or notifications.
@@ -1018,6 +1028,7 @@ The `map` element has the following attributes:
10181028
* `cached`: (optional) Determines if mapped with caching enabled or disabled. Defaults to `true`.
10191029
* `setvar_vaddr`: (optional) Specifies a symbol in the program image. This symbol will be rewritten with the virtual address of the memory region.
10201030
* `setvar_size`: (optional) Specifies a symbol in the program image. This symbol will be rewritten with the size of the memory region.
1031+
* `setvar_prefill_size`: (optional) Specifies a symbol in the program image. This symbol will be rewritten with the size of the prefilled data.
10211032

10221033
The `irq` element has the following attributes on ARM and RISC-V:
10231034

@@ -1093,6 +1104,7 @@ It supports the following attributes:
10931104
* `size`: Size of the memory region in bytes (must be a multiple of the page size)
10941105
* `page_size`: (optional) Size of the pages used in the memory region; must be a supported page size if provided. Defaults to the largest page size for the target architecture that the memory region is aligned to.
10951106
* `phys_addr`: (optional) The physical address for the start of the memory region (must be a multiple of the page size).
1107+
* `prefill_path`: (optional) Path to a file containing data that the memory region will be filled with at boot.
10961108

10971109
The `memory_region` element does not support any child elements.
10981110

0 commit comments

Comments
 (0)