summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/virtaddr.h
diff options
context:
space:
mode:
authorMichael Brown2005-05-09 15:21:56 +0200
committerMichael Brown2005-05-09 15:21:56 +0200
commite3f2aa7b4ddd96e17c4d0bf3d3d39800ef2acc2a (patch)
tree96e44bc5d3ad25bbf117ec15580c51c00b2a35a6 /src/arch/i386/include/virtaddr.h
parentAdd memcpy (diff)
downloadipxe-e3f2aa7b4ddd96e17c4d0bf3d3d39800ef2acc2a.tar.gz
ipxe-e3f2aa7b4ddd96e17c4d0bf3d3d39800ef2acc2a.tar.xz
ipxe-e3f2aa7b4ddd96e17c4d0bf3d3d39800ef2acc2a.zip
Add off_t and physaddr_t, and the copy_{to,from}_phys helper routines.
Diffstat (limited to 'src/arch/i386/include/virtaddr.h')
-rw-r--r--src/arch/i386/include/virtaddr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/i386/include/virtaddr.h b/src/arch/i386/include/virtaddr.h
index 15fad1cc..3bc02833 100644
--- a/src/arch/i386/include/virtaddr.h
+++ b/src/arch/i386/include/virtaddr.h
@@ -45,6 +45,14 @@ static inline void * phys_to_virt ( unsigned long phys_addr ) {
return ( void * ) ( phys_addr - virt_offset );
}
+static inline void copy_to_phys ( physaddr_t dest, void *src, size_t len ) {
+ memcpy ( phys_to_virt ( dest ), src, len );
+}
+
+static inline void copy_from_phys ( void *dest, physaddr_t src, size_t len ) {
+ memcpy ( dest, phys_to_virt ( src ), len );
+}
+
#else /* KEEP_IT_REAL */
/*