浏览代码

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

to the REAL_CODE interface.
tags/v0.9.3
Michael Brown 18 年前
父节点
当前提交
9196e9069c
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      src/arch/i386/include/librm.h

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

248
 		      "\n\t"				\
248
 		      "\n\t"				\
249
 		      "ret\n\t" )
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
 #endif /* ASSEMBLY */
257
 #endif /* ASSEMBLY */
252
 
258
 
253
 #endif /* LIBRM_H */
259
 #endif /* LIBRM_H */

正在加载...
取消
保存