1 #ifndef _GPXE_UACCESS_H
2 #define _GPXE_UACCESS_H
7 * Access to external ("user") memory
9 * gPXE often needs to transfer data between internal and external
10 * buffers. On i386, the external buffers may require access via a
11 * different segment, and the buffer address cannot be encoded into a
12 * simple void * pointer. The @c userptr_t type encapsulates the
13 * information needed to identify an external buffer, and the
14 * copy_to_user() and copy_from_user() functions provide methods for
15 * transferring data between internal and external buffers.
17 * Note that userptr_t is an opaque type; in particular, performing
18 * arithmetic upon a userptr_t is not allowed.
22 #include <bits/uaccess.h>
24 /** Equivalent of NULL for user pointers */
25 #define UNULL ( ( userptr_t ) 0 )
27 #endif /* _GPXE_UACCESS_H */