CN117708019A - Communication method and communication system - Google Patents

Communication method and communication system Download PDF

Info

Publication number
CN117708019A
CN117708019A CN202311627912.7A CN202311627912A CN117708019A CN 117708019 A CN117708019 A CN 117708019A CN 202311627912 A CN202311627912 A CN 202311627912A CN 117708019 A CN117708019 A CN 117708019A
Authority
CN
China
Prior art keywords
storage device
bmc
host
signal line
data read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311627912.7A
Other languages
Chinese (zh)
Inventor
耿梦达
尹明
王博
赵明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yanxiang Intelligent Iot Software Co ltd
Original Assignee
Shenzhen Yanxiang Intelligent Iot Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yanxiang Intelligent Iot Software Co ltd filed Critical Shenzhen Yanxiang Intelligent Iot Software Co ltd
Priority to CN202311627912.7A priority Critical patent/CN117708019A/en
Publication of CN117708019A publication Critical patent/CN117708019A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The embodiment of the application relates to the technical field of computers and discloses a communication method and a communication system, wherein the communication system comprises HOST and BMC, or the communication system comprises HOST, BMC and storage equipment; the HOST is connected with the BMC through a first signal line, and the method comprises the following steps: when the BMC detects first information to be sent to HOST and after the data read-write permission for the storage device is successfully obtained, the BMC writes the first information into the storage device, and after the first information is written into the storage device, the data read-write permission for the storage device is released; and then, after the HOST detects the first data reading indication information aiming at the storage device and successfully acquires the data reading and writing permission of the storage device, reading the first information from the storage device, and after the first information is read from the storage device, releasing the data reading and writing permission of the storage device. By adopting the mode, the embodiment of the application realizes the process of the BMC actively communicating to HOST.

Description

