summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2024-09-27 15:33:14 +0530
committerFelix Held <felix-coreboot@felixheld.de>2024-10-01 21:34:49 +0000
commitc74de0dea765159e9d7b2f3541b389e95012e063 (patch)
tree7a50579c8b60a1472f149e7297a036c6f6685b2d /src/soc/intel/common
parent2ec9addc301151319cd73fe10b1e0acbccb8201b (diff)
soc/intel: Correct return type of fsp_get_pch_reset_status()
The `fsp_get_pch_reset_status()` function returns a FSP reset status code. This change corrects its return type from `uint32_t` to `efi_return_status_t` to ensure consistency with the FSP API and prevent potential issues caused by type mismatch. This correction is necessary for compatibility with both 32-bit and 64-bit FSP interfaces. The change also updates all callers of this function in the Meteor Lake and Panther Lake SoCs to use the correct return type. Includes `fsp/api.h` to provide the `efi_return_status_t` definition. BUG=b:347669091 TEST=Verified global reset functionality on google/rex0 (32-bit) and google/rex64 (64-bit) platforms. Change-Id: I0cdee541506bf424f50fd00833d5ee200a3a8a48 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84571 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/fsp_reset.c4
-rw-r--r--src/soc/intel/common/reset.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/soc/intel/common/fsp_reset.c b/src/soc/intel/common/fsp_reset.c
index 2626c39413..983d4fce53 100644
--- a/src/soc/intel/common/fsp_reset.c
+++ b/src/soc/intel/common/fsp_reset.c
@@ -41,7 +41,7 @@ void chipset_handle_reset(efi_return_status_t status)
die("unknown reset type");
}
-static uint32_t fsp_reset_type_to_status(EFI_RESET_TYPE reset_type)
+static efi_return_status_t fsp_reset_type_to_status(EFI_RESET_TYPE reset_type)
{
efi_return_status_t status;
@@ -68,7 +68,7 @@ static uint32_t fsp_reset_type_to_status(EFI_RESET_TYPE reset_type)
* If reset type is `EfiResetPlatformSpecific` then relying on pch_reset_data structure
* to know if the reset type is a global reset.
*/
-uint32_t fsp_get_pch_reset_status(void)
+efi_return_status_t fsp_get_pch_reset_status(void)
{
size_t size;
const struct fsp_reset_hob *hob = fsp_find_extension_hob_by_guid(fsp_reset_guid, &size);
diff --git a/src/soc/intel/common/reset.h b/src/soc/intel/common/reset.h
index d9c6ac6228..658223c32a 100644
--- a/src/soc/intel/common/reset.h
+++ b/src/soc/intel/common/reset.h
@@ -3,6 +3,8 @@
#ifndef _INTEL_COMMON_RESET_H_
#define _INTEL_COMMON_RESET_H_
+#include <efi/efi_datatype.h>
+
/*
* Implement SoC specific global reset (i.e. a reset of both host and
* ME partitions). Usually the ME is asked to perform the reset first.
@@ -21,6 +23,6 @@ __noreturn void global_reset(void);
* If reset type if `EfiResetPlatformSpecific` then relying on pch_reset_data structure
* to know if the reset type is a global reset.
*/
-uint32_t fsp_get_pch_reset_status(void);
+efi_return_status_t fsp_get_pch_reset_status(void);
#endif /* _INTEL_COMMON_RESET_H_ */