iPXE
bios_mp.h
Go to the documentation of this file.
1 #ifndef _IPXE_BIOS_MP_H
2 #define _IPXE_BIOS_MP_H
3 
4 /** @file
5  *
6  * BIOS multiprocessor API implementation
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <ipxe/io.h>
13 
14 #ifdef MPAPI_PCBIOS
15 #define MPAPI_PREFIX_pcbios
16 #else
17 #define MPAPI_PREFIX_pcbios __pcbios_
18 #endif
19 
20 /**
21  * Calculate address as seen by a multiprocessor function
22  *
23  * @v address Address in boot processor address space
24  * @ret address Address in application processor address space
25  */
26 static inline __attribute__ (( always_inline )) mp_addr_t
27 MPAPI_INLINE ( pcbios, mp_address ) ( void *address ) {
28 
29  return virt_to_phys ( address );
30 }
31 
32 #endif /* _IPXE_BIOS_MP_H */
static mp_address(void *address)
Calculate address as seen by a multiprocessor function.
Definition: bios_mp.h:27
iPXE I/O API
uint64_t address
Base address.
Definition: ena.h:24
#define MPAPI_INLINE(_subsys, _api_func)
Calculate static inline multiprocessor API function name.
Definition: mp.h:81
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
Definition: uaccess.h:287
unsigned long mp_addr_t
An address within the address space for a multiprocessor function.
Definition: mp.h:24
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static __attribute__((always_inline)) mp_addr_t MPAPI_INLINE(pcbios
Calculate address as seen by a multiprocessor function.