CN113704149A - In-band communication method, system and related components - Google Patents
In-band communication method, system and related components Download PDFInfo
- Publication number
- CN113704149A CN113704149A CN202110876888.5A CN202110876888A CN113704149A CN 113704149 A CN113704149 A CN 113704149A CN 202110876888 A CN202110876888 A CN 202110876888A CN 113704149 A CN113704149 A CN 113704149A
- Authority
- CN
- China
- Prior art keywords
- serial port
- ipmi
- communication
- module
- cpu
- 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.)
- Withdrawn
Links
- 238000004891 communication Methods 0.000 title claims abstract description 112
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000013507 mapping Methods 0.000 claims abstract description 35
- 230000005540 biological transmission Effects 0.000 claims abstract description 9
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 claims abstract 18
- 230000004044 response Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 9
- 238000004806 packaging method and process Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 8
- 238000005538 encapsulation Methods 0.000 claims description 6
- 230000000875 corresponding effect Effects 0.000 description 6
- 230000009471 action Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000013459 approach Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Abstract
The application discloses an in-band communication method, a system and related components, which are used for realizing intelligent platform management interface communication, and the method comprises the following steps: establishing a first serial port for communication between the CPU and the BMC through a serial port device file; establishing a second serial port for data transmission with the IPMI module in the BMC; setting the same communication parameters for the first serial port and the second serial port; establishing a mapping relation between a first serial port and a second serial port in the BMC; and carrying out data communication between the CPU and the IPMI module by utilizing the first serial port and the second serial port which establish the mapping relation. The method and the device have the advantages that the first serial port is established by utilizing the universal serial port equipment file, the communication serial port of the CPU is redirected by establishing the mapping relation between the first serial port and the second serial port, necessary precondition is provided for data communication between the CPU and the IPMI module, the suitability of IPMI drive does not need to be considered, various CPUs can use the scheme, the operation cost is low, and the universality is high.
Description
Technical Field
The invention relates to the field of host interaction, in particular to an in-band communication method, an in-band communication system and related components.
Background
Currently, IPMI (Intelligent Platform Management Interface) has become a new generation of universal Interface standard for intelligentizing hardware Management. The user may utilize the IPMI to monitor the physical characteristics of the server, such as temperature, voltage, fan operating status, power supply, etc. IPMI generally implements functions of monitoring data of each sensor and recording logs of various events by a BMC (Baseboard Management Controller). At present, the IPMI function of the BMC part is generally completed, but to achieve a better platform management effect, an OS (Operation System) is required to obtain IPMI information.
In order to enable the OS to obtain IPMI information, a conventional approach is to download and install an IPMI driver that is open on the internet in the OS, and the OS can exchange information with the BMC with the support of the IPMI driver. However, due to design differences of CPU (Central Processing Unit) chips, not all CPU chips supporting communication with the BMC can run IPMI drivers that are open on the internet.
Therefore, how to provide a solution to the above technical problems is a problem to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a method, system and related components for in-band communication. The specific scheme is as follows:
an in-band communication method is used for realizing intelligent platform management interface communication and comprises the following steps:
establishing a first serial port for communication between the CPU and the BMC through a serial port device file;
establishing a second serial port for data transmission with the IPMI module in the BMC;
setting the same communication parameters for the first serial port and the second serial port;
establishing a mapping relation between the first serial port and the second serial port in the BMC;
and performing data communication between the CPU and the IPMI module by using the first serial port and the second serial port which establish the mapping relation.
Preferably, the first serial port and the second serial port are both UART serial ports.
Preferably, the first serial port is a UART serial port based on a hardware channel protocol.
Preferably, the communication parameters include baud rate, and/or data bits, and/or parity bits, and/or stop bits.
Preferably, the serial device file is specifically a ttyS device file.
Preferably, the process of setting the same communication parameters for the first serial port and the second serial port includes:
and respectively setting the same communication parameters for the first serial port and the second serial port through the ttyS device file.
Preferably, the process of performing data communication between the CPU and the IPMI module by using the first serial port and the second serial port with the mapping relationship established includes:
obtaining IPMI data request instruction information of the CPU and packaging a serial port;
sending the IPMI data request instruction information after serial port encapsulation to the IPMI module through the first serial port and the second serial port which establish the mapping relation, so that the IPMI module executes the following operations:
serial port decapsulation is carried out on the IPMI data request instruction information;
determining IPMI response data corresponding to the IPMI data request instruction information;
and carrying out serial port packaging on the IPMI response data and sending the IPMI response data to the CPU through the first serial port and the second serial port.
Correspondingly, this application still discloses communication system in-band for realize intelligent platform management interface communication, include:
the first module is used for establishing a first serial port for communication between the CPU and the BMC through a serial port device file;
the second module is used for establishing a second serial port for data transmission with the IPMI module in the BMC;
the setting module is used for setting the same communication parameters for the first serial port and the second serial port;
the mapping module is used for establishing the mapping relation between the first serial port and the second serial port in the BMC;
and the communication module is used for performing data communication between the CPU and the IPMI module by utilizing the first serial port and the second serial port which establish the mapping relation.
Correspondingly, this application still discloses in-band communication device for realize intelligent platform management interface communication, include:
a memory for storing a computer program;
a processor for implementing the steps of the in-band communication method as described in any of the above when executing the computer program.
Accordingly, the present application also discloses a readable storage medium having a computer program stored thereon, which, when being executed by a processor, implements the steps of the in-band communication method according to any of the above.
The application discloses an in-band communication method for realizing intelligent platform management interface communication, which comprises the following steps: establishing a first serial port for communication between the CPU and the BMC through a serial port device file; establishing a second serial port for data transmission with the IPMI module in the BMC; setting the same communication parameters for the first serial port and the second serial port; establishing a mapping relation between the first serial port and the second serial port in the BMC; and performing data communication between the CPU and the IPMI module by using the first serial port and the second serial port which establish the mapping relation. The method and the device have the advantages that the first serial port is established by utilizing the universal serial port equipment file, the communication serial port of the CPU is redirected by establishing the mapping relation between the first serial port and the second serial port, necessary precondition is provided for data communication between the CPU and the IPMI module, the suitability of IPMI drive does not need to be considered, various CPUs can use the scheme, the operation cost is low, and the universality is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart illustrating steps of a method for in-band communication according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating sub-steps of an in-band communication method according to an embodiment of the present invention;
fig. 3 is a structural distribution diagram of an in-band communication system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to enable the OS to obtain IPMI information, a conventional approach is to download and install an IPMI driver that is open on the internet in the OS, and the OS can exchange information with the BMC with the support of the IPMI driver. However, due to design differences of CPU chips, not all CPU chips supporting communication with BMC can run IPMI driver that is open source on the web.
The method and the device have the advantages that the first serial port is established by utilizing the universal serial port equipment file, the communication serial port of the CPU is redirected by establishing the mapping relation between the first serial port and the second serial port, necessary precondition is provided for data communication between the CPU and the IPMI module, the suitability of IPMI drive does not need to be considered, various CPUs can use the scheme, the operation cost is low, and the universality is high.
The embodiment of the invention discloses an in-band communication method, which is used for realizing intelligent platform management interface communication and comprises the following steps:
s1: establishing a first serial port for communication between the CPU and the BMC through a serial port device file;
specifically, the first serial port is a UART serial port, and is a UART serial port based on a hardware channel protocol, where the hardware channel protocol includes, but is not limited to, LPC (Low Pin Count, Advanced High-performance Bus), AHB (Advanced High-performance Bus), and a serial device file, that is, a ttyS device file, and the device file is specifically located in a system application layer, and can perform corresponding read-write operations to achieve corresponding effects.
S2: establishing a second serial port for data transmission with the IPMI module in the BMC;
similarly, the second serial port is also a UART serial port, and is established through a ttyS device file in the BMC.
In addition, in this embodiment, the first serial port and the second serial port may also be implemented by using a virtual serial port virtual UART.
S3: setting the same communication parameters for the first serial port and the second serial port;
specifically, the communication parameters include baud rate, and/or data bits, and/or parity bits, and/or stop bits, and may also include other communication parameters, which are not limited herein.
Specifically, the means for setting the communication parameters is also to write the communication parameters into the device file corresponding to each serial port, that is, to set the same communication parameters for the first serial port and the second serial port respectively through the device file.
S4: establishing a mapping relation between a first serial port and a second serial port in the BMC;
it can be understood that, the mapping relationship is established here, which actually realizes the redirection of the CPU to the communication serial port in the BMC, and the mapping relationship is stored in the relevant register inside the BMC, and establishes the channel connection between the first serial port and the second serial port.
It can be understood that, because the establishing action bodies of the first serial port and the second serial port are different, the steps S1 and S2 are not required to have a definite action sequence, and the setting of step S3 may be to set the communication parameters of the next serial port to be the same as those of the previous serial port after any serial port is established. The step S4 is executed only after two serial ports are established, and the specific sequence of the serial ports and the sequence of the serial ports S3 is not mandatory. That is, in the method, the communication channel can be established only after steps S1-S4 are completed before S5 starts to work normally.
S5: and carrying out data communication between the CPU and the IPMI module by utilizing the first serial port and the second serial port which establish the mapping relation.
Further, referring to fig. 2, in step S5, the process of performing data communication between the CPU and the IPMI module by using the first serial port and the second serial port with the mapping relationship established includes:
s51: obtaining IPMI data request instruction information of a CPU and packaging a serial port;
specifically, the IPMI data request instruction information is generated based on the IPMI protocol, and is usually generated by calling a function, which can be written by an open source ipmitool program.
S52: and sending the IPMI data request instruction information after the serial port encapsulation to the IPMI module through the first serial port and the second serial port which are established with the mapping relation, so that the IPMI module executes the steps S53-S55.
S53: carrying out serial port decapsulation on the IPMI data request instruction information;
s54: determining IPMI response data corresponding to the IPMI data request instruction information;
s55: and carrying out serial port packaging on the IPMI response data and sending the IPMI response data to the CPU through the first serial port and the second serial port.
It can be understood that, in this embodiment, serial port encapsulation of IPMI data request instruction information and IPMI response data can be implemented by calling a serial port data frame encapsulation function, actually, a frame header character and a frame tail character are added to the head and the tail of a data object, and when encapsulated information is received, it is necessary to perform decapsulation to obtain an information main body inside the data object. Furthermore, the IPMI data request instruction information and the IPMI response data are both based on an IPMI protocol, when the CPU receives the IPMI response data, serial port decapsulation is firstly carried out, then the IPMI response data are analyzed based on the IPMI protocol, and finally, visual and available data are obtained for subsequent processing of a client.
It can be understood that, in this embodiment, based on the LPC channel between the CPU and the BMC, most common server systems access the serial port function through LPC, and developers also often develop and use the serial port, so that the software development process related to the serial port is relatively simple, only the operations such as reading and writing related device files are required, and finally, an agent software or application software is obtained to implement the method, which is simple in software development and short in time consumption.
It can be understood that, in this embodiment, not only the IPMI driver is bypassed, but also the external serial port is not added, but also the common LPC channel used by the original BMC and the CPU is used, and on the basis of not increasing the hardware cost, a communication method for IPMI that is generally used for various CPUs is implemented.
The application discloses an in-band communication method for realizing intelligent platform management interface communication, which comprises the following steps: establishing a first serial port for communication between the CPU and the BMC through a serial port device file; establishing a second serial port for data transmission with the IPMI module in the BMC; setting the same communication parameters for the first serial port and the second serial port; establishing a mapping relation between the first serial port and the second serial port in the BMC; and performing data communication between the CPU and the IPMI module by using the first serial port and the second serial port which establish the mapping relation. The method and the device have the advantages that the first serial port is established by utilizing the universal serial port equipment file, the communication serial port of the CPU is redirected by establishing the mapping relation between the first serial port and the second serial port, necessary precondition is provided for data communication between the CPU and the IPMI module, the suitability of IPMI drive does not need to be considered, various CPUs can use the scheme, the operation cost is low, and the universality is high.
Correspondingly, the present application further discloses an in-band communication system, which is used for implementing the intelligent platform management interface communication, and as shown in fig. 3, the in-band communication system includes:
the first module 1 is used for establishing a first serial port for communication between the CPU and the BMC through a serial port device file;
the second module 2 is used for establishing a second serial port for data transmission with the IPMI module in the BMC;
the setting module 3 is used for setting the same communication parameters for the first serial port and the second serial port;
the mapping module 4 is used for establishing a mapping relation between the first serial port and the second serial port in the BMC;
and the communication module 5 is configured to perform data communication between the CPU and the IPMI module by using the first serial port and the second serial port in which the mapping relationship is established.
In the embodiment, the first serial port is established by using a universal serial port device file, the communication serial port of the CPU is redirected by establishing the mapping relation between the first serial port and the second serial port, necessary precondition is provided for the data communication between the CPU and the IPMI module, the suitability of IPMI drive is not required to be considered, various CPUs can use the scheme, the operation cost is low, and the universality is high.
In some specific embodiments, the first serial port and the second serial port are both UART serial ports.
In some specific embodiments, the first serial port is a UART serial port based on a hardware channel protocol.
In some embodiments, the communication parameters include baud rate, and/or data bits, and/or parity bits, and/or stop bits.
In some specific embodiments, the serial device file is specifically a ttyS device file. In some specific embodiments, the setting module 3 is specifically configured to:
and respectively setting the same communication parameters for the first serial port and the second serial port through the equipment file.
In some specific embodiments, the communication module 5 is specifically configured to:
obtaining IPMI data request instruction information of the CPU and packaging a serial port;
sending the IPMI data request instruction information after serial port encapsulation to the IPMI module through the first serial port and the second serial port which establish the mapping relation, so that the IPMI module executes the following operations:
serial port decapsulation is carried out on the IPMI data request instruction information;
determining IPMI response data corresponding to the IPMI data request instruction information;
and carrying out serial port packaging on the IPMI response data and sending the IPMI response data to the CPU through the first serial port and the second serial port.
Correspondingly, this application still discloses in-band communication device for realize intelligent platform management interface communication, include:
a memory for storing a computer program;
a processor for implementing the steps of the in-band communication method as described in any of the above when executing the computer program.
Accordingly, the present application also discloses a readable storage medium having a computer program stored thereon, which, when being executed by a processor, implements the steps of the in-band communication method according to any of the above.
In this embodiment, specific contents of the in-band communication method may refer to the related description in the above embodiments, and are not described herein again.
The technical effects of the in-band communication device and the readable storage medium in this embodiment are the same as those of the in-band communication method in the above embodiments, and are not described herein again.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The in-band communication method, system and related components provided by the present invention are described in detail above, and the principle and the implementation manner of the present invention are explained in this document by applying specific examples, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. An in-band communication method is used for realizing intelligent platform management interface communication, and is characterized by comprising the following steps:
establishing a first serial port for communication between the CPU and the BMC through a serial port device file;
establishing a second serial port for data transmission with the IPMI module in the BMC;
setting the same communication parameters for the first serial port and the second serial port;
establishing a mapping relation between the first serial port and the second serial port in the BMC;
and performing data communication between the CPU and the IPMI module by using the first serial port and the second serial port which establish the mapping relation.
2. The in-band communication method of claim 1, wherein the first serial port and the second serial port are both UART serial ports.
3. The in-band communication method of claim 2, wherein the first serial port is a UART serial port based on a hardware channel protocol.
4. The in-band communication method of claim 1,
the communication parameters comprise baud rate, and/or data bits, and/or parity bits, and/or stop bits.
5. The in-band communication method of claim 1, wherein the serial device file is specifically a ttyS device file.
6. The in-band communication method according to claim 5, wherein the process of setting the same communication parameter for the first serial port and the second serial port comprises:
and respectively setting the same communication parameters for the first serial port and the second serial port through the ttyS device file.
7. The in-band communication method according to any one of claims 1 to 6, wherein the performing of the data communication between the CPU and the IPMI module by using the first serial port and the second serial port with the mapping relationship established includes:
obtaining IPMI data request instruction information of the CPU and packaging a serial port;
sending the IPMI data request instruction information after serial port encapsulation to the IPMI module through the first serial port and the second serial port which establish the mapping relation, so that the IPMI module executes the following operations:
serial port decapsulation is carried out on the IPMI data request instruction information;
determining IPMI response data corresponding to the IPMI data request instruction information;
and carrying out serial port packaging on the IPMI response data and sending the IPMI response data to the CPU through the first serial port and the second serial port.
8. The utility model provides an in-band communication system for realize intelligent platform management interface communication, its characterized in that includes:
the first module is used for establishing a first serial port for communication between the CPU and the BMC through a serial port device file;
the second module is used for establishing a second serial port for data transmission with the IPMI module in the BMC;
the setting module is used for setting the same communication parameters for the first serial port and the second serial port;
the mapping module is used for establishing the mapping relation between the first serial port and the second serial port in the BMC;
and the communication module is used for performing data communication between the CPU and the IPMI module by utilizing the first serial port and the second serial port which establish the mapping relation.
9. The utility model provides an in-band communication device for realize intelligent platform management interface communication, its characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the in-band communication method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the in-band communication method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110876888.5A CN113704149A (en) | 2021-07-31 | 2021-07-31 | In-band communication method, system and related components |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110876888.5A CN113704149A (en) | 2021-07-31 | 2021-07-31 | In-band communication method, system and related components |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113704149A true CN113704149A (en) | 2021-11-26 |
Family
ID=78651127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110876888.5A Withdrawn CN113704149A (en) | 2021-07-31 | 2021-07-31 | In-band communication method, system and related components |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113704149A (en) |
-
2021
- 2021-07-31 CN CN202110876888.5A patent/CN113704149A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8560686B2 (en) | Communicating with an in-band management application through an out-of-band communications channel | |
CN102567074B (en) | USB (universal serial bus) device redirecting method facing virtual machines | |
US7840736B2 (en) | Bus communication enumeration | |
US9507619B2 (en) | Virtualizing a host USB adapter | |
JP2007172586A (en) | Method, apparatus and computer program for sharing computer data among computers | |
US20070288937A1 (en) | Virtual Device Driver | |
CN112130911A (en) | Data interaction method, device and system, electronic equipment and storage medium | |
US10606677B2 (en) | Method of retrieving debugging data in UEFI and computer system thereof | |
WO2022151707A1 (en) | Memory testing method and apparatus, readable storage medium, and electronic device | |
WO2022143714A1 (en) | Server system, and virtual machine creation method and apparatus | |
CN113010470A (en) | Edge node remote control system, method, device and storage medium | |
US10853255B2 (en) | Apparatus and method of optimizing memory transactions to persistent memory using an architectural data mover | |
US10642667B1 (en) | Apparatus, system, and method for efficiently sharing data between processes | |
US7934063B2 (en) | Invoking externally assisted calls from an isolated environment | |
WO2014000299A1 (en) | Serial port redirection processing method, device, and system | |
CN117149283A (en) | Method, device, equipment and storage medium for adapting plug-in card | |
CN113704149A (en) | In-band communication method, system and related components | |
CN116089124A (en) | Communication method, device and medium of simulation system | |
CN115033172A (en) | Storage module control method, device, equipment and storage medium | |
KR20230053496A (en) | System, method, and device for accessing device operating system over an interconnect | |
US7421711B2 (en) | System, method and apparatus for supporting a kernel mode driver | |
CN113626087A (en) | Method, system and device for data communication between host and BMC | |
US20070174034A1 (en) | Transparent intellectual network storage device | |
CN112579507A (en) | Host machine and BMC communication method, BIOS, operating system, BMC and server | |
US7702764B1 (en) | System and method for testing network protocols |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211126 |