]> git.baikalelectronics.ru Git - uboot.git/commit
mailbox: k3-sec-proxy: Fill non-message tx data fields with 0x0
authorNishanth Menon <nm@ti.com>
Tue, 20 Jun 2023 18:17:09 +0000 (13:17 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 25 Jul 2023 16:44:46 +0000 (12:44 -0400)
commit40973081e58b0a95e34bb8bcae92b46945ec0ee5
tree8d8a5d56289d5f0ddb562b7fb0797cdccc280a81
parent255828c57a74dfe9821f54b95c4c3b37bf7098d1
mailbox: k3-sec-proxy: Fill non-message tx data fields with 0x0

Sec proxy data buffer is 60 bytes with the last of the registers
indicating transmission completion. This however poses a bit of a
challenge.

The backing memory for sec_proxy is regular memory, and all sec proxy
does is to trigger a burst of all 60 bytes of data over to the target
thread backing ring accelerator. It doesn't do a memory scrub when
it moves data out in the burst. When we transmit multiple messages,
remnants of previous message is also transmitted which results in
some random data being set in TISCI fields of messages that have been
expanded forward.

The entire concept of backward compatibility hinges on the fact that
the unused message fields remain 0x0 allowing for 0x0 value to be
specially considered when backward compatibility of message extension
is done.

So, instead of just writing the completion register, we continue
to fill the message buffer up with 0x0 (note: for partial message
involving completion, we already do this).

This allows us to scale and introduce ABI changes back also work with
other boot stages that may have left data in the internal memory.

While at this, drop the unused accessor function.

Fixes: e6d9e60f419a ("mailbox: Introduce K3 Secure Proxy Driver")
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/mailbox/k3-sec-proxy.c