summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/librm.h
diff options
context:
space:
mode:
authorMichael Brown2007-01-11 19:40:46 +0100
committerMichael Brown2007-01-11 19:40:46 +0100
commit9196e9069ccd5b0f1729ca1c259f5688923df5bb (patch)
treefe56dc00705bb1a75668a039d4734e9bd129d0a1 /src/arch/i386/include/librm.h
parentCapable of loading a multiboot image into memory (diff)
downloadipxe-9196e9069ccd5b0f1729ca1c259f5688923df5bb.tar.gz
ipxe-9196e9069ccd5b0f1729ca1c259f5688923df5bb.tar.xz
ipxe-9196e9069ccd5b0f1729ca1c259f5688923df5bb.zip
Add PHYS_CODE, for use as in __asm__ ( PHYS_CODE ( ... ) ), comparable
to the REAL_CODE interface.
Diffstat (limited to 'src/arch/i386/include/librm.h')
-rw-r--r--src/arch/i386/include/librm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/i386/include/librm.h b/src/arch/i386/include/librm.h
index 7fc79517..19966c6d 100644
--- a/src/arch/i386/include/librm.h
+++ b/src/arch/i386/include/librm.h
@@ -248,6 +248,12 @@ extern void remove_from_rm_stack ( void *data, size_t size );
"\n\t" \
"ret\n\t" )
+/* PHYS_CODE: declare a fragment of code that executes in flat physical mode */
+#define PHYS_CODE( asm_code_str ) \
+ "call _virt_to_phys\n\t" \
+ asm_code_str \
+ "call _phys_to_virt\n\t"
+
#endif /* ASSEMBLY */
#endif /* LIBRM_H */