Merge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Jun 2009 23:14:41 +0000 (16:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Jun 2009 23:14:41 +0000 (16:14 -0700)
* 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, setup: fix comment in the "glove box" code
  x86, setup: "glove box" BIOS interrupts in the video code
  x86, setup: "glove box" BIOS interrupts in the MCA code
  x86, setup: "glove box" BIOS interrupts in the EDD code
  x86, setup: "glove box" BIOS interrupts in the APM code
  x86, setup: "glove box" BIOS interrupts in the core boot code
  x86, setup: "glove box" BIOS calls -- infrastructure

1  2 
arch/x86/boot/Makefile
arch/x86/boot/header.S

diff --combined arch/x86/boot/Makefile
index 619d297aa2bae19dc1b75846dc5a2f8589efc252,658bc525cac78adca70a309457fc9d7ebd182726..8d16ada250480cb57168ea8b600c920f7c1f5192
@@@ -26,9 -26,10 +26,10 @@@ targets             := vmlinux.bin setup.bin setup
  targets               += fdimage fdimage144 fdimage288 image.iso mtools.conf
  subdir-               := compressed
  
- setup-y               += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
+ setup-y               += a20.o bioscall.o cmdline.o copy.o cpu.o cpucheck.o edd.o
  setup-y               += header.o main.o mca.o memory.o pm.o pmjump.o
- setup-y               += printf.o string.o tty.o video.o video-mode.o version.o
+ setup-y               += printf.o regs.o string.o tty.o video.o video-mode.o
+ setup-y               += version.o
  setup-$(CONFIG_X86_APM_BOOT) += apm.o
  
  # The link order of the video-*.o modules can matter.  In particular,
@@@ -86,27 -87,19 +87,27 @@@ $(obj)/vmlinux.bin: $(obj)/compressed/v
  
  SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
  
 -sed-offsets := -e 's/^00*/0/' \
 -        -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
 +sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'
  
 -quiet_cmd_offsets = OFFSETS $@
 -      cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
 +quiet_cmd_voffset = VOFFSET $@
 +      cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@
  
 -$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
 -      $(call if_changed,offsets)
 +targets += voffset.h
 +$(obj)/voffset.h: vmlinux FORCE
 +      $(call if_changed,voffset)
 +
 +sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(startup_32\|input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p'
 +
 +quiet_cmd_zoffset = ZOFFSET $@
 +      cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
 +
 +targets += zoffset.h
 +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
 +      $(call if_changed,zoffset)
  
 -targets += offsets.h
  
  AFLAGS_header.o += -I$(obj)
 -$(obj)/header.o: $(obj)/offsets.h
 +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
  
  LDFLAGS_setup.elf     := -T
  $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
diff --combined arch/x86/boot/header.S
index 1040f6e8010cd8b6ead2a20d0ec2171b16a5d13c,486d97fa7f4d32066aed306fa0b49ac42481f03a..b31cc54b46410f89b4120702b1d1b018a79e204d
@@@ -22,8 -22,7 +22,8 @@@
  #include <asm/page_types.h>
  #include <asm/setup.h>
  #include "boot.h"
 -#include "offsets.h"
 +#include "voffset.h"
 +#include "zoffset.h"
  
  BOOTSEG               = 0x07C0                /* original address of boot-sector */
  SYSSEG                = 0x1000                /* historical load address >> 4 */
@@@ -116,7 -115,7 +116,7 @@@ _start
        # Part 2 of the header, from the old setup.S
  
                .ascii  "HdrS"          # header signature
 -              .word   0x0209          # header version number (>= 0x0105)
 +              .word   0x020a          # header version number (>= 0x0105)
                                        # or else old loadlin-1.5 will fail)
                .globl realmode_swtch
  realmode_swtch:       .word   0, 0            # default_switch, SETUPSEG
@@@ -169,11 -168,7 +169,11 @@@ heap_end_ptr:    .word   _end+STACK_SIZE-51
                                        # end of setup code can be used by setup
                                        # for local heap purposes.
  
 -pad1:         .word   0
 +ext_loader_ver:
 +              .byte   0               # Extended boot loader version
 +ext_loader_type:
 +              .byte   0               # Extended boot loader type
 +
  cmd_line_ptr: .long   0               # (Header version 0x0202 or later)
                                        # If nonzero, a 32-bit pointer
                                        # to the kernel command line.
@@@ -205,7 -200,7 +205,7 @@@ relocatable_kernel:    .byte 
  #else
  relocatable_kernel:    .byte 0
  #endif
 -pad2:                 .byte 0
 +min_alignment:                .byte MIN_KERNEL_ALIGN_LG2      # minimum alignment
  pad3:                 .word 0
  
  cmdline_size:   .long   COMMAND_LINE_SIZE-1     #length of the command line,
@@@ -217,27 -212,16 +217,27 @@@ hardware_subarch:       .long 0                 # subarchit
  
  hardware_subarch_data:        .quad 0
  
 -payload_offset:               .long input_data
 -payload_length:               .long input_data_end-input_data
 +payload_offset:               .long ZO_input_data
 +payload_length:               .long ZO_z_input_len
  
  setup_data:           .quad 0                 # 64-bit physical pointer to
                                                # single linked list of
                                                # struct setup_data
  
 +pref_address:         .quad LOAD_PHYSICAL_ADDR        # preferred load addr
 +
 +#define ZO_INIT_SIZE  (ZO__end - ZO_startup_32 + ZO_z_extract_offset)
 +#define VO_INIT_SIZE  (VO__end - VO__text)
 +#if ZO_INIT_SIZE > VO_INIT_SIZE
 +#define INIT_SIZE ZO_INIT_SIZE
 +#else
 +#define INIT_SIZE VO_INIT_SIZE
 +#endif
 +init_size:            .long INIT_SIZE         # kernel initialization size
 +
  # End of setup header #####################################################
  
-       .section ".inittext", "ax"
+       .section ".entrytext", "ax"
  start_of_setup:
  #ifdef SAFE_RESET_DISK_CONTROLLER
  # Reset the disk controller.