summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2024-02-16 13:29:26 -0800
committerFelix Held <felix-coreboot@felixheld.de>2024-04-23 21:16:13 +0000
commit3f431844c6cecffa658ec7e2f97aaa903e898b12 (patch)
tree40ed9522fc5bc53895efc4ec1e27b5e1e3716087 /src/drivers/intel
parent859df7160a5982eeaff1aa18ce40fbd2ae6ee107 (diff)
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>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/util.h10
-rw-r--r--src/drivers/intel/fsp2_0/ppi/mp_service1.c14
-rw-r--r--src/drivers/intel/fsp2_0/ppi/mp_service2.c16
3 files changed, 20 insertions, 20 deletions
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h
index e89b7f8205..ce6666a453 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 @@ static inline const char *soc_select_fsp_s_cbfs(void)
}
#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 879a8e881a..3c036c1110 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 @@ static efi_return_status_t mps1_get_processor_info(const
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 @@ static efi_return_status_t mps1_startup_all_aps(const
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 @@ static efi_return_status_t mps1_startup_this_ap(const
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 fd91b46d4a..28bcadff55 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 @@ static efi_return_status_t mps2_get_number_of_processors(
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 @@ static efi_return_status_t mps2_get_processor_info(
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 @@ static efi_return_status_t mps2_startup_all_aps(
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 @@ static efi_return_status_t mps2_startup_all_cpus(
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 @@ static efi_return_status_t mps2_startup_this_ap(
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)
{