-/*
- * Enter 1-1 mappings for kernel and for kernel page tables.
- */
- movl $(INTEL_PTE_KERNEL),%eax /* set up pte prototype */
-0:
- cmpl %esi,%edi /* at end of pte page? */
- jb 1f /* if so: */
- movl %edi,%edx /* get pte address (physical) */
- andl $(-NBPG),%edx /* mask out offset in page */
- orl $(INTEL_PTE_KERNEL),%edx /* add pte bits */
- movl %edx,(%ebx) /* set pde */
- addl $4,%ebx /* point to next pde */
- movl %edi,%esi /* point to */
- addl $(NBPG),%esi /* end of new pte page */
-1:
- movl %eax,(%edi) /* set pte */
- addl $4,%edi /* advance to next pte */
- addl $(NBPG),%eax /* advance to next phys page */
- cmpl %edi,%eax /* have we mapped this pte page yet? */
- jb 0b /* loop if not */
-
-/*
- * Zero rest of last pte page.
- */
- xor %eax,%eax /* don`t map yet */
-2: cmpl %esi,%edi /* at end of pte page? */
- jae 3f
- movl %eax,(%edi) /* zero mapping */
- addl $4,%edi
- jmp 2b
-3:
-
-#if NCPUS > 1
-/*
- * Grab (waste?) another page for a bootstrap page directory
- * for the other CPUs. We don't want the running CPUs to see
- * addresses 0..3fffff mapped 1-1.
- */
- movl %edi,PA(EXT(mp_boot_pde)) /* save its physical address */
- movl $(PTES_PER_PAGE),%ecx /* and clear it */
- rep
- stosl
-#endif /* NCPUS > 1 */
- movl %edi,PA(EXT(first_avail)) /* save first available phys addr */
-
-/*
- * pmap_bootstrap will enter rest of mappings.
- */
-
-/*
- * Fix initial descriptor tables.
- */
- lea PA(EXT(idt)),%esi /* fix IDT */
- movl $(IDTSZ),%ecx
- movl $(PA(fix_idt_ret)),%ebx
- jmp fix_desc_common /* (cannot use stack) */
-fix_idt_ret:
-
- lea PA(EXT(gdt)),%esi /* fix GDT */
- movl $(GDTSZ),%ecx
- movl $(PA(fix_gdt_ret)),%ebx
- jmp fix_desc_common /* (cannot use stack) */
-fix_gdt_ret:
-
- lea PA(EXT(ldt)),%esi /* fix LDT */
- movl $(LDTSZ),%ecx
- movl $(PA(fix_ldt_ret)),%ebx
- jmp fix_desc_common /* (cannot use stack) */
-fix_ldt_ret: