1. 28 1月, 2013 1 次提交
    • D
      x86, build: Dynamically find entry points in compressed startup code · 99f857db
      David Woodhouse 提交于
      We have historically hard-coded entry points in head.S just so it's easy
      to build the executable/bzImage headers with references to them.
      
      Unfortunately, this leads to boot loaders abusing these "known" addresses
      even when they are *explicitly* told that they "should look at the ELF
      header to find this address, as it may change in the future". And even
      when the address in question *has* actually been changed in the past,
      without fanfare or thought to compatibility.
      
      Thus we have bootloaders doing stunningly broken things like jumping
      to offset 0x200 in the kernel startup code in 64-bit mode, *hoping*
      that startup_64 is still there (it has moved at least once
      before). And hoping that it's actually a 64-bit kernel despite the
      fact that we don't give them any indication of that fact.
      
      This patch should hopefully remove the temptation to abuse internal
      addresses in future, where sternly worded comments have not sufficed.
      Instead of having hard-coded addresses and saying "please don't abuse
      these", we actually pull the addresses out of the ELF payload into
      zoffset.h, and make build.c shove them back into the right places in
      the bzImage header.
      
      Rather than including zoffset.h into build.c and thus having to rebuild
      the tool for every kernel build, we parse it instead. The parsing code
      is small and simple.
      
      This patch doesn't actually move any of the interesting entry points, so
      any offending bootloader will still continue to "work" after this patch
      is applied. For some version of "work" which includes jumping into the
      compressed payload and crashing, if the bzImage it's given is a 32-bit
      kernel. No change there then.
      
      [ hpa: some of the issues in the description are addressed or
        retconned by the 2.12 boot protocol.  This patch has been edited to
        only remove fixed addresses that were *not* thus retconned. ]
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.orgSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Cc: Matt Fleming <matt.fleming@intel.com>
      99f857db
  2. 15 10月, 2012 1 次提交
  3. 03 10月, 2012 1 次提交
  4. 11 8月, 2012 1 次提交
  5. 23 3月, 2012 1 次提交
  6. 29 2月, 2012 1 次提交
  7. 26 5月, 2011 1 次提交
  8. 03 8月, 2010 1 次提交
  9. 19 6月, 2009 1 次提交
    • P
      gcov: enable GCOV_PROFILE_ALL for x86_64 · 7bf99fb6
      Peter Oberparleiter 提交于
      Enable gcov profiling of the entire kernel on x86_64. Required changes
      include disabling profiling for:
      
      * arch/kernel/acpi/realmode and arch/kernel/boot/compressed:
        not linked to main kernel
      * arch/vdso, arch/kernel/vsyscall_64 and arch/kernel/hpet:
        profiling causes segfaults during boot (incompatible context)
      Signed-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bf99fb6
  10. 21 5月, 2009 1 次提交
  11. 12 5月, 2009 1 次提交
  12. 10 4月, 2009 1 次提交
    • H
      x86, setup: "glove box" BIOS calls -- infrastructure · 7a734e7d
      H. Peter Anvin 提交于
      Impact: new interfaces (not yet used)
      
      For all the platforms out there, there is an infinite number of buggy
      BIOSes.  This adds infrastructure to treat BIOS interrupts more like
      toxic waste and "glove box" them -- we switch out the register set,
      perform the BIOS interrupt, and then restore the previous state.
      
      LKML-Reference: <49DE7F79.4030106@zytor.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      7a734e7d
  13. 03 4月, 2009 1 次提交
  14. 13 3月, 2009 2 次提交
  15. 12 3月, 2009 1 次提交
    • H
      x86: remove zImage support · 5e47c478
      H. Peter Anvin 提交于
      Impact: obsolete feature removal
      
      The zImage kernel format has been functionally unused for a very long
      time.  It is just barely possible to build a modern kernel that still
      fits within the zImage size limit, but it is highly unlikely that
      anyone ever uses it.  Furthermore, although it is still supported by
      most bootloaders, it has been at best poorly tested (or not tested at
      all); some bootloaders are even known to not support zImage at all and
      not having even noticed.
      
      Also remove some really obsolete constants that no longer have any
      meaning.
      
      LKML-Reference: <49B703D4.1000008@zytor.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      5e47c478
  16. 23 2月, 2009 1 次提交
    • I
      x86: remove the Voyager 32-bit subarch · 965c7eca
      Ingo Molnar 提交于
      Impact: remove unused/broken code
      
      The Voyager subarch last built successfully on the v2.6.26 kernel
      and has been stale since then and does not build on the v2.6.27,
      v2.6.28 and v2.6.29-rc5 kernels.
      
      No actual users beyond the maintainer reported this breakage.
      Patches were sent and most of the fixes were accepted but the
      discussion around how to do a few remaining issues cleanly
      fizzled out with no resolution and the code remained broken.
      
      In the v2.6.30 x86 tree development cycle 32-bit subarch support
      has been reworked and removed - and the Voyager code, beyond the
      build problems already known, needs serious and significant
      changes and probably a rewrite to support it.
      
      CONFIG_X86_VOYAGER has been marked BROKEN then. The maintainer has
      been notified but no patches have been sent so far to fix it.
      
      While all other subarchs have been converted to the new scheme,
      voyager is still broken. We'd prefer to receive patches which
      clean up the current situation in a constructive way, but even in
      case of removal there is no obstacle to add that support back
      after the issues have been sorted out in a mutually acceptable
      fashion.
      
      So remove this inactive code for now.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      965c7eca
  17. 05 10月, 2008 1 次提交
  18. 06 9月, 2008 1 次提交
  19. 17 4月, 2008 2 次提交
    • P
      x86: move suspend wakeup code to C · e44b7b75
      Pavel Machek 提交于
      Move wakeup code to .c, so that video mode setting code can be shared
      between boot and wakeup. Remove nasty assembly code in 64-bit case by
      re-using trampoline code. Stack setup was fixed to clear high 16bits
      of %esp, maybe that fixes some machines.
      
      .c code sharing and morse code was done H. Peter Anvin, Sam Ravnborg
      reviewed kbuild related stuff, and it seems okay to him. Rafael did
      some cleanups.
      
      [rjw:
      * Made the patch stop breaking compilation on x86-32
      * Added arch/x86/kernel/acpi/sleep.h
      * Got rid of compiler warnings in arch/x86/kernel/acpi/sleep.c
      * Fixed 32-bit compilation on x86-64 systems
      * Added include/asm-x86/trampoline.h and fixed the non-SMP
        compilation on 64-bit x86
      * Removed arch/x86/kernel/acpi/sleep_32.c which was not used
      * Fixed some breakage caused by the integration of smpboot.c done
        under us in the meantime]
      Signed-off-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e44b7b75
    • I
      x86: use ELF format in compressed images. · 099e1377
      Ian Campbell 提交于
      Signed-off-by: NIan Campbell <ijc@hellion.org.uk>
      Cc: Ian Campbell <ijc@hellion.org.uk>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: virtualization@lists.linux-foundation.org
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: virtualization@lists.linux-foundation.org
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      099e1377
  20. 04 2月, 2008 2 次提交
  21. 30 1月, 2008 2 次提交
  22. 13 11月, 2007 1 次提交
    • S
      x86: do not use $(ARCH) when not needed · d746d647
      Sam Ravnborg 提交于
      For x86 ARCH may say i386 or x86_64 and soon x86.
      Rely on CONFIG_X64_32 to select between 32/64 or just
      hardcode the value as appropriate.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      d746d647
  23. 17 10月, 2007 2 次提交
  24. 16 10月, 2007 1 次提交
    • S
      kbuild: enable 'make AFLAGS=...' to add additional options to AS · 222d394d
      Sam Ravnborg 提交于
      The variable AFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of AFLAGS with KBUILD_AFLAGS all over
      the tree.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      222d394d
  25. 15 10月, 2007 1 次提交
    • S
      kbuild: enable 'make CFLAGS=...' to add additional options to CC · a0f97e06
      Sam Ravnborg 提交于
      The variable CFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
      tree and enabling one to use:
      make CFLAGS=...
      to specify additional gcc commandline options.
      
      One usecase is when trying to find gcc bugs but other
      use cases has been requested too.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k
      
      Test was simple to do a defconfig build, apply the patch and check
      that nothing got rebuild.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a0f97e06
  26. 11 10月, 2007 1 次提交
  27. 19 7月, 2007 1 次提交
  28. 13 7月, 2007 1 次提交
  29. 03 5月, 2007 1 次提交
  30. 27 6月, 2006 1 次提交
  31. 27 3月, 2006 1 次提交
  32. 11 1月, 2006 1 次提交
  33. 10 1月, 2006 1 次提交
  34. 26 6月, 2005 1 次提交
  35. 22 6月, 2005 1 次提交