[PATCH v2 1/3] arch: arm: mach-socfpga: smc: Add dcache flushing and invalidation in smc_send_mailbox()

Chee, Tien Fong tien.fong.chee at altera.com
Thu Aug 21 05:22:13 CEST 2025



> -----Original Message-----
> From: Ng, Boon Khai <boon.khai.ng at altera.com>
> Sent: Thursday, August 14, 2025 11:18 AM
> To: U-boot Openlist <u-boot at lists.denx.de>
> Cc: Tom Rini <trini at konsulko.com>; Simon Glass <sjg at chromium.org>;
> Marek Vasut <marex at denx.de>; Simon Goldschmidt
> <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> <tien.fong.chee at altera.com>; Maniyam, Dinesh
> <dinesh.maniyam at altera.com>; Yuslaimi, Alif Zakuan
> <alif.zakuan.yuslaimi at altera.com>; Lim, Jit Loon <jit.loon.lim at altera.com>;
> Ng, Boon Khai <boon.khai.ng at altera.com>; Kathpalia, Tanmay
> <tanmay.kathpalia at altera.com>; Ilias Apalodimas
> <ilias.apalodimas at linaro.org>; Jerome Forissier
> <jerome.forissier at linaro.org>; Rao, Mahesh <mahesh.rao at altera.com>
> Subject: [PATCH v2 1/3] arch: arm: mach-socfpga: smc: Add dcache flushing
> and invalidation in smc_send_mailbox()
> 
> Adding the dcache flushing and invalidation in the smc_send_mailbox() At
> the same time replace the use of u64 with uintptr_t to ensure compatibility
> across different architectures and correct the pointer arithmetic for buffer
> end address calculation.
> 
> Signed-off-by: Mahesh Rao <mahesh.rao at altera.com>
> Signed-off-by: Boon Khai Ng <boon.khai.ng at altera.com>
> ---
>  arch/arm/mach-socfpga/smc_api.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-socfpga/smc_api.c b/arch/arm/mach-
> socfpga/smc_api.c index b212a94b321..a531030f5be 100644
> --- a/arch/arm/mach-socfpga/smc_api.c
> +++ b/arch/arm/mach-socfpga/smc_api.c
> @@ -57,6 +57,7 @@ int smc_send_mailbox(u32 cmd, u32 len, u32 *arg, u8
> urgent, u32 *resp_buf_len,
>  			 resp, ARRAY_SIZE(resp));
> 
>  	if (ret == INTEL_SIP_SMC_STATUS_OK && resp_buf &&
> resp_buf_len) {
> +		invalidate_dcache_range((uintptr_t)resp_buf,
> (uintptr_t)(resp_buf +
> +*resp_buf_len));
>  		if (!resp[0])
>  			*resp_buf_len = resp[1];
>  	}
> --
> 2.35.3

Reviewed-by: Tien Fong Chee <tien.fong.chee at altera.com>

Best regards,
Tien Fong



More information about the U-Boot mailing list