iPXE
iomap_pages.h
Go to the documentation of this file.
1#ifndef _IPXE_IOMAP_PAGES_H
2#define _IPXE_IOMAP_PAGES_H
3
4/** @file
5 *
6 * I/O mapping API using page tables
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#ifdef IOMAP_PAGES
14#define IOMAP_PREFIX_pages
15#else
16#define IOMAP_PREFIX_pages __pages_
17#endif
18
19static inline __always_inline unsigned long
20IOMAP_INLINE ( pages, io_to_bus ) ( volatile const void *io_addr ) {
21 /* Not easy to do; just return the CPU address for debugging purposes */
22 return ( ( intptr_t ) io_addr );
23}
24
25#endif /* _IPXE_IOMAP_PAGES_H */
unsigned long intptr_t
Definition stdint.h:21
#define __always_inline
Declare a function to be always inline.
Definition compiler.h:611
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define IOMAP_INLINE(_subsys, _api_func)
Calculate static inline I/O mapping API function name.
Definition iomap.h:26
unsigned long io_to_bus(volatile const void *io_addr)
Convert I/O address to bus address (for debug only)