Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/80277?usp=email )
Change subject: drivers/intel/fsp2_0: Support FSP 2.4 64-bits ......................................................................
drivers/intel/fsp2_0: Support FSP 2.4 64-bits
FSP 2.4 brings FSP 64-bits support which requires some adjustments in coreboot:
FSP/UEFI uses the Microsoft x64 calling convention. Appropriate attribute has to be set to all functions calling or called by the FSP.
BUG=b:329034258 TEST=verified on Lunar Lake RVP board (lnlrvp)
Change-Id: If0397f5cc8d0f4f1872bd37a001fe42e0c37ec99 Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/80277 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Subrata Banik subratabanik@google.com Reviewed-by: Krishna P Bhat D krishna.p.bhat.d@intel.com --- M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/ppi/mp_service1.c M src/drivers/intel/fsp2_0/ppi/mp_service2.c M src/include/efi/efi_datatype.h 4 files changed, 21 insertions(+), 21 deletions(-)
Approvals: Subrata Banik: Looks good to me, approved Krishna P Bhat D: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index e89b7f8..ce6666a 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -218,12 +218,12 @@ } #endif
-typedef asmlinkage uint32_t (*temp_ram_exit_fn)(void *param); -typedef asmlinkage uint32_t (*fsp_memory_init_fn) +typedef __efiapi efi_return_status_t (*temp_ram_exit_fn)(void *param); +typedef __efiapi efi_return_status_t (*fsp_memory_init_fn) (void *raminit_upd, void **hob_list); -typedef asmlinkage uint32_t (*fsp_silicon_init_fn)(void *silicon_upd); -typedef asmlinkage uint32_t (*fsp_multi_phase_init_fn)(struct fsp_multi_phase_params *); -typedef asmlinkage uint32_t (*fsp_notify_fn)(struct fsp_notify_params *); +typedef __efiapi efi_return_status_t (*fsp_silicon_init_fn)(void *silicon_upd); +typedef __efiapi efi_return_status_t (*fsp_multi_phase_init_fn)(struct fsp_multi_phase_params *); +typedef __efiapi efi_return_status_t (*fsp_notify_fn)(struct fsp_notify_params *); #include <fsp/debug.h>
#endif /* _FSP2_0_UTIL_H_ */ diff --git a/src/drivers/intel/fsp2_0/ppi/mp_service1.c b/src/drivers/intel/fsp2_0/ppi/mp_service1.c index 879a8e8..3c036c1 100644 --- a/src/drivers/intel/fsp2_0/ppi/mp_service1.c +++ b/src/drivers/intel/fsp2_0/ppi/mp_service1.c @@ -6,14 +6,14 @@
typedef EFI_PEI_MP_SERVICES_PPI efi_pei_mp_services_ppi;
-static efi_return_status_t mps1_get_number_of_processors(const +static __efiapi efi_return_status_t mps1_get_number_of_processors(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_uintn_t *number_of_processors, efi_uintn_t *number_of_enabled_processors) { return mp_get_number_of_processors(number_of_processors, number_of_enabled_processors); }
-static efi_return_status_t mps1_get_processor_info(const +static __efiapi efi_return_status_t mps1_get_processor_info(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_uintn_t processor_number, efi_processor_information *processor_info_buffer) @@ -21,7 +21,7 @@ return mp_get_processor_info(processor_number, processor_info_buffer); }
-static efi_return_status_t mps1_startup_all_aps(const +static __efiapi efi_return_status_t mps1_startup_all_aps(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_ap_procedure procedure, efi_boolean_t run_serial, efi_uintn_t timeout_usec, void *argument) @@ -29,7 +29,7 @@ return mp_startup_all_aps(procedure, run_serial, timeout_usec, argument); }
-static efi_return_status_t mps1_startup_this_ap(const +static __efiapi efi_return_status_t mps1_startup_this_ap(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_ap_procedure procedure, efi_uintn_t processor_number, efi_uintn_t timeout_usec, void *argument) @@ -37,21 +37,21 @@ return mp_startup_this_ap(procedure, processor_number, timeout_usec, argument); }
-static efi_return_status_t mps1_switch_bsp(const efi_pei_services **ignored1, +static __efiapi efi_return_status_t mps1_switch_bsp(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_uintn_t ignored3, efi_boolean_t ignored4) { return mp_api_unsupported(); }
-static efi_return_status_t mps1_enable_disable_ap(const +static __efiapi efi_return_status_t mps1_enable_disable_ap(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_uintn_t ignored3, efi_boolean_t ignored4, efi_uint32_t *ignored5) { return mp_api_unsupported(); }
-static efi_return_status_t mps1_identify_processor(const +static __efiapi efi_return_status_t mps1_identify_processor(const efi_pei_services **ignored1, efi_pei_mp_services_ppi *ignored2, efi_uintn_t *processor_number) { diff --git a/src/drivers/intel/fsp2_0/ppi/mp_service2.c b/src/drivers/intel/fsp2_0/ppi/mp_service2.c index fd91b46..28bcadf 100644 --- a/src/drivers/intel/fsp2_0/ppi/mp_service2.c +++ b/src/drivers/intel/fsp2_0/ppi/mp_service2.c @@ -6,7 +6,7 @@
typedef EDKII_PEI_MP_SERVICES2_PPI efi_pei_mp_services_ppi;
-static efi_return_status_t mps2_get_number_of_processors( +static __efiapi efi_return_status_t mps2_get_number_of_processors( efi_pei_mp_services_ppi *ignored1, efi_uintn_t *number_of_processors, efi_uintn_t *number_of_enabled_processors) @@ -14,7 +14,7 @@ return mp_get_number_of_processors(number_of_processors, number_of_enabled_processors); }
-static efi_return_status_t mps2_get_processor_info( +static __efiapi efi_return_status_t mps2_get_processor_info( efi_pei_mp_services_ppi *ignored1, efi_uintn_t processor_number, efi_processor_information *processor_info_buffer) @@ -22,7 +22,7 @@ return mp_get_processor_info(processor_number, processor_info_buffer); }
-static efi_return_status_t mps2_startup_all_aps( +static __efiapi efi_return_status_t mps2_startup_all_aps( efi_pei_mp_services_ppi *ignored1, efi_ap_procedure procedure, efi_boolean_t run_serial, efi_uintn_t timeout_usec, void *argument) @@ -30,7 +30,7 @@ return mp_startup_all_aps(procedure, run_serial, timeout_usec, argument); }
-static efi_return_status_t mps2_startup_all_cpus( +static __efiapi efi_return_status_t mps2_startup_all_cpus( efi_pei_mp_services_ppi *ignored1, efi_ap_procedure procedure, efi_uintn_t timeout_usec, void *argument) @@ -38,7 +38,7 @@ return mp_startup_all_cpus(procedure, timeout_usec, argument); }
-static efi_return_status_t mps2_startup_this_ap( +static __efiapi efi_return_status_t mps2_startup_this_ap( efi_pei_mp_services_ppi *ignored1, efi_ap_procedure procedure, efi_uintn_t processor_number, efi_uintn_t timeout_usec, void *argument) @@ -46,21 +46,21 @@ return mp_startup_this_ap(procedure, processor_number, timeout_usec, argument); }
-static efi_return_status_t mps2_switch_bsp( +static __efiapi efi_return_status_t mps2_switch_bsp( efi_pei_mp_services_ppi *ignored1, efi_uintn_t ignored2, efi_boolean_t ignored3) { return mp_api_unsupported(); }
-static efi_return_status_t mps2_enable_disable_ap( +static __efiapi efi_return_status_t mps2_enable_disable_ap( efi_pei_mp_services_ppi *ignored1, efi_uintn_t ignored2, efi_boolean_t ignored3, efi_uint32_t *ignored4) { return mp_api_unsupported(); }
-static efi_return_status_t mps2_identify_processor( +static __efiapi efi_return_status_t mps2_identify_processor( efi_pei_mp_services_ppi *ignored1, efi_uintn_t *processor_number) { diff --git a/src/include/efi/efi_datatype.h b/src/include/efi/efi_datatype.h index 8a1a124..0333a84 100644 --- a/src/include/efi/efi_datatype.h +++ b/src/include/efi/efi_datatype.h @@ -81,6 +81,6 @@ */ typedef void -(EFIAPI *efi_ap_procedure)(void *buffer); +(__efiapi *efi_ap_procedure)(void *buffer);
#endif