From 30cca6ca2ad92c44104fc5a1f261356b038abe20 Mon Sep 17 00:00:00 2001 From: Aamir Bohra Date: Thu, 4 Feb 2021 20:57:51 +0530 Subject: drivers/intel/fsp2_0: Add support for MP services2 PPI Add support for MP services2 PPIs, which is slight modification over MP services 1 PPIs. A new API StartupAllCPUs have been added to allow running a task on BSP and all APs. Also the EFI_PEI_SERVICES parameter has been removed from all MP PPI APIs. This implementation also selects the respective MP services PPI version supported for SoCs BUG=b:169196864 Change-Id: Id74baf17fb90147d229c78be90268fdc3ec1badc Signed-off-by: Aamir Bohra Reviewed-on: https://review.coreboot.org/c/coreboot/+/49474 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- .../intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h | 36 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h') diff --git a/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h b/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h index 836e996631..3c30063111 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h +++ b/src/drivers/intel/fsp2_0/include/fsp/ppi/mp_service_ppi.h @@ -11,10 +11,36 @@ #include #include -/* - * SOC must call this function to get required EFI_PEI_MP_SERVICES_PPI - * structure. - */ -efi_pei_mp_services_ppi *mp_fill_ppi_services_data(void); +/* SOC must call this function to get required EFI_PEI_MP_SERVICES_PPI structure */ +void *mp_fill_ppi_services_data(void); + +/* get the number of logical processors in the platform */ +efi_return_status_t mp_get_number_of_processors(efi_uintn_t *number_of_processors, + efi_uintn_t *number_of_enabled_processors); + +/* get processor info such as id, status */ +efi_return_status_t mp_get_processor_info(efi_uintn_t processor_number, + efi_processor_information *processor_info_buffer); + +/* executes a caller provided function on all enabled APs */ +efi_return_status_t mp_startup_all_aps(efi_ap_procedure procedure, + efi_uintn_t timeout_usec, void *argument); + +/* executes a caller provided function on all enabled APs + BSP */ +efi_return_status_t mp_startup_all_cpus(efi_ap_procedure procedure, + efi_uintn_t timeout_usec, void *argument); + +/* executes a caller provided function on specific AP */ +efi_return_status_t mp_startup_this_ap(efi_ap_procedure procedure, + efi_uintn_t processor_number, efi_uintn_t timeout_usec, void *argument); + +/* get the processor instance */ +efi_return_status_t mp_identify_processor(efi_uintn_t *processor_number); + +/* for the APIs that are not supported/required */ +static inline efi_return_status_t mp_api_unsupported(void) +{ + return FSP_UNSUPPORTED; +} #endif /* MP_SERVICE_PPI_H */ -- cgit v1.2.3