diff options
author | Michael Brown | 2024-03-15 18:30:21 +0100 |
---|---|---|
committer | Michael Brown | 2024-03-15 18:30:21 +0100 |
commit | 1344e13a03cb6ed25372651cae6b057b863c89be (patch) | |
tree | 16c62043094c652a3179ec302b436185f3c5b822 /src/arch/x86/include/ipxe/bios_mp.h | |
parent | [librm] Add support for installing a startup IPI handler (diff) | |
download | ipxe-1344e13a03cb6ed25372651cae6b057b863c89be.tar.gz ipxe-1344e13a03cb6ed25372651cae6b057b863c89be.tar.xz ipxe-1344e13a03cb6ed25372651cae6b057b863c89be.zip |
[bios] Provide a multiprocessor API for BIOS
Provide an implementation of the iPXE multiprocessor API for BIOS,
based on sending broadcast INIT and SIPI interprocessor interrupts to
start up all application processors.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/x86/include/ipxe/bios_mp.h')
-rw-r--r-- | src/arch/x86/include/ipxe/bios_mp.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 */ |