Browse Source

[i386] Move real_to_user() to realmode.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
81166302a0

+ 0
- 12
src/arch/i386/include/librm.h View File

170
 extern uint16_t __text16 ( rm_ds );
170
 extern uint16_t __text16 ( rm_ds );
171
 #define rm_ds __use_text16 ( rm_ds )
171
 #define rm_ds __use_text16 ( rm_ds )
172
 
172
 
173
-/**
174
- * Convert segment:offset address to user buffer
175
- *
176
- * @v segment		Real-mode segment
177
- * @v offset		Real-mode offset
178
- * @ret buffer		User buffer
179
- */
180
-static inline __always_inline userptr_t
181
-real_to_user ( unsigned int segment, unsigned int offset ) {
182
-	return ( phys_to_user ( ( segment << 4 ) + offset ) );
183
-}
184
-
185
 extern uint16_t copy_user_to_rm_stack ( userptr_t data, size_t size );
173
 extern uint16_t copy_user_to_rm_stack ( userptr_t data, size_t size );
186
 extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
174
 extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
187
 
175
 

+ 12
- 0
src/arch/i386/include/realmode.h View File

64
  * assembler output to make sure that it's doing the right thing.
64
  * assembler output to make sure that it's doing the right thing.
65
  */
65
  */
66
 
66
 
67
+/**
68
+ * Convert segment:offset address to user buffer
69
+ *
70
+ * @v segment		Real-mode segment
71
+ * @v offset		Real-mode offset
72
+ * @ret buffer		User buffer
73
+ */
74
+static inline __always_inline userptr_t
75
+real_to_user ( unsigned int segment, unsigned int offset ) {
76
+	return ( phys_to_user ( ( segment << 4 ) + offset ) );
77
+}
78
+
67
 /**
79
 /**
68
  * Copy data to base memory
80
  * Copy data to base memory
69
  *
81
  *

+ 1
- 0
src/arch/i386/interface/pxe/pxe_tftp.c View File

41
 #include <ipxe/open.h>
41
 #include <ipxe/open.h>
42
 #include <ipxe/process.h>
42
 #include <ipxe/process.h>
43
 #include <ipxe/uri.h>
43
 #include <ipxe/uri.h>
44
+#include <realmode.h>
44
 #include <pxe.h>
45
 #include <pxe.h>
45
 
46
 
46
 /** A PXE TFTP connection */
47
 /** A PXE TFTP connection */

+ 1
- 0
src/arch/i386/interface/pxe/pxe_udp.c View File

11
 #include <ipxe/udp.h>
11
 #include <ipxe/udp.h>
12
 #include <ipxe/uaccess.h>
12
 #include <ipxe/uaccess.h>
13
 #include <ipxe/process.h>
13
 #include <ipxe/process.h>
14
+#include <realmode.h>
14
 #include <pxe.h>
15
 #include <pxe.h>
15
 
16
 
16
 /*
17
 /*

Loading…
Cancel
Save