Browse Source

Add PHYS_CODE, for use as in __asm__ ( PHYS_CODE ( ... ) ), comparable

to the REAL_CODE interface.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
9196e9069c
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/arch/i386/include/librm.h

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

@@ -248,6 +248,12 @@ extern void remove_from_rm_stack ( void *data, size_t size );
248 248
 		      "\n\t"				\
249 249
 		      "ret\n\t" )
250 250
 
251
+/* PHYS_CODE: declare a fragment of code that executes in flat physical mode */
252
+#define PHYS_CODE( asm_code_str )			\
253
+	"call _virt_to_phys\n\t"			\
254
+	asm_code_str					\
255
+	"call _phys_to_virt\n\t"
256
+
251 257
 #endif /* ASSEMBLY */
252 258
 
253 259
 #endif /* LIBRM_H */

Loading…
Cancel
Save