ia64/xen-unstable

view xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/head.S @ 235:d7d0a23b2e07

bitkeeper revision 1.93 (3e5a4e6bkPheUp3x1uufN2MS3LAB7A)

Latest and Greatest version of XenoLinux based on the Linux-2.4.21-pre4
kernel.
author iap10@labyrinth.cl.cam.ac.uk
date Mon Feb 24 16:55:07 2003 +0000 (2003-02-24)
parents
children 8d23d3ad0f20 2eb189eacf01
line source
2 .text
3 #include <linux/config.h>
4 #include <linux/threads.h>
5 #include <linux/linkage.h>
6 #include <asm/segment.h>
7 #include <asm/page.h>
8 #include <asm/pgtable.h>
9 #include <asm/desc.h>
11 /* Offsets in start_info structure */
12 #define SHARED_INFO 4
13 #define MOD_START 12
14 #define MOD_LEN 16
16 startup_32:
17 cld
19 lss stack_start,%esp
21 /* Copy initrd somewhere safe before it's clobbered by BSS. */
22 mov MOD_LEN(%esi),%ecx
23 shr $2,%ecx
24 jz 2f /* bail from copy loop if no initrd */
25 mov $SYMBOL_NAME(_end),%edi
26 add MOD_LEN(%esi),%edi
27 mov MOD_START(%esi),%eax
28 add MOD_LEN(%esi),%eax
29 1: sub $4,%eax
30 sub $4,%edi
31 mov (%eax),%ebx
32 mov %ebx,(%edi)
33 loop 1b
34 mov %edi,MOD_START(%esi)
36 /* Clear BSS first so that there are no surprises... */
37 2: xorl %eax,%eax
38 movl $SYMBOL_NAME(__bss_start),%edi
39 movl $SYMBOL_NAME(_end),%ecx
40 subl %edi,%ecx
41 rep stosb
43 /* Copy the necessary stuff from start_info structure. */
44 /* We need to copy shared_info early, so that sti/cli work */
45 mov SHARED_INFO(%esi),%eax
46 mov %eax,SYMBOL_NAME(HYPERVISOR_shared_info)
47 mov $SYMBOL_NAME(start_info_union),%edi
48 mov $128,%ecx
49 rep movsl
51 jmp SYMBOL_NAME(start_kernel)
53 ENTRY(stack_start)
54 .long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
56 .org 0x1000
57 ENTRY(empty_zero_page)
59 .org 0x2000
60 ENTRY(cpu0_pte_quicklist)
62 .org 0x2400
63 ENTRY(cpu0_pgd_quicklist)
65 .org 0x2800
66 ENTRY(stext)
67 ENTRY(_stext)