diff options
author | kib <kib@FreeBSD.org> | 2012-01-30 07:56:00 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-01-30 07:56:00 +0000 |
commit | 6392be1eb8b49cec1df260bcd8e95cb7ce44542c (patch) | |
tree | 1eda6d1470e00f85e847c4321121ff9a4259296b /sys/powerpc | |
parent | a39b6a3bffcf6cca87ef96f29c24d81e39d0fa2d (diff) | |
download | FreeBSD-src-6392be1eb8b49cec1df260bcd8e95cb7ce44542c.zip FreeBSD-src-6392be1eb8b49cec1df260bcd8e95cb7ce44542c.tar.gz |
Finally, try to enable the nxstacks on amd64 and powerpc64 for both 64bit
and 32bit ABIs. Also try to enable nxstacks for PAE/i386 when supported,
and some variants of powerpc32.
MFC after: 2 months (if ever)
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/aim/mmu_oea64.c | 4 | ||||
-rw-r--r-- | sys/powerpc/booke/machdep.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index d58e8de..efe091f 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -1445,6 +1445,8 @@ moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) return (void *)va; } +extern int elf32_nxstack; + void moea64_init(mmu_t mmu) { @@ -1464,6 +1466,8 @@ moea64_init(mmu_t mmu) uma_zone_set_allocf(moea64_mpvo_zone,moea64_uma_page_alloc); } + elf32_nxstack = 1; + moea64_initialized = TRUE; } diff --git a/sys/powerpc/booke/machdep.c b/sys/powerpc/booke/machdep.c index c2b5e6f..82a37e1 100644 --- a/sys/powerpc/booke/machdep.c +++ b/sys/powerpc/booke/machdep.c @@ -192,6 +192,8 @@ void print_kernel_section_addr(void); void print_kenv(void); u_int booke_init(uint32_t, uint32_t); +extern int elf32_nxstack; + static void cpu_e500_startup(void *dummy) { @@ -227,6 +229,9 @@ cpu_e500_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 * |