Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/reserved-memory/reserved-memory.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: /reserved-memory Child Node Common Device Tree Bindings
0008 
0009 maintainers:
0010   - devicetree-spec@vger.kernel.org
0011 
0012 description: >
0013   Reserved memory is specified as a node under the /reserved-memory node. The
0014   operating system shall exclude reserved memory from normal usage one can
0015   create child nodes describing particular reserved (excluded from normal use)
0016   memory regions. Such memory regions are usually designed for the special
0017   usage by various device drivers.
0018 
0019   Each child of the reserved-memory node specifies one or more regions
0020   of reserved memory. Each child node may either use a 'reg' property to
0021   specify a specific range of reserved memory, or a 'size' property with
0022   optional constraints to request a dynamically allocated block of
0023   memory.
0024 
0025   Following the generic-names recommended practice, node names should
0026   reflect the purpose of the node (ie. "framebuffer" or "dma-pool").
0027   Unit address (@<address>) should be appended to the name if the node
0028   is a static allocation.
0029 
0030 properties:
0031   reg: true
0032 
0033   size:
0034     $ref: /schemas/types.yaml#/definitions/uint32-array
0035     minItems: 1
0036     maxItems: 2
0037     description: >
0038       Length based on parent's \#size-cells. Size in bytes of memory to
0039       reserve.
0040 
0041   alignment:
0042     $ref: /schemas/types.yaml#/definitions/uint32-array
0043     minItems: 1
0044     maxItems: 2
0045     description: >
0046       Length based on parent's \#size-cells. Address boundary for
0047       alignment of allocation.
0048 
0049   alloc-ranges:
0050     $ref: /schemas/types.yaml#/definitions/uint32-array
0051     description: >
0052       Address and Length pairs. Specifies regions of memory that are
0053       acceptable to allocate from.
0054 
0055   no-map:
0056     type: boolean
0057     description: >
0058       Indicates the operating system must not create a virtual mapping
0059       of the region as part of its standard mapping of system memory,
0060       nor permit speculative access to it under any circumstances other
0061       than under the control of the device driver using the region.
0062 
0063   reusable:
0064     type: boolean
0065     description: >
0066       The operating system can use the memory in this region with the
0067       limitation that the device driver(s) owning the region need to be
0068       able to reclaim it back. Typically that means that the operating
0069       system can use that region to store volatile or cached data that
0070       can be otherwise regenerated or migrated elsewhere.
0071 
0072 allOf:
0073   - if:
0074       required:
0075         - no-map
0076 
0077     then:
0078       not:
0079         required:
0080           - reusable
0081 
0082   - if:
0083       required:
0084         - reusable
0085 
0086     then:
0087       not:
0088         required:
0089           - no-map
0090 
0091 oneOf:
0092   - required:
0093       - reg
0094 
0095   - required:
0096       - size
0097 
0098 additionalProperties: true
0099 
0100 ...