linux pl320 mbox控制器驱动分析 - (2) 消息传递示例

news2024/11/26 10:47:25

linux pl320 mbox控制器驱动分析 - (2)消息传递示例

  • 1 Messaging from Core0 to Core1
  • 2 Back-to-back messaging from Core0 to Core1
  • 3 Messaging from Core0 to Cores 1, 2, and 3 using Auto Acknowledge
  • 4 Auto Link messaging from Core0 to Core1 using Mailbox0 and Mailbox1

pl320手册的下载地址为:
https://developer.arm.com/documentation/ddi0306/b/?lang=en
https://developer.arm.com/Processors/PL320

1 Messaging from Core0 to Core1

In this example system, there are two cores and four mailboxes. Core0 is the source core and Core1 is the destination core. Core0 uses Channel ID1 and Core1 uses Channel ID2. Core0 sends a message to Core1 using Mailbox0. This example assumes that the IPCM is not in integration test mode. Mailboxes 1-3 are inactive and Auto Acknowledge and Auto Link are disabled. Figure 2.5 shows the configuration.
在这个示例系统中,有两个核心和四个邮箱。 Core0 是源core,Core1 是目标core。 Core0 使用 Channel ID1,Core1 使用 Channel ID2。 Core0 使用 Mailbox0 向 Core1 发送消息。此示例假定 IPCM 未处于集成测试模式。邮箱 1-3 处于非活动状态,自动确认和自动链接被禁用。图 2.5 显示了配置。

Figure 2.5. Configuration, messaging from Core0 to Core1
在这里插入图片描述
Figure 2.5. Configuration, messaging from Core0 to Core1
Figure 2.6 shows the messaging sequence.
在这里插入图片描述
Figure 2.6. Messaging from Core0 to Core1

In this example, the following sequence occurs:

  • 1 Core0 gains control of Mailbox 0 and identifies itself as the source core by setting bit 0 in the IPCM0SOURCE Register.
  • 2 Core0 enables interrupts to Core?0 and Core1 by setting bits 0 and 1 in the IPCM0MSTATUS Register.
  • 3 Core0 defines the destination core by setting bit 1 in the IPCM0DSTATUS Register.
  • 4 Core0 programs the data payload, DA7A0000.
  • 5 Core0 sets Mailbox Send Register bit 0 to trigger the Mailbox0 interrupt to Core 1.
  • 6 Core1 reads the IPCMRIS1 Register to determine which mailbox caused the interrupt. In this case, only Mailbox0 is indicated.
  • 7 Core1 reads the data payload.
  • 8 Core1 optionally updates the data payload with the Acknowledge data, DA7A1111.
  • 9 Core1 clears bit 0 and sets bit 1 in the IPCM0SEND Register to clear its interrupt and provide the Manual Acknowledge interrupt back to Core0.
  • 10 Core0 reads the IPCMRIS0 Register to determine which mailbox caused the interrupt. Again, only Mailbox0 is indicated.
  • 11 Core0 reads the Acknowledge payload data.
  • 12 Core0 clears bit 1 in the Mailbox Send Register to clear its interrupt.
  • 13 Core0 releases ownership of the mailbox by clearing the IPCM0SOURCE Register, which in turn clears the IPCM0DSTATUS, IPCM0MSTATUS, and IPCM0DR0 Registers.

note:
Core0 can hold on to the mailbox to send another data message by not clearing the IPCM0SOURCE Register at step 13.
通过在第 13 步不清除 IPCM0SOURCE 寄存器,Core0 可以保留邮箱发送另一条数据消息。

2 Back-to-back messaging from Core0 to Core1

Back-to-back messaging from Core0 to Core1
In this example system, there are two cores and four mailboxes. Core0 is the source core and Core1 is the destination core. Core0 uses Channel ID1 and Core1 uses Channel ID2, as in Back-to-back messaging from Core0 to Core1. Core0 sends a message to Core1, obtains an acknowledge, and sends another message to Core1, which is also acknowledged. This example assumes that the IPCM is not in integration test mode. Mailboxes 1-3 are inactive and Auto Acknowledge and Auto Link are disabled. Figure 2.7 shows the configuration.
在这里插入图片描述
在这里插入图片描述

