ia64/xen-unstable

view extras/mini-os/head.S @ 810:3f44ecdcb631

bitkeeper revision 1.499 (3f867c85oOyUdtcboCzrLgktKtvdgA)

ac_timer.h, ac_timer.c:
Xen ac timers now use a heap to find earliest timeout.
author kaf24@scramble.cl.cam.ac.uk
date Fri Oct 10 09:31:49 2003 +0000 (2003-10-10)
parents 34473973889b
children 02306208d767
line source
1 #include <os.h>
3 /* Offsets in start_info structure */
4 #define SHARED_INFO 4
5 #define MOD_START 12
6 #define MOD_LEN 16
8 #define ENTRY(X) .globl X ; X :
10 .globl _start
11 _start:
12 cld
14 lss stack_start,%esp
16 /* Copy any module somewhere safe before it's clobbered by BSS. */
17 mov MOD_LEN(%esi),%ecx
18 shr $2,%ecx
19 jz 2f /* bail from copy loop if no module */
21 mov $_end,%edi
22 add MOD_LEN(%esi),%edi
23 mov MOD_START(%esi),%eax
24 add MOD_LEN(%esi),%eax
25 1: sub $4,%eax
26 sub $4,%edi
27 mov (%eax),%ebx
28 mov %ebx,(%edi)
29 loop 1b
30 mov %edi,MOD_START(%esi)
32 /* Clear BSS first so that there are no surprises... */
33 2: xorl %eax,%eax
34 movl $__bss_start,%edi
35 movl $_end,%ecx
36 subl %edi,%ecx
37 rep stosb
39 push %esi
40 call start_kernel
43 stack_start:
44 .long stack+8192, __KERNEL_DS