chosen.txt 4.0 KB

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