From c74de0dea765159e9d7b2f3541b389e95012e063 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Fri, 27 Sep 2024 15:33:14 +0530 Subject: soc/intel: Correct return type of fsp_get_pch_reset_status() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84571 Reviewed-by: Jérémy Compostella Reviewed-by: Christian Walter Reviewed-by: Karthik Ramasubramanian Tested-by: build bot (Jenkins) --- src/soc/intel/meteorlake/chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/soc/intel/meteorlake') diff --git a/src/soc/intel/meteorlake/chip.c b/src/soc/intel/meteorlake/chip.c index 84b9235b25..d2011f9899 100644 --- a/src/soc/intel/meteorlake/chip.c +++ b/src/soc/intel/meteorlake/chip.c @@ -264,7 +264,7 @@ static void soc_enable(struct device *dev) static void soc_init_final_device(void *chip_info) { - uint32_t reset_status = fsp_get_pch_reset_status(); + efi_return_status_t reset_status = fsp_get_pch_reset_status(); if (reset_status == FSP_SUCCESS) return; @@ -273,8 +273,8 @@ static void soc_init_final_device(void *chip_info) fsp_handle_reset(reset_status); /* Control shouldn't return here */ - die_with_post_code(POSTCODE_HW_INIT_FAILURE, - "Failed to handle the FSP reset request with error 0x%08x\n", reset_status); + fsp_die_with_post_code(reset_status, POSTCODE_HW_INIT_FAILURE, + "Failed to handle the FSP reset request with error"); } struct chip_operations soc_intel_meteorlake_ops = { -- cgit v1.2.3