Communication method and device, storage medium and computer program product
By adopting the communication method of shared memory and communication interrupt mechanism in asymmetric dual-core controllers, the problems of confusing and poor robustness of inter-core communication code structure are solved, and more efficient and maintainable inter-core communication is achieved.
Patent Information
- Application Number
- CN202510180944.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When asymmetric dual-core controllers conduct inter-core communication, there are problems such as confusing transmission code structure and poor robustness.
A communication method is provided to standardize the code structure of communication between cores by using shared memory and communication interrupt mechanisms through data transmission between the first processor and the second processor. The specific steps include sending communication data to the shared memory, receiving communication interrupts and obtaining corresponding communication data from the shared memory.
By standardizing the code structure of inter-core communication, the robustness of inter-core communication is improved, the amount of code is reduced, and maintainability is improved.
Smart Images

Figure CN119645688A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a communication method, device, storage medium and computer program product. Background Art
[0002] An asymmetric dual-core controller is a design that integrates two processors with different characteristics in architecture or function on the same controller. The processor with better performance is called the main core, which is used to run time-sharing operating systems such as Linux and is responsible for the main control tasks; the other processor is called the co-core, which is used to run real-time operating systems and is responsible for assisting in completing specific functions. At present, the data code structure of the asymmetric dual-core system is chaotic and the robustness is poor. This will lead to defects such as increased code volume for inter-core communication, chaotic code structure, and poor maintainability. Summary of the invention
[0003] In order to solve the problem of chaotic transmission code structure and poor robustness when an asymmetric dual-core controller performs inter-core communication, this application provides the following technical solutions: In a first aspect, a communication method is provided, which is applied to data transmission between a first processor and a second processor, wherein the first processor and the second processor are a sending end and a receiving end of each other, and the method includes: The sender sends communication data to the shared memory; In response to the shared memory completing the reception of the communication data, the sending end sends a communication interrupt to the receiving end; In response to the receiving end receiving the communication interruption, the receiving end parses the communication interruption and obtains communication data corresponding to the communication interruption from the shared memory.
[0004] Further, the first processor is used to run the first system, and the second processor is used to run the second system; The performance indicator of the first processor is better than the performance indicator of the second processor, and the performance indicator includes at least one of the following: processor frequency, cache capacity, and memory bandwidth; The first system is a time-sharing operating system, and the second system is a real-time operating system.
[0005] Further, the sending end is a first processor and the receiving end is a second processor; The sender sends communication data to the shared memory, including: Determine a sender according to a data source of the first system, and generate first target data according to the sender, wherein the sender includes an application layer and a kernel layer; Send the first target data to the shared memory.
[0006] Further, determining a sender according to a data source of the first system, and generating first target data according to the sender, includes: In response to the data source being the application layer of the first system, the application layer is set as the sender, a data header in a preset format is set with a first identifier, and the set data header is combined with a data body in the preset format to obtain first target data, wherein the first identifier is used to indicate that the data source is the application layer; In response to the data source being the kernel layer of the first system, the kernel layer is set as the sender, the data header in the preset format is set with the second identifier, and the set data header is combined with the data body in the preset format to obtain the second target data, wherein the second identifier is used to indicate that the data source is the kernel layer.
[0007] Further, obtaining communication data corresponding to the communication interruption from the shared memory includes: The receiving end transmits the first target data from the shared memory to the transmission data group according to the analyzed communication interruption, wherein the first target data represents data transmitted from the sending end to the receiving end through the shared memory, and the transmission data group is used to transmit the first target data from the shared memory to the receiving end; Determining whether the target command carried by the first target data is supported by the receiving end; In response to the target command being supported by the receiving end, the receiving end executes the target command to obtain an execution result.
[0008] Furthermore, before sending the first target data to the shared memory, the method further includes: Writing the first target data into the inter-core communication file handle, and performing data verification on the first target data; In response to the first target data passing the data verification, it is determined whether the first target data is synchronization data.
[0009] Furthermore, the data source is an application layer of the first system, and the first target data is stored in a shared memory, including: Sending the processing task of the first target data to the kernel layer of the first system through the message queue; Acquire a first data group, and determine whether the first data group is idle, wherein the first data group is used to transfer first target data whose data source is a first system application layer and is synchronous data to a shared memory; In response to the first data group being idle, determining whether the capacity of the first target data exceeds the capacity of the memory channel, wherein the shared memory includes at least one memory channel, and the capacity of any memory channel is the same; Determine whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory via the first data group and stored in any idle memory channel.
[0010] Furthermore, the data source is a kernel layer of the first system, and the first target data is stored in a shared memory, including: Acquire a second data group, and determine whether the second data group is idle, wherein the second data group is used to transfer first target data whose data source is a first system kernel layer and is synchronous data to a shared memory; In response to the second data group being idle, determining whether the capacity of the first target data exceeds the capacity of the memory channel; In response to the capacity of the first target data not exceeding the capacity of the memory channel, sending the first target data to the shared memory via the first data group; Determine whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the second data group and stored in any idle memory channel.
[0011] Furthermore, the method further comprises: In response to the first target data being asynchronous data, determining whether the capacity of the first target data exceeds the capacity of the memory channel; In response to the first target data capacity not exceeding the capacity of the memory channel, determining whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the inter-core communication file handle and stored in any memory channel.
[0012] Furthermore, the method further comprises: In response to the first target data capacity exceeding the capacity of the memory channel, the first target data is divided into at least two data packets, and the at least two data packets are sent to the shared memory and stored in the idle memory channel, wherein the capacity of the data packets is not greater than the capacity of any memory channel.
[0013] Furthermore, the method further comprises: In response to the absence of an idle memory channel in the shared memory, re-determining whether there is an idle memory channel in the shared memory every retry interval; In response to the number of times of re-determining whether there is an idle memory channel in the shared memory being greater than a preset number, device abnormality information is fed back to the sending end.
[0014] Further, the receiving end transmits the first target data from the shared memory to the transmission data group according to the analyzed communication interruption, including: The receiving end triggers the interrupt source processing function according to the communication interruption; Poll any memory channel in the shared memory according to the interrupt source processing function; In response to the existence of the first target data in the memory channel, obtaining a data header of the first target data and verifying the first target data; In response to the first target data being successfully verified, identifying a data sender according to the data header; In response to the data sender being the first system, transmitting the first target data to the transmission data group; The interrupt source processing function is used to process the communication interrupt from the first system.
[0015] Further, determining whether the target command carried by the first target data is supported by the receiving end includes: The transmission data group is monitored, and first target data is acquired in response to the transmission data group, and then it is identified according to the management command whether a command carried by the first target data is supported by the second system.
[0016] Furthermore, the method further comprises: The second system determines whether the first target data needs to be replied; In response to the first target data needing to be replied, after reading the first target data from the shared memory, releasing the memory channel corresponding to the first target data, and sending the execution result to the first system after the target command carried by the first target data is executed; In response to the first target data not requiring reply, the first target data is discarded, and the memory channel corresponding to the first target data is released.
[0017] Furthermore, the method further comprises: The memory channels of the shared memory are divided into a first part of memory channels and a second part of memory channels, wherein the first part of memory channels includes a plurality of memory channels for receiving first target data, and the second part of memory channels includes a plurality of memory channels for receiving second target data, wherein the second target data represents data transmitted from the second system to the first system through the shared memory.
[0018] Further, the sending end is the second processor and the receiving end is the first processor; The sender sends communication data to the shared memory, including: storing the second target data of the sending end in the shared memory and sending a communication interrupt to the first system; The first system traverses any memory channel in the shared memory according to the communication interruption to verify the second target data; In response to the second target data passing verification, determining the execution object according to the data header of the second target data; According to the execution object, the second target data is sent to the receiving end for execution.
[0019] Furthermore, before the second target data of the sending end is stored in the shared memory and the communication interrupt is sent to the first system, the method further includes: The second system is set as a sending end, a data header in a preset format is set with a third identifier, and the set data header is combined with a data body in the preset format to obtain second target data, wherein the third identifier is used to indicate that the data source is the second system; Determining whether the second target data is synchronization data; In response to the second target data being synchronous data, a third data group is acquired, and it is determined whether the third data group is idle, wherein the third data group is used to transfer the second target data being synchronous data from the second system to the shared memory.
[0020] Further, according to the execution object, sending the second target data to the receiving end for execution includes: Traversing the memory channels in the shared memory, obtaining the data header of the second target data stored in the memory channel, and performing data verification on the data header; In response to the data header verification being successful, determining, according to the data header, that the data receiving end is an application layer of the first system or a kernel layer of the first system; In response to the data receiving end being the kernel layer of the first system, sending the data header to the target queue; In response to the data receiving end being the application layer of the first system, the memory channel number of the shared memory where the second target data is stored is sent to the application layer of the first system.
[0021] Furthermore, the receiving end is a kernel layer of the first system, and the method further includes: monitoring the target queue, acquiring second target data in response to the target queue, and identifying whether a command carried by the second target data is supported by the first system according to the management command; In response to the command carried by the second target data being supported by the first system, a callback function of the command is searched and the command is executed.
[0022] Furthermore, the receiving end is an application layer of the first system, and the method further includes: Triggering a preset function of the first system application layer, and obtaining the channel number of the shared memory where the second target data is located through parsing the preset function; Reading a data header of the second target data according to the channel number, and determining a target command according to the data header; Call the callback function corresponding to the target command to execute the target command and get the execution result.
[0023] In a second aspect, a communication device is provided, which is applied to data transmission between a first processor and a second processor, wherein the first processor and the second processor are a sending end and a receiving end of each other, and a method includes: A data sending module is used for the sending end to send communication data to the shared memory; An interruption sending module, used for sending a communication interruption from the sending end to the receiving end in response to the shared memory completing the reception of the communication data; The data receiving module is used for responding to the communication interruption received by the receiving end, the receiving end analyzing the communication interruption, and obtaining the communication data corresponding to the communication interruption from the shared memory.
[0024] In a third aspect, a computer device is provided, comprising a memory, a processor, and a communication program stored in the memory and executable on the processor, wherein when the processor executes the communication program, the communication method described in the first aspect is implemented.
[0025] According to a fourth aspect, a computer-readable storage medium is provided, on which a communication program is stored. When the communication program is executed by a processor, the communication method described in the first aspect is implemented.
[0026] According to a fifth aspect, a computer program product is provided, including a computer program, which, when executed by a processor, implements the communication method described in the first aspect.
[0027] The beneficial effect brought about by the technical solution provided by the embodiments of the present application is: by implementing the inter-core communication method, device, storage medium and computer program product disclosed in the embodiments of the present application, the inter-core communication code structure of the dual-core controller is standardized and the robustness of the inter-core communication is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 is a schematic diagram of communication between a first processor and a second processor provided in an embodiment of the present application; Figure 2 is a schematic diagram of a communication method provided in an embodiment of the present application; Figure 3 is a schematic diagram of an inter-core communication method provided in an embodiment of the present application; Figure 4 It is a schematic diagram of the data format provided in the embodiment of the present application; Figure 5 is a schematic diagram of data organization in a shared memory provided in an embodiment of the present application; Figure 6 is a schematic diagram of a communication device provided in an embodiment of the present application; Figure 7is a schematic diagram of a computer device provided in an embodiment of the present application; Figure 8 This is a schematic diagram of a process of sending data from a Linux application layer to an RTOS provided in an embodiment of the present application; Fig. 9 It is a schematic diagram of the execution flow of the Linux IPI driver command sending provided in an embodiment of the present application; Fig.10 It is a schematic diagram of the IPI-driven data distribution process of the RTOS provided in an embodiment of the present application; Fig.11 This is a schematic diagram of the RTOS service thread data processing flow provided in an embodiment of the present application; Fig.12 This is a schematic diagram of a process of sending data from the Linux kernel layer to the RTOS provided in an embodiment of the present application; Fig.13 This is a schematic diagram of RTOS-side data transmission provided by an embodiment of the present application; Fig.14 It is a schematic diagram of the execution flow of Linux IPI driver data distribution provided in an embodiment of the present application; Fig.15 This is a schematic diagram of the Linux kernel layer service thread command execution process provided by an embodiment of the present application; Fig.16 It is a schematic diagram of the Linux application layer business process command receiving process provided by an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the implementation mode of this application will be clearly and completely described below in conjunction with the drawings in the implementation mode of this application. Obviously, the described implementation mode is only a part of the embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "one" or "the" do not indicate a quantity limitation, but indicate that there is at least one. The numbers in the drawings of the specification only indicate the distinction between various functional components or modules, and do not indicate the logical relationship between components or modules. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0032] Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that in the accompanying drawings, the same reference numerals are given to components having substantially the same or similar structures and functions, and repeated descriptions thereof will be omitted.
[0033] In view of the problem that the transmission code structure is chaotic and the robustness is poor when the asymmetric dual-core controller communicates between cores, this application provides the following technical solutions: In some embodiments, Figure 1 As shown, a communication method is applied to data transmission between a first processor and a second processor, where the first processor and the second processor are each other's sending end and receiving end.
[0034] like Figure 2 As shown, the method includes: S100: The sending end sends communication data to the shared memory; S200: In response to the shared memory completing the reception of the communication data, the sending end sends a communication interrupt to the receiving end; S300: In response to the receiving end receiving the communication interruption, the receiving end parses the communication interruption and obtains communication data corresponding to the communication interruption from the shared memory.
[0035] The first processor is used to run the first system, and the second processor is used to run the second system; The performance indicator of the first processor is better than the performance indicator of the second processor, and the performance indicator includes at least one of the following: processor frequency, cache capacity, and memory bandwidth; The first system is a time-sharing operating system, and the second system is a real-time operating system.
[0036] Taking the dual-core baseboard management controller as an example, the solution is explained. The first processor refers to a processor with better performance, which is used to run the first system. The first system is a time-sharing operating system, schematically, such as a Linux system. It performs the main control tasks. The second processor, which has poorer performance than the first processor, is used to run the second system. The second system is a real-time operating system (RTOS system) that assists in completing specific functions. Figure 3 The system architecture for inter-core communication between a first processor and a second processor is shown. Figure 3 The first processor running the Linux system includes an application layer and a kernel layer. The communication method includes a method for transmitting data from the first processor to the second processor, which specifically includes: a part of transmitting data from the Linux application layer of the first processor to the RTOS system of the second processor, and a part of transmitting data from the Linux kernel layer of the first processor to the RTOS system of the second processor. The communication method also includes a method for transmitting data from the second processor to the first processor, and then distributing the data to the corresponding business layer for execution according to whether the data execution end is the Linux application layer or the Linux kernel layer. Here, the business layer to the application layer or the kernel layer.
[0037] In some embodiments, the transmitting end is a first processor and the receiving end is a second processor; The sender sends communication data to the shared memory, including: Determine a sender according to a data source of the first system, and generate first target data according to the sender, wherein the sender includes an application layer and a kernel layer; Send the first target data to the shared memory.
[0038] Determining a sender according to a data source of the first system, and generating first target data according to the sender, including: In response to the data source being the application layer of the first system, the application layer is set as the sender, a data header in a preset format is set with a first identifier, and the set data header is combined with a data body in the preset format to obtain first target data, wherein the first identifier is used to indicate that the data source is the application layer; In response to the data source being the kernel layer of the first system, the kernel layer is set as the sender, the data header in the preset format is set with the second identifier, and the set data header is combined with the data body in the preset format to obtain the second target data, wherein the second identifier is used to indicate that the data source is the kernel layer.
[0039] Figure 4The format of the first target data is shown. Schematically, the first target data can be composed of a 32-bit positive integer. Bits 0 to 11 are the command number. Bits 12 to 15 indicate whether there is subsequent data; 1 indicates yes, 0 indicates no, and the 4 bytes are used for situations where the amount of data is large and needs to be sent in packets. Bits 16 to 23 are the module number, and the user can set the meaning of the corresponding number as needed. Bits 24 to 27 are the responders of the command; bits 28 to 31 are the initiators of the command. The numbers of the initiator and responder are consistent with the InitiatorDevId field in IpiCmdId. Schematically, 0 represents RTOS, 1 represents the Linux kernel layer, and 2 represents the Linux application layer.
[0040] Obtain communication data corresponding to the communication interruption from the shared memory, including: The receiving end transmits the first target data from the shared memory to the transmission data group according to the analyzed communication interruption, wherein the first target data represents data transmitted from the sending end to the receiving end through the shared memory, and the transmission data group is used to transmit the first target data from the shared memory to the receiving end; Determining whether the target command carried by the first target data is supported by the receiving end; In response to the target command being supported by the receiving end, the receiving end executes the target command to obtain an execution result.
[0041] The process from the Linux application layer to the RTOS system is as follows: The business process of the Linux application layer uses system calls such as ioctl to send commands to the IPI driver of the kernel layer; the IPI driver structures the data and puts it into shared memory, and sends an interrupt to the second processor; after receiving the interrupt, the RTOS wakes up the receiving thread, and the receiving thread receives data from the shared memory.
[0042] The process sent from the Linux kernel layer to the RTOS system is as follows: The service thread of the Linux kernel layer sends data to the IPI driver; the IPI driver structures the data and puts it into the shared memory, and sends an interrupt to the second processor; after receiving the interrupt, the RTOS wakes up the receiving thread, and the receiving thread receives the data from the shared memory.
[0043] The process sent from the RTOS system to Linnux is as follows: The RTOS system writes the command data into the shared memory and sends an interrupt to the first processor; after receiving the interrupt, Linux distributes the data command to the business process corresponding to the command.
[0044] Schematically, the code for the thread to interact with the IPI driver through IPI commands and write data to the shared memory is as follows: typedef struct { uint32_t magic; / / "IPIC" --->0x49504943 uint32_t cmd; / / command word uint8_t needResp; / / Whether a reply is needed uint8_t channel; / / Channel number of shared memory, filled by IPI driver IpiCmdId cmdId; / / Command code uint32_t pkgIndex; / / Package number, used when total length > shared memory channel capacity int32_t pid; / / Application layer process number, used when the initiator is the Linux application layer int32_t cmdReturn; / / Command execution result uint32_t totalBodyLen; / / Used when the total length of data is greater than the capacity of the shared memory channel uint32_t bodyLen; / / The length of the current command body uint32_t bodyCrc; / / Command body checksum uint8_t body[0]; / / command body }IpiCmdPackage; The IpiCmdId format is as follows: typedef struct { / / Device id of the command sender 0:RTOS 1:Linux kernel 2:Linux app uint16_t initiatorDevId : 2; / / Command id, used to match command requests and replies uint16_t cmdId : 14; }IpiCmdId; It should be noted that the content after “ / / ” in the above code is used to comment on the meaning of the previous line of code.
[0045] Before sending the first target data to the shared memory, the method further includes: Writing the first target data into the inter-core communication file handle, and performing data verification on the first target data; In response to the first target data passing the data verification, it is determined whether the first target data is synchronization data.
[0046] The data source is the application layer of the first system, and the first target data is stored in the shared memory, including: Sending the processing task of the first target data to the kernel layer of the first system through the message queue; Acquire a first data group, and determine whether the first data group is idle, wherein the first data group is used to transfer first target data whose data source is a first system application layer and is synchronous data to a shared memory; In response to the first data group being idle, determining whether the capacity of the first target data exceeds the capacity of the memory channel, wherein the shared memory includes at least one memory channel, and the capacity of any memory channel is the same; Determine whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory via the first data group and stored in any idle memory channel.
[0047] The data source is the kernel layer of the first system, and the first target data is stored in the shared memory, including: Acquire a second data group, and determine whether the second data group is idle, wherein the second data group is used to transfer first target data whose data source is a first system kernel layer and is synchronous data to a shared memory; In response to the second data group being idle, determining whether the capacity of the first target data exceeds the capacity of the memory channel; In response to the capacity of the first target data not exceeding the capacity of the memory channel, sending the first target data to the shared memory via the first data group; Determine whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the second data group and stored in any idle memory channel.
[0048] The method also includes: In response to the first target data being asynchronous data, determining whether the capacity of the first target data exceeds the capacity of the memory channel; In response to the first target data capacity not exceeding the capacity of the memory channel, determining whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the inter-core communication file handle and stored in any memory channel.
[0049] The method also includes: In response to the first target data capacity exceeding the capacity of the memory channel, the first target data is divided into at least two data packets, and the at least two data packets are sent to the shared memory and stored in the idle memory channel, wherein the capacity of the data packets is not greater than the capacity of any memory channel.
[0050] The method also includes: In response to the absence of an idle memory channel in the shared memory, re-determining whether there is an idle memory channel in the shared memory every retry interval; In response to the number of times of re-determining whether there is an idle memory channel in the shared memory being greater than a preset number, device abnormality information is fed back to the sending end.
[0051] The receiving end transmits the first target data from the shared memory to the transmission data group according to the analyzed communication interruption, including: The receiving end triggers the interrupt source processing function according to the communication interruption; Poll any memory channel in the shared memory according to the interrupt source processing function; In response to the existence of the first target data in the memory channel, obtaining a data header of the first target data and verifying the first target data; In response to the first target data being successfully verified, identifying a data sender according to the data header; In response to the data sender being the first system, transmitting the first target data to the transmission data group; The interrupt source processing function is used to process the communication interrupt from the first system.
[0052] Determining whether the target command carried by the first target data is supported by the receiving end includes: The transmission data group is monitored, and first target data is acquired in response to the transmission data group, and then it is identified according to the management command whether a command carried by the first target data is supported by the second system.
[0053] The method also includes: The second system determines whether the first target data needs to be replied; In response to the first target data needing to be replied, after reading the first target data from the shared memory, releasing the memory channel corresponding to the first target data, and sending the execution result to the first system after the target command carried by the first target data is executed; In response to the first target data not requiring reply, the first target data is discarded, and the memory channel corresponding to the first target data is released.
[0054] The method also includes: The memory channels of the shared memory are divided into a first part of memory channels and a second part of memory channels, wherein the first part of memory channels includes a plurality of memory channels for receiving first target data, and the second part of memory channels includes a plurality of memory channels for receiving second target data, wherein the second target data represents data transmitted from the second system to the first system through the shared memory.
[0055] For an example of data transmission from the Linux system kernel layer of the first processor to the RTOS system of the second processor, please refer to the following embodiment 2 for details.
[0056] In some other embodiments, the transmitting end is the second processor and the receiving end is the first processor; The sender sends communication data to the shared memory, including: storing the second target data of the sending end in the shared memory and sending a communication interrupt to the first system; The first system traverses any memory channel in the shared memory according to the communication interruption to verify the second target data; In response to the second target data passing verification, determining the execution object according to the data header of the second target data; According to the execution object, the second target data is sent to the receiving end for execution.
[0057] Before the second target data of the sending end is stored in the shared memory and the communication interrupt is sent to the first system, the method further includes: The second system is set as a sending end, a data header in a preset format is set with a third identifier, and the set data header is combined with a data body in the preset format to obtain second target data, wherein the third identifier is used to indicate that the data source is the second system; Determining whether the second target data is synchronization data; In response to the second target data being synchronous data, a third data group is acquired, and it is determined whether the third data group is idle, wherein the third data group is used to transfer the second target data being synchronous data from the second system to the shared memory.
[0058] According to the execution object, the second target data is sent to the receiving end for execution, including: Traversing the memory channels in the shared memory, obtaining the data header of the second target data stored in the memory channel, and performing data verification on the data header; In response to the data header verification being successful, determining, according to the data header, that the data receiving end is an application layer of the first system or a kernel layer of the first system; In response to the data receiving end being the kernel layer of the first system, sending the data header to the target queue; In response to the data receiving end being the application layer of the first system, the memory channel number of the shared memory where the second target data is stored is sent to the application layer of the first system.
[0059] The receiving end is a kernel layer of the first system, and the method further includes: monitoring the target queue, acquiring second target data in response to the target queue, and identifying whether a command carried by the second target data is supported by the first system according to the management command; In response to the command carried by the second target data being supported by the first system, a callback function of the command is searched and the command is executed.
[0060] The receiving end is an application layer of the first system, and the method further includes: Triggering a preset function of the first system application layer, and obtaining the channel number of the shared memory where the second target data is located through parsing the preset function; Reading a data header of the second target data according to the channel number, and determining a target command according to the data header; Call the callback function corresponding to the target command to execute the target command and get the execution result.
[0061] The memory channels of the shared memory are divided into a first part of memory channels and a second part of memory channels, wherein the first part of memory channels includes a plurality of memory channels for receiving first target data, and the second part of memory channels includes a plurality of memory channels for receiving second target data.
[0062] Preferably, an even number of channels is provided in the shared memory, wherein the first processor uses half of the channels and the second processor uses the other half of the channels to avoid conflicts. Figure 5 The data organization in the shared memory is shown in Figure 1. The channel status is used to identify whether the channel is occupied. For an introduction to the IPI command data header, see Figure 4 , and the corresponding textual explanation in the previous text. The IPI command data body is the data to be transmitted, and its length is determined by the size of the memory. Among them, n represents the byte length of the IPI command data body.
[0063] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0064] In some other embodiments, a communication device is provided, such as Figure 6 As shown, the method is applied to data transmission between a first processor and a second processor, the first processor and the second processor are each other's sending end and receiving end, and includes: A data sending module is used for the sending end to send communication data to the shared memory; An interruption sending module, used for sending a communication interruption from the sending end to the receiving end in response to the shared memory completing the reception of the communication data; The data receiving module is used for responding to the communication interruption received by the receiving end, the receiving end analyzing the communication interruption, and obtaining the communication data corresponding to the communication interruption from the shared memory.
[0065] For the specific definition of the communication device, please refer to the definition of the communication method above, which will not be repeated here. Each module in the above communication device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0066] In other embodiments, Figure 7 As shown, a computer device includes a memory, a processor, and a communication program stored in the memory and executable on the processor. When the processor executes the communication program, the above-mentioned communication method is implemented, which will not be described in detail here.
[0067] In other embodiments, a computer-readable storage medium stores a communication program thereon, and when the communication program is executed by a processor, the above-mentioned communication method is implemented, which will not be described in detail here.
[0068] In other embodiments, a computer program product includes a computer program. When the computer program is executed by a processor, the above-mentioned communication method is implemented, which will not be described in detail here.
[0069] Embodiment 1 Embodiment 1 describes the specific process of sending data from the Linux application layer of the first processor to the RTOS of the second processor, such as Figure 8 As shown: Organize the IpiCmdPackage data header and data body to obtain the first target data. The cmdId is atomically incremented and the highest bit is changed to 10h, 10h represents the Linux application layer, and pid is set to the pid of the current process; Open the file handle of the IPI driver; Determine whether it is a synchronous command, that is, a command that needs to wait for command processing to be completed. If it is not a synchronous command, directly call the system call write to write the file handle of the IPI driver; If it is a synchronous command, first obtain an idle appInitiatorMsgQ queue, send it to the kernel layer, and then send the first target data to the shared memory. Since the command body length may exceed the capacity of a shared memory channel, the data is sent in packets.
[0070] Receive the reply from RTOS. Since RTOS may send packets in batches, it may also receive packets in batches.
[0071] The execution process of Linux IPI driver command sending is as follows Fig. 9 shown.
[0072] When the IPI driver receives the data sent by the application layer, it verifies the data. If the verification fails, it sends a signal to the application layer and returns a verification failure.
[0073] If the data verification is successful, the idle channel in the shared memory is obtained. If there is no idle channel at present, the retry is not more than three times, and the sleep time between each retry is 500ms.
[0074] If the number of retries is greater than 3, a signal is sent to the user, a device exception is returned, and the channel is released.
[0075] After obtaining the idle channel, organize the data sent to the RTOS and calculate the check value of the data.
[0076] Write the prepared data into the shared memory and send an IPI interrupt to the RTOS to notify the RTOS.
[0077] The IPI driver data distribution process of RTOS is as follows Fig.10 shown.
[0078] After Linux puts the data into the shared memory, it sends an interrupt to the co-core, triggering the interrupt source processing function (ISR) of the RTOS. The interrupt processing function releases the rtosRecvSem semaphore resource, thereby waking up the RTOS data distribution thread.
[0079] The RTOS data distribution thread is usually blocked waiting for the rtosRecvSem semaphore resource to be released.
[0080] After the rtosRecvSem semaphore resource is released, the thread will check all channels. If there is data in any channel, the data header will be taken out and the data will be verified. If the data verification fails, the needResp field in the data header will be used to determine whether the command needs a reply. If it does, a reply will be sent to the shared memory. The execution result is "verification failed". Then it will be determined whether it is the last channel. If not, check whether the next channel has data. If so, restart the sleep state and wait for the rtosRecvSem resource.
[0081] If the verification is successful, the command initiator is Linux, which means that the data packet is a command request packet.
[0082] If the initiator is Linux, the data is sent to the rtosTargetMsgQ queue.
[0083] Determine whether it is the last channel, if not, check whether the next channel has data. If so, restart the sleep state and wait for rtosRecvSem resources.
[0084] RTOS business thread data processing flow is as follows Fig.11 As shown: This thread has been blocking and listening to the rtosTargetMsgQ queue, the producer of which is the IPI command distribution thread. When the rtosTargetMsgQ queue receives data, it determines whether the command is supported based on netFn and cmd. If not, the execution result is set to "the command is not supported". If supported, the callback function of the command is found and executed; Determine whether the command needs a reply. If not, re-enter the blocking listening rtosTargetMsgQ state. If necessary, organize the data of the IPI data packet, magic, cmd, cmdId, pid, and channel remain unchanged, cmdReturn is changed to the command execution result, body is changed to the content that needs to be replied, bodyLen and bodyCrc are set to the length and check value of the body respectively; Send the data to the shared memory and then listen to rtosTargetMsgQ again.
[0085] At this point, the data transfer from the Linux application layer to the RTOS is completed.
[0086] Embodiment 2 Embodiment 2 describes the specific process of sending data from the Linux kernel layer of the first processor to the RTOS of the second processor. Fig.12 As shown: Organize IPI data packets, where cmdId is atomically incremented and the highest bit is changed to 01h, where 01h represents the Linux kernel layer, and pid is set to 0; Determine whether the command is a synchronous command. If it is an asynchronous command, send it to the shared memory and then end it; If it is a synchronous command, first apply for an idle kernelInitiatorMsgQ queue and save the correspondence between cmdId and the queue, then send the data to the shared memory; Receive RTOS data reply; If the receiving queue times out, the execution result is that the command is set to time out, and the queue is released, and then returned.
[0087] The execution process of Linux's IPI driver command sending, RTOS's IPI driver data distribution process, and RTOS business thread data processing process are the same as those described in Example 1 and will not be repeated here.
[0088] Embodiment 3 RTOS end data transmission is as follows Fig.13 As shown, Organize the IPI data packet to obtain the second target data, where cmdId is atomically incremented and the highest two bits are changed to 01h (indicating Linux Kernel) and pid is 0; Determine whether the command is a synchronous command. If it is an asynchronous command, send it to the shared memory and then end it; If it is a synchronous command, first apply for an idle rtosInitiatorMsgQ queue and save the corresponding relationship between cmdId and the queue, and then send the data to the shared memory; Receive Linux data reply; If the receiving queue times out, the execution result is that the command is set to time out, and the queue is released, and then returned.
[0089] The execution process of Linux IPI driver data distribution is as follows Fig.14 shown.
[0090] This process will check all channels. If there is data in a channel, the data header will be taken out and the data will be verified. If the data verification fails, the needResp field in the data header will be used to determine whether the command needs a reply. If it does, a reply will be sent to the shared memory. If the execution result is "verification failed", it will be determined whether it is the last channel. If so, it will exit. If not, it will be determined whether there is data in the next channel.
[0091] If the verification is successful, the initiator of the command data is the RTOS, which means that the IPI data packet is a command request packet.
[0092] When the initiator is RTOS, it determines whether the receiver is the kernel layer. If so, the IPI data header is sent to the kernelTargetMsgQ queue; otherwise, a signal is sent to the corresponding application layer and the channel number of the shared memory.
[0093] Determine whether it is the last channel, if so, exit, if not, determine whether the next channel has data.
[0094] The Linux kernel layer business thread command execution process is as follows Fig.15 shown.
[0095] This thread has been blocking and listening to the kernelTargetMsgQ queue, the producer of which is the IPI command distribution thread. When the kernelTargetMsgQ queue receives data, it determines whether the command is supported based on netFn and cmd. If not, the execution result is set to "the command is not supported". If supported, the callback function of the command is found and executed; Determine whether the command needs a reply. If not, re-enter the blocking listening kernelTargetMsgQ state. If necessary, execute the data of the organization IPI data packet, magic, cmd, cmdId, pid, channel remain unchanged, cmdReturn is changed to the command execution result, body is changed to the content that needs to be replied, bodyLen and bodyCrc are set to the length and check value of the body respectively; Send the data to the shared memory and then listen to the kernelTargetMsgQ queue again.
[0096] The Linux application layer service process command receiving process is as follows Fig.16 shown.
[0097] When the IPI driver receives the data sent by the RTOS to the current application layer process, the IPI driver sends a signal to the current application layer process, and the signal carries the channel number of the shared memory.
[0098] When the singal handler of the application layer is triggered, the handler will parse the channel number of the shared memory from its input parameters. Then the handler will read the IPI data header from the shared memory; According to the information in the IPI data header, it is determined whether it is a command reply. If so, the appInitiatorMsgQ queue corresponding to the command is found and the IPI data header is sent to the queue. After receiving the IPI data header, the thread sending the command will read the IPI data body from the shared memory for subsequent processing; If the IPI data packet is not a command reply (i.e. a command request), then look for the callback function of the command. If there is one, then take out all the data and execute the command. After the execution is completed, save the execution result; and determine whether the command needs a reply. If not, then end it directly; if a reply is required, organize the IPI command header and command body, and send these data to the shared memory.
[0099] If there is no callback function for the command, the execution result is set to not supported.
[0100] Finally, determine whether the command requires a reply. If not, terminate directly. If a reply is required, organize the IPI command header and command body and send these data to the shared memory.
[0101] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program loaded on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory, or installed from a ROM. When the computer program is executed by an external processor, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0102] It should be noted that the computer-readable medium of the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0103] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: in response to detecting that the peripheral mode of the terminal is not activated, obtains the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determines whether the user is obtaining the screen information of the terminal; in response to the judgment result that the user is not obtaining the screen information of the terminal, controls the screen to enter the immediate dimming mode.
[0104] Computer program code for performing the operation of the embodiments of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0105] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0106] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
[0107] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A communication method, characterized in that: Applied to data transmission between a first processor and a second processor, the first processor and the second processor are a sending end and a receiving end of each other, the method comprising: The transmitting end sends communication data to the shared memory; In response to the shared memory completing the reception of the communication data, the sending end sending a communication interrupt to the receiving end; In response to the receiving end receiving the communication interruption, the receiving end parses the communication interruption and obtains communication data corresponding to the communication interruption from the shared memory.
2. The communication method according to claim 1, characterized in that: The first processor is used to run a first system, and the second processor is used to run a second system; The performance index of the first processor is better than the performance index of the second processor, and the performance index includes at least one of the following: processor frequency, cache capacity, and memory bandwidth; The first system is a time-sharing operating system, and the second system is a real-time operating system.
3. The communication method according to claim 1 or 2, characterized in that: The sending end is the first processor, and the receiving end is the second processor; The sending end sends communication data to the shared memory, including: Determine a sender according to a data source of the first system, and generate first target data according to the sender, wherein the sender includes an application layer and a kernel layer; The first target data is sent to the shared memory.
4. The communication method according to claim 3, characterized in that: Determining a sender according to a data source of the first system, and generating first target data according to the sender, including: In response to the data source being the application layer of the first system, setting the application layer as a sender, setting a data header in a preset format with a first identifier, and combining the set data header with a data body in the preset format to obtain first target data, wherein the first identifier is used to indicate that the data source is the application layer; In response to the data source being the kernel layer of the first system, the kernel layer is set as the sender, a data header in a preset format is set with a second identifier, and the set data header is combined with a data body in a preset format to obtain second target data, wherein the second identifier is used to indicate that the data source is the kernel layer.
5. The communication method according to claim 3, characterized in that: The acquiring, from the shared memory, communication data corresponding to the communication interruption comprises: The receiving end transmits the first target data from the shared memory to the transmission data group according to the analyzed communication interruption, wherein the first target data represents data transmitted from the sending end to the receiving end through the shared memory, and the transmission data group is used to transmit the first target data from the shared memory to the receiving end; Determining whether the target command carried by the first target data is supported by the receiving end; In response to the target command being supported by the receiving end, the receiving end executes the target command to obtain an execution result.
6. The communication method according to claim 3, characterized in that: Before sending the first target data to the shared memory, the method further includes: Writing the first target data into the inter-core communication file handle, and performing data verification on the first target data; In response to the first target data passing the data verification, it is determined whether the first target data is synchronization data.
7. The communication method according to claim 6, characterized in that: The data source is an application layer of the first system, and the storing the first target data in a shared memory includes: Sending the processing task of the first target data to the kernel layer of the first system through a message queue; Acquire a first data group, and determine whether the first data group is idle, wherein the first data group is used to transfer first target data whose data source is a first system application layer and is synchronous data to a shared memory; In response to the first data group being idle, determining whether the capacity of the first target data exceeds the capacity of a memory channel, wherein the shared memory includes at least one memory channel, and the capacity of any of the memory channels is the same; Determine whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the first data group and stored in any idle memory channel.
8. The communication method according to claim 6, characterized in that: The data source is a kernel layer of the first system, and the storing the first target data in a shared memory includes: Acquire a second data group, and determine whether the second data group is idle, wherein the second data group is used to transfer first target data whose data source is a first system kernel layer and is synchronous data to a shared memory; In response to the second data group being idle, determining whether the capacity of the first target data exceeds the capacity of the memory channel; In response to the capacity of the first target data not exceeding the capacity of the memory channel, sending the first target data to the shared memory via a first data group; Determine whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the second data group and stored in any idle memory channel.
9. The communication method according to claim 6, characterized in that: The method further comprises: In response to the first target data being asynchronous data, determining whether the capacity of the first target data exceeds the capacity of the memory channel; In response to the first target data capacity not exceeding the capacity of the memory channel, determining whether there is an idle memory channel in the shared memory; In response to the existence of an idle memory channel in the shared memory, the first target data is sent to the shared memory through the inter-core communication file handle and stored in any memory channel.
10. The communication method according to claim 9, characterized in that: The method further comprises: In response to the first target data capacity exceeding the capacity of the memory channel, the first target data is divided into at least two data packets, and the at least two data packets are sent to the shared memory and stored in an idle memory channel, wherein the capacity of the data packets is not greater than the capacity of any of the memory channels.
11. The communication method according to claim 9, characterized in that: The method further comprises: In response to the absence of an idle memory channel in the shared memory, re-determining whether there is an idle memory channel in the shared memory at every retry interval; In response to the number of times of re-determining whether there is an idle memory channel in the shared memory being greater than a preset number, device abnormality information is fed back to the sending end.
12. The communication method according to claim 5, characterized in that: The receiving end transmits the first target data from the shared memory to the transmission data group according to the analyzed communication interruption, including: The receiving end triggers an interrupt source processing function according to the communication interruption; Poll any memory channel in the shared memory according to the interrupt source processing function; In response to the first target data existing in the memory channel, obtaining a data header of the first target data and verifying the first target data; In response to the first target data being successfully verified, identifying a data sender according to the data header; In response to the data sender being the first system, transmitting the first target data to the transmission data group; The interrupt source processing function is used to process the communication interrupt from the first system.
13. The communication method according to claim 5, characterized in that: Determining whether the target command carried by the first target data is supported by the receiving end includes: The transmission data group is monitored, the first target data is acquired in response to the transmission data group, and then, according to a management command, it is identified whether a command carried by the first target data is supported by the second system.
14. The communication method according to claim 5, characterized in that: The method further comprises: The second system determines whether the first target data needs to be replied; In response to the need to reply to the first target data, after reading the first target data from the shared memory, releasing the memory channel corresponding to the first target data, and sending the execution result to the first system after the target command carried by the first target data is executed; In response to the first target data not requiring a reply, the first target data is discarded, and a memory channel corresponding to the first target data is released.
15. The communication method according to claim 5, characterized in that: The method further comprises: The memory channels of the shared memory are divided into a first part of memory channels and a second part of memory channels, wherein the first part of memory channels includes a plurality of memory channels for receiving the first target data, and the second part of memory channels includes a plurality of memory channels for receiving second target data, wherein the second target data represents data transmitted from the second system to the first system through the shared memory.
16. The communication method according to claim 1 or 2, characterized in that: The sending end is the second processor, and the receiving end is the first processor; The sending end sends communication data to the shared memory, including: storing the second target data of the sending end in the shared memory and sending a communication interrupt to the first system; The first system traverses any memory channel in the shared memory according to the communication interruption to verify the second target data; In response to the second target data passing verification, determining an execution object according to a data header of the second target data; According to the execution object, the second target data is sent to a receiving end for execution.
17. The communication method according to claim 16, characterized in that: Before the second target data of the sending end is stored in the shared memory and the communication interrupt is sent to the first system, the method further includes: The second system is set as a sending end, a data header in a preset format is set with a third identifier, and the set data header is combined with a data body in the preset format to obtain second target data, wherein the third identifier is used to indicate that the data source is the second system; Determining whether the second target data is synchronization data; In response to the second target data being synchronous data, a third data group is acquired, and it is determined whether the third data group is idle, wherein the third data group is used to transfer the second target data being synchronous data from the second system to the shared memory.
18. The communication method according to claim 16, characterized in that: The step of sending the second target data to a receiving end for execution according to the execution object includes: Traversing the memory channels in the shared memory, obtaining the data header of the second target data stored in the memory channel, and performing data verification on the data header; In response to the data header verification being successful, determining, according to the data header, that the data receiving end is an application layer of the first system or a kernel layer of the first system; In response to the data receiving end being the kernel layer of the first system, sending the data header to the target queue; In response to the data receiving end being the application layer of the first system, the memory channel number of the shared memory where the second target data is stored is sent to the application layer of the first system.
19. The communication method according to claim 18, characterized in that: The receiving end is a kernel layer of the first system, and the method further includes: monitoring the target queue, acquiring the second target data in response to the target queue, and identifying whether a command carried by the second target data is supported by the first system according to a management command; In response to the command carried by the second target data being supported by the first system, a callback function of the command is searched and the command is executed.
20. The communication method according to claim 18, characterized in that: The receiving end is an application layer of the first system, and the method further includes: Triggering a preset function of the first system application layer, and obtaining the channel number of the shared memory where the second target data is located through parsing the preset function; reading a data header of the second target data according to the channel number, and determining a target command according to the data header; The callback function corresponding to the target command is called to execute the target command and obtain an execution result.
21. A computer device, characterized in that: The invention comprises a memory, a processor and a communication program stored in the memory and executable on the processor, wherein when the processor executes the communication program, the communication method according to any one of claims 1 to 20 is implemented.
22. A computer-readable storage medium, characterized in that: A communication program is stored thereon, and when the communication program is executed by a processor, the communication method described in any one of claims 1-20 is implemented.
23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the communication method according to any one of claims 1 to 20 is implemented.
Citation Information
Patent Citations
Communication method and device, computer readable storage medium and electronic equipment
CN116243995A
Inter-core communication method and device, multi-core processor and electronic equipment
CN119225995A
Firmware upgrading method and apparatus, BMC chip, server and medium
WO2024255223A1