summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/include/ipxe/iomap_pages.h
blob: 18e0a3002aef4f8f55eb6c00e0fd54c0df514a74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 */