Date: Fri, 31 Jul 2009 14:43:05 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r195999 - projects/ppc64/sys/powerpc/aim Message-ID: <200907311443.n6VEh57Y072181@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Fri Jul 31 14:43:05 2009 New Revision: 195999 URL: http://svn.freebsd.org/changeset/base/195999 Log: Make copyin()/copyout() work. Modified: projects/ppc64/sys/powerpc/aim/copyinout.c projects/ppc64/sys/powerpc/aim/trap.c Modified: projects/ppc64/sys/powerpc/aim/copyinout.c ============================================================================== --- projects/ppc64/sys/powerpc/aim/copyinout.c Fri Jul 31 14:30:06 2009 (r195998) +++ projects/ppc64/sys/powerpc/aim/copyinout.c Fri Jul 31 14:43:05 2009 (r195999) @@ -279,7 +279,7 @@ suword32(void *addr, int word) return (-1); } - set_user_sr(pm->pm_sr[(uintptr_t)addr >> ADDR_SR_SHFT]); + set_user_sr(va_to_vsid(pm,addr)); *p = word; Modified: projects/ppc64/sys/powerpc/aim/trap.c ============================================================================== --- projects/ppc64/sys/powerpc/aim/trap.c Fri Jul 31 14:30:06 2009 (r195998) +++ projects/ppc64/sys/powerpc/aim/trap.c Fri Jul 31 14:43:05 2009 (r195999) @@ -522,6 +522,12 @@ trap_pfault(struct trapframe *frame, int __asm ("slbmfev %0, %1" : "=r"(user_sr) : "r"(USER_SR)); + + user_sr >>= 12; + + /* XXX - limit to 46 byte EA space */ + user_sr &= (1UL << 17) - 1UL; + #else __asm ("mfsr %0, %1" : "=r"(user_sr)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907311443.n6VEh57Y072181>