Skip to content

Commit

Permalink
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/tip/tip

Pull x86 EFI changes from Ingo Molnar:
 "The main changes:

  - Add debug code to the dump EFI pagetable - Borislav Petkov

  - Make 1:1 runtime mapping robust when booting on machines with lots
    of memory - Borislav Petkov

  - Move the EFI facilities bits out of 'x86_efi_facility' and into
    efi.flags which is the standard architecture independent place to
    keep EFI state, by Matt Fleming.

  - Add 'EFI mixed mode' support: this allows 64-bit kernels to be
    booted from 32-bit firmware.  This needs a bootloader that supports
    the 'EFI handover protocol'.  By Matt Fleming"

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
  x86, efi: Abstract x86 efi_early calls
  x86/efi: Restore 'attr' argument to query_variable_info()
  x86/efi: Rip out phys_efi_get_time()
  x86/efi: Preserve segment registers in mixed mode
  x86/boot: Fix non-EFI build
  x86, tools: Fix up compiler warnings
  x86/efi: Re-disable interrupts after calling firmware services
  x86/boot: Don't overwrite cr4 when enabling PAE
  x86/efi: Wire up CONFIG_EFI_MIXED
  x86/efi: Add mixed runtime services support
  x86/efi: Firmware agnostic handover entry points
  x86/efi: Split the boot stub into 32/64 code paths
  x86/efi: Add early thunk code to go from 64-bit to 32-bit
  x86/efi: Build our own EFI services pointer table
  efi: Add separate 32-bit/64-bit definitions
  x86/efi: Delete dead code when checking for non-native
  x86/mm/pageattr: Always dump the right page table in an oops
  x86, tools: Consolidate #ifdef code
  x86/boot: Cleanup header.S by removing some #ifdefs
  efi: Use NULL instead of 0 for pointer
  ...
  • Loading branch information
Linus Torvalds committed Mar 31, 2014
2 parents ad8946f + 204b0a1 commit 7cc3afd
Show file tree
Hide file tree
Showing 29 changed files with 2,452 additions and 598 deletions.
7 changes: 7 additions & 0 deletions arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ efi_init (void)
char *cp, vendor[100] = "unknown";
int i;

set_bit(EFI_BOOT, &efi.flags);
set_bit(EFI_64BIT, &efi.flags);

/*
* It's too early to be able to use the standard kernel command line
* support...
Expand Down Expand Up @@ -529,6 +532,8 @@ efi_init (void)
efi.systab->hdr.revision >> 16,
efi.systab->hdr.revision & 0xffff, vendor);

set_bit(EFI_SYSTEM_TABLES, &efi.flags);

palo_phys = EFI_INVALID_TABLE_ADDR;

if (efi_config_init(arch_tables) != 0)
Expand Down Expand Up @@ -657,6 +662,8 @@ efi_enter_virtual_mode (void)
return;
}

set_bit(EFI_RUNTIME_SERVICES, &efi.flags);

/*
* Now that EFI is in virtual mode, we call the EFI functions more
* efficiently:
Expand Down
14 changes: 14 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,20 @@ config EFI_STUB

See Documentation/efi-stub.txt for more information.

config EFI_MIXED
bool "EFI mixed-mode support"
depends on EFI_STUB && X86_64
---help---
Enabling this feature allows a 64-bit kernel to be booted
on a 32-bit firmware, provided that your CPU supports 64-bit
mode.

Note that it is not possible to boot a mixed-mode enabled
kernel via the EFI boot stub - a bootloader that supports
the EFI handover protocol must be used.

If unsure, say N.

config SECCOMP
def_bool y
prompt "Enable seccomp to safely compute untrusted bytecode"
Expand Down
9 changes: 9 additions & 0 deletions arch/x86/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ config X86_PTDUMP
kernel.
If in doubt, say "N"

config EFI_PGT_DUMP
bool "Dump the EFI pagetable"
depends on EFI && X86_PTDUMP
---help---
Enable this if you want to dump the EFI page table before
enabling virtual mode. This can be used to debug miscellaneous
issues with the mapping of the EFI runtime regions into that
table.

config DEBUG_RODATA
bool "Write protect kernel read-only data structures"
default y
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ targets += voffset.h
$(obj)/voffset.h: vmlinux FORCE
$(call if_changed,voffset)

sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|startup_64\|efi_pe_entry\|efi_stub_entry\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p'
sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|startup_64\|efi32_stub_entry\|efi64_stub_entry\|efi_pe_entry\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p'

quiet_cmd_zoffset = ZOFFSET $@
cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
Expand Down
Loading

0 comments on commit 7cc3afd

Please sign in to comment.