This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: optee:Message not acknowledged

Part Number: AM623

Tool/software:

Hi, TI expert! 

I have a development environment for am6234, with our own evaluation board.

The software SDK version is PROCESSOR-SDK-LINUX-RT-AM62X-10.01.10.04.

I can read otp efuse normally under optee, as shown in the following picture:

I am writing otp efuse on optee and encountering the following error:

I am using the SDK version PROCESSOR-SDK-LINUX-RT-AM62X-08.06.00.42, which can read and write otp efuse normally under optee

Here is the configuration file corresponding to PROCESSOR-SDK-LINUX-RT-AM62X-10.01.10.04 for this SDK:

// ti-processor-sdk-linux-rt-am62xx-evm-10.01.10.04\board-support\ti-u-boot-2024.04+git\board\ti\am62x\sec-cfg.yaml

    otp_config:
        subhdr:
            magic: 0x4081
            size: 69
        otp_entry:
            -  # 1
                host_id: 128
                host_perms: 2
            -  # 2
                host_id: 128
                host_perms: 2
            -  # 3
                host_id: 128
                host_perms: 2
            -  # 4
                host_id: 128
                host_perms: 2
            -  # 5
                host_id: 128
                host_perms: 2
            -  # 6
                host_id: 128
                host_perms: 2
            -  # 7
                host_id: 128
                host_perms: 2
            -  # 8
                host_id: 128
                host_perms: 2
            -  # 9
                host_id: 128
                host_perms: 2
            -  # 10
                host_id: 128
                host_perms: 2
            -  # 11
                host_id: 128
                host_perms: 2
            -  # 12
                host_id: 128
                host_perms: 2
            -  # 13
                host_id: 128
                host_perms: 2
            -  # 14
                host_id: 128
                host_perms: 2
            -  # 15
                host_id: 128
                host_perms: 2
            -  # 16
                host_id: 128
                host_perms: 2
            -  # 17
                host_id: 128
                host_perms: 2
            -  # 18
                host_id: 128
                host_perms: 2
            -  # 19
                host_id: 128
                host_perms: 2
            -  # 20
                host_id: 128
                host_perms: 2
            -  # 21
                host_id: 128
                host_perms: 2
            -  # 22
                host_id: 128
                host_perms: 2
            -  # 23
                host_id: 128
                host_perms: 2
            -  # 24
                host_id: 128
                host_perms: 2
            -  # 25
                host_id: 128
                host_perms: 2
            -  # 26
                host_id: 128
                host_perms: 2
            -  # 27
                host_id: 128
                host_perms: 2
            -  # 28
                host_id: 128
                host_perms: 2
            -  # 29
                host_id: 128
                host_perms: 2
            -  # 30
                host_id: 128
                host_perms: 2
            -  # 31
                host_id: 128
                host_perms: 2
            -  # 32
                host_id: 128
                host_perms: 2
        write_host_id: 11

The configuration files corresponding to the SDK version PROCESSOR-SDK-LINUX-RT-AM62X-08.06.00.42 are as follows:

// ti-processor-sdk-linux-rt-am62xx-evm-08.06.00.42\board-support\k3-image-gen-2022.01\soc\am62x\evm\sec-cfg.c

	/* OTP access configuration */
	.otp_config = {
		.subhdr = {
			.magic = BOARDCFG_OTP_CFG_MAGIC_NUM,
			.size = sizeof(struct boardcfg_extended_otp),
		},
		/* Host ID 0 is DMSC. This means no host has write access to OTP array */
		.write_host_id = HOST_ID_A53_1,
		/* This is an array with 32 entries */
		.otp_entry = {
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
			{
				.host_id = HOST_ID_ALL,
				.host_perms = 0x2,
			},
		},
	},

The corresponding debugging source code is as follows:

// ti-processor-sdk-linux-rt-am62xx-evm-10.01.10.04\board-support\optee-os-4.4.0+git\core\arch\arm\plat-k3\drivers\ti_sci.c

/**
 * ti_sci_get_response() - Receive response from mailbox channel
 *
 * @xfer:	Transfer to initiate and wait for response
 *
 * Return: 0 if all goes well, else appropriate error message
 */
static inline int ti_sci_get_response(struct ti_sci_xfer *xfer)
{
	struct k3_sec_proxy_msg *msg = &xfer->rx_message;
	struct ti_sci_msg_hdr *hdr = NULL;
	unsigned int retry = 5;
	int ret = 0;

	for (; retry > 0; retry--) {
		/* Receive the response */
		ret = k3_sec_proxy_recv(msg);
		if (ret) {
			EMSG("Message receive failed (%d)", ret);
			return ret;
		}

		/* msg is updated by Secure Proxy driver */
		hdr = (struct ti_sci_msg_hdr *)msg->buf;

		/* Sanity check for message response */
		if (hdr->seq == message_sequence)
			break;

		IMSG("Message with sequence ID %u is not expected", hdr->seq);
	}
	if (!retry) {
		EMSG("Timed out waiting for message");
		return TEE_ERROR_BUSY;
	}

	DMSG("Message Header Details:");
	DMSG("  Type: 0x%x", hdr->type);
	DMSG("  Host: %d", hdr->host);
	DMSG("  Sequence: %u", hdr->seq);
	DMSG("  Flags: 0x%x", hdr->flags);
	DMSG("  Expected Sequence: %u", message_sequence);

	if (!(hdr->flags & TI_SCI_FLAG_RESP_GENERIC_ACK)) {
		DMSG("Message not acknowledged");
		return TEE_ERROR_ACCESS_DENIED;
	}

	return 0;
}

May I ask how to solve this problem?

Regards,

Li