18c2ecf20Sopenharmony_ciThe chosen node 28c2ecf20Sopenharmony_ci--------------- 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThe chosen node does not represent a real device, but serves as a place 58c2ecf20Sopenharmony_cifor passing data between firmware and the operating system, like boot 68c2ecf20Sopenharmony_ciarguments. Data in the chosen node does not represent the hardware. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciThe following properties are recognized: 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cikaslr-seed 128c2ecf20Sopenharmony_ci----------- 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciThis property is used when booting with CONFIG_RANDOMIZE_BASE as the 158c2ecf20Sopenharmony_cientropy used to randomize the kernel image base address location. Since 168c2ecf20Sopenharmony_ciit is used directly, this value is intended only for KASLR, and should 178c2ecf20Sopenharmony_cinot be used for other purposes (as it may leak information about KASLR 188c2ecf20Sopenharmony_cioffsets). It is parsed as a u64 value, e.g. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/ { 218c2ecf20Sopenharmony_ci chosen { 228c2ecf20Sopenharmony_ci kaslr-seed = <0xfeedbeef 0xc0def00d>; 238c2ecf20Sopenharmony_ci }; 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciNote that if this property is set from UEFI (or a bootloader in EFI 278c2ecf20Sopenharmony_cimode) when EFI_RNG_PROTOCOL is supported, it will be overwritten by 288c2ecf20Sopenharmony_cithe Linux EFI stub (which will populate the property itself, using 298c2ecf20Sopenharmony_ciEFI_RNG_PROTOCOL). 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cistdout-path 328c2ecf20Sopenharmony_ci----------- 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciDevice trees may specify the device to be used for boot console output 358c2ecf20Sopenharmony_ciwith a stdout-path property under /chosen, as described in the Devicetree 368c2ecf20Sopenharmony_ciSpecification, e.g. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/ { 398c2ecf20Sopenharmony_ci chosen { 408c2ecf20Sopenharmony_ci stdout-path = "/serial@f00:115200"; 418c2ecf20Sopenharmony_ci }; 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci serial@f00 { 448c2ecf20Sopenharmony_ci compatible = "vendor,some-uart"; 458c2ecf20Sopenharmony_ci reg = <0xf00 0x10>; 468c2ecf20Sopenharmony_ci }; 478c2ecf20Sopenharmony_ci}; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciIf the character ":" is present in the value, this terminates the path. 508c2ecf20Sopenharmony_ciThe meaning of any characters following the ":" is device-specific, and 518c2ecf20Sopenharmony_cimust be specified in the relevant binding documentation. 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ciFor UART devices, the preferred binding is a string in the form: 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci <baud>{<parity>{<bits>{<flow>}}} 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ciwhere 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci baud - baud rate in decimal 608c2ecf20Sopenharmony_ci parity - 'n' (none), 'o', (odd) or 'e' (even) 618c2ecf20Sopenharmony_ci bits - number of data bits 628c2ecf20Sopenharmony_ci flow - 'r' (rts) 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ciFor example: 115200n8r 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciImplementation note: Linux will look for the property "linux,stdout-path" or 678c2ecf20Sopenharmony_cion PowerPC "stdout" if "stdout-path" is not found. However, the 688c2ecf20Sopenharmony_ci"linux,stdout-path" and "stdout" properties are deprecated. New platforms 698c2ecf20Sopenharmony_cishould only use the "stdout-path" property. 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_cilinux,booted-from-kexec 728c2ecf20Sopenharmony_ci----------------------- 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ciThis property is set (currently only on PowerPC, and only needed on 758c2ecf20Sopenharmony_cibook3e) by some versions of kexec-tools to tell the new kernel that it 768c2ecf20Sopenharmony_ciis being booted by kexec, as the booting environment may differ (e.g. 778c2ecf20Sopenharmony_cia different secondary CPU release mechanism) 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_cilinux,usable-memory-range 808c2ecf20Sopenharmony_ci------------------------- 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ciThis property (arm64 only) holds a base address and size, describing a 838c2ecf20Sopenharmony_cilimited region in which memory may be considered available for use by 848c2ecf20Sopenharmony_cithe kernel. Memory outside of this range is not available for use. 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ciThis property describes a limitation: memory within this range is only 878c2ecf20Sopenharmony_civalid when also described through another mechanism that the kernel 888c2ecf20Sopenharmony_ciwould otherwise use to determine available memory (e.g. memory nodes 898c2ecf20Sopenharmony_cior the EFI memory map). Valid memory may be sparse within the range. 908c2ecf20Sopenharmony_cie.g. 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci/ { 938c2ecf20Sopenharmony_ci chosen { 948c2ecf20Sopenharmony_ci linux,usable-memory-range = <0x9 0xf0000000 0x0 0x10000000>; 958c2ecf20Sopenharmony_ci }; 968c2ecf20Sopenharmony_ci}; 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ciThe main usage is for crash dump kernel to identify its own usable 998c2ecf20Sopenharmony_cimemory and exclude, at its boot time, any other memory areas that are 1008c2ecf20Sopenharmony_cipart of the panicked kernel's memory. 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ciWhile this property does not represent a real hardware, the address 1038c2ecf20Sopenharmony_ciand the size are expressed in #address-cells and #size-cells, 1048c2ecf20Sopenharmony_cirespectively, of the root node. 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_cilinux,elfcorehdr 1078c2ecf20Sopenharmony_ci---------------- 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ciThis property (currently used only on arm64) holds the memory range, 1108c2ecf20Sopenharmony_cithe address and the size, of the elf core header which mainly describes 1118c2ecf20Sopenharmony_cithe panicked kernel's memory layout as PT_LOAD segments of elf format. 1128c2ecf20Sopenharmony_cie.g. 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci/ { 1158c2ecf20Sopenharmony_ci chosen { 1168c2ecf20Sopenharmony_ci linux,elfcorehdr = <0x9 0xfffff000 0x0 0x800>; 1178c2ecf20Sopenharmony_ci }; 1188c2ecf20Sopenharmony_ci}; 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ciWhile this property does not represent a real hardware, the address 1218c2ecf20Sopenharmony_ciand the size are expressed in #address-cells and #size-cells, 1228c2ecf20Sopenharmony_cirespectively, of the root node. 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_cilinux,initrd-start and linux,initrd-end 1258c2ecf20Sopenharmony_ci--------------------------------------- 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ciThese properties hold the physical start and end address of an initrd that's 1288c2ecf20Sopenharmony_ciloaded by the bootloader. Note that linux,initrd-start is inclusive, but 1298c2ecf20Sopenharmony_cilinux,initrd-end is exclusive. 1308c2ecf20Sopenharmony_cie.g. 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci/ { 1338c2ecf20Sopenharmony_ci chosen { 1348c2ecf20Sopenharmony_ci linux,initrd-start = <0x82000000>; 1358c2ecf20Sopenharmony_ci linux,initrd-end = <0x82800000>; 1368c2ecf20Sopenharmony_ci }; 1378c2ecf20Sopenharmony_ci}; 138