^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/firmware/efi/runtime-map/
^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: Switching efi runtime services to virtual mode requires
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) that all efi memory ranges which have the runtime attribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) bit set to be mapped to virtual addresses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) The efi runtime services can only be switched to virtual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) mode once without rebooting. The kexec kernel must maintain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) the same physical to virtual address mappings as the first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) kernel. The mappings are exported to sysfs so userspace tools
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) can reassemble them and pass them into the kexec kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /sys/firmware/efi/runtime-map/ is the directory the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) exports that information in.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) subdirectories are named with the number of the memory range::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /sys/firmware/efi/runtime-map/0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) /sys/firmware/efi/runtime-map/1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /sys/firmware/efi/runtime-map/2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) /sys/firmware/efi/runtime-map/3
^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) Each subdirectory contains five files:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) ========= =========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) attribute The attributes of the memory range.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) num_pages The size of the memory range in pages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) phys_addr The physical address of the memory range.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) type The type of the memory range.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) virt_addr The virtual address of the memory range.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) ========= =========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Above values are all hexadecimal numbers with the '0x' prefix.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) Users: Kexec