david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[i386] Move real_to_user() to realmode.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2015-03-05 02:30:58 +00:00
parent fbc4ba4b4e
commit 81166302a0
4 changed files with 14 additions and 12 deletions

View File

@ -170,18 +170,6 @@ extern uint16_t __text16 ( rm_cs );
extern uint16_t __text16 ( rm_ds );
#define rm_ds __use_text16 ( rm_ds )
/**
* Convert segment:offset address to user buffer
*
* @v segment Real-mode segment
* @v offset Real-mode offset
* @ret buffer User buffer
*/
static inline __always_inline userptr_t
real_to_user ( unsigned int segment, unsigned int offset ) {
return ( phys_to_user ( ( segment << 4 ) + offset ) );
}
extern uint16_t copy_user_to_rm_stack ( userptr_t data, size_t size );
extern void remove_user_from_rm_stack ( userptr_t data, size_t size );

View File

@ -64,6 +64,18 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
* assembler output to make sure that it's doing the right thing.
*/
/**
* Convert segment:offset address to user buffer
*
* @v segment Real-mode segment
* @v offset Real-mode offset
* @ret buffer User buffer
*/
static inline __always_inline userptr_t
real_to_user ( unsigned int segment, unsigned int offset ) {
return ( phys_to_user ( ( segment << 4 ) + offset ) );
}
/**
* Copy data to base memory
*

View File

@ -41,6 +41,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/open.h>
#include <ipxe/process.h>
#include <ipxe/uri.h>
#include <realmode.h>
#include <pxe.h>
/** A PXE TFTP connection */

View File

@ -11,6 +11,7 @@
#include <ipxe/udp.h>
#include <ipxe/uaccess.h>
#include <ipxe/process.h>
#include <realmode.h>
#include <pxe.h>
/*