| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: locore.S,v 1.101 2012/06/27 00:37:08 jym Exp $ */ | | 1 | /* $NetBSD: locore.S,v 1.102 2012/09/01 23:19:46 cherry Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright-o-rama! | | 4 | * Copyright-o-rama! |
5 | */ | | 5 | */ |
6 | | | 6 | |
7 | /* | | 7 | /* |
8 | * Copyright (c) 2006 Manuel Bouyer. | | 8 | * Copyright (c) 2006 Manuel Bouyer. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -119,27 +119,27 @@ | | | @@ -119,27 +119,27 @@ |
119 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 119 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
120 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 120 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
121 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 121 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
122 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 122 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
123 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 123 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
124 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 124 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
125 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 125 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
126 | * SUCH DAMAGE. | | 126 | * SUCH DAMAGE. |
127 | * | | 127 | * |
128 | * @(#)locore.s 7.3 (Berkeley) 5/13/91 | | 128 | * @(#)locore.s 7.3 (Berkeley) 5/13/91 |
129 | */ | | 129 | */ |
130 | | | 130 | |
131 | #include <machine/asm.h> | | 131 | #include <machine/asm.h> |
132 | __KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.101 2012/06/27 00:37:08 jym Exp $"); | | 132 | __KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.102 2012/09/01 23:19:46 cherry Exp $"); |
133 | | | 133 | |
134 | #include "opt_compat_oldboot.h" | | 134 | #include "opt_compat_oldboot.h" |
135 | #include "opt_ddb.h" | | 135 | #include "opt_ddb.h" |
136 | #include "opt_modular.h" | | 136 | #include "opt_modular.h" |
137 | #include "opt_multiboot.h" | | 137 | #include "opt_multiboot.h" |
138 | #include "opt_realmem.h" | | 138 | #include "opt_realmem.h" |
139 | #include "opt_vm86.h" | | 139 | #include "opt_vm86.h" |
140 | #include "opt_xen.h" | | 140 | #include "opt_xen.h" |
141 | | | 141 | |
142 | #include "npx.h" | | 142 | #include "npx.h" |
143 | #include "assym.h" | | 143 | #include "assym.h" |
144 | #include "lapic.h" | | 144 | #include "lapic.h" |
145 | #include "ioapic.h" | | 145 | #include "ioapic.h" |
| @@ -223,30 +223,30 @@ _C_LABEL(lapic_tpr): | | | @@ -223,30 +223,30 @@ _C_LABEL(lapic_tpr): |
223 | #endif | | 223 | #endif |
224 | | | 224 | |
225 | _C_LABEL(cputype): .long 0 # are we 80486, Pentium, or.. | | 225 | _C_LABEL(cputype): .long 0 # are we 80486, Pentium, or.. |
226 | _C_LABEL(cpuid_level): .long 0 | | 226 | _C_LABEL(cpuid_level): .long 0 |
227 | _C_LABEL(atdevbase): .long 0 # location of start of iomem in virtual | | 227 | _C_LABEL(atdevbase): .long 0 # location of start of iomem in virtual |
228 | _C_LABEL(lwp0uarea): .long 0 | | 228 | _C_LABEL(lwp0uarea): .long 0 |
229 | _C_LABEL(PDPpaddr): .long 0 # paddr of PDP, for libkvm | | 229 | _C_LABEL(PDPpaddr): .long 0 # paddr of PDP, for libkvm |
230 | _C_LABEL(tablesize): .long 0 | | 230 | _C_LABEL(tablesize): .long 0 |
231 | | | 231 | |
232 | .space 512 | | 232 | .space 512 |
233 | tmpstk: | | 233 | tmpstk: |
234 | #ifdef XEN | | 234 | #ifdef XEN |
235 | .align PAGE_SIZE, 0x0 # Align on page boundary | | 235 | .align PAGE_SIZE, 0x0 # Align on page boundary |
| | | 236 | .globl tmpgdt |
236 | _C_LABEL(tmpgdt): | | 237 | _C_LABEL(tmpgdt): |
237 | .space PAGE_SIZE # Xen expects a page | | 238 | .space PAGE_SIZE # Xen expects a page |
238 | #endif /* XEN */ | | 239 | #endif /* XEN */ |
239 | .globl tmpgdt | | | |
240 | #ifndef XEN | | 240 | #ifndef XEN |
241 | #define _RELOC(x) ((x) - KERNBASE) | | 241 | #define _RELOC(x) ((x) - KERNBASE) |
242 | #else | | 242 | #else |
243 | #define _RELOC(x) ((x)) | | 243 | #define _RELOC(x) ((x)) |
244 | #endif /* XEN */ | | 244 | #endif /* XEN */ |
245 | #define RELOC(x) _RELOC(_C_LABEL(x)) | | 245 | #define RELOC(x) _RELOC(_C_LABEL(x)) |
246 | | | 246 | |
247 | .text | | 247 | .text |
248 | .globl _C_LABEL(kernel_text) | | 248 | .globl _C_LABEL(kernel_text) |
249 | .set _C_LABEL(kernel_text),KERNTEXTOFF | | 249 | .set _C_LABEL(kernel_text),KERNTEXTOFF |
250 | | | 250 | |
251 | .globl start | | 251 | .globl start |
252 | #ifndef XEN | | 252 | #ifndef XEN |