In this example, the following sequence occurs:

  1. Core0 gains control of Mailbox0 and identifies itself as the source core by setting bit 0 in the IPCM0SOURCE Register.
  2. Core0 enables interrupts to Core0 and Core1 by setting bits 0 and 1 in the IPCM0MSTATUS Register.
  3. Core0 defines the destination core by setting bit 1 in the IPCM0DSTATUS Register.
  4. Core0 programs the data payload, DA7A0000.
  5. Core0 sets bit 0 of the IPCM0SEND Register to send the interrupt to the destination core.
  6. Core1 reads the IPCMRIS1 Register and reads the data payload.
  7. Core1 optionally updates the data payload for the Acknowledge, DA7A1111.
  8. Core1 clears bit 0 and sets bit 1 in the IPCM0SEND Register to provide the Manual Acknowledge back to Core?0.
  9. Core0 reads the IPCMRIS0 Register and reads the data payload.
  10. Core0 programs the data payload for the next message, DA7A2222.
  11. Core0 clears bit 1 and sets bit 0 of the IPCM0SEND Register to send the interrupt to the destination core.
  12. Core1 reads the IPCMRIS1 Register and reads the data payload.
  13. Core1 optionally updates the data payload for the Acknowledge, DA7A3333.
  14. Core1 clears bit 0 and sets bit 1 in the IPCM0SEND Register to provide the Manual Acknowledge back to Core0.
  15. Core0 reads the IPCMRIS0 Register and reads the data payload.
  16. Core0 clears the interrupt and releases ownership of the mailbox by clearing the IPCM0SOURCE Register, which in turn clears the IPCM0DSTATUS, IPCM0MSTATUS, IPCM0SEND, and IPCM0DR0 Registers.

3 Messaging from Core0 to Cores 1, 2, and 3 using Auto Acknowledge

In this example system, there are four cores and four mailboxes:

  • Core0 uses Channel ID1
  • Core1 uses Channel ID2
  • Core2 uses Channel ID4
  • Core3 uses Channel ID8.

Core0 is the source core and sends a message to three destination cores, 1, 2, and 3. This example assumes that the IPCM is not in integration test mode. Mailboxes 1-3 are inactive and Auto Link is disabled. Figure 2.9 shows the configuration.
Core0 是源core,向三个目标内核 1、2 和 3 发送消息。此示例假定 IPCM 未处于集成测试模式。邮箱 1-3 处于非活动状态并且自动链接被禁用。图 2.9 显示了配置。

Figure 2.9. Configuration, messaging from Core0 to Cores 1, 2, and 3 using Auto Acknowledge
在这里插入图片描述
在这里插入图片描述
In this example, the following sequence occurs:

  1. Core0 gains control of Mailbox0 and identifies itself as the source core by setting bit 0 in the IPCM0SOURCE Register.
  2. Core0 sets Mailbox Mode Register bit 0 to put the mailbox into Auto Acknowledge mode.
  3. Core?0 enables interrupts to Core0, Core1, Core2, and Core3 by setting bits 0, 1, 2, and 3 in the IPCM0MSTATUS Register.
  4. Core0 defines the destination cores by setting bits 1, 2, and 3 in the IPCM0DSTATUS Register.
  5. Core0 programs the data payload, DA7A0000.
  6. Core0 sets bit 0 of the IPCM0SEND Register to send the interrupts to the destination cores.
  7. Core1 reads the IPCMRIS1 Register and reads the data payload.
  8. Core1 clears bit 1 in the IPCM0DSTATUS Register.
  9. Core3 reads the IPCMRIS3 Register and reads the data payload.
  10. Core3 clears bit 3 in the IPCM0DSTATUS Register.
  11. Core2 reads the IPCMRIS2 Register and reads the data payload.
  12. Core2 clears bit 2 in the IPCM0DSTATUS Register. As the final Mailbox Destination Register bit is cleared, the mailbox automatically detects this, clears Mailbox Send Register bit 0 and sets Mailbox Send Register bit 1 to provide the Auto Acknowledge back to the source core, Core?0. The data registers are not updated in Auto Acknowledge mode.
  13. Core0 reads Status0 and reads the data payload.
  14. Core 0 clears the interrupt and releases ownership of the mailbox by clearing the IPCM0SOURCE register, which in turn clears the IPCM0SEND and IPCM0DR0 Registers.

