version 1.139, 2016/11/11 11:00:38 |
version 1.144, 2017/01/06 08:36:56 |
Line 270 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 270 __KERNEL_RCSID(0, "$NetBSD$"); |
|
*/ |
*/ |
.data |
.data |
|
|
#if NLAPIC > 0 |
|
.align PAGE_SIZE |
|
.globl _C_LABEL(local_apic) |
|
|
|
.type _C_LABEL(local_apic), @object |
|
LABEL(local_apic) |
|
.space PAGE_SIZE |
|
END(local_apic) |
|
#endif |
|
|
|
.globl _C_LABEL(tablesize) |
.globl _C_LABEL(tablesize) |
.globl _C_LABEL(nox_flag) |
.globl _C_LABEL(nox_flag) |
.globl _C_LABEL(cputype) |
.globl _C_LABEL(cputype) |
|
|
*/ |
*/ |
|
|
/* Find end of kernel image; brings us on (1). */ |
/* Find end of kernel image; brings us on (1). */ |
movl $RELOC(end),%edi |
movl $RELOC(__kernel_end),%edi |
|
|
#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(makeoptions_COPY_SYMTAB) |
#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(makeoptions_COPY_SYMTAB) |
/* Save the symbols (if loaded); brinds us on (2). */ |
/* Save the symbols (if loaded); brinds us on (2). */ |
|
|
incl %eax /* one more PTP for VAs stolen by bootstrap */ |
incl %eax /* one more PTP for VAs stolen by bootstrap */ |
1: movl %eax,RELOC(nkptp)+1*4 |
1: movl %eax,RELOC(nkptp)+1*4 |
|
|
/* tablesize = (PDP_SIZE + UPAGES + nkptp) << PGSHIFT; */ |
/* tablesize = (PDP_SIZE + UPAGES + nkptp[1]) << PGSHIFT; */ |
addl $(PDP_SIZE+UPAGES),%eax |
addl $(PDP_SIZE+UPAGES),%eax |
#ifdef PAE |
#ifdef PAE |
incl %eax /* one more page for L3 */ |
incl %eax /* one more page for L3 */ |
|
|
#endif |
#endif |
movl %eax,RELOC(tablesize) |
movl %eax,RELOC(tablesize) |
|
|
/* Ensure that nkptp covers BOOTSTRAP TABLES. */ |
/* Ensure that nkptp[1] covers BOOTSTRAP TABLES, ie: |
|
* (esi + tablesize) >> L2_SHIFT + 1 < nkptp[1] */ |
addl %esi,%eax |
addl %esi,%eax |
addl $~L2_FRAME,%eax |
addl $~L2_FRAME,%eax |
shrl $L2_SHIFT,%eax |
shrl $L2_SHIFT,%eax |
|
|
call _C_LABEL(initgdt) |
call _C_LABEL(initgdt) |
addl $4,%esp |
addl $4,%esp |
|
|
call xen_pmap_bootstrap |
call xen_locore |
|
|
/* |
/* |
* The first VA available is returned by xen_pmap_bootstrap in %eax. We |
* The first VA available is returned by xen_locore in %eax. We |
* use it as the UAREA, and set up the stack here. |
* use it as the UAREA, and set up the stack here. |
*/ |
*/ |
movl %eax,%esi |
movl %eax,%esi |
|
|
leal (USPACE-FRAMESIZE)(%eax),%esp |
leal (USPACE-FRAMESIZE)(%eax),%esp |
xorl %ebp,%ebp /* mark end of frames */ |
xorl %ebp,%ebp /* mark end of frames */ |
|
|
/* Set first_avail after the UAREA. */ |
/* Set first_avail after the DUMMY PAGE (see xen_locore). */ |
addl $USPACE,%esi |
addl $(USPACE+PAGE_SIZE),%esi |
subl $KERNBASE,%esi /* init386 wants a physical address */ |
subl $KERNBASE,%esi /* init386 wants a physical address */ |
|
|
#ifdef PAE |
#ifdef PAE |