^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/kernel/boot_params
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: December 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Contact: Dave Young <dyoung@redhat.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Description: The /sys/kernel/boot_params directory contains two
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) files: "data" and "version" and one subdirectory "setup_data".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) It is used to export the kernel boot parameters of an x86
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) platform to userspace for kexec and debugging purpose.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) If there's no setup_data in boot_params the subdirectory will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) not be created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) "data" file is the binary representation of struct boot_params.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) "version" file is the string representation of boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) protocol version.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) "setup_data" subdirectory contains the setup_data data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) structure in boot_params. setup_data is maintained in kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) as a link list. In "setup_data" subdirectory there's one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) subdirectory for each link list node named with the number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) of the list nodes. The list node subdirectory contains two
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) files "type" and "data". "type" file is the string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) representation of setup_data type. "data" file is the binary
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) representation of setup_data payload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) The whole boot_params directory structure is like below::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) /sys/kernel/boot_params
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) |__ data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) |__ setup_data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) | |__ 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) | | |__ data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) | | |__ type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) | |__ 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) | |__ data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) | |__ type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) |__ version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) Users: Kexec