^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) The chosen node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) The chosen node does not represent a real device, but serves as a place
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) for passing data between firmware and the operating system, like boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) arguments. Data in the chosen node does not represent the hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) The following properties are recognized:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) kaslr-seed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) This property is used when booting with CONFIG_RANDOMIZE_BASE as the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) entropy used to randomize the kernel image base address location. Since
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) it is used directly, this value is intended only for KASLR, and should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) not be used for other purposes (as it may leak information about KASLR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) offsets). It is parsed as a u64 value, e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) / {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) chosen {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) kaslr-seed = <0xfeedbeef 0xc0def00d>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Note that if this property is set from UEFI (or a bootloader in EFI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) mode) when EFI_RNG_PROTOCOL is supported, it will be overwritten by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) the Linux EFI stub (which will populate the property itself, using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) EFI_RNG_PROTOCOL).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) stdout-path
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) Device trees may specify the device to be used for boot console output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) with a stdout-path property under /chosen, as described in the Devicetree
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) Specification, e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) / {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) chosen {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) stdout-path = "/serial@f00:115200";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) serial@f00 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) compatible = "vendor,some-uart";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) reg = <0xf00 0x10>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) If the character ":" is present in the value, this terminates the path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) The meaning of any characters following the ":" is device-specific, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) must be specified in the relevant binding documentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) For UART devices, the preferred binding is a string in the form:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) <baud>{<parity>{<bits>{<flow>}}}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) where
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) baud - baud rate in decimal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) parity - 'n' (none), 'o', (odd) or 'e' (even)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) bits - number of data bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) flow - 'r' (rts)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) For example: 115200n8r
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Implementation note: Linux will look for the property "linux,stdout-path" or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) on PowerPC "stdout" if "stdout-path" is not found. However, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) "linux,stdout-path" and "stdout" properties are deprecated. New platforms
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) should only use the "stdout-path" property.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) linux,booted-from-kexec
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) This property is set (currently only on PowerPC, and only needed on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) book3e) by some versions of kexec-tools to tell the new kernel that it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) is being booted by kexec, as the booting environment may differ (e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) a different secondary CPU release mechanism)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) linux,usable-memory-range
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) This property (arm64 only) holds a base address and size, describing a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) limited region in which memory may be considered available for use by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) the kernel. Memory outside of this range is not available for use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) This property describes a limitation: memory within this range is only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) valid when also described through another mechanism that the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) would otherwise use to determine available memory (e.g. memory nodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) or the EFI memory map). Valid memory may be sparse within the range.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) / {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) chosen {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) linux,usable-memory-range = <0x9 0xf0000000 0x0 0x10000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) The main usage is for crash dump kernel to identify its own usable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) memory and exclude, at its boot time, any other memory areas that are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) part of the panicked kernel's memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) While this property does not represent a real hardware, the address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) and the size are expressed in #address-cells and #size-cells,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) respectively, of the root node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) linux,elfcorehdr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) ----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) This property (currently used only on arm64) holds the memory range,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) the address and the size, of the elf core header which mainly describes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) the panicked kernel's memory layout as PT_LOAD segments of elf format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) / {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) chosen {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) linux,elfcorehdr = <0x9 0xfffff000 0x0 0x800>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) While this property does not represent a real hardware, the address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) and the size are expressed in #address-cells and #size-cells,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) respectively, of the root node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) linux,initrd-start and linux,initrd-end
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) ---------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) These properties hold the physical start and end address of an initrd that's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) loaded by the bootloader. Note that linux,initrd-start is inclusive, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) linux,initrd-end is exclusive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) e.g.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) / {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) chosen {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) linux,initrd-start = <0x82000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) linux,initrd-end = <0x82800000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) };