efi: Export EFI runtime memory mapping to sysfs
authorDave Young <dyoung@redhat.com>
Fri, 20 Dec 2013 10:02:18 +0000 (18:02 +0800)
committerMatt Fleming <matt.fleming@intel.com>
Sat, 21 Dec 2013 15:29:36 +0000 (15:29 +0000)
commit926172d46038d7610b6b8d84e40db727cefb482d
tree8963aaa9fccd0a4ee0d59717b4de8e8cdfebbe62
parenta0998eb15afeffbf52a2c2829318f67df9ac57b8
efi: Export EFI runtime memory mapping to sysfs

kexec kernel will need exactly same mapping for EFI runtime memory
ranges. Thus here export the runtime ranges mapping to sysfs,
kexec-tools will assemble them and pass to 2nd kernel via setup_data.

Introducing a new directory /sys/firmware/efi/runtime-map just like
/sys/firmware/memmap. Containing below attribute in each file of that
directory:

attribute  num_pages  phys_addr  type  virt_addr

Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Documentation/ABI/testing/sysfs-firmware-efi-runtime-map [new file with mode: 0644]
arch/x86/platform/efi/efi.c
drivers/firmware/efi/Kconfig
drivers/firmware/efi/Makefile
drivers/firmware/efi/efi.c
drivers/firmware/efi/runtime-map.c [new file with mode: 0644]
include/linux/efi.h