Communication method and communication system
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a communication method and a communication system.
Background
For servers with BMCs (Baseboard Management Controller, baseboard management controllers) deployed, there is much information interaction between the BMCs and HOST HOSTs of the servers. Typically, a BMC as a slave to HOST can only receive information from HOST.
However, in the communication process between the BMC and the HOST, the HOST may be beneficial to the management and control process of the server if it can obtain the information actively provided by the BMC. For example, the BMC grasps a large amount of information such as system state information of the server, and when it is analyzed that an abnormality occurs in part of the hardware of the server according to the information, if the BMC can timely transmit information to the HOST to enable the server to quickly process according to the abnormality, the management and control process of the server will be more efficient. Therefore, how to realize the function of BMC to actively communicate with HOST is a problem to be solved.
Disclosure of Invention
In view of the above problems, embodiments of the present application provide a communication method and a communication system, which can implement a process of active communication from BMC to HOST.
According to an aspect of the embodiments of the present application, there is provided a communication method applied to a communication system, where the communication system includes a HOST and a BMC, or where the communication system includes the HOST, the BMC, and a storage device; the HOST is connected with the BMC through a first signal line, and the method comprises the following steps:
when the BMC detects first information to be sent to the HOST, acquiring data read-write permission of the storage device through the first signal line;
After the BMC successfully acquires the data read-write permission aiming at the storage device, writing the first information into the storage device, and after the first information is written into the storage device, releasing the data read-write permission aiming at the storage device;
when detecting first data reading indication information aiming at the storage equipment, the HOST acquires data reading and writing permission of the storage equipment through the first signal line;
and after the first information is read from the storage device, releasing the data read-write permission of the storage device.
According to an aspect of embodiments of the present application, there is provided a communication system, the communication system including a HOST and a BMC, or the communication system including the HOST, the BMC, and a storage device for storing information written by the BMC and information written by the HOST; the HOST is connected with the BMC through a first signal line, wherein:
the BMC is used for executing the operation executed by the BMC in the communication method;
the HOST is used for executing the operation executed by the HOST in the communication method;
According to an aspect of the embodiments of the present application, a server is provided, where the communication system is deployed.
In summary, a first signal line is provided between the HOST and the BMC, both the BMC and the HOST can acquire and release the data read-write permission of the storage device through the first signal line, and the storage device is introduced between the HOST and the BMC, both the HOST and the BMC can read and write the data of the storage device under the condition that the data read-write permission of the storage device is successfully obtained, so that the process of actively communicating to the HOST by the BMC is realized.
The foregoing description is only an overview of the technical solutions of the embodiments of the present application, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present application can be more clearly understood, and the following detailed description of the present application will be presented in order to make the foregoing and other objects, features and advantages of the embodiments of the present application more understandable.
Drawings
The drawings are only for purposes of illustrating embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1A is a schematic structural diagram of a server according to an embodiment of the present application;
Fig. 1B is a schematic structural diagram of a communication system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a communication process according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a communication method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a control process for the first signal line according to an embodiment of the present application;
fig. 5 is a schematic diagram of another control process for the first signal line according to the embodiment of the present application;
fig. 6 is a flow chart of another communication method provided in an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein.
With the rapid development of the internet industry, the number of servers deployed worldwide has become very large, so that the security problem of the servers is also becoming an important point of research. BMCs are often deployed in mid-high end servers. The BMC may be understood as a service management system. For example, the BMC herein may be an embedded central manager with a range of monitoring and control functions, the subject of which is the hardware of the server. For example, the BMC can monitor parameters such as temperature or voltage of hardware of the server and perform corresponding adjustment work to ensure that the server is in a healthy state.
In the actual monitoring and management process, more information interaction exists between the BMC and the HOST of the monitored server. HOST may be understood as a server system. For example, HOST herein may be understood as the central manager of the server. Information interaction between the BMC and the HOST needs to conform to IPMI (Intelligent Platform Management Interface ) protocol related specifications, under which the BMC and the HOST communicate by means of LPC (Low Pin Count), LAN (Local Area Network ), etc., and a slave device of the BMC as the HOST generally only receives information from the HOST.
However, in the communication process between the BMC and the HOST, the HOST may be beneficial to the management and control process of the server if it can obtain the information actively provided by the BMC. For example, the BMC grasps a large amount of information such as system state information of the server, and when it is analyzed that an abnormality occurs in part of the hardware of the server according to the information, if the BMC can timely transmit information to the HOST to enable the server to quickly process according to the abnormality, the management and control process of the server will be more efficient. Therefore, how to realize the function of BMC to actively communicate with HOST is a problem to be solved.
In order to solve the above problems, embodiments of the present application provide a communication method. On the one hand, the communication method can realize the process of the BMC actively communicating to HOST. On the other hand, by adopting the communication method, HOST communication to BMC can be realized actively.
It should be noted that, the communication method adopted in the embodiments of the present application is not based on the communication between HOST and BMC implemented by the conventional IPMI protocol. According to the communication method adopted by the embodiment of the invention, communication between HOST and BMC is realized by introducing the first signal line and the storage device, the communication method does not limit the data read-write format, the data read-write data quantity and the like of the storage device, and the restrictions of IPMI on the data transmission format, the data quantity and the like in the communication process are eliminated, so that the communication process between HOST and BMC is more free and convenient, and the communication efficiency between HOST and BMC is improved.
Wherein the first signal line may be any one of the following: single bus, SPI (Serial Peripheral Interface ) bus, I 2 C bus (Inter-Integrated Circuit, integrated circuit bus). When the first signal line is a single bus, hardware resources required for communication between the HOST and the BMC can be effectively saved, maximum utilization of the resources can be realized, control logic can be simplified, and control efficiency can be improved.
The storage device is a readable and writable storage device. For example, the storage device may be memory in a server where HOST resides, such as Flash memory. Alternatively, the storage device may be a storage device operating on the internet, such as a network hard disk or a data storage server.
In one embodiment, the storage device is a readable and writable storage device having a power-down persistence function. The power-down continuation function may also be referred to herein as a power-down hold function. In addition to the HOST and the BMC being able to communicate with each other using the storage device, the HOST and the BMC may store their respective key information in the storage device. Equivalently, the storage device in the embodiment of the application can not only play a role in helping HOST communicate with BMC, but also play a role in saving key information to prevent loss. In addition, if the storage device has a power-off continuous function, the storage device can also play a role in power-off protection on the information written into the storage device, that is, the information in the storage device can still be kept for a period of time when the HOST or the BMC is powered off. If the key information of the BMC is stored in the firmware of the BMC, the information is lost when the firmware of the BMC is updated, so that the BMC in the embodiment of the present application stores the key information in the storage device, and the above-mentioned information loss situation can be avoided.
The communication method can be applied to a communication system.
One implementation of the communication system includes HOST and BMC.
Another implementation regarding a communication system is that the communication system includes a BMC, HOST, and storage device. The communication system described herein also includes a storage device in comparison to the structure of the previous communication system.
Wherein HOST is connected with BMC through first signal line. In one embodiment, the HOST GPIO (General Purpose Input/Output) interface is connected to the BMC GPIO interface via a first signal line. The HOST's GPIO interface is configured to be in an input state when a first preset condition is satisfied, the first preset condition including the first signal line being in an idle state or the BMC controlling the first signal line to be in a busy state. The HOST's GPIO interface is configured to output state during control of the first signal line in a busy state. The GPIO interface of the BMC is configured to be in an input state when a second preset condition is met, wherein the second preset condition comprises that the first signal line is in an idle state or the HOST controls the first signal line to be in a busy state. The GPIO interface of the BMC is configured to be in an output state during controlling the first signal line to be in a busy state.
Alternatively, both HOST and BMC may establish a connection with the storage device via wireless communication. In this case, the HOST and BMC may communicate with the storage device via a network such as the internet. Specifically, HOST may perform data read-write operations on a storage device through a network such as the internet.
Alternatively, the HOST may establish a connection with the storage device through the second signal line, and the BMC may establish a connection with the storage device through the third signal line. Alternatively, the second signal line and the third signal line may each be Bus buses. In the embodiment of the application, the selection of the second signal line and the third signal line can be performed according to the memory device. For example, if the storage device is SPI (Serial Peripheral Interface ) Flash, the second signal line may be an SPI Bus. It should be noted that, during system design or practical application, the second signal line and the third signal line may be flexibly selected according to practical requirements, which is not limited herein.
HOST communicates with the storage device via a second signal line. Specifically, HOST may perform data read and write operations on the storage device through the second signal line. The BMC communicates with the storage device via a third signal line. Specifically, the BMC may perform data read/write operations on the storage device through the third signal line. The problem of poor communication quality between the BMC and the HOST caused by poor network quality can be avoided by adopting the second signal line and the third signal line.
In the communication system, when detecting the first information to be sent to HOST, the BMC can acquire the data read-write permission of the storage device through the first signal line. The first information may be any information to be processed by the HOST, such as information that is more urgent for the server where the HOST is located, such as an alarm message, or may also be information that is less urgent, such as asset information of the server. The present application does not limit the first information. After the BMC successfully acquires the data read-write permission aiming at the storage device, the BMC writes the first information into the storage device, and after the first information is written into the storage device, the BMC releases the data read-write permission aiming at the storage device. Then, HOST obtains the data read-write permission of the storage device through the first signal line when detecting the first data read instruction information of the storage device. The first data reading instruction information is generated by the HOST after the BMC writes the first information into the storage device, and is used for instructing the HOST to execute data reading operation on the storage device. After the HOST successfully acquires the data read-write permission of the storage device, the HOST reads the first information from the storage device, and after the first information is read from the storage device, the HOST releases the data read-write permission of the storage device. The embodiment of the application realizes the process of the BMC actively communicating to HOST by adopting the mode.
In one embodiment, the HOST obtains data read-write permission to the storage device through the first signal line when detecting the second information to be sent to the BMC. The second information may be any information to be processed by the BMC, for example, may be an instruction that needs to be processed by the BMC, or information that needs to be saved to the BMC. The present application does not limit the second information. After the HOST successfully acquires the data read-write permission aiming at the storage device, writing the second information into the storage device, and after the second information is written into the storage device, releasing the data read-write permission of the storage device. And then, when the BMC detects the second data reading indication information aiming at the storage device, acquiring the data reading and writing permission of the storage device through the first signal line. The second data reading indication information is generated by the BMC after the HOST writes the second information into the storage device and is used for indicating the BMC to execute data reading operation on the storage device. And after the second information is read from the storage device, releasing the data read-write permission of the storage device. The embodiment of the application adopts the mode to realize the process of HOST communication to BMC actively.
In one embodiment, the communication system may be deployed in a server. For example, as shown in fig. 1A, assuming that the communication system is the communication system 100, the server is the server 10, the communication system 100 may be deployed in the server 10. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
One implementation of the communication system is described below using fig. 1B as an example.
Referring to fig. 1B, the communication system 100 shown in fig. 1B includes a host 101, a baseboard management controller 102, a storage device 103, a signal line 104, a signal line 105, and a signal line 106. Wherein the HOST 101 corresponds to HOST mentioned in the embodiments of the present application, the baseboard management controller 102 corresponds to BMC mentioned in the embodiments of the present application, and the storage device 103 corresponds to storage device mentioned in the embodiments of the present application. The signal line 104 corresponds to a first signal line mentioned in the embodiment of the present application, the signal line 106 corresponds to a second signal line mentioned in the embodiment of the present application, and the signal line 105 corresponds to a third signal line mentioned in the embodiment of the present application.
In the communication system 100, a host 101 is connected to a baseboard management controller 102 via a signal line 104, and the host 101 is also connected to a storage device 103 via a signal line 105. The baseboard management controller 102 is connected to the memory device 103 via a signal line 106. In the communication system 100, a host 101 may perform data read and write operations on a storage device 103. Specifically, the host 101 may perform data read and write operations on the storage device 103 through the signal line 106. The baseboard management controller 102 may also perform data read and write operations to the memory device 103. Specifically, the baseboard management controller 102 can perform data read and write operations on the memory device 103 through the signal line 105. Wherein:
before the baseboard management controller 102 writes data to the storage device 103, the baseboard management controller 102 performs a first write operation as follows:
the baseboard management controller 102 detects information to be written into the host 101, such as first information, and acquires data read/write authority to the storage device 103 via the signal line 104. After the acquisition of the data read/write authority for the storage device 103 is successful, the baseboard management controller 102 writes information to the storage device 103 through the signal line 105. After the baseboard management controller 102 finishes writing information into the storage device 103, the data read-write authority of the storage device 103 is released.
Before the baseboard management controller 102 reads data from the storage device 103, the baseboard management controller 102 performs a first read operation as follows:
the baseboard management controller 102 detects data read instruction information to the storage device 103, and acquires data read/write authority to the storage device 103 through the signal line 104. After the acquisition of the data read/write authority to the storage device 103 is successful, the baseboard management controller 102 performs a data read operation to the storage device 103 through the signal line 105. After the data reading operation is completed on the storage device 103, the baseboard management controller 102 releases the data read/write authority on the storage device 103. Here, the data read instruction information here is information for instructing to perform a data read operation on the storage device 103.
Before the host 101 writes data to the storage device 103, the host 101 performs a second write operation as follows:
when detecting information to be written to the storage device 103, such as second information, the host 101 acquires data read-write permission to the storage device 103 via the signal line 104. After the host 101 successfully acquires the data read/write authority for the storage device 103, information is written to the storage device 103 via the signal line 106. After the information is written into the storage device 103, the host 101 releases the data read/write authority to the storage device 103.
Before the host 101 reads data from the storage device 103, the host 101 performs the following second read operation:
when detecting data read instruction information for the storage device 103, the host 101 acquires data read/write authority to the storage device 103 via the signal line 104. After the host 101 successfully acquires the data read/write authority to the storage device 103, the host performs a data read operation to the storage device 103 via the signal line 106. After the data reading operation is completed on the storage device 103, the host 101 releases the data read-write authority on the storage device 103. Here, the data read instruction information here is information for instructing to perform a data read operation on the storage device 103.
In the communication system 100, the host 101 and the baseboard management controller 102 can implement a process of actively communicating with the host 101 and a process of actively communicating with the baseboard management controller 102 by performing data reading and writing on the storage device 103, as well as a process of actively communicating with the baseboard management controller 102 by the host 101. Specifically:
during the process that the baseboard management controller 102 actively communicates to the host 101, the baseboard management controller 102 performs the first writing operation described above, and the host 101 performs the second reading operation described above, thereby implementing the process that the host 101 actively communicates to the baseboard management controller 102.
During the process in which the host 101 actively communicates to the baseboard management controller 102, the host 101 performs the second write operation described above, and the baseboard management controller 102 performs the first read operation described above, thereby implementing the process in which the host 101 actively communicates to the baseboard management controller 102.
It should be noted that, in other examples of the communication system, the communication manner between the host 101 and the storage device 103, and the communication manner between the baseboard management controller 102 and the storage device 103 may be other manners than the communication system shown in fig. 1B, which is not limited in this embodiment of the present application.
It should be further noted that, the first signal line mentioned in the embodiment of the present application is configured to arbitrate data read/write rights (data read/write rights for a storage device) for HOST and BMC, that is, determine whether the data read/write rights for the storage device are obtained by HOST or BMC. Equivalently, the first signal line plays a role in deciding which device of the HOST and the BMC is to read and write data from and to the storage device during communication. The first signal line is not used for information interaction between HOST and BMC. The second signal line mentioned in the embodiment of the application is used for carrying out information interaction between HOST and the storage device, and the third signal line is used for carrying out information interaction between BMC and the storage device.
In this embodiment of the present application, the HOST and the BMC do not perform data read/write operations on the storage device in the same period, and the BMC does not perform data read/write operations on the storage device during the data read/write operations on the storage device, and the HOST does not perform data read/write operations on the storage device during the data read/write operations on the storage device. HOST is to read the first information from the storage device after the BMC finishes writing the first information into the storage device through a series of right acquisition processes, and BMC is to read the second information from the storage device after HOST finishes writing the second information into the storage device through a series of right acquisition processes. By adopting the mode, the data read-write conflict between HOST and BMC in the communication process can be avoided.
Based on the aforementioned communication system, the embodiments of the present application also provide an example of a communication procedure. Referring to fig. 2, fig. 2 is a schematic diagram of a communication process according to an embodiment of the present application. The communication process shown in fig. 2 includes steps S201 to S206. The communication process may be performed by a first device or a second device in the communication system. Here, when the first device is BMC, the second device is HOST, and when the first device is HOST, the second device is BMC. The following describes the communication process by taking the communication process as an example of the execution process of the first device. Specifically:
S201, inputting information.
Wherein, the information input may be: the first device obtains information to be input to the second device, such as information to be transmitted to the second device; or the first device obtains an indication that information needs to be read from the storage device, such as data reading indication information; or, the first device obtains other information to be written to the storage device, such as part of the information to be saved by the storage device.
S202, acquiring data read-write permission.
In step S202, the first device attempts to acquire data read-write rights of the storage device.
If the first device successfully acquires the data read-write permission, the first device sequentially executes step S203 to step S205, and if the first device fails to acquire the data read-write permission, the first device executes step S206.
In step S202, the first device may specifically obtain the data read-write authority of the storage device by competing for control rights to the first signal line.
If the first device successfully controls the first signal line, the first device obtains the data read-write permission of the storage device, and if the first device does not successfully control the first signal line, the second device is controlling the first signal line, and the first device does not obtain the data read-write permission of the storage device.
S203, data reading and writing are carried out on the storage device.
Step S203 will be described below in the case of different information inputs.
If the first device obtains information that needs to be input to the second device, the first device may write the information that needs to be input to the second device in the storage device.
If the first device obtains an indication that information needs to be read from the storage device, the first device may read information desired by the first device from the storage device.
If the first device obtains other information which needs to be written into the storage device, the first device writes the other information into the storage device.
S204, maintaining for a period of time.
S205, releasing the data read-write permission.
In step S204, the first device may maintain the data read-write operation on the storage device for a period of time, such as a target period of time. The target duration is a duration that enables the first device to complete data read-write operations. Optionally, the target duration may be an actual duration of the first device performing data reading and writing on the storage device. Optionally, the target duration may be an actual duration of the first device performing data reading and writing on the storage device, or may be a duration greater than an actual duration of the first device performing data reading and writing on the storage device. By executing step S204, the first device has enough time to complete the data read/write operation on the storage device.
In step S205, the first device releases the data read-write authority to the storage device. It can be understood that the first device may control the first signal line to be in the busy state for the target duration, so that the first device may maintain the target duration of the data read/write operation. After the first device finishes the duration of the continuous data read-write operation target, the first device does not control the first signal line to be in a busy state any more, and the first signal line is restored to an idle state, so that the purpose that the first device releases the data read-write permission of the storage device is achieved.
S206, waiting for a period of time. After the waiting is finished, step S202 is repeatedly executed.
In step S206, the first device may wait for a period of time, such as a second period of time, so that after the second device releases the data read-write permission to the storage device, the first device performs step S202 again to reacquire the data read-write permission. The embodiment of the application also refers to a first time length, and the first time length takes a value smaller than the second time length.
Wherein the second duration is less than or equal to the target duration. Alternatively, the second duration may be the shortest duration for performing the data read/write operation on the storage device. The second time period may be preset. For example, the second time period may be empirically set. Or, the second duration may be a minimum value selected from a shortest duration of performing data read/write operations on the storage device by the HOST and a shortest duration of performing data read/write operations on the storage device by the BMC. Optionally, the shortest duration of how long the HOST performs data read and write operations on the storage device is statistically counted from the duration of how long the HOST history performs data read and write operations on the storage device. The shortest time for the BMC to perform the data read-write operation on the storage device is counted and separated according to the time length system for the BMC to perform the data read-write operation on the storage device according to the BMC history.
Optionally, the manner in which the first device obtains the data read-write permission to the storage device may be as follows: the first device adopts a preset arbitration policy to acquire data read-write permission of the storage device according to the first signal line. Here, an arbitration policy may be used to address the issue of allocation of data read-write permissions for a storage device. In this way, the first device can arbitrate the data read-write permission of the storage device according to the working state of the first signal line, so as to determine whether the first device fails to acquire the data read-write permission of the storage device or whether the first device succeeds in acquiring the data read-write permission of the storage device.
Next, a specific description will be given of a method for the BMC to actively communicate to the HOST. Referring to fig. 3, a flow chart of a communication method according to an embodiment of the present application is provided. The communication method can be applied to the aforementioned communication system, such as the communication system shown in fig. 1B. Specifically, the method comprises the following steps:
and S301, when the BMC detects the first information to be sent to HOST, acquiring the data read-write permission of the storage device through a first signal line.
In this embodiment of the present application, when detecting the first information to be sent to the HOST, the BMC may use an arbitration policy to obtain the data read-write permission for the storage device according to the first signal line. The BMC can arbitrate the data read-write permission of the storage device according to the working state of the first signal line, so that whether the BMC fails to acquire the data read-write permission of the storage device or acquires the data read-write permission of the storage device is successful is judged. An arbitration policy may be used to address the problem of allocation of data read-write permissions for a storage device. The arbitration policy can determine whether the BMC can successfully acquire the data read-write permission of the storage device, so that the data read-write sequence of the BMC and HOST on the storage device is effectively coordinated.
In one embodiment, the preset arbitration policy adopted by the BMC may be the first arbitration policy or the second arbitration policy.
In one embodiment, the process of the BMC adopting the first arbitration policy to obtain the data read/write rights to the storage device according to the first signal line may include the following steps (1) - (3). Specifically:
(1) the BMC acquires the working state of the first signal line.
Specifically, the BMC may detect the level of the first signal line, determine that the operation state of the first signal line is a busy state if the level of the first signal line is detected as a low level, and determine that the operation state of the first signal line is an idle state if the level of the first signal line is detected as a high level.
When the BMC detects that the level of the first signal line is low, it indicates that the HOST is occupying the first signal line, and thus, it can be determined that the operating state of the first signal line is busy, and when the BMC detects that the level of the first signal line is high, it indicates that the first signal line is not occupied by the HOST, and it can be determined that the operating state of the first signal line is idle.
(2) When the working state of the first signal line is a busy state, the BMC determines that the BMC fails to acquire the data read-write permission of the storage device.
When the working state of the first signal line is busy, it indicates that the HOST is occupying the first signal line, the HOST obtains the data read-write permission to the storage device, and the HOST does not release the data read-write permission to the storage device currently. When the working state of the first signal line is a busy state, the failure of the BMC to acquire the data read-write permission of the storage device is directly judged, and the data read-write conflict caused by the fact that HOST and the BMC acquire the data read-write permission of the storage device at the same time can be avoided.
(3) When the working state of the first signal wire is in an idle state, the BMC controls the first signal wire to be converted into a busy state from the idle state, and after the first signal wire is controlled to maintain the busy state for a first time period, the working state of the first signal wire is acquired again, if the working state acquired again is in the idle state, the first signal wire is controlled to be converted into the busy state from the idle state, the success of acquiring the data read-write permission of the storage device by the BMC is determined, and if the working state acquired again is in the busy state, the failure of the BMC to acquire the data read-write permission of the storage device is determined.
Specifically, when the working state of the first signal line is an idle state, the BMC pulls down the first signal line from a high level to a low level, so that the first signal line is converted from the idle state to a busy state. Then, the BMC controls the first signal line to maintain a low level for a first period of time so that the first signal line maintains a busy state for the first period of time. After the BMC controls the first signal line to maintain the low level for a first period of time, the working state of the first signal line is acquired again. When the acquired working state is the idle state again, the BMC pulls down the first signal line from the high level to the low level so as to enable the first signal line to be converted into the busy state from the idle state. After the BMC pulls down the first signal line from the high level to the low level, the BMC determines that the BMC successfully acquires the data read-write permission of the storage device. When the acquired working state is busy again, the BMC determines that the BMC fails to acquire the data read-write permission of the storage device.
That is, the BMC adopts the first arbitration policy to obtain the data read-write permission of the storage device through the first signal line, that is, when the BMC detects that the working state of the first signal line is a busy state for the first time, it indicates that the first signal line is already occupied by the HOST, and the HOST successfully obtains the read-write permission of the storage device. At this time, the BMC fails to acquire the data read-write permission to the storage device. When the BMC detects that the first signal line is in the idle state for the first time, the BMC detects the working state of the first signal line for the second time after a period of time so as to confirm whether HOST occupies the first signal line. If the BMC detects that the first signal line is in a busy state for the second time, the BMC indicates that the first signal line is occupied by HOST, and the HOST acquires the read-write permission of the storage device successfully. At this time, the BMC fails to acquire the data read-write permission to the storage device. The BMC preferentially enables HOST to execute data read-write operation, and the BMC does not execute occupation operation on the first signal line any more during the period, so that only one device can occupy the first signal line at the same time, and further, only one device can execute data read-write operation on the storage device at the same time. If the BMC detects that the first signal line is in the idle state for the second time, the BMC indicates that the first signal line is not occupied by HOST, and obtains the data read-write permission of the storage device after the first signal line is converted into the busy state from the idle state, so that the data read-write operation is executed on the storage device.
In one embodiment, the process of the BMC adopting the second arbitration policy to obtain the data read-write permission to the storage device through the first signal line is as follows: the BMC acquires the working state of the first signal line; when the working state of the first signal line is a busy state, the BMC determines that the BMC fails to acquire the data read-write permission of the storage device; when the working state of the first signal line is an idle state, the BMC controls the first signal line to be converted into a busy state from the idle state, and the BMC is determined to successfully acquire the data read-write permission of the storage device. The process of how the BMC obtains the working state of the first signal line may refer to the foregoing step (1), and when the working state of the first signal line is a busy state, the BMC determines that the BMC fails to obtain the data read-write permission to the storage device, and may refer to the foregoing step (2), which is not repeated herein. It should be noted that the first arbitration policy is different from the second arbitration policy in step (3). When the working state of the first signal line is in an idle state, the BMC directly controls the first signal line to be converted into a busy state from the idle state, and determines that the BMC successfully obtains the data read-write authority of the storage device, and the working state of the first signal line is not required to be obtained again for analysis after a period of time as in the step (3) when the working state of the first signal line is in the idle state.
The control process for the first signal line will be described below with reference to fig. 4 to 5.
Referring to fig. 4, the bmc detects the operation state of the first signal line at the same time as the HOST.
The BMC detects that the level of the first signal line is high (denoted as H in fig. 4) and determines that the operation state of the first signal line is an idle state. Meanwhile, HOST also detects that the level of the first signal line is high level, and determines that the working state of the first signal line is an idle state.
HOST detects that the operation state of the first signal line is an idle state, and pulls down the first signal line from a high level to a low level (indicated as L in fig. 4). HOST controls the first signal line to maintain the low level for at least Th time after the first signal line is pulled down from the high level to the low level, and performs data read-write operation on the memory device during the period. After the HOST pulls down the first signal line from the high level to the low level, the data read-write permission of the storage device is obtained, namely the HOST successfully obtains the data read-write permission of the storage device.
The BMC detects that the working state of the first signal line is an idle state, and pulls down the first signal line from a high level to a low level. The BMC controls the first signal line to maintain the low level Tb for a period of time (Tb for a period of time less than Th) after the first signal line is pulled down from the high level to the low level. Then, the BMC again detects the operation state of the first signal line. The BMC detects the busy state again, and does not obtain the data read-write permission of the storage device, and the BMC fails to acquire the data read-write permission of the storage device. And then, the BMC waits for HOST to finish data read-write operation.
Referring to fig. 5, the bmc detects an operation state of the first signal line. HOST does not detect the operation state of the first signal line at the same time.
The BMC detects that the working state of the first signal line is an idle state, and pulls down the first signal line from a high level to a low level. The BMC controls the first signal line to maintain the low level Tb for a period of time after the first signal line is pulled down from the high level to the low level. Next, the BMC starts to detect the operation state of the first signal line again. The BMC detects the working state as an idle state again, and pulls down the first signal line from a high level to a low level. After the BMC pulls down the first signal line from the high level to the low level, the data read-write permission of the storage device is obtained, namely the BMC successfully obtains the data read-write permission of the storage device, and performs data read-write operation on the storage device. This occurs in fig. 5, which shows how the HOST does not perform the operation of acquiring data read and write rights to the storage device through the first signal line with the BMC at the same time or nearly the same time.
S302, after the BMC successfully acquires the data read-write permission aiming at the storage device, writing the first information into the storage device, and after the first information is written into the storage device, releasing the data read-write permission of the storage device.
In the embodiment of the application, after the BMC acquires the data read-write permission for the storage device successfully, the BMC writes the first information into the storage device. After the BMC finishes writing the first information into the storage device, the operation of controlling the first signal line to maintain the low level is ended, so that the first signal line is restored to the high level, the operation of ending controlling the first signal line to maintain the busy state is realized, the first signal line is restored to the idle state, and the aim of releasing the data read-write permission of the storage device is fulfilled.
In one embodiment, if the information interaction is performed between the BMC and the storage device through the second signal line, after the first information is written into the storage device, the BMC does not occupy the first signal line any more, and does not occupy a third signal line connected between the BMC and the storage device any more, so that the purpose of releasing the data read-write permission of the storage device is achieved.
In one embodiment, after the BMC fails to acquire the data read-write permission to the storage device, waiting for a second duration, and repeating the step of the BMC acquiring the data read-write permission to the storage device through the first signal line until the BMC acquires the data read-write permission to the storage device, and then writing the first information into the storage device. It should be noted that, the HOST may consume a second time period for performing the data read-write operation, so after the BMC fails to acquire the data read-write permission of the storage device, the BMC waits for the second time period, and repeatedly executes the step of acquiring the data read-write permission of the storage device by the BMC through the first signal line, so that the BMC may perform the data read-write operation on the storage device more timely.
S303, when the HOST detects first data reading instruction information aiming at the storage device, acquiring data reading and writing permission of the storage device through a first signal line.
The first data reading indication information may be a first GPIO interrupt request. The first GPIO interrupt request is generated by HOST upon detection of a prescribed level change process of the first signal line.
In this embodiment of the present application, after the BMC finishes the operation of controlling the first signal line to maintain the low level, the first signal line is restored from the low level to the high level, and the HOST may detect the rising edge of the signal of the first signal line through the GPIO interface of the HOST. After detecting the rising edge of the signal of the first signal line through the HOST's GPIO interface, the HOST may generate a first GPIO interrupt request through the HOST's interrupt controller. Here, the first GPIO interrupt request refers to a GPIO interrupt request generated by an interrupt controller of the HOST. The HOST determines the first GPIO interrupt request as first data read instruction information. And when the HOST detects the first data reading indication information aiming at the storage device, acquiring the data reading and writing permission of the storage device through a first signal line. In the mode, the HOST is triggered to execute the operation of acquiring the data read-write permission of the storage device through the first signal line by introducing the GPIO interrupt mechanism, which is equivalent to the realization of actively prompting the HOST through the first signal line that the HOST can execute the data read-write operation on the storage device at present, so that the HOST can read information from the storage device more timely, and the communication rate between the BMC and the HOST is effectively improved.
The first data reading instruction information may also be a first data reading instruction.
In this embodiment of the present application, after the BMC finishes controlling the operation of maintaining the first signal line at the low level, the BMC may send the first data reading instruction to the HOST by a manual trigger or other devices (not the BMC and the HOST). In one embodiment, the first data reading instruction may carry an identifier of the first information and/or a storage address where the first information is located. Wherein the identification of the first information is information for uniquely identifying the first information. The HOST may determine the first data read instruction as first data read instruction information. And when the HOST detects the first data reading indication information aiming at the storage device, acquiring the data reading and writing permission of the storage device through a first signal line.
In this embodiment of the present application, when detecting the first data read instruction information for the storage device, the HOST may use a preset arbitration policy to obtain the data read-write permission for the storage device according to the first signal line. In this way, the HOST can arbitrate the data read-write permission of the storage device according to the working state of the first signal line, so as to determine whether the HOST fails to acquire the data read-write permission of the storage device or the HOST succeeds in acquiring the data read-write permission of the storage device. An arbitration policy may be used to address the problem of allocation of data read-write permissions for a storage device. Here, it may be determined by the arbitration policy whether the HOST can successfully acquire the data read-write permission to the storage device, so as to effectively coordinate the data read-write sequence of the BMC and the HOST to the storage device. In one embodiment, the preset arbitration policy employed by HOST herein may be a third arbitration policy or a fourth arbitration policy. Wherein the third arbitration policy is different from the fourth arbitration policy.
In one embodiment, the process of HOST employing a third arbitration policy to obtain data read-write rights to the storage device based on the first signal line is as follows: HOST obtains the working state of the first signal line; when the working state of the first signal line is busy, determining that HOST fails to acquire the data read-write permission of the storage device; when the working state of the first signal line is an idle state, the HOST is controlled to be converted into a busy state from the idle state, and the HOST is determined to successfully acquire the data read-write permission of the storage device. The HOST obtains the working state of the first signal line, specifically, the HOST can detect the level of the first signal line, if the level of the first signal line is detected to be low level, the working state of the first signal line is determined to be busy, and if the level of the first signal line is detected to be high level, the working state of the first signal line is determined to be idle.
In one embodiment, the process of HOST employing a fourth arbitration policy to obtain data read-write rights to the storage device based on the first signal line is as follows: HOST obtains the working state of the first signal line; when the working state of the first signal line is busy, determining that HOST fails to acquire the data read-write permission of the storage device; when the working state of the first signal line is an idle state, the HOST controls the first signal line to be switched from a high level to a low level so that the first signal line is switched from the idle state to a busy state. Then, HOST maintains the first signal line low for a third period of time, so that HOST maintains the first signal line in a busy state for the third period of time. After the HOST is controlled to maintain the low level for a third period of time, the working state of the first signal line is acquired again, and if the acquired working state is the idle state, the first signal line is controlled to be converted from the high level to the low level so as to be converted from the idle state to the busy state. After the HOST is controlled to be switched from high level to low level, the HOST is determined to acquire the data read-write permission of the storage device successfully, and if the acquired working state is a busy state again, the HOST is determined to fail to acquire the data read-write permission of the storage device. In one embodiment, the third duration may take on a value that is less than the second duration. In one embodiment, the third time period may be the first time period.
That is, the process of using the fourth arbitration policy by the HOST to obtain the data read-write permission to the storage device through the first signal line is that the HOST indicates that the first signal line is occupied by the BMC when detecting that the working state of the first signal line is a busy state for the first time, and the BMC successfully obtains the read-write permission to the storage device. At this time, HOST fails to acquire the data read-write authority to the storage device. And when the HOST detects that the first signal line is in the idle state for the first time, detecting the working state of the first signal line for the second time after a period of time so as to confirm whether the BMC occupies the first signal line. And if the HOST detects that the first signal line is in a busy state for the second time, indicating that the first signal line is occupied by the BMC, and the BMC acquires the read-write permission of the storage device successfully. At this time, HOST fails to acquire the data read-write authority to the storage device. HOST preferably enables the BMC to execute data read-write operation, and during the period, HOST does not execute occupation operation on the first signal line any more, so that only one device can occupy the first signal line at the same time, and further, only one device can execute data read-write operation on the storage device at the same time. And if the HOST detects that the first signal line is in the idle state for the second time, the HOST indicates that the first signal line is not occupied by the BMC, and obtains the data read-write permission of the storage device after the idle state of the first signal line is converted into the busy state, so that the data read-write operation is executed on the storage device.
S304, after the HOST successfully acquires the data read-write permission of the storage device, the HOST reads the first information from the storage device, and after the first information is read from the storage device, the HOST releases the data read-write permission of the storage device.
In this embodiment of the present application, after the HOST finishes reading the first information from the storage device, the operation of controlling the first signal line to maintain the low level is ended, so that the first signal line is restored to the high level, thereby implementing the operation of ending controlling the first signal line to maintain the busy state, so that the first signal line is restored to the idle state, and the purpose of releasing the data read-write permission to the storage device is achieved.
In one embodiment, if the HOST and the storage device perform information interaction through the second signal line, after the HOST finishes reading the first information from the storage device, the HOST does not occupy the first signal line, and does not occupy the second signal line connected between the HOST and the storage device, so as to achieve the purpose of releasing the data read-write permission of the storage device.
In one embodiment, after the HOST fails to acquire the data read-write permission to the storage device, waiting for a second period of time, and repeating the step of the HOST acquiring the data read-write permission to the storage device through the first signal line until the HOST acquires the data read-write permission to the storage device, and then reading the first information from the storage device. It should be noted that, the duration of performing the data read/write operation on the storage device by the HOST remains at least the second duration. The time required for the HOST to actually perform the data read/write operation depends on factors such as the amount of data read/written by the HOST to the storage device, and the present application will not be described herein. Likewise, the duration of the BMC performing the data read/write operation on the storage device remains at least a second duration. The time required for the BMC to actually perform the data read/write operation depends on factors such as the amount of data read/written by HOST to the storage device, which is not described herein.
In the embodiment of the present application, the implementation process of the communication method described mainly by the high level corresponding to the idle state and the low level corresponding to the busy state is mainly used, but in the embodiment of the present application, the opposite may be also used, that is, the low level corresponding to the idle state and the high level corresponding to the busy state may also be used to implement the communication method, and the specific implementation process is similar to the former and is not repeated here. In one embodiment, when the low level corresponds to the idle state and the high level corresponds to the busy state, the HOST determines a third GPIO interrupt request as the first data read indication information, where the third GPIO interrupt request is generated by an interrupt controller of the HOST by the HOST detecting a falling edge of a signal of the first signal line through a GPIO interface of the HOST.
In the embodiment shown in fig. 3, after detecting the first information to be sent to the HOST, the BMC may attempt to obtain the data read-write permission to the storage device, and after obtaining the data read-write permission to the storage device successfully, write the first information to the storage device, and after writing the first information to the storage device, release the data read-write permission to the storage device; after detecting the first data reading indication information aiming at the storage device, the HOST attempts to acquire the data reading and writing permission of the storage device, reads the first information from the storage device after the data reading and writing permission of the storage device is successfully acquired, and releases the data reading and writing permission of the storage device after the first information is read from the storage device, so that the BMC can communicate to the HOST.
Next, a method for HOST to actively communicate to the BMC will be specifically described. Referring to fig. 6, a flow chart of another communication method according to an embodiment of the present application is provided. The communication method can be applied to the aforementioned communication system, such as the communication system 100 shown in fig. 1B. Specifically, the method comprises the following steps:
s601, when detecting second information to be sent to the BMC, HOST obtains data read-write permission of the storage device through a first signal line.
In this embodiment of the present application, when the HOST detects the second information to be sent to the BMC, a preset arbitration policy may be adopted to obtain the data read-write permission of the storage device according to the first signal line. In this way, the HOST can arbitrate the data read-write permission of the storage device according to the working state of the first signal line, so as to determine whether the first device fails to acquire the data read-write permission of the storage device or whether the first device succeeds in acquiring the data read-write permission of the storage device. An arbitration policy may be used to address the problem of allocation of data read-write permissions for a storage device. The arbitration policy can determine whether HOST can successfully acquire the data read-write permission of the storage device, so that the data read-write sequence of the BMC and the HOST to the storage device is effectively coordinated.
In one embodiment, the arbitration policy employed by HOST herein may be a third arbitration policy or a fourth arbitration policy. The third arbitration policy is different from the fourth arbitration policy. The process of how the HOST specifically uses the third arbitration policy to obtain the data read-write permission of the storage device through the first signal line may refer to the process of using the third arbitration policy to obtain the data read-write permission of the storage device through the first signal line described in the embodiment of fig. 3, which is not described herein in detail. And how the HOST specifically uses the fourth arbitration policy to obtain the data read/write permission to the storage device through the first signal line, refer to the process described in the embodiment of fig. 3 in which the HOST uses the fourth arbitration policy to obtain the data read/write permission to the storage device through the first signal line, which is not described herein in detail.
S602, after the HOST successfully acquires the data read-write permission aiming at the storage device, writing the second information into the storage device, and after the second information is written into the storage device, releasing the data read-write permission of the storage device.
In this embodiment of the present application, after writing the second information into the storage device, the HOST ends controlling the operation of maintaining the first signal line at a low level, and the first signal line returns to a high level, thereby implementing the operation of ending controlling the first signal line to maintain a busy state, so that the first signal line returns to an idle state, and the purpose of releasing the data read-write permission to the storage device is achieved.
In one embodiment, if the HOST and the storage device perform information interaction through the second signal line, after writing the second information into the storage device, the HOST does not occupy the first signal line, and does not occupy the second signal line connected between the HOST and the storage device, so as to achieve the purpose of releasing the data read-write permission of the storage device.
In one embodiment, HOST may wait for a second duration after failing to acquire data read-write rights to the storage device. And then, repeatedly executing the step of acquiring the data read-write permission of the storage device by the HOST through the first signal line until the HOST acquires the data read-write permission of the storage device and then writing the second information into the storage device. It should be noted that, the BMC may consume a second period of time for performing the data read-write operation, so after the HOST fails to acquire the data read-write permission to the storage device, the HOST waits for the second period of time, and then repeatedly executes the step that the HOST acquires the data read-write permission to the storage device through the first signal line, so that the HOST performs the data read-write operation to the storage device more timely.
And S603, when the BMC detects second data reading indication information aiming at the storage device, acquiring data reading and writing permission of the storage device through a first signal line.
The second data reading indication information may be a second GPIO interrupt request. The second GPIO interrupt request is generated by the BMC after detecting a prescribed level change process of the first signal line.
In this embodiment of the present application, after the BMC finishes controlling the operation of maintaining the first signal line at the low level, the first signal line is restored from the low level to the high level, and the BMC may detect the rising edge of the signal of the first signal line through the GPIO interface of the BMC. After the BMC detects the rising edge of the signal of the first signal line through the GPIO interface of the BMC, the BMC can generate a second GPIO interrupt request through the interrupt controller of the BMC. Here, the second GPIO interrupt request refers to a GPIO interrupt request generated by an interrupt controller of the BMC. The BMC determines the second GPIO interrupt request as second data read indication information. When the BMC detects second data reading indication information aiming at the storage device, the BMC acquires the data reading and writing permission of the storage device through the first signal line. In the mode, the GPIO interrupt mechanism is introduced to trigger the BMC to execute the operation of acquiring the data read-write permission of the storage device through the first signal line, which is equivalent to the realization that the first signal line prompts the BMC to execute the data read-write operation on the storage device at present, so that the BMC can read information from the storage device more timely, and the communication rate between the BMC and the HOST is effectively improved.
The second data reading instruction information may be a second data reading instruction.
In this embodiment of the present application, after the BMC finishes controlling the operation of maintaining the first signal line at the low level, a second data reading instruction may be sent to the HOST by a manual trigger or other devices (not the BMC and the HOST). In one embodiment, the second data read instruction may carry an identification of the second information and/or a storage address where the second information is located. Wherein the identification of the second information is information for uniquely identifying the second information. The HOST may determine the second data read instruction as second data read instruction information. And when the HOST detects the second data reading indication information aiming at the storage device, acquiring the data reading and writing permission of the storage device through the first signal line.
In the embodiment of the application, when the BMC detects the second data reading indication information aiming at the storage device, a preset arbitration strategy is adopted to acquire the data reading and writing permission of the storage device through the first signal line. By adopting the mode, the BMC can arbitrate the data read-write permission of the storage device according to the working state of the first signal line, so as to judge whether the first device fails to acquire the data read-write permission of the storage device or whether the first device succeeds in acquiring the data read-write permission of the storage device. An arbitration policy may be used to address the problem of allocation of data read-write permissions for a storage device. Here, it may be determined by the arbitration policy whether the BMC can successfully obtain the data read/write permission to the storage device, so as to effectively coordinate the data read/write sequence of the BMC and HOST to the storage device.
In one embodiment, the arbitration policy employed by the BMC herein may be a first arbitration policy or a second arbitration policy. The process of the BMC for obtaining the data read/write permission to the storage device through the first signal line by using the first arbitration policy may be referred to the process of the embodiment of fig. 3 for obtaining the data read/write permission to the storage device through the first signal line by using the first arbitration policy, which is not described herein in detail. And, how the BMC specifically uses the second arbitration policy to obtain the data read/write permission of the storage device through the first signal line may refer to the process described in the embodiment of fig. 3 in which the BMC uses the second arbitration policy to obtain the data read/write permission of the storage device through the first signal line, which is not described herein in detail.
And S604, after the BMC successfully acquires the data read-write permission of the storage device, reading the second information from the storage device, and after the second information is read from the storage device, releasing the data read-write permission of the storage device.
In this embodiment of the present application, after the BMC finishes reading the second information from the storage device, the BMC ends controlling the operation of maintaining the first signal line at a low level, so that the first signal line is restored to a high level, thereby implementing the operation of ending controlling the first signal line to maintain a busy state, so that the first signal line is restored to an idle state, and the purpose of releasing the data read-write permission of the storage device is achieved.
In one embodiment, if the information interaction is performed between the BMC and the storage device through the second signal line, after the second information is read from the storage device, the BMC does not occupy the first signal line any more, and does not occupy the second signal line connected between the BMC and the storage device any more, so that the purpose of releasing the data read-write permission of the storage device is achieved.
In one embodiment, after the BMC fails to acquire the data read-write permission to the storage device, waiting for a second duration, and repeating the step of acquiring the data read-write permission to the storage device by the BMC through the first signal line until the BMC acquires the data read-write permission to the storage device and then reads the second information from the storage device. It should be noted that, the duration of performing the data read/write operation on the storage device by the HOST remains at least the second duration. The time required for the HOST to actually perform the data read/write operation depends on factors such as the amount of data read/written by the HOST to the storage device, and the present application will not be described herein. And the BMC keeps the duration of executing the data read-write operation on the storage device at least a second duration. The time required for the BMC to actually perform the data read/write operation depends on factors such as the amount of data read/written by HOST to the storage device, which is not described herein.
In the embodiment of the present application, the implementation process of the communication method described mainly by the high level corresponding to the idle state and the low level corresponding to the busy state is mainly used, but in the embodiment of the present application, the opposite may be also used, that is, the low level corresponding to the idle state and the high level corresponding to the busy state may also be used to implement the communication method, and the specific implementation process is similar to the former and is not repeated here. In one embodiment, when the low level corresponds to the idle state and the high level corresponds to the busy state, the BMC determines the fourth GPIO interrupt request as the first data read instruction information, where the fourth GPIO interrupt request is generated by the BMC through the interrupt controller of the BMC when the BMC detects a falling edge of the signal of the first signal line through the GPIO interface of the BMC.
It can be seen that, in the embodiment shown in fig. 6, the HOST may write the second information into the storage device after detecting the second information to be sent to the BMC and after acquiring the data read-write permission for the storage device successfully, and release the data read-write permission for the storage device after writing the second information into the storage device is completed; the BMC reads the second information from the storage device after detecting the second data reading indication information aiming at the storage device and acquiring the data reading and writing permission of the storage device successfully, and releases the data reading and writing permission of the storage device after the second information is read from the storage device, so that the HOST to BMC communication process is realized.
Optionally, in the embodiment of fig. 3 or the embodiment of fig. 6, the BMC and HOST may also perform the following operations:
the BMC acquires the arbitration priority of the BMC, and if the arbitration priority of the BMC is the first priority, a first arbitration policy can be adopted to acquire the data read-write permission of the storage device according to the first signal line. If the arbitration priority of the BMC is the second priority, a second arbitration policy may be used to obtain the data read-write permission of the storage device according to the first signal line. The HOST may obtain an arbitration priority of the HOST, and if the arbitration priority of the HOST is the first priority, a third arbitration policy may be used to obtain data read-write permission to the storage device according to the first signal line. If the arbitration priority of HOST is the second priority, a fourth arbitration policy may be adopted to obtain the data read-write permission of the storage device according to the first signal line. Different arbitration priorities for different devices correspond to different arbitration policies for the devices. Optionally, by setting different arbitration priorities, different arbitration policies may be selected to obtain data read-write permission for the storage device according to the first signal line.
In some embodiments, when the BMC employs the first arbitration policy to obtain read and write rights to the storage device over the first signal line, the HOST employs the third arbitration policy to obtain read and write rights to the storage device over the first signal line. In some embodiments, if arbitration priorities are set for the BMC and HOST, then in this case, the arbitration priority set for the BMC is the first priority, and the arbitration priority set for HOST is the first priority. By the method, when the BMC and the HOST want to execute data read-write operation on the storage device at the same time or at similar times, the HOST can be given priority to execute the data read-write operation on the storage device.
In some embodiments, when the BMC employs a first arbitration policy to obtain read and write rights to the storage device over the first signal line, the HOST employs a fourth arbitration policy to obtain read and write rights to the storage device over the first signal line. In some embodiments, if arbitration priorities are set for the BMC and HOST, then in this case the arbitration priority set for the BMC is a first priority and the arbitration priority set for HOST is a second priority. By adopting the mode, when the BMC and the HOST want to execute the data read-write operation on the storage device at the same time or at similar times, the BMC can execute the data read-write operation on the storage device preferentially.
In some embodiments, when the BMC employs the second arbitration policy to obtain the read/write rights to the storage device through the first signal line, the HOST may also employ the fourth arbitration policy to obtain the read/write rights to the storage device through the first signal line. In some embodiments, if arbitration priorities are set for the BMC and HOST, then in this case, the arbitration priority set for the BMC is the second priority, and the arbitration priority set for HOST is the second priority. By adopting the mode, when the BMC and the HOST want to execute the data read-write operation on the storage device at the same time or at similar times, the BMC can execute the data read-write operation on the storage device preferentially.
It should be noted that, whether the first priority or the second priority is set for the HOST, whether the first priority or the second priority is set for the BMC, or whether the first arbitration policy or the second arbitration policy is set for the BMC, and whether the third arbitration policy or the fourth arbitration policy is set for the HOST may be adaptively designed according to the actual service requirement or the actual application scenario, which is not limited in this embodiment of the present application.
When the time of the BMC obtaining the working state of the first signal line is the same as or very similar to the time of the HOST obtaining the working state of the first signal line, the situation that both the HOST and the BMC obtain the working state of the first signal line is idle will occur. At this time, both the BMC and the HOST acquire the data read-write permission of the storage device successfully, which results in the situation that the HOST and the BMC execute the data read-write operation on the storage device simultaneously, and the HOST and the BMC generate data read-write conflict. Therefore, in the embodiment of the present application, only one device of the HOST and the BMC can successfully obtain the data read/write permission to the storage device at the same time or at a similar time by adopting the third arbitration policy when the BMC adopts the first arbitration policy or adopting the fourth arbitration policy when the BMC adopts the second arbitration policy, so that only one device of the HOST and the BMC executes the data read/write operation to the storage device within the same period, thereby avoiding the data read/write collision caused by that the two devices execute the data read/write operation to the storage device simultaneously.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the application, various features of embodiments of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed application requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component, and they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.

