Devicetree integration
Sentry use Devicetree Specification for hardware description and configuration. Dts [1] file is preprocessed at build time and used to generate code according to configuration. Dts file dts include dir (for fragments and bindings resolution) have to be passed at project configure time, see Bootstraping Sentry build section.
CamelotOS/Sentry requires custom nodes and property to work as expected.
Properties
sentry,owner property
This property is an u32 type property used to assign the owner task label
to a the parent node. This property is mandatory for each mappable and/or restricted node
as userspace devices, shared memories and
dma buffers.
1/{
2 ...
3 some_nodelabel: name@address {
4 ...
5 sentry,owner = <0xbabe>;
6 ...
7 };
8};
chosen node
sentry,debug_stdout property
This property defines the device to use as standard output use in debug mode if configured. ..
Add a reference to config here
type:
phandleparent:
chosen
1/{
2 chosen {
3 sentry,debug_stdout = <&usart1>;
4 }
5};
sentry,kernelram_section property
Reference to the kernel ram reserved memory region.
type:
phandleparent:
chosen
Note
This property is mandatory
sentry,idleram_section property
Reference to the idle task ram reserved memory region.
type:
phandleparent:
chosen
Note
This property is mandatory
sentry,kernelcode_section property
Reference to the kernel code reserved memory region.
type:
phandleparent:
chosen
Note
This property is mandatory
sentry,idlecode_section property
Reference to the idle task code reserved memory region.
type:
phandleparent:
chosen
Note
This property is mandatory
sentry,autotestram_section property
Reference to the autotest task ram reserved memory region.
type:
phandleparent:
chosen
Note
Required while build in autotest mode
sentry,autotestcode_section property
Reference to the autotest task code reserved memory region.
type:
phandleparent:
chosen
Note
Required while build in autotest mode
sentry,rng property
TBD
reserved-memory node
reserved-memory is the node holding memory region reserved for a specific usage. This
could be kernel, idle task or user tasks code/ram region, shared memory or, dma buffers.
Each child node describe one region with the following properties:
reg: <base_address size> (mandatory)
dma-pool: boolean, this region can be used as dma-pool.
sentry,shm: boolean, can be use as shared memory, this property requires sentry,label and sentry,owner property to be defined
sentry,label: memory region label (used by user space to get internal opaque handler)
sentry,owner: see sentry,owner property section.
sentry,no-map: prevent region to be mapped by sentry kernel.
Important
[kernel/idle/autotest/tasks]_code/ram label are reserved and mandatory in order to declare,
respectively, kernel, idle task, autotest task and user defined tasks memory region.
autotest` and tasks are mutually exclusive as there is no user tasks in autotest mode.
All user tasks are relocated at project build time in the configured region.
For those regions, only reg property is required, all others are ignored.
Warning
reserved memory regions must comply with target MPU alignment requirements.
1 reserved-memory {
2 #address-cells = <1>;
3 #size-cells = <1>;
4
5 kernel_code: memory@8000000 {
6 reg = <0x8000000 0x8000>;
7 compatible = "sentry,memory-pool";
8 };
9 idle_code: memory@8008000 {
10 reg = <0x8008000 0x300>;
11 compatible = "sentry,memory-pool";
12 };
13 kernel_ram: memory@20000000 {
14 reg = <0x20000000 0x2000>;
15 compatible = "sentry,memory-pool";
16 };
17 idle_ram: memory@20004000 {
18 reg = <0x20004000 0x200>;
19 compatible = "sentry,memory-pool";
20 };
21 tasks_code: memory@0800a000 {
22 reg = <0x0800a000 0x200000>;
23 compatible = "sentry,memory-pool";
24 };
25 tasks_ram: memory@20008000 {
26 reg = <0x20008000 0x280000>;
27 compatible = "sentry,memory-pool";
28 };
29 };