This patch adds functions to libfdt for accessing the memory reservation map section of a device tree blob. fdt_num_mem_rsv() retreives the number of reservation entries in a dtb, and fdt_get_mem_rsv() retreives a specific reservation entry. fdt_add_mem_rsv() adds a new entry, and fdt_del_mem_rsv() removes a specific numbered entry. Testcases for these new functions are also included. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
24 lines
321 B
Plaintext
24 lines
321 B
Plaintext
/memreserve/ deadbeef00000000-deadbeef000fffff;
|
|
/memreserve/ abcd1234 00001234;
|
|
|
|
/ {
|
|
prop-int = <deadbeef>;
|
|
prop-str = "hello world";
|
|
|
|
subnode@1 {
|
|
prop-int = <deadbeef>;
|
|
|
|
subsubnode {
|
|
prop-int = <deadbeef>;
|
|
};
|
|
};
|
|
|
|
subnode@2 {
|
|
prop-int = <abcd1234>;
|
|
|
|
subsubnode@0 {
|
|
prop-int = <abcd1234>;
|
|
};
|
|
};
|
|
};
|