Note
If Core0 has another message to send, it can maintain ownership of the mailbox by keeping the IPCM0SOURCE Register set, and updating the IPCM0DSTATUS, IPCM0MODE, IPCM0MSTATUS, and IPCM0DR0 Registers with the new message at step 14.
如果 Core0 要发送另一条消息,它可以通过保持 IPCM0SOURCE 寄存器设置并在第 14 步用新消息更新 IPCM0DSTATUS、IPCM0MODE、IPCM0MSTATUS 和 IPCM0DR0 寄存器来维护邮箱的所有权。

4 Auto Link messaging from Core0 to Core1 using Mailbox0 and Mailbox1

In this example system, there are two cores and four mailboxes. Core0 is the source core and Core1 is the destination core. Core?0 uses Channel ID1 and Core1 uses Channel ID2. Core0 sets up Mailbox0 and Mailbox1 in Auto Link mode, and sends a message to Core1. Core1 responds to each interrupt separately and acknowledges both. Core0 only obtains an acknowledge interrupt when Core1 has finished with the final message. This example assumes that the IPCM has interrupts enabled and is not in integration test mode. Mailboxes 2-3 are inactive and Auto Acknowledge is disabled. Figure 2.11 shows the configuration.
在这个示例系统中,有两个核心和四个邮箱。 Core0 是源内核,Core1 是目标内核。 Core?0 使用 Channel ID1,Core1 使用 Channel ID2。 Core0 将 Mailbox0 和 Mailbox1 设置为 Auto Link 模式,并向 Core1 发送消息。 Core1 分别响应每个中断并确认两者。 Core0 仅在 Core1 完成最终消息时获得确认中断。此示例假定 IPCM 已启用中断且未处于集成测试模式。邮箱 2-3 处于非活动状态并且自动确认被禁用。图 2.11 显示了配置。

Figure 2.11. Configuration, Auto Link messaging from Core0 to Core1 using Mailbox0 and Mailbox1
在这里插入图片描述
在这里插入图片描述
In this example, the following sequence occurs:

  1. Core0 gains control of Mailbox0 and sets bit 0 in the IPCM0SOURCE Register.
  2. Core0 gains control of Mailbox1 and sets bit 0 in the IPCM1SOURCE Register.
  3. Core0 links Mailbox?0 to Mailbox1 by setting bit 1 in the IPCM0MODE Register.
  4. Core0 enables interrupts to Core0 and Core1 by setting bits 0 and 1 in the IPCM0MSTATUS Register.
  5. Core0 defines the destination core of Mailbox?0 by setting bit 1 in the IPCM0DSTATUS Register.
  6. Core0 programs the data payload of Mailbox?0 by setting the IPCM0DR0 Register to DA7A0000.
  7. Core0 enables interrupts to Core0 and Core1 by setting bits 0 and 1 in the IPCM1MSTATUS Register.
  8. Core0 defines the destination core of Mailbox1 by setting bit 1 in the IPCM1DSTATUS Register.
  9. Core0 programs the data payload of Mailbox1 by setting Data1 to DA7A1111.
  10. Core0 sets bit 1 in the IPCM0SEND Register to send the message in Mailbox0.
  11. Core1 reads the IPCMRIS1 Register and reads the data payload in Mailbox0.
  12. Core1 clears bit 0 and sets bit 1 in the IPCM0SEND Register to provide the Manual Acknowledge back to Core0.
    Note
    There is no acknowledge interrupt to Core 0.
  13. The message in Mailbox1 is automatically sent, triggered by bit 1 in the IPCM0SEND Register going HIGH and Auto Link mode being active.
  14. Core 1 reads the IPCMRIS1 Register and reads the data payload in Mailbox1.
  15. Core1 clears bit 0 and sets bit 1 in the IPCM1SEND Register to provide the Manual Acknowledge back to Core0.

