Initialize NX stack capabilities and direct map status in pmap like on AIM.

This commit is contained in:
Nathan Whitehorn 2015-03-01 21:23:23 +00:00
parent 7a49d964d3
commit 3846dae834
2 changed files with 6 additions and 4 deletions

View File

@ -226,9 +226,6 @@ cpu_booke_startup(void *dummy)
/* Set up buffers, so they can be used to read disk labels. */
bufinit();
vm_pager_bufferinit();
/* Cpu supports execution permissions on the pages. */
elf32_nxstack = 1;
}
static char *
@ -454,7 +451,6 @@ booke_init(uint32_t arg1, uint32_t arg2)
/* Initialise virtual memory. */
pmap_mmu_install(MMU_TYPE_BOOKE, 0);
pmap_bootstrap((uintptr_t)kernel_text, end);
pmap_bootstrapped = 1;
debugf("MSR = 0x%08x\n", mfmsr());
#if defined(BOOKE_E500)
//tlb1_print_entries();

View File

@ -1014,6 +1014,10 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_offset_t kernelend)
debugf("mmu_booke_bootstrap: entered\n");
/* Set interesting system properties */
hw_direct_map = 0;
elf32_nxstack = 1;
/* Initialize invalidation mutex */
mtx_init(&tlbivax_mutex, "tlbivax", NULL, MTX_SPIN);
@ -1315,6 +1319,8 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_offset_t kernelend)
kstack0 += PAGE_SIZE;
kstack0_phys += PAGE_SIZE;
}
pmap_bootstrapped = 1;
debugf("virtual_avail = %08x\n", virtual_avail);
debugf("virtual_end = %08x\n", virtual_end);