From 1ab4d3079d29e9ebee0c85f1aec14a3b1df8f679 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 13 Mar 2024 15:08:10 +0000 Subject: [mp] Define an API for multiprocessor functions Define an API for executing very limited functions on application processors in a multiprocessor system, along with an x86-only implementation. The normal iPXE runtime environment is effectively non-existent on application processors. There is no ability to make firmware calls (e.g. to write to a console), and there may be no stack space available. Signed-off-by: Michael Brown --- src/include/ipxe/null_mp.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/include/ipxe/null_mp.h (limited to 'src/include/ipxe/null_mp.h') diff --git a/src/include/ipxe/null_mp.h b/src/include/ipxe/null_mp.h new file mode 100644 index 00000000..f89da5d9 --- /dev/null +++ b/src/include/ipxe/null_mp.h @@ -0,0 +1,36 @@ +#ifndef _IPXE_NULL_MP_H +#define _IPXE_NULL_MP_H + +/** @file + * + * Null multiprocessor API implementation + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#ifdef MPAPI_NULL +#define MPAPI_PREFIX_null +#else +#define MPAPI_PREFIX_null __null_ +#endif + +static inline __attribute__ (( always_inline )) mp_addr_t +MPAPI_INLINE ( null, mp_address ) ( void *address ) { + + return ( ( mp_addr_t ) address ); +} + +static inline __attribute__ (( always_inline )) void +MPAPI_INLINE ( null, mp_exec_boot ) ( mp_func_t func __unused, + void *opaque __unused ) { + /* Do nothing */ +} + +static inline __attribute__ (( always_inline )) void +MPAPI_INLINE ( null, mp_start_all ) ( mp_func_t func __unused, + void *opaque __unused ) { + /* Do nothing */ +} + +#endif /* _IPXE_NULL_MP_H */ -- cgit v1.2.3-55-g7522