u-boot/drivers/firmware
Dhruva Gole 0c4e36d65f firmware: ti_sci: fix the secure_hdr in do_xfer
The ti_sci driver in U-Boot has support for secure_msg as part of it's
do_xfer function. This let's U-boot send secure messages during boot up.

The protocol to send such secure messages is described as part of the
struct ti_sci_secure_msg_hdr. As part of this, there are 2 fields for
checksum and reserved that occupy the first 4 bytes of any secure
message. This is called as the secure_hdr.

As of now, the secure_hdr needs to be 0 init-ed before sending secure
messages. However the existing code was never putting the zero-inited vars
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make secure_hdr members 0, it automatically ensures
the first 4 bytes of secure_buf are 0.

Fixes: 32cd25128b ("firmware: Add basic support for TI System Control Interface (TI SCI)")
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
2024-02-06 16:31:06 -05:00
..
arm-ffa arm_ffa: fix: remove deadcode in ffa_print_error_log() 2023-10-30 15:32:49 -04:00
scmi firmware: scmi: support protocols on sandbox only if enabled 2023-11-28 22:31:03 -05:00
firmware-sandbox.c dm: test: Add "/firmware" node scan test 2018-09-29 11:49:35 -06:00
firmware-uclass.c treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
firmware-zynqmp.c mailbox: zynqmp: support mulitple mboxes via device-tree 2023-12-13 08:58:07 +01:00
Kconfig arm_ffa: introduce Arm FF-A support 2023-08-08 10:22:03 -04:00
Makefile firmware: add SCMI agent uclass 2020-09-30 11:55:23 -04:00
psci.c firmware: psci: enable DM_FLAG_PRE_RELOC 2023-04-25 15:31:28 -04:00
ti_sci_static_data.h tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
ti_sci.c firmware: ti_sci: fix the secure_hdr in do_xfer 2024-02-06 16:31:06 -05:00
ti_sci.h tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00