Skip to content
Snippets Groups Projects
  1. Oct 27, 2010
  2. Aug 27, 2010
  3. Feb 07, 2010
  4. Oct 27, 2009
  5. Sep 16, 2009
  6. Aug 09, 2009
  7. Aug 03, 2009
    • Paul Mackerras's avatar
      x86: Make 64-bit efi_ioremap use ioremap on MMIO regions · 6a7bbd57
      Paul Mackerras authored
      
      Booting current 64-bit x86 kernels on the latest Apple MacBook
      (MacBook5,2) via EFI gives the following warning:
      
      [    0.182209] ------------[ cut here ]------------
      [    0.182222] WARNING: at arch/x86/mm/pageattr.c:581 __cpa_process_fault+0x44/0xa0()
      [    0.182227] Hardware name: MacBook5,2
      [    0.182231] CPA: called for zero pte. vaddr = ffff8800ffe00000 cpa->vaddr = ffff8800ffe00000
      [    0.182236] Modules linked in:
      [    0.182242] Pid: 0, comm: swapper Not tainted 2.6.31-rc4 #6
      [    0.182246] Call Trace:
      [    0.182254]  [<ffffffff8102c754>] ? __cpa_process_fault+0x44/0xa0
      [    0.182261]  [<ffffffff81048668>] warn_slowpath_common+0x78/0xd0
      [    0.182266]  [<ffffffff81048744>] warn_slowpath_fmt+0x64/0x70
      [    0.182272]  [<ffffffff8102c7ec>] ? update_page_count+0x3c/0x50
      [    0.182280]  [<ffffffff818d25c5>] ? phys_pmd_init+0x140/0x22e
      [    0.182286]  [<ffffffff8102c754>] __cpa_process_fault+0x44/0xa0
      [    0.182292]  [<ffffffff8102ce60>] __change_page_attr_set_clr+0x5f0/0xb40
      [    0.182301]  [<ffffffff810d1035>] ? vm_unmap_aliases+0x175/0x190
      [    0.182307]  [<ffffffff8102d4ae>] change_page_attr_set_clr+0xfe/0x3d0
      [    0.182314]  [<ffffffff8102dcca>] _set_memory_uc+0x2a/0x30
      [    0.182319]  [<ffffffff8102dd4b>] set_memory_uc+0x7b/0xb0
      [    0.182327]  [<ffffffff818afe31>] efi_enter_virtual_mode+0x2ad/0x2c9
      [    0.182334]  [<ffffffff818a1c66>] start_kernel+0x2db/0x3f4
      [    0.182340]  [<ffffffff818a1289>] x86_64_start_reservations+0x99/0xb9
      [    0.182345]  [<ffffffff818a1389>] x86_64_start_kernel+0xe0/0xf2
      [    0.182357] ---[ end trace 4eaa2a86a8e2da22 ]---
      [    0.182982] init_memory_mapping: 00000000ffffc000-0000000100000000
      [    0.182993]  00ffffc000 - 0100000000 page 4k
      
      This happens because the 64-bit version of efi_ioremap calls
      init_memory_mapping for all addresses, regardless of whether they are
      RAM or MMIO.  The EFI tables on this machine ask for runtime access to
      some MMIO regions:
      
      [    0.000000] EFI: mem195: type=11, attr=0x8000000000000000, range=[0x0000000093400000-0x0000000093401000) (0MB)
      [    0.000000] EFI: mem196: type=11, attr=0x8000000000000000, range=[0x00000000ffc00000-0x00000000ffc40000) (0MB)
      [    0.000000] EFI: mem197: type=11, attr=0x8000000000000000, range=[0x00000000ffc40000-0x00000000ffc80000) (0MB)
      [    0.000000] EFI: mem198: type=11, attr=0x8000000000000000, range=[0x00000000ffc80000-0x00000000ffca4000) (0MB)
      [    0.000000] EFI: mem199: type=11, attr=0x8000000000000000, range=[0x00000000ffca4000-0x00000000ffcb4000) (0MB)
      [    0.000000] EFI: mem200: type=11, attr=0x8000000000000000, range=[0x00000000ffcb4000-0x00000000ffffc000) (3MB)
      [    0.000000] EFI: mem201: type=11, attr=0x8000000000000000, range=[0x00000000ffffc000-0x0000000100000000) (0MB)
      
      This arranges to pass the EFI memory type through to efi_ioremap, and
      makes efi_ioremap use ioremap rather than init_memory_mapping if the
      type is EFI_MEMORY_MAPPED_IO.  With this, the above warning goes away.
      
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      LKML-Reference: <19062.55858.533494.471153@cargo.ozlabs.ibm.com>
      Cc: Huang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      6a7bbd57
  8. Jun 17, 2009
    • Cliff Wickman's avatar
      x86: correct the conversion of EFI memory types · e2a71476
      Cliff Wickman authored
      
      This patch causes all the EFI_RESERVED_TYPE memory reservations to be recorded
      in the e820 table as type E820_RESERVED.
      
      (This patch replaces one called 'x86: vendor reserved memory type'.
       This version has been discussed a bit with Peter and Yinghai but not given
       a final opinion.)
      
      Without this patch EFI_RESERVED_TYPE memory reservations may be
      marked usable in the e820 table. There may be a collision between
      kernel use and some reserver's use of this memory.
      
      (An example use of this functionality is the UV system, which
       will access extremely large areas of memory with a memory engine
       that allows a user to address beyond the processor's range.  Such
       areas are reserved in the EFI table by the BIOS.
       Some loaders have a restricted number of entries possible in the e820 table,
       hence the need to record the reservations in the unrestricted EFI table.)
      
      The call to do_add_efi_memmap() is only made if "add_efi_memmap" is specified
      on the kernel command line.
      
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      e2a71476
  9. Mar 04, 2009
  10. Jan 21, 2009
  11. Oct 16, 2008
  12. Oct 03, 2008
  13. Jul 11, 2008
  14. Jul 08, 2008
    • Paul Jackson's avatar
      x86 boot: only pick up additional EFI memmap if add_efi_memmap flag · 200001eb
      Paul Jackson authored
      
      Applies on top of the previous patch:
        x86 boot: add code to add BIOS provided EFI memory entries to kernel
      
      Instead of always adding EFI memory map entries (if present) to the
      memory map after initially finding either E820 BIOS memory map entries
      and/or kernel command line memmap entries, -instead- only add such
      additional EFI memory map entries if the kernel boot option:
      
          add_efi_memmap
      
      is specified.
      
      Requiring this 'add_efi_memmap' option is backward compatible with
      kernels that didn't load such additional EFI memory map entries in
      the first place, and it doesn't override a configuration that tries
      to replace all E820 or EFI BIOS memory map entries with ones given
      entirely on the kernel command line.
      
      Signed-off-by: default avatarPaul Jackson <pj@sgi.com>
      Cc: "Yinghai Lu" <yhlu.kernel@gmail.com>
      Cc: "Jack Steiner" <steiner@sgi.com>
      Cc: "Mike Travis" <travis@sgi.com>
      Cc: "Huang
      Cc: Ying" <ying.huang@intel.com>
      Cc: "Andi Kleen" <andi@firstfloor.org>
      Cc: "Andrew Morton" <akpm@linux-foundation.org>
      Cc: Paul Jackson <pj@sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      200001eb
    • Paul Jackson's avatar
      x86 boot: x86_64 efi compiler warning fix · 05486fa7
      Paul Jackson authored
      
      Fix a compiler warning.  Rather than always casting a u32 to a pointer
      (which generates a warning on x86_64 systems) instead separate the
      x86_32 and x86_64 assignments entirely with ifdefs.  Until other recent
      changes to this code, it used to have x86_64 separated like this.
      
      Signed-off-by: default avatarPaul Jackson <pj@sgi.com>
      Cc: "Yinghai Lu" <yhlu.kernel@gmail.com>
      Cc: "Jack Steiner" <steiner@sgi.com>
      Cc: "Mike Travis" <travis@sgi.com>
      Cc: "Huang
      Cc: Ying" <ying.huang@intel.com>
      Cc: "Andi Kleen" <andi@firstfloor.org>
      Cc: "Andrew Morton" <akpm@linux-foundation.org>
      Cc: Paul Jackson <pj@sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      05486fa7
    • Yinghai Lu's avatar
      x86: rename two e820 related functions · d0be6bde
      Yinghai Lu authored
      
      rename update_memory_range to e820_update_range
      rename add_memory_region to e820_add_region
      
      to make it more clear that they are about e820 map operations.
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d0be6bde
  15. Jun 05, 2008
  16. May 25, 2008
    • Paul Jackson's avatar
      x86 boot: add code to add BIOS provided EFI memory entries to kernel · 69c91893
      Paul Jackson authored
      
      Add to the kernels boot memory map 'memmap' entries found in
      the EFI memory descriptors passed in from the BIOS.
      
      On EFI systems, up to E820MAX == 128 memory map entries can
      be passed via the legacy E820 interface (limited by the size
      of the 'zeropage').  These entries can be duplicated in the
      EFI descriptors also passed from the BIOS, and possibly more
      entries passed by the EFI interface, which does not have the
      E820MAX limit on number of memory map entries.
      
      This code doesn't worry about the likely duplicate, overlapping
      or (unlikely) conflicting entries between the EFI map and the
      E820 map.  It just dumps all the EFI entries into the memmap[]
      array (which already has the E820 entries) and lets the existing
      routine sanitize_e820_map() sort the mess out.
      
      Signed-off-by: default avatarPaul Jackson <pj@sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      69c91893
  17. Apr 19, 2008
  18. Feb 19, 2008
  19. Feb 14, 2008
  20. Feb 13, 2008
    • Huang, Ying's avatar
      x86: EFI runtime code mapping enhancement · 4de0d4a6
      Huang, Ying authored
      
      This patch enhances EFI runtime code memory mapping as following:
      
      - Move __supported_pte_mask & _PAGE_NX checking before invoking
        runtime_code_page_mkexec(). This makes it possible for compiler to
        eliminate runtime_code_page_mkexec() on machine without NX support.
      
      - Use set_memory_x/nx in early_mapping_set_exec(). This eliminates the
        duplicated implementation.
      
      This patch has been tested on Intel x86_64 platform with EFI64/32
      firmware.
      
      Signed-off-by: default avatarHuang Ying <ying.huang@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4de0d4a6
    • Thomas Gleixner's avatar
      x86: EFI: fix use of unitialized variable and the cache logic · e85f2051
      Thomas Gleixner authored
      
      Andi Kleen pointed out that the cache attribute logic is reverse in
      efi_enter_virtual_mode(). This problem alone is harmless as we do not
      (yet) do cache attribute conflict resolution. (This bug was not present
      in the original EFI submission - I introduced it while fixing up rejects.)
      
      While reviewing this code I noticed a second, worse problem: the use of
      uninitialized md->virt_addr.
      
      Fix both problems.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e85f2051
  21. Feb 04, 2008
  22. Jan 30, 2008
Loading