23 #ifndef _XENO_NUCLEUS_BUFD_H
24 #define _XENO_NUCLEUS_BUFD_H
29 #include <nucleus/types.h>
31 #ifdef CONFIG_XENO_OPT_PERVASIVE
39 struct mm_struct *b_mm;
44 void xnbufd_map_umem(
struct xnbufd *bufd,
45 void __user *ptr,
size_t len);
48 const void __user *ptr,
size_t len)
50 xnbufd_map_umem(bufd, (
void __user *)ptr, len);
54 void __user *ptr,
size_t len)
56 xnbufd_map_umem(bufd, ptr, len);
73 void xnbufd_map_kmem(
struct xnbufd *bufd,
74 void *ptr,
size_t len);
77 const void *ptr,
size_t len)
79 xnbufd_map_kmem(bufd, (
void *)ptr, len);
83 void *ptr,
size_t len)
85 xnbufd_map_kmem(bufd, ptr, len);
93 struct xnbufd *bufd,
size_t len);
96 void *from,
size_t len);
void xnbufd_invalidate(struct xnbufd *bufd)
Invalidate a buffer descriptor.
Definition: bufd.c:678
ssize_t xnbufd_unmap_kread(struct xnbufd *bufd)
Finalize a buffer descriptor obtained from xnbufd_map_kread().
Definition: bufd.c:760
static void xnbufd_map_kwrite(struct xnbufd *bufd, void *ptr, size_t len)
Initialize a buffer descriptor for writing to kernel memory.
Definition: bufd.h:82
ssize_t xnbufd_unmap_kwrite(struct xnbufd *bufd)
Finalize a buffer descriptor obtained from xnbufd_map_kwrite().
Definition: bufd.c:792
ssize_t xnbufd_unmap_uwrite(struct xnbufd *bufd)
Finalize a buffer descriptor obtained from xnbufd_map_uwrite().
Definition: bufd.c:596
ssize_t xnbufd_unmap_uread(struct xnbufd *bufd)
Finalize a buffer descriptor obtained from xnbufd_map_uread().
Definition: bufd.c:552
ssize_t xnbufd_copy_to_kmem(void *ptr, struct xnbufd *bufd, size_t len)
Copy memory covered by a buffer descriptor to kernel memory.
Definition: bufd.c:339
static void xnbufd_reset(struct xnbufd *bufd)
Reset a buffer descriptor.
Definition: bufd.h:100
static void xnbufd_map_uwrite(struct xnbufd *bufd, void __user *ptr, size_t len)
Initialize a buffer descriptor for writing to user memory.
Definition: bufd.h:53
static void xnbufd_map_uread(struct xnbufd *bufd, const void __user *ptr, size_t len)
Initialize a buffer descriptor for reading from user memory.
Definition: bufd.h:47
ssize_t xnbufd_copy_from_kmem(struct xnbufd *bufd, void *from, size_t len)
Copy kernel memory to the area covered by a buffer descriptor.
Definition: bufd.c:453
static void xnbufd_map_kread(struct xnbufd *bufd, const void *ptr, size_t len)
Initialize a buffer descriptor for reading from kernel memory.
Definition: bufd.h:76