1. 22 7月, 2012 3 次提交
  2. 26 1月, 2012 1 次提交
  3. 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
  4. 17 12月, 2010 1 次提交
  5. 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
  6. 03 8月, 2010 1 次提交
    • Y
      x86, setup: enable early console output from the decompressor · 8fee13a4
      Yinghai Lu 提交于
      This enables the decompressor output to be seen on the serial console.
      Most of the code is shared with the regular boot code.
      
      We could add printf to the decompressor if needed, but currently there
      is no sufficiently compelling user.
      
      -v2: define BOOT_BOOT_H to avoid include boot.h
      -v3: early_serial_base need to be static in misc.c ?
      -v4: create seperate string.c printf.c cmdline.c early_serial_console.c
           after hpa's patch that allow global variables in compressed/misc stage
      -v5: remove printf.c related
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      8fee13a4
  7. 19 2月, 2010 1 次提交
  8. 06 2月, 2010 1 次提交
  9. 12 1月, 2010 1 次提交
  10. 13 5月, 2009 1 次提交
    • H
      x86, boot: correct sanity checks in boot/compressed/misc.c · 7ed42a28
      H. Peter Anvin 提交于
      arch/x86/boot/compressed/misc.c contains several sanity checks on the
      output address.  Correct constraints that are no longer correct:
      
      - the alignment test should be MIN_KERNEL_ALIGN on both 32 and 64
        bits.
      - the 64 bit maximum address was set to 2^40, which was the limit of
        one specific x86-64 implementation.  Change the test to 2^46, the
        current Linux limit, and at least try to test the end rather than
        the beginning.
      - for non-relocatable kernels, test against LOAD_PHYSICAL_ADDR on both
        32 and 64 bits.
      
      [ Impact: fix potential boot failure due to invalid tests ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      7ed42a28
  11. 05 1月, 2009 1 次提交
    • A
      bzip2/lzma: x86 kernel compression support · ae03c499
      Alain Knaff 提交于
      Impact: Replaces x86 kernel decompressor with new code
      
      This is the third part of the bzip2/lzma patch
      
      The bzip patch is based on an idea by Christian Ludwig, includes support for
      compressing the kernel with bzip2 or lzma rather than gzip. Both
      compressors give smaller sizes than gzip.  Lzma's decompresses faster
      than bzip2.
      
      It also supports ramdisks and initramfs' compressed using these two
      compressors.
      
      The functionality has been successfully used for a couple of years by
      the udpcast project
      
      This version applies to "tip" kernel 2.6.28
      
      This part contains:
      - support for new bzip2 and lzma kernel compression for x86
      Signed-off-by: NAlain Knaff <alain@knaff.lu>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      ae03c499
  12. 23 10月, 2008 1 次提交
  13. 15 8月, 2008 1 次提交
    • P
      x86: coding style fixes to arch/x86/boot/compressed/misc.c · 020878ac
      Paolo Ciarrocchi 提交于
      Before:
      total: 4 errors, 6 warnings, 439 lines checked
      
      After:
      total: 1 errors, 5 warnings, 441 lines checked
      
      Before
      
       -#include <asm/io.h>
       +#include <linux/io.h>
      
      paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/misc.o.*
      8b2394e1fe519a9542e9a7e3e7b69c39  /tmp/misc.o.after
      8b2394e1fe519a9542e9a7e3e7b69c39  /tmp/misc.o.before
      
      After
      
       -#include <asm/io.h>
       +#include <linux/io.h>
      
      paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/misc.o.*
      59a2d264284be5e72b5af4f3a8ccfb47  /tmp/misc.o.after
      8b2394e1fe519a9542e9a7e3e7b69c39  /tmp/misc.o.before
      Signed-off-by: NPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      020878ac
  14. 26 7月, 2008 1 次提交
    • T
      inflate: refactor inflate malloc code · 2d6ffcca
      Thomas Petazzoni 提交于
      Inflate requires some dynamic memory allocation very early in the boot
      process and this is provided with a set of four functions:
      malloc/free/gzip_mark/gzip_release.
      
      The old inflate code used a mark/release strategy rather than implement
      free.  This new version instead keeps a count on the number of outstanding
      allocations and when it hits zero, it resets the malloc arena.
      
      This allows removing all the mark and release implementations and unifying
      all the malloc/free implementations.
      
      The architecture-dependent code must define two addresses:
       - free_mem_ptr, the address of the beginning of the area in which
         allocations should be made
       - free_mem_end_ptr, the address of the end of the area in which
         allocations should be made. If set to 0, then no check is made on
         the number of allocations, it just grows as much as needed
      
      The architecture-dependent code can also provide an arch_decomp_wdog()
      function call.  This function will be called several times during the
      decompression process, and allow to notify the watchdog that the system is
      still running.  If an architecture provides such a call, then it must
      define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls
      arch_decomp_wdog().
      
      Work initially done by Matt Mackall, updated to a recent version of the
      kernel and improved by me.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Mikael Starvik <mikael.starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NYoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d6ffcca
  15. 23 7月, 2008 1 次提交
  16. 03 7月, 2008 1 次提交
  17. 10 6月, 2008 1 次提交
  18. 31 5月, 2008 2 次提交
  19. 20 4月, 2008 1 次提交
  20. 17 4月, 2008 4 次提交
  21. 30 1月, 2008 8 次提交
  22. 22 10月, 2007 1 次提交
    • R
      i386: paravirt boot sequence · a24e7851
      Rusty Russell 提交于
      This patch uses the updated boot protocol to do paravirtualized boot.
      If the boot version is >= 2.07, then it will do two things:
      
       1. Check the bootparams loadflags to see if we should reload the
          segment registers and clear interrupts.  This is appropriate
          for normal native boot and some paravirtualized environments, but
          inapproprate for others.
      
       2. Check the hardware architecture, and dispatch to the appropriate
          kernel entrypoint.  If the bootloader doesn't set this, then we
          simply do the normal boot sequence.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a24e7851
  23. 20 10月, 2007 1 次提交
  24. 11 10月, 2007 2 次提交
  25. 03 5月, 2007 1 次提交
    • J
      [PATCH] x86: deflate stack usage in lib/inflate.c · 35c74226
      Jeremy Fitzhardinge 提交于
      inflate_fixed and huft_build together use around 2.7k of stack.  When
      using 4k stacks, I saw stack overflows from interrupts arriving while
      unpacking the root initrd:
      
      do_IRQ: stack overflow: 384
       [<c0106b64>] show_trace_log_lvl+0x1a/0x30
       [<c01075e6>] show_trace+0x12/0x14
       [<c010763f>] dump_stack+0x16/0x18
       [<c0107ca4>] do_IRQ+0x6d/0xd9
       [<c010202b>] xen_evtchn_do_upcall+0x6e/0xa2
       [<c0106781>] xen_hypervisor_callback+0x25/0x2c
       [<c010116c>] xen_restore_fl+0x27/0x29
       [<c0330f63>] _spin_unlock_irqrestore+0x4a/0x50
       [<c0117aab>] change_page_attr+0x577/0x584
       [<c0117b45>] kernel_map_pages+0x8d/0xb4
       [<c016a314>] cache_alloc_refill+0x53f/0x632
       [<c016a6c2>] __kmalloc+0xc1/0x10d
       [<c0463d34>] malloc+0x10/0x12
       [<c04641c1>] huft_build+0x2a7/0x5fa
       [<c04645a5>] inflate_fixed+0x91/0x136
       [<c04657e2>] unpack_to_rootfs+0x5f2/0x8c1
       [<c0465acf>] populate_rootfs+0x1e/0xe4
      
      (This was under Xen, but there's no reason it couldn't happen on bare
        hardware.)
      
      This patch mallocs the local variables, thereby reducing the stack
      usage to sane levels.
      
      Also, up the heap size for the kernel decompressor to deal with the
      extra allocation.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Tim Yamin <plasmaroo@gentoo.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      35c74226
  26. 07 12月, 2006 1 次提交