Rev 1840 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1805 | decky | 1 | # |
1840 | decky | 2 | # Copyright (C) 2006 Martin Decky |
1805 | decky | 3 | # All rights reserved. |
4 | # |
||
5 | # Redistribution and use in source and binary forms, with or without |
||
6 | # modification, are permitted provided that the following conditions |
||
7 | # are met: |
||
8 | # |
||
9 | # - Redistributions of source code must retain the above copyright |
||
10 | # notice, this list of conditions and the following disclaimer. |
||
11 | # - Redistributions in binary form must reproduce the above copyright |
||
12 | # notice, this list of conditions and the following disclaimer in the |
||
13 | # documentation and/or other materials provided with the distribution. |
||
14 | # - The name of the author may not be used to endorse or promote products |
||
15 | # derived from this software without specific prior written permission. |
||
16 | # |
||
17 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
||
18 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
||
19 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||
20 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
||
21 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
||
22 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||
23 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||
24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
||
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
27 | # |
||
28 | |||
29 | #include <arch/boot/boot.h> |
||
30 | #include <arch/mm/page.h> |
||
31 | #include <arch/pm.h> |
||
32 | |||
33 | .section __xen_guest |
||
1824 | decky | 34 | .ascii "GUEST_OS=HelenOS," |
35 | .ascii "XEN_VER=xen-3.0," |
||
36 | .ascii "HYPERCALL_PAGE=0x0000," |
||
37 | .ascii "LOADER=generic," |
||
38 | .ascii "FEATURES=writable_page_tables" |
||
1805 | decky | 39 | .byte 0 |
40 | |||
1810 | decky | 41 | .text |
1805 | decky | 42 | |
43 | .code32 |
||
44 | .align 4 |
||
1809 | decky | 45 | .global kernel_image_start |
1805 | decky | 46 | |
1809 | decky | 47 | kernel_image_start: |
1813 | decky | 48 | # copy start_info (esi initialized by Xen) |
49 | |||
50 | movl $start_info, %edi |
||
51 | movl $START_INFO_SIZE >> 2, %ecx |
||
52 | cld |
||
53 | rep movsb |
||
1824 | decky | 54 | |
55 | # switch to temporal kernel stack |
||
56 | |||
57 | movl $kernel_stack, %esp |
||
58 | |||
59 | call arch_pre_main |
||
1805 | decky | 60 | call main_bsp # never returns |
61 | |||
62 | cli |
||
63 | hlt |
||
64 | |||
1824 | decky | 65 | kernel_stack_bottom: |
66 | .space TEMP_STACK_SIZE |
||
67 | kernel_stack: |
||
68 | |||
1816 | decky | 69 | .section K_TEXT_START, "aw", @progbits |
1813 | decky | 70 | .global hypercall_page |
1816 | decky | 71 | .org 0 |
1813 | decky | 72 | hypercall_page: |
73 | .space PAGE_SIZE |
||
1824 | decky | 74 | |
75 | .global shared_info |
||
76 | .org 0x1000 |
||
77 | shared_info: |
||
78 | .space PAGE_SIZE |
||
1832 | decky | 79 | |
80 | .global console_page |
||
81 | .org 0x2000 |
||
82 | console_page: |
||
83 | .space PAGE_SIZE |