]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/kern_subr.c
xnu-344.49.tar.gz
[apple/xnu.git] / bsd / kern / kern_subr.c
index 7e94acb9c9aa474a6b7f08854207997f50862e5f..5ad9b0eb147cfd99fe71d57b9bfcdc555e2daf27 100644 (file)
@@ -68,7 +68,6 @@
 #include <sys/proc.h>
 #include <sys/malloc.h>
 #include <sys/queue.h>
-#include <vm/pmap.h>
 
 #include <kdebug.h>
 
 #define DBG_UIO_COPYOUT 16
 #define DBG_UIO_COPYIN  17
 
+
 int
 uiomove(cp, n, uio)
        register caddr_t cp;
        register int n;
        register struct uio *uio;
-{
-       return uiomove64((addr64_t)((unsigned int)cp), n, uio);
-}
-
-int
-uiomove64(addr64_t cp, int n, struct uio *uio)
 {
        register struct iovec *iov;
        u_int cnt;
@@ -116,22 +110,22 @@ uiomove64(addr64_t cp, int n, struct uio *uio)
                        if (uio->uio_rw == UIO_READ)
                          {
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_START,
-                                        (caddr_t)cp, iov->iov_base, cnt, 0,0);
+                                        cp, iov->iov_base, cnt, 0,0);
 
-                               error = copyout((caddr_t)cp, iov->iov_base, cnt);
+                               error = copyout(cp, iov->iov_base, cnt);
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_END,
-                                        (caddr_t)cp, iov->iov_base, cnt, 0,0);
+                                        cp, iov->iov_base, cnt, 0,0);
                          }
                        else
                          {
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_START,
-                                        iov->iov_base, (caddr_t)cp, cnt, 0,0);
+                                        iov->iov_base, cp, cnt, 0,0);
 
-                               error = copyin(iov->iov_base, (caddr_t)cp, cnt);
+                               error = copyin(iov->iov_base, cp, cnt);
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_END,
-                                        iov->iov_base, (caddr_t)cp, cnt, 0,0);
+                                        iov->iov_base, cp, cnt, 0,0);
                          }
                        if (error)
                                return (error);
@@ -152,8 +146,8 @@ uiomove64(addr64_t cp, int n, struct uio *uio)
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_START,
                                         cp, iov->iov_base, cnt, 1,0);
 
-                               if (error = copypv((addr64_t)cp, (addr64_t)((unsigned int)iov->iov_base), cnt, cppvPsrc | cppvNoRefSrc))        /* Copy physical to virtual */
-                                       error = EFAULT;
+                               error = copyp2v(cp, iov->iov_base, cnt);
+
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_END,
                                         cp, iov->iov_base, cnt, 1,0);
@@ -163,8 +157,7 @@ uiomove64(addr64_t cp, int n, struct uio *uio)
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_START,
                                         iov->iov_base, cp, cnt, 1,0);
 
-                               if (error = copypv((addr64_t)((unsigned int)iov->iov_base), (addr64_t)cp, cnt, cppvPsnk | cppvNoRefSrc | cppvNoModSnk)) /* Copy virtual to physical */
-                                       error = EFAULT;
+                               panic("copyv2p not implemented yet\n");
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_END,
                                         iov->iov_base, cp, cnt, 1,0);