xref: /aosp_15_r20/external/coreboot/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef MP_SERVICE_PPI_H
4 #define MP_SERVICE_PPI_H
5 
6 /*
7  * This file to implement MP_SERVICES_PPI for Intel FSP to use.
8  * More details about this PPI can be found here :
9  * http://github.com/tianocore/edk2/blob/master/MdePkg/Include/Ppi/MpServices.h
10  */
11 #include <efi/efi_datatype.h>
12 #include <fsp/soc_binding.h>
13 
14 /* SOC must call this function to get required EFI_PEI_MP_SERVICES_PPI structure */
15 void *mp_fill_ppi_services_data(void);
16 
17 /* get the number of logical processors in the platform */
18 efi_return_status_t mp_get_number_of_processors(efi_uintn_t *number_of_processors,
19 	efi_uintn_t *number_of_enabled_processors);
20 
21 /* get processor info such as id, status */
22 efi_return_status_t mp_get_processor_info(efi_uintn_t processor_number,
23 	efi_processor_information *processor_info_buffer);
24 
25 /* executes a caller provided function on all enabled APs */
26 efi_return_status_t mp_startup_all_aps(efi_ap_procedure procedure,
27 	bool run_serial, efi_uintn_t timeout_usec, void *argument);
28 
29 /* executes a caller provided function on all enabled APs + BSP */
30 efi_return_status_t mp_startup_all_cpus(efi_ap_procedure procedure,
31 	efi_uintn_t timeout_usec, void *argument);
32 
33 /* executes a caller provided function on specific AP */
34 efi_return_status_t mp_startup_this_ap(efi_ap_procedure procedure,
35 	efi_uintn_t processor_number, efi_uintn_t timeout_usec, void *argument);
36 
37 /* get the processor instance */
38 efi_return_status_t mp_identify_processor(efi_uintn_t *processor_number);
39 
40 /* for the APIs that are not supported/required */
mp_api_unsupported(void)41 static inline efi_return_status_t mp_api_unsupported(void)
42 {
43 	return FSP_UNSUPPORTED;
44 }
45 
46 #endif	/* MP_SERVICE_PPI_H */
47