From 2d89c7821744de70e5bddd3a1659dd43c4be5d4e Mon Sep 17 00:00:00 2001
From: Appukuttan V K <appukuttan.vk@intel.com>
Date: Tue, 2 Apr 2024 17:26:25 +0530
Subject: drivers/intel/fsp2_0: Introduce fsp print helper macros

This patch introduces fsp print helper macros to print
`efi_return_status_t' with the appropriate format. These macros
are now used for fsp debug prints with return status

efi_return_status_t is defined as UINT64 or UNIT32 based on the
selected architecture

BUG=b:329034258
TEST=Verified on Meteor Lake board (Rex)

Change-Id: If6342c4d40c76b702351070e424797c21138a4a9
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81630
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
 src/soc/amd/common/fsp/fsp_reset.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/soc/amd')

diff --git a/src/soc/amd/common/fsp/fsp_reset.c b/src/soc/amd/common/fsp/fsp_reset.c
index 0a89dc728a..761ba2bdbb 100644
--- a/src/soc/amd/common/fsp/fsp_reset.c
+++ b/src/soc/amd/common/fsp/fsp_reset.c
@@ -6,10 +6,9 @@
 #include <fsp/util.h>
 #include <stdint.h>
 
-void chipset_handle_reset(uint32_t status)
+void chipset_handle_reset(efi_return_status_t status)
 {
-	printk(BIOS_ERR, "unexpected call to %s(0x%08x).  Doing cold reset.\n",
-			__func__, status);
+	fsp_printk(status, BIOS_ERR, "Doing cold reset due to unexpected call to %s", __func__);
 	BUG();
 	do_cold_reset();
 }
-- 
cgit v1.2.3