Claims (12)

1. A communication method, characterized in that it is applied to a communication system comprising a HOST and a baseboard management controller BMC, or the communication system comprises the HOST, the BMC and a storage device; the HOST is connected with the BMC through a first signal line, and the method comprises the following steps:
When the BMC detects first information to be sent to the HOST, acquiring data read-write permission of the storage device through the first signal line;
after the BMC successfully acquires the data read-write permission aiming at the storage device, writing the first information into the storage device, and after the first information is written into the storage device, releasing the data read-write permission aiming at the storage device;
when detecting first data reading indication information aiming at the storage equipment, the HOST acquires data reading and writing permission of the storage equipment through the first signal line;
and after the first information is read from the storage device, releasing the data read-write permission of the storage device.
2. The method of claim 1, wherein the BMC obtaining, via the first signal line, data read-write permissions to the storage device, comprising:
the BMC acquires the working state of the first signal line;
when the working state of the first signal line is a busy state, the BMC determines that the BMC fails to acquire the data read-write permission of the storage device;
When the working state of the first signal wire is in an idle state, the BMC controls the first signal wire to be converted into a busy state from the idle state, and after the first signal wire is controlled to maintain the busy state for a first duration, the working state of the first signal wire is acquired again, if the working state acquired again is in the idle state, the first signal wire is controlled to be converted into the busy state from the idle state, the BMC is determined to acquire the data read-write permission of the storage device successfully, and if the working state acquired again is in the busy state, the BMC is determined to fail to acquire the data read-write permission of the storage device.
3. The method of claim 1 or 2, wherein the method further comprises:
and after the BMC fails to acquire the data read-write permission of the storage device, waiting for a second time period, and repeatedly executing the step that the BMC acquires the data read-write permission of the storage device through the first signal line until the BMC acquires the data read-write permission of the storage device, and then writing the first information into the storage device.
4. The method of claim 3, wherein the second time period is a shortest time period for reading and writing data to the storage device, and the first time period is less than the second time period.
5. The method of claim 3, wherein the HOST obtains data read-write permission to the storage device via the first signal line, comprising:
the HOST acquires the working state of the first signal line;
when the working state of the first signal line is a busy state, determining that the HOST fails to acquire the data read-write permission of the storage equipment;
and when the working state of the first signal line is an idle state, the HOST is controlled to be converted into a busy state from the idle state, and the HOST is determined to successfully acquire the data read-write permission of the storage equipment.
6. The method of claim 5, wherein the method further comprises:
and after the HOST fails to acquire the data read-write permission of the storage device, waiting for the second time period, and repeatedly executing the step of acquiring the data read-write permission of the storage device by the HOST through the first signal line until the HOST acquires the data read-write permission of the storage device, and then reading the first information from the storage device.
7. The method of claim 1, wherein the HOST and the BMC are connected to the first signal line through respective general purpose input output GPIO interfaces, the method further comprising, after the BMC releases the data read and write permissions to the storage device:
The HOST detects the rising edge of the signal of the first signal line through the GPIO interface of the HOST, and generates a first GPIO interrupt request through the interrupt controller of the HOST;
the HOST determines the first GPIO interrupt request as the first data reading indication information; the HOST's GPIO interface is configured to be in an input state when a first preset condition is satisfied, where the first preset condition includes that the first signal line is in an idle state or the BMC controls the first signal line to be in a busy state.
8. The method of claim 1, wherein the method further comprises:
when the HOST detects second information to be sent to the BMC, acquiring data read-write permission of the storage device through the first signal line;
after the HOST successfully acquires the data read-write permission aiming at the storage equipment, writing the second information into the storage equipment, and after the second information is written into the storage equipment, releasing the data read-write permission of the storage equipment;
when the BMC detects second data reading indication information aiming at the storage equipment, acquiring data reading and writing permission of the storage equipment through the first signal line;
And after the second information is read from the storage device, releasing the data read-write permission of the storage device.
9. The method of claim 8, wherein after the HOST releases the data read-write permission to the storage device, the method further comprises:
the BMC detects the rising edge of the signal of the first signal line through a GPIO interface of the BMC, and generates a second GPIO interrupt request through an interrupt controller of the BMC;
the BMC determines the second GPIO interrupt request as the second data reading indication information; the GPIO interface of the BMC is configured to be in an input state when a second preset condition is met, wherein the second preset condition comprises that the first signal line is in an idle state or the HOST controls the first signal line to be in a busy state.
10. The method of claim 8, wherein,
establishing wireless communication connection between the HOST and the BMC and the storage device; or alternatively, the first and second heat exchangers may be,
the HOST is connected with the storage device through a second signal line, the BMC is connected with the storage device through a third signal line, and the second signal line is used for the HOST to execute data read-write operation on the storage device; the third signal line is used for the BMC to execute data read-write operation on the storage device.
11. The method of claim 10, wherein,
the first signal line is any one of the following: single bus, serial peripheral interface SPI bus, integrated circuit I 2 A C bus;
the second signal line and the third signal line are buses;
the storage device has a power-off hold function.
12. A communication system comprising a HOST and a BMC, or comprising the HOST, the BMC, and a storage device for storing information written by the BMC and information written by the HOST; the HOST is connected with the BMC through a first signal line; wherein:
the BMC is used for executing the operation executed by the BMC in any of claims 1-11;
the HOST for performing operations performed by the HOST as claimed in any one of claims 1 to 11.
CN202311627912.7A 2023-11-29 2023-11-29 Communication method and communication system Pending CN117708019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311627912.7A CN117708019A (en) 2023-11-29 2023-11-29 Communication method and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311627912.7A CN117708019A (en) 2023-11-29 2023-11-29 Communication method and communication system

