当前位置:网站首页>Explain in detail the communication mode between arm A7 and risc-v e907 on Quanzhi v853

Explain in detail the communication mode between arm A7 and risc-v e907 on Quanzhi v853

2022-07-07 22:43:00 51CTO

V853 The chip contains two CPU. One is the main core Arm A7 CPU, function Tina Linux( Full ambition self-study Linux) System , It is the main system of the chip ; One is RISC-V E907 auxiliary CPU, function Melis( Full ambition self-study RTOS) System , The main function is to provide general computing power supplement 、 auxiliary Linux Realize functions such as fast start and low power management .

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _ isomerism

  • A7 - Linux System

V853 The main core A7 Running on is Tina Linux System .Tina Linux It's all about AIoT Kind of product , be based on Linux Embedded system with deeply customized kernel .

stay Tina Linux in , Provide AMP And RPMsg docking E907

1.Linux remoteproc Management control E907
2.RPMsg And E907 Communications

  • E907 - RTOS System

V853 Auxiliary core E907 What is running on is self-study RTOS System Melis. It is independent of A7 In the heart of the main nucleus Linux System . Can run independently .

stay E907 Melis in , Provide OpenAMP Software framework comes with A7 Linux The system communicates .

1. Provides processor lifecycle management (LCM,Life Cycle Management), And Linux Of remoteproc compatible
2. It provides a message transmission mechanism between processors , And Linux Of RPMsg compatible

Heterogeneous system startup process

First , From the inside of the chip BORM Look for the boot media , stay V853 On the development board eMMC Storage . After finding the boot media, it will run BOOT0 Code .BOOT0 Will be in A7 The main core runs Linux System , Will also be in E907 Run in the core RTOS System . The two systems started are running independently .

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _v8_02

Communication of heterogeneous systems

V853 The heterogeneous system communication in hardware uses MSGBOX, At the software level AMP And RPMsg Communication protocol . among A7 Based on Linux The standard RPMsg Drive frame ,E907 be based on OpenAMP Heterogeneous communication framework .

V853 With A7 Main core and E907 The auxiliary core is completely different from the two cores , In order to maximize their performance , Cooperate to complete a task , So the systems running on different cores are also different . The core of these different architectures and the software running on them are combined , became AMP System (Asymmetric Multiprocessing System, Heterogeneous multiprocessing system ).

Because the purpose of the existence of the two cores is collaborative processing , Therefore, in heterogeneous multiprocessing systems, it often forms Master - Remote structure . After the main core is started, start the auxiliary core . When the systems on both cores are started , They passed through IPC(Inter Processor Communication) Way to communicate , and RPMsg Namely IPC One of the .

stay AMP In the system , The two cores communicate by sharing memory . The two cores passed AMP Interrupt to deliver messages . The main core is responsible for memory management .

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _v8_03

AMP The system has two buffers in each communication direction , Namely USED and AVAIL, This buffer can be in accordance with RPMsg The format of messages in is divided into pieces and links form a ring .

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _linux_04

When the master core needs to communicate with the slave core, it can be divided into four steps :

  • The master core follows first USED Get a piece of memory (Allocate)
  • Fill the message according to the message protocol
  • Link this memory to AVAIL Buffer zone (Send)
  • Trigger interrupt , Notify the auxiliary kernel to handle the message

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _v8_05

conversely , It is also similar when the slave core needs to communicate with the master core :

  • The master core follows first AVAIL Get a piece of memory (Allocate)
  • Fill the message according to the message protocol
  • Link this memory to USED Buffer zone (Send)
  • Trigger interrupt , Notify the main core of message processing .

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _ isomerism _06

since RPMsg It is a kind of information exchange protocol , And TCP/IP similar ,RPMsg The protocol also has layers , It is mainly divided into three layers , They are the transport layer 、MAC Layer and physical layer .

 Explain the whole annals in detail V853 Upper ARM A7 and RISC-V E907 The way of communication between _v8_07

among MAC layer Of VirtIO It's a kind of I/O Semi virtualization solutions , It's a universal I/O Device virtualization program , It's semi virtualization Hypervisor A set of common I/O The abstraction of the device . It provides a set of upper application and each Hypervisor Communication framework and programming interface between virtualized devices , Reduce cross platform compatibility issues , Greatly improve the efficiency of driver development .

RPMsg Messages on the bus have the following structure , It contains two fixed parts: message header and data , The definition of the message format is located in drivers/rpmsg/virtio_rpmsg_bus.c in , The specific definitions are as follows :

struct rpmsg_hdr {
    u32 src;
    u32 dst;
    u32 reserved;
    u16 len;
    u16 flags;
    u8 data[];
} __packed;

     
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.

Control of heterogeneous systems

In heterogeneous systems , More than just message transmission , Relevant controls are also needed . For example, the opening of the main check auxiliary core , Loading firmware , Shut down... Etc . And that's where it comes in remoteproc frame .

remoteproc The framework supports different platforms , Control by processors of different architectures , It can monitor the operation of the auxiliary core .

about V853 Come on ,remoteproc Used to deal with E907 Lifecycle management , Generally speaking, it includes loading firmware 、 Detect whether the remote processor crashes and other functions . When it loads the firmware of the remote processor , Will be based on resource table To apply for resources , And create VirtIO equipment .

原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207072135076819.html