diff options
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r-- | src/arch/x86/include/bits/mp.h | 2 | ||||
-rw-r--r-- | src/arch/x86/include/ipxe/bios_mp.h | 32 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/arch/x86/include/bits/mp.h b/src/arch/x86/include/bits/mp.h index fe466b09..4541aca3 100644 --- a/src/arch/x86/include/bits/mp.h +++ b/src/arch/x86/include/bits/mp.h @@ -9,4 +9,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +#include <ipxe/bios_mp.h> + #endif /* _BITS_MP_H */ diff --git a/src/arch/x86/include/ipxe/bios_mp.h b/src/arch/x86/include/ipxe/bios_mp.h new file mode 100644 index 00000000..e2e83a15 --- /dev/null +++ b/src/arch/x86/include/ipxe/bios_mp.h @@ -0,0 +1,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 */ |