1. 19 5月, 2012 1 次提交
    • H
      x86, realmode: 16-bit real-mode code support for relocs tool · 6520fe55
      H. Peter Anvin 提交于
      A new option is added to the relocs tool called '--realmode'.
      This option causes the generation of 16-bit segment relocations
      and 32-bit linear relocations for the real-mode code. When
      the real-mode code is moved to the low-memory during kernel
      initialization, these relocation entries can be used to
      relocate the code properly.
      
      In the assembly code 16-bit segment relocations must be relative
      to the 'real_mode_seg' absolute symbol. Linear relocations must be
      relative to a symbol prefixed with 'pa_'.
      
      16-bit segment relocation is used to load cs:ip in 16-bit code.
      Linear relocations are used in the 32-bit code for relocatable
      data references. They are declared in the linker script of the
      real-mode code.
      
      The relocs tool is moved to arch/x86/tools/relocs.c, and added new
      target archscripts that can be used to build scripts needed building
      an architecture.  be compiled before building the arch/x86 tree.
      
      [ hpa: accelerating this because it detects invalid absolute
        relocations, a serious bug in binutils 2.22.52.0.x which currently
        produces bad kernels. ]
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.comSigned-off-by: NJarkko Sakkinen <jarkko.sakkinen@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Cc: <stable@vger.kernel.org>
      6520fe55
  2. 01 5月, 2012 1 次提交
  3. 17 4月, 2012 1 次提交
  4. 23 3月, 2012 1 次提交
  5. 17 3月, 2012 1 次提交
  6. 29 2月, 2012 6 次提交
  7. 01 2月, 2012 1 次提交
  8. 26 1月, 2012 1 次提交
  9. 17 12月, 2011 1 次提交
  10. 13 12月, 2011 1 次提交
    • M
      x86, efi: EFI boot stub support · 291f3632
      Matt Fleming 提交于
      There is currently a large divide between kernel development and the
      development of EFI boot loaders. The idea behind this patch is to give
      the kernel developers full control over the EFI boot process. As
      H. Peter Anvin put it,
      
      "The 'kernel carries its own stub' approach been very successful in
      dealing with BIOS, and would make a lot of sense to me for EFI as
      well."
      
      This patch introduces an EFI boot stub that allows an x86 bzImage to
      be loaded and executed by EFI firmware. The bzImage appears to the
      firmware as an EFI application. Luckily there are enough free bits
      within the bzImage header so that it can masquerade as an EFI
      application, thereby coercing the EFI firmware into loading it and
      jumping to its entry point. The beauty of this masquerading approach
      is that both BIOS and EFI boot loaders can still load and run the same
      bzImage, thereby allowing a single kernel image to work in any boot
      environment.
      
      The EFI boot stub supports multiple initrds, but they must exist on
      the same partition as the bzImage. Command-line arguments for the
      kernel can be appended after the bzImage name when run from the EFI
      shell, e.g.
      
      Shell> bzImage console=ttyS0 root=/dev/sdb initrd=initrd.img
      
      v7:
       - Fix checkpatch warnings.
      
      v6:
      
       - Try to allocate initrd memory just below hdr->inird_addr_max.
      
      v5:
      
       - load_options_size is UTF-16, which needs dividing by 2 to convert
         to the corresponding ASCII size.
      
      v4:
      
       - Don't read more than image->load_options_size
      
      v3:
      
       - Fix following warnings when compiling CONFIG_EFI_STUB=n
      
         arch/x86/boot/tools/build.c: In function ‘main’:
         arch/x86/boot/tools/build.c:138:24: warning: unused variable ‘pe_header’
         arch/x86/boot/tools/build.c:138:15: warning: unused variable ‘file_sz’
      
       - As reported by Matthew Garrett, some Apple machines have GOPs that
         don't have hardware attached. We need to weed these out by
         searching for ones that handle the PCIIO protocol.
      
       - Don't allocate memory if no initrds are on cmdline
       - Don't trust image->load_options_size
      
      Maarten Lankhorst noted:
       - Don't strip first argument when booted from efibootmgr
       - Don't allocate too much memory for cmdline
       - Don't update cmdline_size, the kernel considers it read-only
       - Don't accept '\n' for initrd names
      
      v2:
      
       - File alignment was too large, was 8192 should be 512. Reported by
         Maarten Lankhorst on LKML.
       - Added UGA support for graphics
       - Use VIDEO_TYPE_EFI instead of hard-coded number.
       - Move linelength assignment until after we've assigned depth
       - Dynamically fill out AddressOfEntryPoint in tools/build.c
       - Don't use magic number for GDT/TSS stuff. Requested by Andi Kleen
       - The bzImage may need to be relocated as it may have been loaded at
         a high address address by the firmware. This was required to get my
         macbook booting because the firmware loaded it at 0x7cxxxxxx, which
         triggers this error in decompress_kernel(),
      
      	if (heap > ((-__PAGE_OFFSET-(128<<20)-1) & 0x7fffffff))
      		error("Destination address too large");
      
      Cc: Mike Waychison <mikew@google.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Tested-by: NHenrik Rydberg <rydberg@euromail.se>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Link: http://lkml.kernel.org/r/1321383097.2657.9.camel@mfleming-mobl1.ger.corp.intel.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      291f3632
  11. 28 9月, 2011 1 次提交
    • P
      doc: fix broken references · 395cf969
      Paul Bolle 提交于
      There are numerous broken references to Documentation files (in other
      Documentation files, in comments, etc.). These broken references are
      caused by typo's in the references, and by renames or removals of the
      Documentation files. Some broken references are simply odd.
      
      Fix these broken references, sometimes by dropping the irrelevant text
      they were part of.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      395cf969
  12. 26 5月, 2011 1 次提交
  13. 26 4月, 2011 1 次提交
  14. 02 3月, 2011 1 次提交
  15. 14 1月, 2011 1 次提交
    • L
      x86: support XZ-compressed kernel · 30314804
      Lasse Collin 提交于
      This integrates the XZ decompression code to the x86 pre-boot code.
      
      mkpiggy.c is updated to reserve about 32 KiB more buffer safety margin for
      kernel decompression.  It is done unconditionally for all decompressors to
      keep the code simpler.
      
      The XZ decompressor needs around 30 KiB of heap, so the heap size is
      increased to 32 KiB on both x86-32 and x86-64.
      
      Documentation/x86/boot.txt is updated to list the XZ magic number.
      
      With the x86 BCJ filter in XZ, XZ-compressed x86 kernel tends to be a few
      percent smaller than the equivalent LZMA-compressed kernel.
      Signed-off-by: NLasse Collin <lasse.collin@tukaani.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alain Knaff <alain@knaff.lu>
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      30314804
  16. 17 12月, 2010 1 次提交
  17. 11 11月, 2010 1 次提交
  18. 08 10月, 2010 1 次提交
    • Z
      x86, setup: Use string copy operation to optimze copy in kernel compression · 68f4d5a0
      Zhao Yakui 提交于
      The kernel decompression code parses the ELF header and then copies
      the segment to the corresponding destination.  Currently it uses slow
      byte-copy code.  This patch makes it use the string copy operations
      instead.
      
      In the test the copy performance can be improved very significantly after using
      the string copy operation mechanism.
              1. The copy time can be reduced from 150ms to 20ms on one Atom machine
      	2. The copy time can be reduced about 80% on another machine
      		The time is reduced from 7ms to 1.5ms when using 32-bit kernel.
      		The time is reduced from 10ms to 2ms when using 64-bit kernel.
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      LKML-Reference: <1286502453-7043-1-git-send-email-yakui.zhao@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      68f4d5a0
  19. 22 9月, 2010 2 次提交
  20. 03 8月, 2010 4 次提交
  21. 15 7月, 2010 1 次提交
  22. 14 7月, 2010 1 次提交
  23. 13 7月, 2010 1 次提交
  24. 11 6月, 2010 1 次提交
  25. 26 5月, 2010 1 次提交
    • L
      Revert "endian: #define __BYTE_ORDER" · 13da9e20
      Linus Torvalds 提交于
      This reverts commit b3b77c8c, which was
      also totally broken (see commit 0d2daf5c that reverted the crc32
      version of it).  As reported by Stephen Rothwell, it causes problems on
      big-endian machines:
      
      > In file included from fs/jfs/jfs_types.h:33,
      >                  from fs/jfs/jfs_incore.h:26,
      >                  from fs/jfs/file.c:22:
      > fs/jfs/endian24.h:36:101: warning: "__LITTLE_ENDIAN" is not defined
      
      The kernel has never had that crazy "__BYTE_ORDER == __LITTLE_ENDIAN"
      model.  It's not how we do things, and it isn't how we _should_ do
      things.  So don't go there.
      Requested-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13da9e20
  26. 25 5月, 2010 1 次提交
  27. 03 3月, 2010 1 次提交
  28. 20 2月, 2010 1 次提交
    • H
      x86, setup: Don't skip mode setting for the standard VGA modes · 8e92dc76
      H. Peter Anvin 提交于
      The code for setting standard VGA modes probes for the current mode,
      and skips the mode setting if the mode is 3 (color text 80x25) or 7
      (mono text 80x25).  Unfortunately, there are BIOSes, including the
      VMware BIOS, which report the previous mode if function 0F is queried
      while the screen is in a VESA mode, and of course, nothing can help a
      mode poked directly into the hardware.
      
      As such, the safe option is to set the mode anyway, and only query to
      see if we should be using mode 7 rather than mode 3.  People who don't
      want any mode setting at all should probably use vga=0x0f04
      (VIDEO_CURRENT_MODE).  It's possible that should be the kernel
      default.
      
      Reported-by Rene Arends <R.R.Arends@hro.nl>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <tip-*@git.kernel.org>
      8e92dc76
  29. 19 2月, 2010 1 次提交
  30. 18 2月, 2010 1 次提交
  31. 08 2月, 2010 1 次提交