2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-16 00:01:34 +00:00
xNBA/src/include/gpxe/uaccess.h
Michael Brown d48d0fb1bb Add the concept of a "user pointer" (similar to the void __user * in
the kernel), which encapsulates the information needed to refer to an
external buffer.  Under normal operation, this can just be a void *
equivalent, but under -DKEEP_IT_REAL it would be a segoff_t equivalent.

Use this concept to avoid the need for bounce buffers in int13.c,
which reduces memory usage and opens up the possibility of using
multi-sector reads.

Extend the block-device API and the SCSI block device implementation
to support multi-sector reads.

Update iscsi.c to use user buffers.

Move the obsolete portions of realmode.h to old_realmode.h.

MS-DOS now boots an order of magnitude faster over iSCSI (~10 seconds
from power-up to C:> prompt in bochs).
2006-05-19 15:06:51 +00:00

25 lines
750 B
C

#ifndef _GPXE_UACCESS_H
#define _GPXE_UACCESS_H
/**
* @file
*
* Access to external ("user") memory
*
* gPXE often needs to transfer data between internal and external
* buffers. On i386, the external buffers may require access via a
* different segment, and the buffer address cannot be encoded into a
* simple void * pointer. The @c userptr_t type encapsulates the
* information needed to identify an external buffer, and the
* copy_to_user() and copy_from_user() functions provide methods for
* transferring data between internal and external buffers.
*
* Note that userptr_t is an opaque type; in particular, performing
* arithmetic upon a userptr_t is not allowed.
*
*/
#include <bits/uaccess.h>
#endif /* _GPXE_UACCESS_H */