Publications (1)

Publication Number Publication Date
CN117708019A true CN117708019A (en) 2024-03-15

Family

ID=90154401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311627912.7A Pending CN117708019A (en) 2023-11-29 2023-11-29 Communication method and communication system

Country Status (1)

Country Link
CN (1) CN117708019A (en)

Similar Documents

Publication Publication Date Title
US8190717B2 (en) Method of booting an operating system
US6675268B1 (en) Method and apparatus for handling transfers of data volumes between controllers in a storage environment having multiple paths to the data volumes
EP3495938B1 (en) Raid configuration
JP2010152704A (en) System and method for operational management of computer system
US9063929B2 (en) Information processing apparatus, information processing method, computer-readable recording medium having stored therein program
CN116302617B (en) Method for sharing memory, communication method, embedded system and electronic equipment
CN112073555A (en) Method for configuring IP address, electronic device and computer readable storage medium
WO2016116013A1 (en) Software upgrade method and system
CN113658351B (en) Method and device for producing product, electronic equipment and storage medium
US11016750B2 (en) Firmware update system
CN114296909A (en) Automatic node capacity expansion and reduction method and system according to kubernets event
US8499080B2 (en) Cluster control apparatus, control system, control method, and control program
US20060085598A1 (en) Storage-device resource allocation method and storage device
WO2020252724A1 (en) Log processing method and device, and computer-readable storage medium
JP2003030167A (en) Atomic ownership change operation for input/output bridge device in clustered computer system
US9311195B2 (en) SCSI reservation status information on a SAN disk
CN105391755A (en) Method and device for processing data in distributed system, and system
US6598105B1 (en) Interrupt arbiter for a computing system
US8347045B2 (en) Using a dual mode reader writer lock
CN117708019A (en) Communication method and communication system
CN111126604A (en) Model training method, device, server and storage medium
US10528397B2 (en) Method, device, and non-transitory computer readable storage medium for creating virtual machine
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
CN111506441B (en) Method, device, equipment and storage medium for monitoring Raid card information
CN110908952B (en) Data processing method and device, CPU and computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination