| 1 |
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-clause |
| 2 |
# Copyright 2014,2018 Linaro Ltd. |
| 3 |
# |
| 4 |
# Descriptions based on chosen.txt from Linux kernel |
| 5 |
# Copyright 2017 Kees Cook<[email protected]> |
| 6 |
# Copyright 2017 Jonathan Neuschäfer |
| 7 |
# Copyright ARM Ltd 2017 |
| 8 |
# Copyright 2015 Freescale Semiconductor, Inc. |
| 9 |
%YAML 1.2 |
| 10 |
--- |
| 11 |
$id: http://devicetree.org/schemas/chosen.yaml# |
| 12 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 13 |
|
| 14 |
title: /chosen Node |
| 15 |
|
| 16 |
maintainers: |
| 17 |
- Devicetree Specification Mailing List <[email protected]> |
| 18 |
|
| 19 |
description: |
| 20 |
The chosen node does not represent a real device, but serves as a place |
| 21 |
for passing data between firmware and the operating system, like boot |
| 22 |
arguments. Data in the chosen node does not represent the hardware. |
| 23 |
|
| 24 |
properties: |
| 25 |
$nodename: |
| 26 |
const: chosen |
| 27 |
|
| 28 |
"#address-cells": true |
| 29 |
"#size-cells": true |
| 30 |
ranges: true |
| 31 |
|
| 32 |
bootargs: |
| 33 |
$ref: types.yaml#/definitions/string |
| 34 |
|
| 35 |
bootsource: |
| 36 |
$ref: types.yaml#/definitions/string |
| 37 |
description: |
| 38 |
This property represents the full path to the node representing the device |
| 39 |
the BootROM used to load the initial boot program, e.g. |
| 40 |
|
| 41 |
/ { |
| 42 |
chosen { |
| 43 |
bootsource = "/mmc@ff390000"; |
| 44 |
}; |
| 45 |
}; |
| 46 |
|
| 47 |
If the initial boot program is split into multiple stages, this represents |
| 48 |
the storage medium or device (e.g. used by fastboot) from which the very |
| 49 |
first stage was loaded by the BootROM. |
| 50 |
|
| 51 |
It may differ from the device from which later stages of the boot program |
| 52 |
or client program are loaded from, as this property isn't meant to |
| 53 |
represent those devices. |
| 54 |
|
| 55 |
A later stage of the boot program, or the client program, may use this |
| 56 |
information to favor the device in this property over others for loading |
| 57 |
later stages, or know the storage medium to flash an update to. |
| 58 |
|
| 59 |
kaslr-seed: |
| 60 |
$ref: types.yaml#/definitions/uint64 |
| 61 |
description: |
| 62 |
This property is used when booting with CONFIG_RANDOMIZE_BASE as the |
| 63 |
entropy used to randomize the kernel image base address location. Since |
| 64 |
it is used directly, this value is intended only for KASLR, and should |
| 65 |
not be used for other purposes (as it may leak information about KASLR |
| 66 |
offsets). It is parsed as a u64 value, e.g. |
| 67 |
|
| 68 |
/{ |
| 69 |
chosen { |
| 70 |
kaslr-seed = <0xfeedbeef 0xc0def00d>; |
| 71 |
}; |
| 72 |
}; |
| 73 |
|
| 74 |
Note that if this property is set from UEFI (or a bootloader in EFI |
| 75 |
mode) when EFI_RNG_PROTOCOL is supported, it will be overwritten by |
| 76 |
the Linux EFI stub (which will populate the property itself, using |
| 77 |
EFI_RNG_PROTOCOL). |
| 78 |
|
| 79 |
rng-seed: |
| 80 |
$ref: types.yaml#/definitions/uint8-array |
| 81 |
description: |
| 82 |
This property served as an entropy to add device randomness. It is parsed |
| 83 |
as a byte array, e.g. |
| 84 |
|
| 85 |
/{ |
| 86 |
chosen { |
| 87 |
rng-seed = /bits/ 8 <0x31 0x95 0x1b 0x3c 0xc9 0xfa ...>; |
| 88 |
}; |
| 89 |
}; |
| 90 |
|
| 91 |
This random value should be provided by bootloader. |
| 92 |
|
| 93 |
linux,booted-from-kexec: |
| 94 |
type: boolean |
| 95 |
description: |
| 96 |
This property is set (currently only on PowerPC, and only needed on |
| 97 |
book3e) by some versions of kexec-tools to tell the new kernel that it |
| 98 |
is being booted by kexec, as the booting environment may differ (e.g. |
| 99 |
a different secondary CPU release mechanism). |
| 100 |
|
| 101 |
linux,elfcorehdr: |
| 102 |
$ref: types.yaml#/definitions/address |
| 103 |
maxItems: 1 |
| 104 |
description: | |
| 105 |
This property holds the memory range, the address and the size, of the |
| 106 |
elf core header which mainly describes the panicked kernel\'s memory |
| 107 |
layout as PT_LOAD segments of elf format. |
| 108 |
|
| 109 |
/ { |
| 110 |
chosen { |
| 111 |
linux,elfcorehdr = <0x9 0xfffff000 0x0 0x800>; |
| 112 |
}; |
| 113 |
}; |
| 114 |
|
| 115 |
While this property does not represent a real hardware, the address |
| 116 |
and the size are expressed in #address-cells and #size-cells, |
| 117 |
respectively, of the root node. |
| 118 |
|
| 119 |
linux,usable-memory-range: |
| 120 |
$ref: types.yaml#/definitions/address |
| 121 |
maxItems: 1 |
| 122 |
description: | |
| 123 |
This property holds a base address and size, describing a limited region |
| 124 |
in which memory may be considered available for use by the kernel. Memory |
| 125 |
outside of this range is not available for use. |
| 126 |
|
| 127 |
This property describes a limitation: memory within this range is only |
| 128 |
valid when also described through another mechanism that the kernel |
| 129 |
would otherwise use to determine available memory (e.g. memory nodes |
| 130 |
or the EFI memory map). Valid memory may be sparse within the range. |
| 131 |
|
| 132 |
/ { |
| 133 |
chosen { |
| 134 |
linux,usable-memory-range = <0x9 0xf0000000 0x0 0x10000000>; |
| 135 |
}; |
| 136 |
}; |
| 137 |
|
| 138 |
The main usage is for crash dump kernel to identify its own usable |
| 139 |
memory and exclude, at its boot time, any other memory areas that are |
| 140 |
part of the panicked kernel\'s memory. |
| 141 |
|
| 142 |
While this property does not represent a real hardware, the address |
| 143 |
and the size are expressed in #address-cells and #size-cells, |
| 144 |
respectively, of the root node. |
| 145 |
|
| 146 |
linux,initrd-start: |
| 147 |
$ref: types.yaml#/definitions/address |
| 148 |
maxItems: 1 |
| 149 |
description: |
| 150 |
These properties hold the physical start and end address of an initrd that\'s |
| 151 |
loaded by the bootloader. Note that linux,initrd-start is inclusive, but |
| 152 |
linux,initrd-end is exclusive. |
| 153 |
|
| 154 |
linux,initrd-end: |
| 155 |
$ref: types.yaml#/definitions/address |
| 156 |
maxItems: 1 |
| 157 |
description: |
| 158 |
These properties hold the physical start and end address of an initrd that\'s |
| 159 |
loaded by the bootloader. Note that linux,initrd-start is inclusive, but |
| 160 |
linux,initrd-end is exclusive. |
| 161 |
|
| 162 |
linux,pci-probe-only: |
| 163 |
$ref: types.yaml#/definitions/uint32 |
| 164 |
enum: [ 0, 1 ] |
| 165 |
description: |
| 166 |
Optional property which takes a single-cell argument. If '0', then Linux |
| 167 |
will assign devices in its usual manner, otherwise it will not try to |
| 168 |
assign devices and instead use them as they are configured already. |
| 169 |
|
| 170 |
stdout-path: |
| 171 |
$ref: types.yaml#/definitions/string |
| 172 |
pattern: "^[a-zA-Z0-9@/,+\\-._]*(:[0-9]*[noe]?[78]?[r]?)?$" |
| 173 |
description: | |
| 174 |
Device trees may specify the device to be used for boot console output |
| 175 |
with a stdout-path property under /chosen, as described in the Devicetree |
| 176 |
Specification, e.g. |
| 177 |
|
| 178 |
/ { |
| 179 |
chosen { |
| 180 |
stdout-path = "/serial@f00:115200"; |
| 181 |
}; |
| 182 |
|
| 183 |
serial@f00 { |
| 184 |
compatible = "vendor,some-uart"; |
| 185 |
reg = <0xf00 0x10>; |
| 186 |
}; |
| 187 |
}; |
| 188 |
|
| 189 |
If the character ":" is present in the value, this terminates the path. |
| 190 |
The meaning of any characters following the ":" is device-specific, and |
| 191 |
must be specified in the relevant binding documentation. |
| 192 |
|
| 193 |
For UART devices, the preferred binding is a string in the form: |
| 194 |
|
| 195 |
<baud>{<parity>{<bits>{<flow>}}} |
| 196 |
|
| 197 |
where |
| 198 |
|
| 199 |
baud - baud rate in decimal |
| 200 |
parity - 'n' (none), 'o', (odd) or 'e' (even) |
| 201 |
bits - number of data bits |
| 202 |
flow - 'r' (rts) |
| 203 |
|
| 204 |
For example: 115200n8r |
| 205 |
|
| 206 |
Implementation note: Linux will look for the property "linux,stdout-path" |
| 207 |
or on PowerPC "stdout" if "stdout-path" is not found. However, the |
| 208 |
"linux,stdout-path" and "stdout" properties are deprecated. New platforms |
| 209 |
should only use the "stdout-path" property. |
| 210 |
|
| 211 |
linux,ima-kexec-buffer: |
| 212 |
$ref: types.yaml#/definitions/address |
| 213 |
maxItems: 1 |
| 214 |
description: | |
| 215 |
This property(currently used by powerpc, arm64) holds the memory range, |
| 216 |
"the address and the size", of the Integrity Measurement Architecture(IMA) |
| 217 |
measurement logs that are being carried over to the new kernel. |
| 218 |
|
| 219 |
/ { |
| 220 |
chosen { |
| 221 |
linux,ima-kexec-buffer = <0x9 0x82000000 0x0 0x00008000>; |
| 222 |
}; |
| 223 |
}; |
| 224 |
|
| 225 |
This property does not represent real hardware, but the memory allocated for |
| 226 |
carrying the IMA measurement logs. The address and the size are expressed in |
| 227 |
#address-cells and #size-cells, respectively of the root node. |
| 228 |
|
| 229 |
linux,uefi-system-table: |
| 230 |
$ref: types.yaml#/definitions/uint64 |
| 231 |
description: |
| 232 |
Physical address of the UEFI System Table. |
| 233 |
|
| 234 |
linux,uefi-mmap-start: |
| 235 |
$ref: types.yaml#/definitions/uint64 |
| 236 |
description: |
| 237 |
Physical address of the UEFI memory map, populated by the UEFI |
| 238 |
GetMemoryMap() call. |
| 239 |
|
| 240 |
linux,uefi-mmap-size: |
| 241 |
$ref: types.yaml#/definitions/uint32 |
| 242 |
description: |
| 243 |
Size in bytes of the UEFI memory map pointed to by linux,uefi-mmap-start. |
| 244 |
|
| 245 |
linux,uefi-mmap-desc-size: |
| 246 |
$ref: types.yaml#/definitions/uint32 |
| 247 |
description: |
| 248 |
Size in bytes of each entry in the UEFI memory map. |
| 249 |
|
| 250 |
linux,uefi-mmap-desc-ver: |
| 251 |
$ref: types.yaml#/definitions/uint32 |
| 252 |
description: |
| 253 |
Version of the mmap descriptor format. |
| 254 |
|
| 255 |
linux,kho-fdt: |
| 256 |
$ref: types.yaml#/definitions/address |
| 257 |
maxItems: 1 |
| 258 |
description: | |
| 259 |
This property holds the memory range, the address and the size, of the |
| 260 |
KHO state blob carrying system states passed from the previous kernel |
| 261 |
across kexec. |
| 262 |
|
| 263 |
/ { |
| 264 |
chosen { |
| 265 |
linux,booted-from-kexec; |
| 266 |
linux,kho-scratch = <0x00 0xb4df0000 0x00 0x30>; |
| 267 |
linux,kho-fdt = <0x00 0xb4e00000 0x00 0xa00000>; |
| 268 |
}; |
| 269 |
}; |
| 270 |
|
| 271 |
This property does not represent a real hardware. The address |
| 272 |
and the size are expressed in #address-cells and #size-cells, |
| 273 |
respectively, of the root node. |
| 274 |
|
| 275 |
linux,kho-scratch: |
| 276 |
$ref: types.yaml#/definitions/address |
| 277 |
maxItems: 1 |
| 278 |
description: | |
| 279 |
This property holds the memory range, the address and the size, of the |
| 280 |
KHO scratch region information passed from the previous kernel |
| 281 |
across kexec. |
| 282 |
|
| 283 |
This property does not represent a real hardware. The address |
| 284 |
and the size are expressed in #address-cells and #size-cells, |
| 285 |
respectively, of the root node. |
| 286 |
|
| 287 |
u-boot,bootconf: |
| 288 |
$ref: types.yaml#/definitions/string |
| 289 |
description: |
| 290 |
This property can be used by U-Boot to pass the selected configuration unit |
| 291 |
name of the booted image down to the operating system. |
| 292 |
|
| 293 |
u-boot,version: |
| 294 |
$ref: types.yaml#/definitions/string |
| 295 |
pattern: "^20[0-9]{2}\\.[0-9]{2}.*$" |
| 296 |
description: |
| 297 |
This property is used by U-Boot to pass its version down to the operating |
| 298 |
system. |
| 299 |
|
| 300 |
patternProperties: |
| 301 |
"^framebuffer": true |
| 302 |
|
| 303 |
additionalProperties: false |