aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/boot/setup.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/boot/setup.S')
-rw-r--r--arch/i386/boot/setup.S29
1 files changed, 21 insertions, 8 deletions
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
index 3aec4538a113..9aa8b0518184 100644
--- a/arch/i386/boot/setup.S
+++ b/arch/i386/boot/setup.S
@@ -588,11 +588,6 @@ rmodeswtch_normal:
588 call default_switch 588 call default_switch
589 589
590rmodeswtch_end: 590rmodeswtch_end:
591# we get the code32 start address and modify the below 'jmpi'
592# (loader may have changed it)
593 movl %cs:code32_start, %eax
594 movl %eax, %cs:code32
595
596# Now we move the system to its rightful place ... but we check if we have a 591# Now we move the system to its rightful place ... but we check if we have a
597# big-kernel. In that case we *must* not move it ... 592# big-kernel. In that case we *must* not move it ...
598 testb $LOADED_HIGH, %cs:loadflags 593 testb $LOADED_HIGH, %cs:loadflags
@@ -788,11 +783,12 @@ a20_err_msg:
788a20_done: 783a20_done:
789 784
790#endif /* CONFIG_X86_VOYAGER */ 785#endif /* CONFIG_X86_VOYAGER */
791# set up gdt and idt 786# set up gdt and idt and 32bit start address
792 lidt idt_48 # load idt with 0,0 787 lidt idt_48 # load idt with 0,0
793 xorl %eax, %eax # Compute gdt_base 788 xorl %eax, %eax # Compute gdt_base
794 movw %ds, %ax # (Convert %ds:gdt to a linear ptr) 789 movw %ds, %ax # (Convert %ds:gdt to a linear ptr)
795 shll $4, %eax 790 shll $4, %eax
791 addl %eax, code32
796 addl $gdt, %eax 792 addl $gdt, %eax
797 movl %eax, (gdt_48+2) 793 movl %eax, (gdt_48+2)
798 lgdt gdt_48 # load gdt with whatever is 794 lgdt gdt_48 # load gdt with whatever is
@@ -851,9 +847,26 @@ flush_instr:
851# Manual, Mixing 16-bit and 32-bit code, page 16-6) 847# Manual, Mixing 16-bit and 32-bit code, page 16-6)
852 848
853 .byte 0x66, 0xea # prefix + jmpi-opcode 849 .byte 0x66, 0xea # prefix + jmpi-opcode
854code32: .long 0x1000 # will be set to 0x100000 850code32: .long startup_32 # will be set to %cs+startup_32
855 # for big kernels
856 .word __BOOT_CS 851 .word __BOOT_CS
852.code32
853startup_32:
854 movl $(__BOOT_DS), %eax
855 movl %eax, %ds
856 movl %eax, %es
857 movl %eax, %fs
858 movl %eax, %gs
859 movl %eax, %ss
860
861 xorl %eax, %eax
8621: incl %eax # check that A20 really IS enabled
863 movl %eax, 0x00000000 # loop forever if it isn't
864 cmpl %eax, 0x00100000
865 je 1b
866
867 # Jump to the 32bit entry point
868 jmpl *(code32_start - start + (DELTA_INITSEG << 4))(%esi)
869.code16
857 870
858# Here's a bunch of information about your current kernel.. 871# Here's a bunch of information about your current kernel..
859kernel_version: .ascii UTS_RELEASE 872kernel_version: .ascii UTS_RELEASE