We are currently doing TISCI interface testing through TDA4 / XJ721E SOC HS equipment. I added TISCI_MSG_SA2UL_SET_DKEK and TISCI_MSG_SA2UL_GET_DKEK functions in TISCI driver by referring to other TISCI functions. Howerver, ti_sci_is_response_ack(resp) return false in linux kernel and u-boot. In other words, I received a reply, but the ACK bit of the flag was not set. Furthermore, I did a test in ti-boot3. At this time, SET_DKEK and other interfaces can work normally. why is this happening? What I know is that the linux kernel and u-boot run on A72, the host ID is 0x0c, while tiboot3 runs on R5, the host ID is 0x04, and the rest of the sending parameters are the same.
xfer->xfer_buf[0~40]={0x03,0x90,0x0c,0x00,0x02,0x00,0x00,0x00,0x00,0x05,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x00,0x00,0x00,0x00,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3d,0x01,0x3d,0x01,0x00}.
The response message is,
xfer->xfer_buf[0~7]={0x03,0x90,0x0c,0x00,0x00,0x00,0x00,0x00}.
/* in the ti_sci.h */
#define TI_SCI_MSG_SA2UL_SET_DKEK 0x9003
struct ti_sci_msg_req_sa2ul_set_dkek {
#define KDF_LABEL_AND_CONTEXT_LEN_MAX 30
struct ti_sci_msg_hdr hdr;
u8 sa2ul_instance;
u8 kdf_label_len;
u8 kdf_context_len;
u8 kdf_label_and_context[KDF_LABEL_AND_CONTEXT_LEN_MAX];
}__unpacked
struct ti_sci_msg_resp_sa2ul_set_dkek {
struct ti_sci_msg_hdr hdr;
}__unpacked
/* in the ti_sci.c */
struct ti_sci_msg_req_sa2ul_set_dkek *req;
struct ti_sci_msg_resp_sa2ul_set_dkek *resp;
xfer= ti_sci_get_one_xfer(info,TI_SCI_MSG_SA2UL_SET_DKEK,
TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
sizeof(*req),sizeof(*resp));
req=(struct ti_sci_msg_req_sa2ul_set_dkek *)xfer->xfer_buf;
req->sa2ul_instance=0;
req->kdf_label=10;
req->kdf_context_len=10;
ret=ti_sci_do_xfer(info,xfer);
resp=(struct ti_sci_msg_resp_sa2ul_set_dkek *)xfer->xfer_buf;
if(!ti_sci_is_response_ack(resp))
ret=-ENODEV;
}