summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2016-02-26 16:33:40 +0100
committerMichael Brown2016-02-26 16:33:40 +0100
commit5bd8427d3dad38993c1f8f175454f7fde0af34ca (patch)
treede75a672e177f36fef93b81ada93c96541761310 /src/arch
parent[librm] Add support for running in 64-bit long mode (diff)
downloadipxe-5bd8427d3dad38993c1f8f175454f7fde0af34ca.tar.gz
ipxe-5bd8427d3dad38993c1f8f175454f7fde0af34ca.tar.xz
ipxe-5bd8427d3dad38993c1f8f175454f7fde0af34ca.zip
[ioapi] Split ioremap() out to a separate IOMAP API
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/core/x86_io.c3
-rw-r--r--src/arch/x86/include/bits/iomap.h12
-rw-r--r--src/arch/x86/include/ipxe/x86_io.h17
3 files changed, 13 insertions, 19 deletions
diff --git a/src/arch/x86/core/x86_io.c b/src/arch/x86/core/x86_io.c
index 3081fa8b..6c6b6e1e 100644
--- a/src/arch/x86/core/x86_io.c
+++ b/src/arch/x86/core/x86_io.c
@@ -74,9 +74,6 @@ static __unused void i386_writeq ( uint64_t data, volatile uint64_t *io_addr ) {
PROVIDE_IOAPI_INLINE ( x86, phys_to_bus );
PROVIDE_IOAPI_INLINE ( x86, bus_to_phys );
-PROVIDE_IOAPI_INLINE ( x86, ioremap );
-PROVIDE_IOAPI_INLINE ( x86, iounmap );
-PROVIDE_IOAPI_INLINE ( x86, io_to_bus );
PROVIDE_IOAPI_INLINE ( x86, readb );
PROVIDE_IOAPI_INLINE ( x86, readw );
PROVIDE_IOAPI_INLINE ( x86, readl );
diff --git a/src/arch/x86/include/bits/iomap.h b/src/arch/x86/include/bits/iomap.h
new file mode 100644
index 00000000..6110e318
--- /dev/null
+++ b/src/arch/x86/include/bits/iomap.h
@@ -0,0 +1,12 @@
+#ifndef _BITS_IOMAP_H
+#define _BITS_IOMAP_H
+
+/** @file
+ *
+ * x86-specific I/O mapping API implementations
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#endif /* _BITS_IOMAP_H */
diff --git a/src/arch/x86/include/ipxe/x86_io.h b/src/arch/x86/include/ipxe/x86_io.h
index 5214e9fb..a6ebe1f4 100644
--- a/src/arch/x86/include/ipxe/x86_io.h
+++ b/src/arch/x86/include/ipxe/x86_io.h
@@ -32,7 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define PAGE_SHIFT 12
/*
- * Physical<->Bus and Bus<->I/O address mappings
+ * Physical<->Bus address mappings
*
*/
@@ -46,21 +46,6 @@ IOAPI_INLINE ( x86, bus_to_phys ) ( unsigned long bus_addr ) {
return bus_addr;
}
-static inline __always_inline void *
-IOAPI_INLINE ( x86, ioremap ) ( unsigned long bus_addr, size_t len __unused ) {
- return ( bus_addr ? phys_to_virt ( bus_addr ) : NULL );
-}
-
-static inline __always_inline void
-IOAPI_INLINE ( x86, iounmap ) ( volatile const void *io_addr __unused ) {
- /* Nothing to do */
-}
-
-static inline __always_inline unsigned long
-IOAPI_INLINE ( x86, io_to_bus ) ( volatile const void *io_addr ) {
- return virt_to_phys ( io_addr );
-}
-
/*
* MMIO reads and writes up to native word size
*