svn commit: r219657 - projects/altix/sys/boot/ia64/common
Marcel Moolenaar
marcel at FreeBSD.org
Tue Mar 15 06:04:13 UTC 2011
Author: marcel
Date: Tue Mar 15 06:04:13 2011
New Revision: 219657
URL: http://svn.freebsd.org/changeset/base/219657
Log:
Round the size, not the top address. This makes the code less
sensitive to compiler bugs (32-bit truncation).
Modified:
projects/altix/sys/boot/ia64/common/exec.c
Modified: projects/altix/sys/boot/ia64/common/exec.c
==============================================================================
--- projects/altix/sys/boot/ia64/common/exec.c Tue Mar 15 01:06:27 2011 (r219656)
+++ projects/altix/sys/boot/ia64/common/exec.c Tue Mar 15 06:04:13 2011 (r219657)
@@ -160,8 +160,8 @@ mmu_setup_paged(vm_offset_t pbvm_top)
PTE_AR_RW);
/* Wire as much of the PBVM we can. This must be a power of 2. */
- pbvm_top = (pbvm_top + IA64_PBVM_PAGE_MASK) & ~IA64_PBVM_PAGE_MASK;
sz = pbvm_top - IA64_PBVM_BASE;
+ sz = (sz + IA64_PBVM_PAGE_MASK) & ~IA64_PBVM_PAGE_MASK;
while (sz & (sz - 1))
sz -= IA64_PBVM_PAGE_SIZE;
mmu_wire(IA64_PBVM_BASE, ia64_pgtbl[0], sz, PTE_AR_RWX);
More information about the svn-src-projects
mailing list