svn commit: r206439 - in user/jmallett/octeon/sys: conf
mips/include mips/mips
Juli Mallett
jmallett at FreeBSD.org
Sat Apr 10 02:11:01 UTC 2010
Author: jmallett
Date: Sat Apr 10 02:11:00 2010
New Revision: 206439
URL: http://svn.freebsd.org/changeset/base/206439
Log:
o) Destroy pmap locks correctly.
o) Remove another unused file.
o) Adjust freebsd32 sysvec to be more correct.
o) Define the top of the user stack as being a page below the max user
address. Because of problems related to USRSTACK (by way of PS_STRINGS)
being compiled into binaries, page sizes will probably be going back to
4k in this branch in the near future, meaning this macro will return to
its original value.
o) Use PTR_S for what's really a SIZE_T_S instead of sw.
o) Correct segtab shifting in trap. XXX trap really shouldn't be doing this
by hand.
Deleted:
user/jmallett/octeon/sys/mips/mips/copystr.S
Modified:
user/jmallett/octeon/sys/conf/files.mips
user/jmallett/octeon/sys/mips/include/vmparam.h
user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c
user/jmallett/octeon/sys/mips/mips/pmap.c
user/jmallett/octeon/sys/mips/mips/support.S
user/jmallett/octeon/sys/mips/mips/trap.c
Modified: user/jmallett/octeon/sys/conf/files.mips
==============================================================================
--- user/jmallett/octeon/sys/conf/files.mips Sat Apr 10 01:49:40 2010 (r206438)
+++ user/jmallett/octeon/sys/conf/files.mips Sat Apr 10 02:11:00 2010 (r206439)
@@ -50,7 +50,6 @@ mips/mips/bus_space_generic.c standard
mips/mips/busdma_machdep.c standard
mips/mips/cache.c standard
mips/mips/cache_mipsNN.c standard
-#mips/mips/copystr.S standard
mips/mips/db_disasm.c optional ddb
mips/mips/db_interface.c optional ddb
mips/mips/db_trace.c optional ddb
Modified: user/jmallett/octeon/sys/mips/include/vmparam.h
==============================================================================
--- user/jmallett/octeon/sys/mips/include/vmparam.h Sat Apr 10 01:49:40 2010 (r206438)
+++ user/jmallett/octeon/sys/mips/include/vmparam.h Sat Apr 10 02:11:00 2010 (r206439)
@@ -60,9 +60,9 @@
* and some QED CPUs perform some virtual address checks before the
* offset is calculated.
*/
-#define USRSTACK 0x7fffe000 /* Start of user stack */
+#define USRSTACK (VM_MAXUSER_ADDRESS - PAGE_SIZE) /* Start of user stack */
#if defined(COMPAT_FREEBSD32)
-#define FREEBSD32_USRSTACK USRSTACK
+#define FREEBSD32_USRSTACK (0x80000000 - PAGE_SIZE)
#endif
/*
Modified: user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c Sat Apr 10 01:49:40 2010 (r206438)
+++ user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c Sat Apr 10 02:11:00 2010 (r206439)
@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD: user/jmallett/octeon
*/
struct sysentvec elf32_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
- .sv_table = sysent,
+ .sv_table = freebsd32_sysent,
.sv_mask = 0,
.sv_sigsize = 0,
.sv_sigtbl = NULL,
@@ -79,11 +79,11 @@ struct sysentvec elf32_freebsd_sysvec =
.sv_minsigstksz = MINSIGSTKSZ,
.sv_pagesize = PAGE_SIZE,
.sv_minuser = VM_MIN_ADDRESS,
- .sv_maxuser = VM_MAXUSER_ADDRESS,
+ .sv_maxuser = (vm_offset_t)0x80000000,
.sv_usrstack = FREEBSD32_USRSTACK,
- .sv_psstrings = PS_STRINGS,
+ .sv_psstrings = FREEBSD32_USRSTACK - sizeof(struct ps_strings),
.sv_stackprot = VM_PROT_ALL,
- .sv_copyout_strings = exec_copyout_strings,
+ .sv_copyout_strings = freebsd32_copyout_strings,
.sv_setregs = exec_setregs,
.sv_fixlimit = NULL,
.sv_maxssiz = NULL,
Modified: user/jmallett/octeon/sys/mips/mips/pmap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/pmap.c Sat Apr 10 01:49:40 2010 (r206438)
+++ user/jmallett/octeon/sys/mips/mips/pmap.c Sat Apr 10 02:11:00 2010 (r206439)
@@ -1263,6 +1263,7 @@ pmap_release(pmap_t pmap)
ptdpg->wire_count--;
atomic_subtract_int(&cnt.v_wire_count, 1);
vm_page_free_zero(ptdpg);
+ PMAP_LOCK_DESTROY(pmap);
}
/*
Modified: user/jmallett/octeon/sys/mips/mips/support.S
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/support.S Sat Apr 10 01:49:40 2010 (r206438)
+++ user/jmallett/octeon/sys/mips/mips/support.S Sat Apr 10 02:11:00 2010 (r206439)
@@ -159,7 +159,7 @@ LEAF(copystr)
2:
beq a3, zero, 3f # return num. of copied bytes
PTR_SUBU a2, t0, a2 # if the 4th arg was non-NULL
- sw a2, 0(a3)
+ PTR_S a2, 0(a3)
3:
j ra # v0 is 0 or ENAMETOOLONG
nop
Modified: user/jmallett/octeon/sys/mips/mips/trap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/trap.c Sat Apr 10 01:49:40 2010 (r206438)
+++ user/jmallett/octeon/sys/mips/mips/trap.c Sat Apr 10 02:11:00 2010 (r206439)
@@ -1304,7 +1304,7 @@ get_mapping_info(vm_offset_t va, pd_entr
pd_entry_t *pdep;
struct proc *p = curproc;
- pdep = (&(p->p_vmspace->vm_pmap.pm_segtab[(uint32_t)va >> SEGSHIFT]));
+ pdep = (&(p->p_vmspace->vm_pmap.pm_segtab[(va >> SEGSHIFT) & (NPDEPG - 1)]));
if (*pdep)
ptep = pmap_pte(&p->p_vmspace->vm_pmap, va);
else
More information about the svn-src-user
mailing list