1. 12 10月, 2015 4 次提交
  2. 11 10月, 2015 1 次提交
    • M
      efi: Use the generic efi.memmap instead of 'memmap' · 0ce423b6
      Matt Fleming 提交于
      Guenter reports that commit:
      
        7bf79311 ("efi, x86: Rearrange efi_mem_attributes()")
      
      breaks the IA64 compilation with the following error:
      
        drivers/built-in.o: In function `efi_mem_attributes': (.text+0xde962): undefined reference to `memmap'
      
      Instead of using the (rather poorly named) global variable
      'memmap' which doesn't exist on IA64, use efi.memmap which
      points to the 'memmap' object on x86 and arm64 and which is NULL
      for IA64.
      
      The fact that efi.memmap is NULL for IA64 is OK because IA64
      provides its own implementation of efi_mem_attributes().
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Jonathan Zhang <zjzhang@codeaurora.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@gmail.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Link: http://lkml.kernel.org/r/20151003222607.GA2682@codeblueprint.co.ukSigned-off-by: NIngo Molnar <mingo@kernel.org>
      0ce423b6
  3. 08 8月, 2015 2 次提交
  4. 31 7月, 2015 1 次提交
    • R
      efi: Check for NULL efi kernel parameters · 9115c758
      Ricardo Neri 提交于
      Even though it is documented how to specifiy efi parameters, it is
      possible to cause a kernel panic due to a dereference of a NULL pointer when
      parsing such parameters if "efi" alone is given:
      
      PANIC: early exception 0e rip 10:ffffffff812fb361 error 0 cr2 0
      [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.2.0-rc1+ #450
      [ 0.000000]  ffffffff81fe20a9 ffffffff81e03d50 ffffffff8184bb0f 00000000000003f8
      [ 0.000000]  0000000000000000 ffffffff81e03e08 ffffffff81f371a1 64656c62616e6520
      [ 0.000000]  0000000000000069 000000000000005f 0000000000000000 0000000000000000
      [ 0.000000] Call Trace:
      [ 0.000000]  [<ffffffff8184bb0f>] dump_stack+0x45/0x57
      [ 0.000000]  [<ffffffff81f371a1>] early_idt_handler_common+0x81/0xae
      [ 0.000000]  [<ffffffff812fb361>] ? parse_option_str+0x11/0x90
      [ 0.000000]  [<ffffffff81f4dd69>] arch_parse_efi_cmdline+0x15/0x42
      [ 0.000000]  [<ffffffff81f376e1>] do_early_param+0x50/0x8a
      [ 0.000000]  [<ffffffff8106b1b3>] parse_args+0x1e3/0x400
      [ 0.000000]  [<ffffffff81f37a43>] parse_early_options+0x24/0x28
      [ 0.000000]  [<ffffffff81f37691>] ? loglevel+0x31/0x31
      [ 0.000000]  [<ffffffff81f37a78>] parse_early_param+0x31/0x3d
      [ 0.000000]  [<ffffffff81f3ae98>] setup_arch+0x2de/0xc08
      [ 0.000000]  [<ffffffff8109629a>] ? vprintk_default+0x1a/0x20
      [ 0.000000]  [<ffffffff81f37b20>] start_kernel+0x90/0x423
      [ 0.000000]  [<ffffffff81f37495>] x86_64_start_reservations+0x2a/0x2c
      [ 0.000000]  [<ffffffff81f37582>] x86_64_start_kernel+0xeb/0xef
      [ 0.000000] RIP 0xffffffff81ba2efc
      
      This panic is not reproducible with "efi=" as this will result in a non-NULL
      zero-length string.
      
      Thus, verify that the pointer to the parameter string is not NULL. This is
      consistent with other parameter-parsing functions which check for NULL pointers.
      Signed-off-by: NRicardo Neri <ricardo.neri-calderon@linux.intel.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      9115c758
  5. 01 7月, 2015 1 次提交
  6. 06 5月, 2015 1 次提交
  7. 01 5月, 2015 1 次提交
  8. 21 1月, 2015 2 次提交
  9. 12 1月, 2015 2 次提交
  10. 08 1月, 2015 1 次提交
  11. 05 11月, 2014 1 次提交
  12. 04 10月, 2014 3 次提交
  13. 19 7月, 2014 3 次提交
    • L
      efi: Autoload efivars · 28d54022
      Lee, Chun-Yi 提交于
      The original patch is from Ben Hutchings's contribution to debian
      kernel. Got Ben's permission to remove the code of efi-pstore.c and
      send to linux-efi:
      https://github.com/BlankOn/linux-debian/blob/master/debian/patches/features/all/efi-autoload-efivars.patch
      
      efivars is generally useful to have on EFI systems, and in some cases
      it may be impossible to load it after a kernel upgrade in order to
      complete a boot loader update. At the same time we don't want to waste
      memory on non-EFI systems by making them built-in.
      
      Instead, give them module aliases as if they are platform drivers, and
      register a corresponding platform device whenever EFI runtime services
      are available.  This should trigger udev to load them.
      Signed-off-by: NLee, Chun-Yi <jlee@suse.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Tested-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      28d54022
    • D
      efi: Introduce EFI_PARAVIRT flag · 9f27bc54
      Daniel Kiper 提交于
      Introduce EFI_PARAVIRT flag. If it is set then kernel runs
      on EFI platform but it has not direct control on EFI stuff
      like EFI runtime, tables, structures, etc. If not this means
      that Linux Kernel has direct access to EFI infrastructure
      and everything runs as usual.
      
      This functionality is used in Xen dom0 because hypervisor
      has full control on EFI stuff and all calls from dom0 to
      EFI must be requested via special hypercall which in turn
      executes relevant EFI code in behalf of dom0.
      Signed-off-by: NDaniel Kiper <daniel.kiper@oracle.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      9f27bc54
    • D
      efi: Use early_mem*() instead of early_io*() · abc93f8e
      Daniel Kiper 提交于
      Use early_mem*() instead of early_io*() because all mapped EFI regions
      are memory (usually RAM but they could also be ROM, EPROM, EEPROM, flash,
      etc.) not I/O regions. Additionally, I/O family calls do not work correctly
      under Xen in our case. early_ioremap() skips the PFN to MFN conversion
      when building the PTE. Using it for memory will attempt to map the wrong
      machine frame. However, all artificial EFI structures created under Xen
      live in dom0 memory and should be mapped/unmapped using early_mem*() family
      calls which map domain memory.
      Signed-off-by: NDaniel Kiper <daniel.kiper@oracle.com>
      Cc: Leif Lindholm <leif.lindholm@linaro.org>
      Cc: Mark Salter <msalter@redhat.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      abc93f8e
  14. 10 7月, 2014 1 次提交
  15. 19 6月, 2014 1 次提交
    • C
      efi: Fix compiler warnings (unused, const, type) · 6fb8cc82
      Catalin Marinas 提交于
      This patch fixes a few compiler warning in the efi code for unused
      variable, discarding const qualifier and wrong pointer type:
      
      drivers/firmware/efi/fdt.c|66 col 22| warning: unused variable ‘name’ [-Wunused-variable]
      drivers/firmware/efi/efi.c|368 col 3| warning: passing argument 3 of ‘of_get_flat_dt_prop’ from incompatible pointer type [enabled by default]
      drivers/firmware/efi/efi.c|368 col 8| warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      6fb8cc82
  16. 01 5月, 2014 1 次提交
  17. 05 3月, 2014 2 次提交
  18. 21 12月, 2013 2 次提交
  19. 05 9月, 2013 2 次提交
  20. 17 4月, 2013 1 次提交
    • T
      efi: split efisubsystem from efivars · a9499fa7
      Tom Gundersen 提交于
      This registers /sys/firmware/efi/{,systab,efivars/} whenever EFI is enabled
      and the system is booted with EFI.
      
      This allows
       *) userspace to check for the existence of /sys/firmware/efi as a way
          to determine whether or it is running on an EFI system.
       *) 'mount -t efivarfs none /sys/firmware/efi/efivars' without manually
          loading any modules.
      
      [ Also, move the efivar API into vars.c and unconditionally compile it.
        This allows us to move efivars.c, which now only contains the sysfs
        variable code, into the firmware/efi directory. Note that the efivars.c
        filename is kept to maintain backwards compatability with the old
        efivars.ko module. With this patch it is now possible for efivarfs
        to be built without CONFIG_EFI_VARS - Matt ]
      
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Kay Sievers <kay@vrfy.org>
      Cc: Jeremy Kerr <jk@ozlabs.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Chun-Yi Lee <jlee@suse.com>
      Cc: Andy Whitcroft <apw@canonical.com>
      Cc: Tobias Powalowski <tpowa@archlinux.org>
      Signed-off-by: NTom Gundersen <teg@jklm.no>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      a9499fa7