Home | History | Annotate | Line # | Download | only in rumpkern
rump_private.h revision 1.3.2.5
      1  1.3.2.5     joerg /*	$NetBSD: rump_private.h,v 1.3.2.5 2007/11/06 19:25:36 joerg Exp $	*/
      2  1.3.2.2     joerg 
      3  1.3.2.2     joerg /*
      4  1.3.2.2     joerg  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
      5  1.3.2.2     joerg  *
      6  1.3.2.2     joerg  * Development of this software was supported by Google Summer of Code.
      7  1.3.2.2     joerg  *
      8  1.3.2.2     joerg  * Redistribution and use in source and binary forms, with or without
      9  1.3.2.2     joerg  * modification, are permitted provided that the following conditions
     10  1.3.2.2     joerg  * are met:
     11  1.3.2.2     joerg  * 1. Redistributions of source code must retain the above copyright
     12  1.3.2.2     joerg  *    notice, this list of conditions and the following disclaimer.
     13  1.3.2.2     joerg  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.3.2.2     joerg  *    notice, this list of conditions and the following disclaimer in the
     15  1.3.2.2     joerg  *    documentation and/or other materials provided with the distribution.
     16  1.3.2.2     joerg  *
     17  1.3.2.2     joerg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
     18  1.3.2.2     joerg  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     19  1.3.2.2     joerg  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     20  1.3.2.2     joerg  * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     21  1.3.2.2     joerg  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22  1.3.2.2     joerg  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     23  1.3.2.2     joerg  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24  1.3.2.2     joerg  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25  1.3.2.2     joerg  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26  1.3.2.2     joerg  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27  1.3.2.2     joerg  * SUCH DAMAGE.
     28  1.3.2.2     joerg  */
     29  1.3.2.2     joerg 
     30  1.3.2.2     joerg #ifndef _SYS_RUMP_PRIVATE_H_
     31  1.3.2.2     joerg #define _SYS_RUMP_PRIVATE_H_
     32  1.3.2.2     joerg 
     33  1.3.2.2     joerg #include <sys/param.h>
     34  1.3.2.2     joerg #include <sys/types.h>
     35  1.3.2.2     joerg 
     36  1.3.2.2     joerg #include <sys/disklabel.h>
     37  1.3.2.2     joerg #include <sys/mount.h>
     38  1.3.2.2     joerg #include <sys/vnode.h>
     39  1.3.2.2     joerg 
     40  1.3.2.2     joerg #include <uvm/uvm.h>
     41  1.3.2.2     joerg #include <uvm/uvm_object.h>
     42  1.3.2.2     joerg #include <uvm/uvm_page.h>
     43  1.3.2.2     joerg 
     44  1.3.2.2     joerg #include "rump.h"
     45  1.3.2.2     joerg 
     46  1.3.2.3     joerg #if 0
     47  1.3.2.3     joerg #define DPRINTF(x) printf x
     48  1.3.2.3     joerg #else
     49  1.3.2.3     joerg #define DPRINTF(x)
     50  1.3.2.3     joerg #endif
     51  1.3.2.3     joerg 
     52  1.3.2.2     joerg struct lwp;
     53  1.3.2.2     joerg extern kauth_cred_t rump_cred;
     54  1.3.2.2     joerg extern struct vmspace rump_vmspace;
     55  1.3.2.2     joerg 
     56  1.3.2.2     joerg #define UIO_VMSPACE_SYS (&rump_vmspace)
     57  1.3.2.2     joerg 
     58  1.3.2.2     joerg struct rump_specpriv {
     59  1.3.2.2     joerg 	char	rsp_path[MAXPATHLEN+1];
     60  1.3.2.2     joerg 	int	rsp_fd;
     61  1.3.2.2     joerg 
     62  1.3.2.2     joerg 	struct partition *rsp_curpi;
     63  1.3.2.2     joerg 	struct partition rsp_pi;
     64  1.3.2.2     joerg 	struct disklabel rsp_dl;
     65  1.3.2.2     joerg };
     66  1.3.2.2     joerg 
     67  1.3.2.2     joerg #define RUMP_UBC_MAGIC_WINDOW (void *)0x37
     68  1.3.2.2     joerg 
     69  1.3.2.2     joerg void abort(void) __attribute__((__noreturn__));
     70  1.3.2.2     joerg 
     71  1.3.2.2     joerg void	rump_putnode(struct vnode *);
     72  1.3.2.2     joerg int	rump_recyclenode(struct vnode *);
     73  1.3.2.2     joerg 
     74  1.3.2.4  jmcneill struct ubc_window;
     75  1.3.2.4  jmcneill int	rump_ubc_magic_uiomove(void *, size_t, struct uio *, int *,
     76  1.3.2.4  jmcneill 			       struct ubc_window *);
     77  1.3.2.2     joerg 
     78  1.3.2.2     joerg void		rumpvm_init(void);
     79  1.3.2.3     joerg void		rump_sleepers_init(void);
     80  1.3.2.2     joerg struct vm_page	*rumpvm_makepage(struct uvm_object *, voff_t);
     81  1.3.2.2     joerg 
     82  1.3.2.2     joerg void		rumpvm_enterva(vaddr_t addr, struct vm_page *);
     83  1.3.2.2     joerg void		rumpvm_flushva(void);
     84  1.3.2.2     joerg 
     85  1.3.2.2     joerg #endif /* _SYS_RUMP_PRIVATE_H_ */
     86