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 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 #ifdef IOMAP_PAGES
14 #define IOMAP_PREFIX_pages
15 #else
16 #define IOMAP_PREFIX_pages __pages_
17 #endif
18 
19 static inline __always_inline unsigned long
20 IOMAP_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 */
FILE_SECBOOT(PERMITTED)
unsigned long io_to_bus(volatile const void *io_addr)
Convert I/O address to bus address (for debug only)
unsigned long intptr_t
Definition: stdint.h:21
#define __always_inline
Declare a function to be always inline.
Definition: compiler.h:611
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static __always_inline unsigned long IOMAP_INLINE(pages, io_to_bus)(volatile const void *io_addr)
Definition: iomap_pages.h:20