summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/include/ipxe/bios_mp.h
blob: e2e83a15fc2d35f05d3906c44fba192a0adb4dcc (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
25
26
27
28
29
30
31
32
#ifndef _IPXE_BIOS_MP_H
#define _IPXE_BIOS_MP_H

/** @file
 *
 * BIOS multiprocessor API implementation
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

#include <ipxe/io.h>

#ifdef MPAPI_PCBIOS
#define MPAPI_PREFIX_pcbios
#else
#define MPAPI_PREFIX_pcbios __pcbios_
#endif

/**
 * Calculate address as seen by a multiprocessor function
 *
 * @v address		Address in boot processor address space
 * @ret address		Address in application processor address space
 */
static inline __attribute__ (( always_inline )) mp_addr_t
MPAPI_INLINE ( pcbios, mp_address ) ( void *address ) {

	return virt_to_phys ( address );
}

#endif /* _IPXE_BIOS_MP_H */