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).
This commit is contained in:
Michael Brown
2006-05-19 15:06:51 +00:00
parent 0ab92faedb
commit d48d0fb1bb
11 changed files with 154 additions and 54 deletions

View File

@@ -149,25 +149,6 @@ typedef struct segoff segoff_t;
* "(discard)" in the above code.
*/
#warning "realmode.h contains placeholders for obsolete macros"
/* Just for now */
#define SEGMENT(x) ( virt_to_phys ( x ) >> 4 )
#define OFFSET(x) ( virt_to_phys ( x ) & 0xf )
#define SEGOFF(x) { OFFSET(x), SEGMENT(x) }
/* To make basemem.c compile */
extern int lock_real_mode_stack;
extern char *real_mode_stack;
extern char real_mode_stack_size[];
#define RM_FRAGMENT(name,asm) \
void name ( void ) {} \
extern char name ## _size[];
#endif /* ASSEMBLY */
#endif /* REALMODE_H */