mirror of https://github.com/ipxe/ipxe.git
[i386] Move real_to_user() to realmode.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/34/head
parent
fbc4ba4b4e
commit
81166302a0
|
@ -170,18 +170,6 @@ extern uint16_t __text16 ( rm_cs );
|
||||||
extern uint16_t __text16 ( rm_ds );
|
extern uint16_t __text16 ( rm_ds );
|
||||||
#define rm_ds __use_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 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 );
|
extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,18 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||||
* assembler output to make sure that it's doing the right thing.
|
* 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
|
* Copy data to base memory
|
||||||
*
|
*
|
||||||
|
|
|
@ -41,6 +41,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||||
#include <ipxe/open.h>
|
#include <ipxe/open.h>
|
||||||
#include <ipxe/process.h>
|
#include <ipxe/process.h>
|
||||||
#include <ipxe/uri.h>
|
#include <ipxe/uri.h>
|
||||||
|
#include <realmode.h>
|
||||||
#include <pxe.h>
|
#include <pxe.h>
|
||||||
|
|
||||||
/** A PXE TFTP connection */
|
/** A PXE TFTP connection */
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <ipxe/udp.h>
|
#include <ipxe/udp.h>
|
||||||
#include <ipxe/uaccess.h>
|
#include <ipxe/uaccess.h>
|
||||||
#include <ipxe/process.h>
|
#include <ipxe/process.h>
|
||||||
|
#include <realmode.h>
|
||||||
#include <pxe.h>
|
#include <pxe.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue