class DevicetreeMemoryMatcher
Defined at line 411 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
This matcher parses 'memory' and 'reserved_memory' device nodes and 'memranges' from the
devicetree and makes them available.
The memory regions are encoded in three different sources, whose layout and number of ranges
pero node may vary.
* Each 'memory' nodes defines a collection of ranges that represent ram. Memory nodes
are childs of the root node and contain an address as part of the name(E.g. "/memory@1234").
* 'reserved-memory' is a container node, whose children define collections of memory ranges
that should be reserved. The 'reserved-memory' node is located under the root node
'/reserved-memory'.
* 'memreseve' represents the memory reservation block, which encodes pairs describing base
address and length of reserved memory ranges.
* `ramoops` node is a child of `reserverd-memory` node which is tracked as a special range.
When present will eventually be used to generate `ZBI_TYPE_NVRAM`.
For more information and examples of each source see :
'/memory' :
https://devicetree-specification.readthedocs.io/en/latest/chapter3-devicenodes.html#memory-node
'/reserved-memory' :
https://devicetree-specification.readthedocs.io/en/latest/chapter3-devicenodes.html#reserved-memory-node
'memreserve' :
https://devicetree-specification.readthedocs.io/en/latest/chapter5-flattened-format.html#memory-reservation-block
`ramoops`:
https://www.kernel.org/doc/Documentation/admin-guide/ramoops.rst'
Public Methods
devicetree::ScanState OnNode (const devicetree::NodePath & path, const devicetree::PropertyDecoder & decoder)
Defined at line 32 of file ../../zircon/kernel/phys/lib/boot-shim/devicetree-memory-matcher.cc
void DevicetreeMemoryMatcher (const char * shim_name, FILE * log, std::span<memalloc::Range> storage)
Matcher API.
Defined at line 414 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
void DevicetreeMemoryMatcher (const char * shim_name, FILE * log, std::span<memalloc::Range> storage)
Matcher API.
Defined at line 414 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
void DevicetreeMemoryMatcher (const char * shim_name, FILE * log, std::span<memalloc::Range> storage)
Matcher API.
Defined at line 414 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
void DevicetreeMemoryMatcher (const char * shim_name, FILE * log, std::span<memalloc::Range> storage)
Matcher API.
Defined at line 414 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
devicetree::ScanState OnScan ()
Defined at line 420 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
std::span<const memalloc::Range> ranges ()
Memory Item API for the bootshim to initialize the memory layout.
An empty set of memory ranges indicates an error while parsing the devicetree
memory ranges.
Defined at line 425 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h
const std::optional<zbi_nvram_t> & nvram ()
When valid `ramoops` node is found, then this range is filled.
Defined at line 433 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/devicetree.h