# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-clause # Copyright 2014,2018 Linaro Ltd. # # Descriptions based on chosen.txt from Linux kernel # Copyright 2017 Kees Cook # Copyright 2017 Jonathan Neuschäfer # Copyright ARM Ltd 2017 # Copyright 2015 Freescale Semiconductor, Inc. %YAML 1.2 --- $id: http://devicetree.org/schemas/chosen.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: /chosen Node maintainers: - Devicetree Specification Mailing List description: The chosen node does not represent a real device, but serves as a place for passing data between firmware and the operating system, like boot arguments. Data in the chosen node does not represent the hardware. properties: $nodename: const: chosen "#address-cells": true "#size-cells": true ranges: true bootargs: $ref: types.yaml#/definitions/string bootsource: $ref: types.yaml#/definitions/string description: This property represents the full path to the node representing the device the BootROM used to load the initial boot program, e.g. / { chosen { bootsource = "/mmc@ff390000"; }; }; If the initial boot program is split into multiple stages, this represents the storage medium or device (e.g. used by fastboot) from which the very first stage was loaded by the BootROM. It may differ from the device from which later stages of the boot program or client program are loaded from, as this property isn't meant to represent those devices. A later stage of the boot program, or the client program, may use this information to favor the device in this property over others for loading later stages, or know the storage medium to flash an update to. kaslr-seed: $ref: types.yaml#/definitions/uint64 description: This property is used when booting with CONFIG_RANDOMIZE_BASE as the entropy used to randomize the kernel image base address location. Since it is used directly, this value is intended only for KASLR, and should not be used for other purposes (as it may leak information about KASLR offsets). It is parsed as a u64 value, e.g. /{ chosen { kaslr-seed = <0xfeedbeef 0xc0def00d>; }; }; Note that if this property is set from UEFI (or a bootloader in EFI mode) when EFI_RNG_PROTOCOL is supported, it will be overwritten by the Linux EFI stub (which will populate the property itself, using EFI_RNG_PROTOCOL). rng-seed: $ref: types.yaml#/definitions/uint8-array description: This property served as an entropy to add device randomness. It is parsed as a byte array, e.g. /{ chosen { rng-seed = /bits/ 8 <0x31 0x95 0x1b 0x3c 0xc9 0xfa ...>; }; }; This random value should be provided by bootloader. linux,booted-from-kexec: type: boolean description: This property is set (currently only on PowerPC, and only needed on book3e) by some versions of kexec-tools to tell the new kernel that it is being booted by kexec, as the booting environment may differ (e.g. a different secondary CPU release mechanism). linux,elfcorehdr: $ref: types.yaml#/definitions/address maxItems: 1 description: | This property holds the memory range, the address and the size, of the elf core header which mainly describes the panicked kernel\'s memory layout as PT_LOAD segments of elf format. / { chosen { linux,elfcorehdr = <0x9 0xfffff000 0x0 0x800>; }; }; While this property does not represent a real hardware, the address and the size are expressed in #address-cells and #size-cells, respectively, of the root node. linux,usable-memory-range: $ref: types.yaml#/definitions/address maxItems: 1 description: | This property holds a base address and size, describing a limited region in which memory may be considered available for use by the kernel. Memory outside of this range is not available for use. This property describes a limitation: memory within this range is only valid when also described through another mechanism that the kernel would otherwise use to determine available memory (e.g. memory nodes or the EFI memory map). Valid memory may be sparse within the range. / { chosen { linux,usable-memory-range = <0x9 0xf0000000 0x0 0x10000000>; }; }; The main usage is for crash dump kernel to identify its own usable memory and exclude, at its boot time, any other memory areas that are part of the panicked kernel\'s memory. While this property does not represent a real hardware, the address and the size are expressed in #address-cells and #size-cells, respectively, of the root node. linux,initrd-start: $ref: types.yaml#/definitions/address maxItems: 1 description: These properties hold the physical start and end address of an initrd that\'s loaded by the bootloader. Note that linux,initrd-start is inclusive, but linux,initrd-end is exclusive. linux,initrd-end: $ref: types.yaml#/definitions/address maxItems: 1 description: These properties hold the physical start and end address of an initrd that\'s loaded by the bootloader. Note that linux,initrd-start is inclusive, but linux,initrd-end is exclusive. linux,pci-probe-only: $ref: types.yaml#/definitions/uint32 enum: [ 0, 1 ] description: Optional property which takes a single-cell argument. If '0', then Linux will assign devices in its usual manner, otherwise it will not try to assign devices and instead use them as they are configured already. stdout-path: $ref: types.yaml#/definitions/string pattern: "^[a-zA-Z0-9@/,+\\-._]*(:[0-9]*[noe]?[78]?[r]?)?$" description: | Device trees may specify the device to be used for boot console output with a stdout-path property under /chosen, as described in the Devicetree Specification, e.g. / { chosen { stdout-path = "/serial@f00:115200"; }; serial@f00 { compatible = "vendor,some-uart"; reg = <0xf00 0x10>; }; }; If the character ":" is present in the value, this terminates the path. The meaning of any characters following the ":" is device-specific, and must be specified in the relevant binding documentation. For UART devices, the preferred binding is a string in the form: {{{}}} where baud - baud rate in decimal parity - 'n' (none), 'o', (odd) or 'e' (even) bits - number of data bits flow - 'r' (rts) For example: 115200n8r Implementation note: Linux will look for the property "linux,stdout-path" or on PowerPC "stdout" if "stdout-path" is not found. However, the "linux,stdout-path" and "stdout" properties are deprecated. New platforms should only use the "stdout-path" property. linux,ima-kexec-buffer: $ref: types.yaml#/definitions/address maxItems: 1 description: | This property(currently used by powerpc, arm64) holds the memory range, "the address and the size", of the Integrity Measurement Architecture(IMA) measurement logs that are being carried over to the new kernel. / { chosen { linux,ima-kexec-buffer = <0x9 0x82000000 0x0 0x00008000>; }; }; This property does not represent real hardware, but the memory allocated for carrying the IMA measurement logs. The address and the size are expressed in #address-cells and #size-cells, respectively of the root node. linux,uefi-system-table: $ref: types.yaml#/definitions/uint64 description: Physical address of the UEFI System Table. linux,uefi-mmap-start: $ref: types.yaml#/definitions/uint64 description: Physical address of the UEFI memory map, populated by the UEFI GetMemoryMap() call. linux,uefi-mmap-size: $ref: types.yaml#/definitions/uint32 description: Size in bytes of the UEFI memory map pointed to by linux,uefi-mmap-start. linux,uefi-mmap-desc-size: $ref: types.yaml#/definitions/uint32 description: Size in bytes of each entry in the UEFI memory map. linux,uefi-mmap-desc-ver: $ref: types.yaml#/definitions/uint32 description: Version of the mmap descriptor format. linux,kho-fdt: $ref: types.yaml#/definitions/address maxItems: 1 description: | This property holds the memory range, the address and the size, of the KHO state blob carrying system states passed from the previous kernel across kexec. / { chosen { linux,booted-from-kexec; linux,kho-scratch = <0x00 0xb4df0000 0x00 0x30>; linux,kho-fdt = <0x00 0xb4e00000 0x00 0xa00000>; }; }; This property does not represent a real hardware. The address and the size are expressed in #address-cells and #size-cells, respectively, of the root node. linux,kho-scratch: $ref: types.yaml#/definitions/address maxItems: 1 description: | This property holds the memory range, the address and the size, of the KHO scratch region information passed from the previous kernel across kexec. This property does not represent a real hardware. The address and the size are expressed in #address-cells and #size-cells, respectively, of the root node. u-boot,bootconf: $ref: types.yaml#/definitions/string description: This property can be used by U-Boot to pass the selected configuration unit name of the booted image down to the operating system. u-boot,version: $ref: types.yaml#/definitions/string pattern: "^20[0-9]{2}\\.[0-9]{2}.*$" description: This property is used by U-Boot to pass its version down to the operating system. patternProperties: "^framebuffer": true additionalProperties: false