diff options
author | Michael Brown | 2024-03-13 16:16:47 +0100 |
---|---|---|
committer | Michael Brown | 2024-03-15 14:26:53 +0100 |
commit | 89bb926a041b03c3926bf21266cbdf735d9aee66 (patch) | |
tree | a311ed537893b42e25dec583665777db6a0d99ac /src/include/ipxe/efi/efi_mp.h | |
parent | [mp] Define an API for multiprocessor functions (diff) | |
download | ipxe-89bb926a041b03c3926bf21266cbdf735d9aee66.tar.gz ipxe-89bb926a041b03c3926bf21266cbdf735d9aee66.tar.xz ipxe-89bb926a041b03c3926bf21266cbdf735d9aee66.zip |
[efi] Provide a multiprocessor API for EFI
Provide an implementation of the iPXE multiprocessor API for EFI,
based on using EFI_MP_SERVICES to start up a wrapper function on all
application processors.
Note that the processor numbers used by EFI_MP_SERVICES are opaque
integers that bear no relation to the underlying CPU identity
(e.g. the APIC ID), and so we must rely on our own (architecture-
specific) implementation to determine the relevant CPU identifiers.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi/efi_mp.h')
-rw-r--r-- | src/include/ipxe/efi/efi_mp.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/ipxe/efi/efi_mp.h b/src/include/ipxe/efi/efi_mp.h new file mode 100644 index 00000000..8dc4243e --- /dev/null +++ b/src/include/ipxe/efi/efi_mp.h @@ -0,0 +1,30 @@ +#ifndef _IPXE_EFI_MP_H +#define _IPXE_EFI_MP_H + +/** @file + * + * EFI multiprocessor API implementation + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#ifdef MPAPI_EFI +#define MPAPI_PREFIX_efi +#else +#define MPAPI_PREFIX_efi __efi_ +#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 ( efi, mp_address ) ( void *address ) { + + return ( ( mp_addr_t ) address ); +} + +#endif /* _IPXE_EFI_MP_H */ |