]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[i386] Move real_to_user() to realmode.h
authorMichael Brown <mcb30@ipxe.org>
Thu, 5 Mar 2015 02:30:58 +0000 (02:30 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 5 Mar 2015 02:30:58 +0000 (02:30 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/include/librm.h
src/arch/i386/include/realmode.h
src/arch/i386/interface/pxe/pxe_tftp.c
src/arch/i386/interface/pxe/pxe_udp.c

index c37373ddc8214cd0e1f20475deed3d982af52ae3..a8a578a390fd7b718e97c0780f781223137c1424 100644 (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 );
 
index 5727e5ac53d997b02fb032eeb1b4c31c9207ea9d..4defd3b9743675ba5e056205b8b419a1c3d8cb82 100644 (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
  *
index 9ec3e96e756a259d4ff0c04a43b95df0fce359ff..068d8a7b27f1a96779b25edd5b119ba0ac8a50bd 100644 (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 */
index 81e873f13000d244e4bb147f882f107c7a7243a0..071cb59dbe225c0125ae6e1e448c884d749f5ae3 100644 (file)
@@ -11,6 +11,7 @@
 #include <ipxe/udp.h>
 #include <ipxe/uaccess.h>
 #include <ipxe/process.h>
+#include <realmode.h>
 #include <pxe.h>
 
 /*