Note
This sends the acknowledge interrupt to Core0.

  1. Core0 reads the IPCMRIS0 Register indicating that Mailbox1 has an acknowledge message. This indicates that the linked messages have all been sent. Core0 also reads the optional acknowledge data payload in Mailbox0.
  2. Core0 clears bit 1 in the IPCM0SEND Register.
  3. Core0 reads the optional acknowledge data payload in Core1.
  4. Core0 clears bit 1 in the IPCM1SEND Register.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/525379.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

算法设计 || 第5题:钓鱼问题-北京大学网站在线算法题(贪心算法)

目录 (一)题目网址视频网址 (二)手写草稿思考 Part1: 慕课PPT Part2: 笨蛋的学习 (一)题目网址视频网址 北京大学网站在线算法题:1042 -- Gone Fishing (poj.org) 视频讲解(北…

进一步了解傅里叶变换的应用(附案例代码)

傅里叶变换(Fourier Transform)是一种非常常见的数学工具,能够将一个函数(或时域信号)分解成一些基本频率的合成。它使我们可以将时域信号(例如波形图)转换成频域信号,因而更容易地看…

ArcGIS按比例缩放图斑

今天介绍一下,在ArcGIS中,当我们需要按比例缩放图斑时,该如何操作呢。 可以使用“缩放”工具对要素进行缩放(使整个要素变大或变小)。在处理比例略有误差的数据(例如,来自多个源的细分宗地&…

ChatGPT背后的大预言模型 以及《ChatGPT全能应用一本通》介绍

大型语言模型已经彻底改变了我们通过自然语言处理进行交互的方式,使得更多的基于语言的应用程序成为可能,例如语言翻译,问答,文本摘要和聊天机器人。 由于这些模型是在大量文本数据集(如书籍,文章和社交媒…

C learning_13 操作符前篇(条件操作符、 逗号表达式、 下标引用、函数调用和结构成员、 表达式求值)

目录 条件操作符 逗号表达式 下标引用、函数调用和结构成员 1. [ ] 下标引用操作符 2. ( ) 函数调用操作符 3. 访问一个结构的成员 表达式求值 1.隐式类型转换 2.算术转换 3.操作符的属性 条件操作符 条件操作符是一种用于简化条件表达式的运算符。它通常表示为问号 …

《游戏编程模式》--重访设计模式--学习

序 在线阅读地址: 命令模式 Design Patterns Revisited 游戏设计模式 (tkchu.me) 参考文章: GameDesignPattern_U3D_Version/Assets/002FlyweightPattern at master TYJia/GameDesignPattern_U3D_Version GitHub 看到了没见过的观点:…

我的算法基础实验代码-下篇

第一题 题目介绍 输入一些数值,求出现的次数最多的数。如果有多个并列,则从大到小输出。 解题思路 代码实现 package com.nineWeek;import java.util.*;/*** author WangYH* version 2021.1.3* date 2023/5/7 18:29*/public class NumMostTimes {pu…

第十四届蓝桥杯b组c/c++

D:飞机降落&#xff08;全排列&#xff09; #include<iostream> #include<cstring> using namespace std;const int N 12; int n; struct node{int t, d, l; //t为此飞机的最早降落时间 d为盘旋时间 l为降落所需时间 }p[N]; bool st[N];//DFS求全排列模型 bool d…

【真题解析】系统集成项目管理工程师 2021 年下半年真题卷

本文为系统集成项目管理工程师考试(软考) 2021 年上半年真题&#xff0c;包含答案与详细解析。考试共分为两科&#xff0c;成绩均 ≥45 即可通过考试&#xff1a; 综合知识&#xff08;选择题 75 道&#xff0c;75分&#xff09;案例分析&#xff08;问答题 4 道&#xff0c;75…

ChatGPT 学习与使用总结

ChatGPT 学习与使用总结 最近ChatGPT大火&#xff0c;2023有可能就是AGI元年了。近两个月使用下来&#xff0c;ChatGPT给我最深刻的感觉就是它所具备的理解和思维能力&#xff0c;第一次体验时真的是非常震撼&#xff0c;完全是之前各种『人工智障』智能助理所不能比拟的&…

Windows系统出现蓝屏怎么办?这些方法可以修复!

Windows 系统蓝屏死机&#xff08;BSOD&#xff09;&#xff0c;也被称为“停止错误”&#xff0c;是Windows系统最常见的故障之一。 当Windows遇到严重的故障时就会显示蓝屏&#xff0c;系统崩溃。蓝屏上显示一个停止代码&#xff0c;如"MEMORY_MANAGEMENT"&#xf…

NeRF与三维重建专栏(一)领域背景、难点与数据集介绍

前言 关于该系列专栏&#xff0c;主要介绍NeRF在三维重建中的应用&#xff08;这里我们特指MVS&#xff0c;multi-view stereo&#xff0c;也即输入带位姿的图片&#xff0c;输出三维结构例如点云、mesh等&#xff1b;并且后面的工作也都是围绕MVS with NeRF讨论的。虽然也有w…

人类与ChatGPT:互动中的共同进步

一、ChatGPT的发展历程 1. GPT模型 ChatGPT是由OpenAI推出的一款聊天机器人&#xff0c;其核心技术基于GPT模型。GPT模型&#xff08;Generative Pre-training Transformer&#xff09;是一种基于Transformer结构的预训练语言模型。它在大规模的文本语料库上进行无监督的预训…

解析 ip addr 的输出的内容含义

解读 ip addr 的输出的网络连接信息含义 一、ifconfig 与 ip addr 用过Linux的读者都知道&#xff0c;在Linux查看ip可以使用ifconfig&#xff0c;当然这个ifconfig属于net-tools 工具集&#xff0c;其来源于BSD&#xff0c;Linux从2001年就不对其进行维护了。那我们应该用什…

基于下垂控制的并网逆变器控制MATLAB仿真模型

资源地址&#xff1a; 基于下垂控制的并网逆变器控制MATLAB仿真模型资源-CSDN文库 主要模块&#xff1a; 建议使用MATLAB2021b及以上版本打开&#xff01; 功率计算模块、下垂控制模块、电压电流双环控制模块、虚拟阻抗压降模块 扰动设置&#xff1a; 在0.5秒到2秒始端设置…

微软出品的实用小工具

微软出品的实用小工具 分享一些微软出品的实用小工具&#xff0c;希望对大家有所帮助。 文章目录 微软出品的实用小工具SysinternalsSuite常用工具AutorunsprocdumpProcess Explorer进程监视器 Process MonitorpsloggedonAccessChk示例 PsToolsrdcmanTcpviewVmmap Sysinternals…

数据结构_树与二叉树

目录 1. 树的基本概念 1.1 树的定义 1.2 基本术语 1.3 树的性质 1.4 相关练习 2. 二叉树的概念 2.1 二叉树的概念及其主要特性 2.2 二叉树的存储结构 2.2.1 顺序存储结构 2.2.2 链式存储结构 2.3 相关练习 3. 二叉树的遍历和线索二叉树 3.1 二叉树的遍历 3.1.1 先…

基于微信小程序校内论坛系统

开发工具&#xff1a;IDEA、微信小程序 服务器&#xff1a;Tomcat9.0&#xff0c; jdk1.8 项目构建&#xff1a;maven 数据库&#xff1a;mysql5.7 前端技术&#xff1a;vue、uniapp 服务端技术&#xff1a;springbootmybatis-plus 本系统分微信小程序和管理后台两部分&a…

神马网络——IP地址

个人简介&#xff1a;云计算网络运维专业人员&#xff0c;了解运维知识&#xff0c;掌握TCP/IP协议&#xff0c;每天分享网络运维知识与技能。座右铭&#xff1a;海不辞水&#xff0c;故能成其大&#xff1b;山不辞石&#xff0c;故能成其高。个人主页&#xff1a;小李会科技的…

ChatGPT提示词技巧

自计算机问世以来&#xff0c;人类与计算机之间的交互方式已经经历过几个重要的阶段&#xff1a; 指令式交互&#xff08;Command-based Interaction&#xff09; 早期的计算机系统主要采用了指令式交互方式&#xff0c;用户需要输入特定的命令或代码来完成各种任务。这种交…