Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 972d5e7e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-efi-kexec-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 EFI changes from Ingo Molnar:
 "This consists of two main parts:

   - New static EFI runtime services virtual mapping layout which is
     groundwork for kexec support on EFI (Borislav Petkov)

   - EFI kexec support itself (Dave Young)"

* 'x86-efi-kexec-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
  x86/efi: parse_efi_setup() build fix
  x86: ksysfs.c build fix
  x86/efi: Delete superfluous global variables
  x86: Reserve setup_data ranges late after parsing memmap cmdline
  x86: Export x86 boot_params to sysfs
  x86: Add xloadflags bit for EFI runtime support on kexec
  x86/efi: Pass necessary EFI data for kexec via setup_data
  efi: Export EFI runtime memory mapping to sysfs
  efi: Export more EFI table variables to sysfs
  x86/efi: Cleanup efi_enter_virtual_mode() function
  x86/efi: Fix off-by-one bug in EFI Boot Services reservation
  x86/efi: Add a wrapper function efi_map_region_fixed()
  x86/efi: Remove unused variables in __map_region()
  x86/efi: Check krealloc return value
  x86/efi: Runtime services virtual mapping
  x86/mm/cpa: Map in an arbitrary pgd
  x86/mm/pageattr: Add last levels of error path
  x86/mm/pageattr: Add a PUD error unwinding path
  x86/mm/pageattr: Add a PTE pagetable populating function
  x86/mm/pageattr: Add a PMD pagetable populating function
  ...
parents 5d4863e4 ef0b8b9a
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
What:		/sys/firmware/efi/fw_vendor
Date:		December 2013
Contact:	Dave Young <dyoung@redhat.com>
Description:	It shows the physical address of firmware vendor field in the
		EFI system table.
Users:		Kexec

What:		/sys/firmware/efi/runtime
Date:		December 2013
Contact:	Dave Young <dyoung@redhat.com>
Description:	It shows the physical address of runtime service table entry in
		the EFI system table.
Users:		Kexec

What:		/sys/firmware/efi/config_table
Date:		December 2013
Contact:	Dave Young <dyoung@redhat.com>
Description:	It shows the physical address of config table entry in the EFI
		system table.
Users:		Kexec
+34 −0
Original line number Diff line number Diff line
What:		/sys/firmware/efi/runtime-map/
Date:		December 2013
Contact:	Dave Young <dyoung@redhat.com>
Description:	Switching efi runtime services to virtual mode requires
		that all efi memory ranges which have the runtime attribute
		bit set to be mapped to virtual addresses.

		The efi runtime services can only be switched to virtual
		mode once without rebooting. The kexec kernel must maintain
		the same physical to virtual address mappings as the first
		kernel. The mappings are exported to sysfs so userspace tools
		can reassemble them and pass them into the kexec kernel.

		/sys/firmware/efi/runtime-map/ is the directory the kernel
		exports that information in.

		subdirectories are named with the number of the memory range:

			/sys/firmware/efi/runtime-map/0
			/sys/firmware/efi/runtime-map/1
			/sys/firmware/efi/runtime-map/2
			/sys/firmware/efi/runtime-map/3
			...

		Each subdirectory contains five files:

		attribute : The attributes of the memory range.
		num_pages : The size of the memory range in pages.
		phys_addr : The physical address of the memory range.
		type      : The type of the memory range.
		virt_addr : The virtual address of the memory range.

		Above values are all hexadecimal numbers with the '0x' prefix.
Users:		Kexec
+38 −0
Original line number Diff line number Diff line
What:		/sys/kernel/boot_params
Date:		December 2013
Contact:	Dave Young <dyoung@redhat.com>
Description:	The /sys/kernel/boot_params directory contains two
		files: "data" and "version" and one subdirectory "setup_data".
		It is used to export the kernel boot parameters of an x86
		platform to userspace for kexec and debugging purpose.

		If there's no setup_data in boot_params the subdirectory will
		not be created.

		"data" file is the binary representation of struct boot_params.

		"version" file is the string representation of boot
		protocol version.

		"setup_data" subdirectory contains the setup_data data
		structure in boot_params. setup_data is maintained in kernel
		as a link list. In "setup_data" subdirectory there's one
		subdirectory for each link list node named with the number
		of the list nodes. The list node subdirectory contains two
		files "type" and "data". "type" file is the string
		representation of setup_data type. "data" file is the binary
		representation of setup_data payload.

		The whole boot_params directory structure is like below:
		/sys/kernel/boot_params
		|__ data
		|__ setup_data
		|   |__ 0
		|   |   |__ data
		|   |   |__ type
		|   |__ 1
		|       |__ data
		|       |__ type
		|__ version

Users:		Kexec
+6 −0
Original line number Diff line number Diff line
@@ -899,6 +899,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
	edd=		[EDD]
			Format: {"off" | "on" | "skip[mbr]"}

	efi=		[EFI]
			Format: { "old_map" }
			old_map [X86-64]: switch to the old ioremap-based EFI
			runtime services mapping. 32-bit still uses this one by
			default.

	efi_no_storage_paranoia [EFI; X86]
			Using this parameter you can use more than 50% of
			your efi variable storage. Use this parameter only if
+3 −0
Original line number Diff line number Diff line
@@ -608,6 +608,9 @@ Protocol: 2.12+
	- If 1, the kernel supports the 64-bit EFI handoff entry point
          given at handover_offset + 0x200.

  Bit 4 (read): XLF_EFI_KEXEC
	- If 1, the kernel supports kexec EFI boot with EFI runtime support.

Field name:	cmdline_size
Type:		read
Offset/size:	0x238/4
Loading