Path: blob/main/sys/contrib/device-tree/Bindings/chosen.txt
48255 views
The chosen node1---------------23The chosen node does not represent a real device, but serves as a place4for passing data between firmware and the operating system, like boot5arguments. Data in the chosen node does not represent the hardware.67The following properties are recognized:8910kaslr-seed11-----------1213This property is used when booting with CONFIG_RANDOMIZE_BASE as the14entropy used to randomize the kernel image base address location. Since15it is used directly, this value is intended only for KASLR, and should16not be used for other purposes (as it may leak information about KASLR17offsets). It is parsed as a u64 value, e.g.1819/ {20chosen {21kaslr-seed = <0xfeedbeef 0xc0def00d>;22};23};2425Note that if this property is set from UEFI (or a bootloader in EFI26mode) when EFI_RNG_PROTOCOL is supported, it will be overwritten by27the Linux EFI stub (which will populate the property itself, using28EFI_RNG_PROTOCOL).2930stdout-path31-----------3233Device trees may specify the device to be used for boot console output34with a stdout-path property under /chosen, as described in the Devicetree35Specification, e.g.3637/ {38chosen {39stdout-path = "/serial@f00:115200";40};4142serial@f00 {43compatible = "vendor,some-uart";44reg = <0xf00 0x10>;45};46};4748If the character ":" is present in the value, this terminates the path.49The meaning of any characters following the ":" is device-specific, and50must be specified in the relevant binding documentation.5152For UART devices, the preferred binding is a string in the form:5354<baud>{<parity>{<bits>{<flow>}}}5556where5758baud - baud rate in decimal59parity - 'n' (none), 'o', (odd) or 'e' (even)60bits - number of data bits61flow - 'r' (rts)6263For example: 115200n8r6465Implementation note: Linux will look for the property "linux,stdout-path" or66on PowerPC "stdout" if "stdout-path" is not found. However, the67"linux,stdout-path" and "stdout" properties are deprecated. New platforms68should only use the "stdout-path" property.6970linux,booted-from-kexec71-----------------------7273This property is set (currently only on PowerPC, and only needed on74book3e) by some versions of kexec-tools to tell the new kernel that it75is being booted by kexec, as the booting environment may differ (e.g.76a different secondary CPU release mechanism)7778linux,usable-memory-range79-------------------------8081This property holds a base address and size, describing a limited region in82which memory may be considered available for use by the kernel. Memory outside83of this range is not available for use.8485This property describes a limitation: memory within this range is only86valid when also described through another mechanism that the kernel87would otherwise use to determine available memory (e.g. memory nodes88or the EFI memory map). Valid memory may be sparse within the range.89e.g.9091/ {92chosen {93linux,usable-memory-range = <0x9 0xf0000000 0x0 0x10000000>;94};95};9697The main usage is for crash dump kernel to identify its own usable98memory and exclude, at its boot time, any other memory areas that are99part of the panicked kernel's memory.100101While this property does not represent a real hardware, the address102and the size are expressed in #address-cells and #size-cells,103respectively, of the root node.104105linux,elfcorehdr106----------------107108This property holds the memory range, the address and the size, of the elf109core header which mainly describes the panicked kernel's memory layout as110PT_LOAD segments of elf format.111e.g.112113/ {114chosen {115linux,elfcorehdr = <0x9 0xfffff000 0x0 0x800>;116};117};118119While this property does not represent a real hardware, the address120and the size are expressed in #address-cells and #size-cells,121respectively, of the root node.122123linux,initrd-start and linux,initrd-end124---------------------------------------125126These properties hold the physical start and end address of an initrd that's127loaded by the bootloader. Note that linux,initrd-start is inclusive, but128linux,initrd-end is exclusive.129e.g.130131/ {132chosen {133linux,initrd-start = <0x82000000>;134linux,initrd-end = <0x82800000>;135};136};137138139