root/zBoot/head.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /*
   2  *  linux/boot/head.s
   3  *
   4  *  Copyright (C) 1991, 1992, 1993  Linus Torvalds
   5  */
   6 
   7 /*
   8  *  head.s contains the 32-bit startup code.
   9  *
  10  * NOTE!!! Startup happens at absolute address 0x00000000, which is also where
  11  * the page directory will exist. The startup code will be overwritten by
  12  * the page directory.
  13  */
  14 .text
  15 
  16 startup_32:
  17         cld
  18         cli
  19         movl $0x10,%eax
  20         mov %ax,%ds
  21         mov %ax,%es
  22         mov %ax,%fs
  23         mov %ax,%gs
  24         lss _stack_start,%esp
  25         xorl %eax,%eax
  26 1:      incl %eax               # check that A20 really IS enabled
  27         movl %eax,0x000000      # loop forever if it isn't
  28         cmpl %eax,0x100000
  29         je 1b
  30 /*
  31  * Initialize eflags.  Some BIOS's leave bits like NT set.  This would
  32  * confuse the debugger if this code is traced.
  33  * XXX - best to initialize before switching to protected mode.
  34  */
  35         pushl $0
  36         popfl
  37         call _decompress_kernel
  38         ljmp $0x08, $0x100000

/* [previous][next][first][last][top][bottom][index][help] */