diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-02-26 15:34:28 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-02-26 15:34:28 +0000 |
commit | 99b5216b1c71dba22dab734e0945887525493cde (patch) | |
tree | 30829acea232821f26d7bfb38aac5c089e252ef8 /src/arch/x86/include/ipxe | |
parent | 5bd8427d3dad38993c1f8f175454f7fde0af34ca (diff) | |
download | ipxe-99b5216b1c71dba22dab734e0945887525493cde.tar.gz |
[librm] Support ioremap() for addresses above 4GB in a 64-bit build
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/x86/include/ipxe')
-rw-r--r-- | src/arch/x86/include/ipxe/iomap_pages.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/arch/x86/include/ipxe/iomap_pages.h b/src/arch/x86/include/ipxe/iomap_pages.h new file mode 100644 index 000000000..18e0a3002 --- /dev/null +++ b/src/arch/x86/include/ipxe/iomap_pages.h @@ -0,0 +1,24 @@ +#ifndef _IPXE_IOMAP_PAGES_H +#define _IPXE_IOMAP_PAGES_H + +/** @file + * + * I/O mapping API using page tables + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#ifdef IOMAP_PAGES +#define IOMAP_PREFIX_pages +#else +#define IOMAP_PREFIX_pages __pages_ +#endif + +static inline __always_inline unsigned long +IOMAP_INLINE ( pages, io_to_bus ) ( volatile const void *io_addr ) { + /* Not easy to do; just return the CPU address for debugging purposes */ + return ( ( intptr_t ) io_addr ); +} + +#endif /* _IPXE_IOMAP_PAGES_H */ |