1. 30 1月, 2013 2 次提交
  2. 21 7月, 2012 1 次提交
    • M
      x86, efi: Handover Protocol · 9ca8f72a
      Matt Fleming 提交于
      As things currently stand, traditional EFI boot loaders and the EFI
      boot stub are carrying essentially the same initialisation code
      required to setup an EFI machine for booting a kernel. There's really
      no need to have this code in two places and the hope is that, with
      this new protocol, initialisation and booting of the kernel can be
      left solely to the kernel's EFI boot stub. The responsibilities of the
      boot loader then become,
      
         o Loading the kernel image from boot media
      
      File system code still needs to be carried by boot loaders for the
      scenario where the kernel and initrd files reside on a file system
      that the EFI firmware doesn't natively understand, such as ext4, etc.
      
         o Providing a user interface
      
      Boot loaders still need to display any menus/interfaces, for example
      to allow the user to select from a list of kernels.
      
      Bump the boot protocol number because we added the 'handover_offset'
      field to indicate the location of the handover protocol entry point.
      
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Acked-and-Tested-by: NMatthew Garrett <mjg@redhat.com>
      Link: http://lkml.kernel.org/r/1342689828-16815-1-git-send-email-matt@console-pimps.orgSigned-off-by: NH. Peter Anvin <hpa@zytor.com>
      9ca8f72a
  3. 17 4月, 2012 1 次提交
  4. 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
  5. 11 11月, 2010 1 次提交
  6. 03 8月, 2010 1 次提交
  7. 24 10月, 2009 1 次提交
  8. 19 9月, 2009 1 次提交
  9. 12 5月, 2009 3 次提交
  10. 09 5月, 2009 6 次提交
    • H
      x86, boot: determine compressed code offset at compile time · 02a884c0
      H. Peter Anvin 提交于
      Determine the compressed code offset (from the kernel runtime address)
      at compile time.  This allows some minor optimizations in
      arch/x86/boot/compressed/head_*.S, but more importantly it makes this
      value available to the build process, which will enable a future patch
      to export the necessary linear memory footprint into the bzImage
      header.
      
      [ Impact: cleanup, future patch enabling ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      02a884c0
    • H
      x86, boot: use appropriate rep string for move and clear · 36d3793c
      H. Peter Anvin 提交于
      In the pre-decompression code, use the appropriate largest possible
      rep movs and rep stos to move code and clear bss, respectively.  For
      reverse copy, do note that the initial values are supposed to be the
      address of the first (highest) copy datum, not one byte beyond the end
      of the buffer.
      
      rep strings are not necessarily the fastest way to perform these
      operations on all current processors, but are likely to be in the
      future, and perhaps more importantly, we want to encourage the
      architecturally right thing to do here.
      
      This also fixes a couple of trivial inefficiencies on 64 bits.
      
      [ Impact: trivial performance enhancement, increase code similarity ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      36d3793c
    • H
      x86, boot: set up the decompression stack as early as possible · 0a137736
      H. Peter Anvin 提交于
      Set up the decompression stack as soon as we know where it needs to
      go.  That way we have a full-service stack as soon as possible, rather
      than relying on the BP_scratch field.
      
      Note that the stack does need to be empty during bss zeroing (or
      else the stack needs to be moved out of the bss segment, which is also
      an option.)
      
      [ Impact: cleanup, minor paranoia ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      0a137736
    • H
      x86, boot: straighten out ranges to copy/zero in compressed/head*.S · 5b11f1ce
      H. Peter Anvin 提交于
      Both on 32 and 64 bits, we copy all the way up to the end of bss,
      except that on 64 bits there is a hack to avoid copying on top of the
      page tables.  There is no point in copying bss at all, especially
      since we are just about to zero it all anyway.
      
      To clean up and unify the handling, we now do:
      
        - copy from startup_32 to _bss.
        - zero from _bss to _ebss.
        - the _ebss symbol is aligned to an 8-byte boundary.
        - the page tables are moved to a separate section.
      
      Use _bss as the copy endpoint since _edata may be misaligned.
      
      [ Impact: cleanup, trivial performance improvement ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      5b11f1ce
    • H
      x86, boot: stylistic cleanups for boot/compressed/head_64.S · b40d68d5
      H. Peter Anvin 提交于
      Clean up style issues in arch/x86/boot/compressed/head_64.S.  This
      file had a lot fewer style issues than its 32-bit cousin, but the ones
      it has are worth fixing, especially since it makes the two files more
      similar.
      
      [ Impact: cleanup, no object code change ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      b40d68d5
    • H
      x86, boot: use BP_scratch in arch/x86/boot/compressed/head_*.S · bd2a3698
      H. Peter Anvin 提交于
      Use the BP_scratch symbol from asm-offsets.h instead of hard-coding
      the location.
      
      [ Impact: cleanup ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      bd2a3698
  11. 20 2月, 2009 1 次提交
  12. 14 2月, 2009 1 次提交
  13. 25 5月, 2008 1 次提交
  14. 20 4月, 2008 2 次提交
  15. 04 2月, 2008 1 次提交
  16. 28 10月, 2007 1 次提交
  17. 11 10月, 2007 4 次提交
  18. 12 8月, 2007 1 次提交
  19. 13 7月, 2007 1 次提交
  20. 03 5月, 2007 2 次提交
    • V
      [PATCH] x86-64: Move cpu verification code to common file · a4831e08
      Vivek Goyal 提交于
      o This patch moves the code to verify long mode and SSE to a common file.
        This code is now shared by trampoline.S, wakeup.S, boot/setup.S and
        boot/compressed/head.S
      
      o So far we used to do very limited check in trampoline.S, wakeup.S and
        in 32bit entry point. Now all the entry paths are forced to do the
        exhaustive check, including SSE because verify_cpu is shared.
      
      o I am keeping this patch as last in the x86 relocatable series because
        previous patches have got quite some amount of testing done and don't want
        to distrub that. So that if there is problem introduced by this patch, at
        least it can be easily isolated.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      a4831e08
    • V
      [PATCH] x86-64: Relocatable Kernel Support · 1ab60e0f
      Vivek Goyal 提交于
      This patch modifies the x86_64 kernel so that it can be loaded and run
      at any 2M aligned address, below 512G.  The technique used is to
      compile the decompressor with -fPIC and modify it so the decompressor
      is fully relocatable.  For the main kernel the page tables are
      modified so the kernel remains at the same virtual address.  In
      addition a variable phys_base is kept that holds the physical address
      the kernel is loaded at.  __pa_symbol is modified to add that when
      we take the address of a kernel symbol.
      
      When loaded with a normal bootloader the decompressor will decompress
      the kernel to 2M and it will run there.  This both ensures the
      relocation code is always working, and makes it easier to use 2M
      pages for the kernel and the cpu.
      
      AK: changed to not make RELOCATABLE default in Kconfig
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      1ab60e0f
  21. 26 6月, 2005 2 次提交
  22. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4