浏览代码

[i386] Move real_to_user() to realmode.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 年前
父节点
当前提交
81166302a0

+ 0
- 12
src/arch/i386/include/librm.h 查看文件

@@ -170,18 +170,6 @@ extern uint16_t __text16 ( rm_cs );
170 170
 extern uint16_t __text16 ( rm_ds );
171 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 173
 extern uint16_t copy_user_to_rm_stack ( userptr_t data, size_t size );
186 174
 extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
187 175
 

+ 12
- 0
src/arch/i386/include/realmode.h 查看文件

@@ -64,6 +64,18 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
64 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 80
  * Copy data to base memory
69 81
  *

+ 1
- 0
src/arch/i386/interface/pxe/pxe_tftp.c 查看文件

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

+ 1
- 0
src/arch/i386/interface/pxe/pxe_udp.c 查看文件

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

正在加载...
取消
保存