mb/google/nissa/var/rull: Add 6W and 15W DPTF parameters
[coreboot2.git] / src / drivers / intel / fsp2_0 / ppi / mp_service2.c
blob28bcadff55f67c8fe9a0789fd4c74f8c93901062
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <fsp/api.h>
4 #include <fsp/ppi/mp_service_ppi.h>
5 #include <Ppi/MpServices2.h>
7 typedef EDKII_PEI_MP_SERVICES2_PPI efi_pei_mp_services_ppi;
9 static __efiapi efi_return_status_t mps2_get_number_of_processors(
10 efi_pei_mp_services_ppi *ignored1,
11 efi_uintn_t *number_of_processors,
12 efi_uintn_t *number_of_enabled_processors)
14 return mp_get_number_of_processors(number_of_processors, number_of_enabled_processors);
17 static __efiapi efi_return_status_t mps2_get_processor_info(
18 efi_pei_mp_services_ppi *ignored1,
19 efi_uintn_t processor_number,
20 efi_processor_information *processor_info_buffer)
22 return mp_get_processor_info(processor_number, processor_info_buffer);
25 static __efiapi efi_return_status_t mps2_startup_all_aps(
26 efi_pei_mp_services_ppi *ignored1,
27 efi_ap_procedure procedure, efi_boolean_t run_serial,
28 efi_uintn_t timeout_usec, void *argument)
30 return mp_startup_all_aps(procedure, run_serial, timeout_usec, argument);
33 static __efiapi efi_return_status_t mps2_startup_all_cpus(
34 efi_pei_mp_services_ppi *ignored1,
35 efi_ap_procedure procedure,
36 efi_uintn_t timeout_usec, void *argument)
38 return mp_startup_all_cpus(procedure, timeout_usec, argument);
41 static __efiapi efi_return_status_t mps2_startup_this_ap(
42 efi_pei_mp_services_ppi *ignored1,
43 efi_ap_procedure procedure, efi_uintn_t processor_number,
44 efi_uintn_t timeout_usec, void *argument)
46 return mp_startup_this_ap(procedure, processor_number, timeout_usec, argument);
49 static __efiapi efi_return_status_t mps2_switch_bsp(
50 efi_pei_mp_services_ppi *ignored1, efi_uintn_t ignored2,
51 efi_boolean_t ignored3)
53 return mp_api_unsupported();
56 static __efiapi efi_return_status_t mps2_enable_disable_ap(
57 efi_pei_mp_services_ppi *ignored1,
58 efi_uintn_t ignored2, efi_boolean_t ignored3, efi_uint32_t *ignored4)
60 return mp_api_unsupported();
63 static __efiapi efi_return_status_t mps2_identify_processor(
64 efi_pei_mp_services_ppi *ignored1,
65 efi_uintn_t *processor_number)
67 return mp_identify_processor(processor_number);
70 /* edk2 UEFIPKG Open Source MP Services 2 PPI to be installed */
72 static efi_pei_mp_services_ppi mp_service2_ppi = {
73 mps2_get_number_of_processors,
74 mps2_get_processor_info,
75 mps2_startup_all_aps,
76 mps2_startup_this_ap,
77 mps2_switch_bsp,
78 mps2_enable_disable_ap,
79 mps2_identify_processor,
80 mps2_startup_all_cpus,
83 void *mp_fill_ppi_services_data(void)
85 return (void *)&mp_service2_ppi;