This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 7bf0f26ec26fc2661f01b0d9206c237171b0e0a0
Author: Matteo Golin <[email protected]>
AuthorDate: Mon Jul 13 17:27:54 2026 -0400

    bcm2711/mailbox: Invalidate cache before read
    
    Cache must be invalidated before the buffer is read since the
    VideoCore's write will not invalidate the cache.
    
    Signed-off-by: Matteo Golin <[email protected]>
---
 arch/arm64/src/bcm2711/bcm2711_mailbox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/src/bcm2711/bcm2711_mailbox.c 
b/arch/arm64/src/bcm2711/bcm2711_mailbox.c
index 27d277a7daf..eb8d66d455e 100644
--- a/arch/arm64/src/bcm2711/bcm2711_mailbox.c
+++ b/arch/arm64/src/bcm2711/bcm2711_mailbox.c
@@ -282,6 +282,8 @@ static int bcm2711_mbox_sendreq(FAR uint32_t *buf, uint8_t 
n)
    * docs).
    */
 
+  up_invalidate_dcache(bufptr, bufptr + n); /* So we read fresh data */
+
   if (retbuf != bufptr)
     {
       ipcerr("Expected %08x, got %08x", bufptr, res);

Reply via email to