CN111858441A - Method and system for setting CPU shared serial port - Google Patents
Method and system for setting CPU shared serial port Download PDFInfo
- Publication number
- CN111858441A CN111858441A CN202010590021.9A CN202010590021A CN111858441A CN 111858441 A CN111858441 A CN 111858441A CN 202010590021 A CN202010590021 A CN 202010590021A CN 111858441 A CN111858441 A CN 111858441A
- Authority
- CN
- China
- Prior art keywords
- communication module
- cpu
- module
- data
- request
- 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
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000004891 communication Methods 0.000 claims abstract description 126
- 238000012545 processing Methods 0.000 description 14
- 238000012544 monitoring process Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000758 substrate Substances 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/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
-
- 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/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a method and a system for setting a CPU shared serial port, which connect the CPU serial port with a BMC chip, wherein the method comprises the following steps: the BMC chip establishes communication connection with a remote terminal; and the BMC chip forwards the request of the remote terminal to the CPU and forwards the data returned by the CPU to the remote terminal. The CPU serial port is connected to the BMC chip by utilizing the BMC chip, and the aim of remotely debugging the CPU operating system is fulfilled by connecting the CPU serial port to the serial port of the CPU end through the BMC through the network through the SOL function realized by the network. In addition, the invention can realize the sharing of CPU data through the routing function of the BMC chip, thereby greatly improving the working efficiency.
Description
Technical Field
The invention belongs to the technical field of white box switches, and particularly relates to a method and a system for setting a CPU shared serial port.
Background
A Universal Asynchronous Receiver Transmitter (UART), which is a serial port in general, is a common interface on a CPU board, and an engineer can log in an operating system of a CPU to operate by connecting the UART to a computer terminal through the serial port. However, the serial port has a disadvantage that the debugging can be performed only by actually connecting the serial port to a computer through a serial port line, and the remote connection cannot be performed. The operation and maintenance personnel must go to the side of the machine room to connect the serial port line, and then can debug.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method and a system for setting a CPU shared serial port, so as to solve the technical problems.
The invention provides a method for setting a CPU shared serial port, which connects the CPU serial port with a BMC chip and comprises the following steps:
the BMC chip establishes communication connection with a remote terminal;
and the BMC chip forwards the request of the remote terminal to the CPU and forwards the data returned by the CPU to the remote terminal.
Further, the method further comprises:
the BMC chip comprises a first communication module, a second communication module, a third communication module and a fourth communication module;
the first communication module is connected with a CPU serial port;
the second communication module is connected with the control end;
synchronously routing the data resources of the first communication module to a third communication module;
synchronously routing the data resource of the second communication module to a fourth communication module;
the BMC chip also comprises a cache module.
Further, the method further comprises:
the first communication module sends a request, received by the BMC from the remote terminal, to the CPU, and simultaneously backs up the request to the cache module through the third communication module;
the first communication module forwards data returned by the CPU to a remote terminal through a network, and simultaneously backs up the data to a cache module through a third communication module;
And the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
Further, the method further comprises:
the first communication module sends a request, received by the BMC from the control end through the second communication module, to the CPU;
the fourth communication module caches the request passing through the second communication module to the cache module;
the third communication module sends the data returned by the CPU to the cache module;
the first communication module sends the request and the data in the cache module to a remote terminal through a network; and the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
The invention also provides a system for setting the CPU sharing serial port, which connects the CPU serial port with the BMC chip, and the system comprises:
the remote connection unit is configured for establishing communication connection between the BMC chip and a remote terminal;
and the data forwarding unit is configured to forward the request of the remote terminal to the CPU by the BMC chip and forward data returned by the CPU to the remote terminal.
Further, the system further comprises:
the BMC chip comprises a first communication module, a second communication module, a third communication module and a fourth communication module;
The first communication module is connected with a CPU serial port;
the second communication module is connected with the control end;
synchronously routing the data resources of the first communication module to a third communication module;
synchronously routing the data resource of the second communication module to a fourth communication module;
the BMC chip also comprises a cache module.
Further, the system further comprises:
the remote request unit is configured for sending a request, received by the BMC from the remote terminal, to the CPU through the first communication module and backing up the request to the cache module through the third communication module;
the remote data module is configured for the first communication module to forward data returned by the CPU to a remote terminal through a network, and simultaneously, the data is backed up to the cache module through the third communication module;
and the physical sharing module is configured to enable the fourth communication module to output the request and the data in the cache module to the control end through the second communication module.
Further, the system further comprises:
the physical request unit is configured for the first communication module to send a request, received by the BMC from the control end through the second communication module, to the CPU;
the request caching unit is configured for the fourth communication module to cache the request passing through the second communication module to the caching module;
The data caching unit is configured for the third communication module to send data returned by the CPU to the caching module;
the cache sharing unit is configured to send the request and the data in the cache module to a remote terminal through a network by the first communication module; and the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
The beneficial effect of the invention is that,
according to the method and the system for setting the CPU shared serial port, the CPU serial port is connected to the BMC chip by utilizing the BMC, the SOL function is realized through a network, the CPU serial port can be connected to the serial port of the CPU end through the BMC through the network, and the purpose of remotely debugging the CPU operating system is realized. In addition, the invention can realize the sharing of CPU data through the routing function of the BMC chip, thereby greatly improving the working efficiency.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic and diagrammatic illustration of a method in accordance with an embodiment of the present application.
FIG. 2 is a schematic flow diagram of input data sharing for a method of one embodiment of the present application.
FIG. 3 is a schematic flow diagram of output data sharing for a method of one embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all 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.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, the terms "first", "second", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The terms in which the invention appears are to be construed.
BMC (Baseboard Management Controller) substrate Management Controller
Intelligent Platform Management Interface for IPMI Intelligent Platform Management Interface
SOL Serial Over Lan network Serial interface
UART Universal Asynchronous Receiver Transceiver
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
Example 1
Referring to fig. 1, the present embodiment provides a method for setting a CPU shared serial port, which mainly includes the following steps:
the cpu serial port is connected to a UART1 serial port inside the BMC chip through an LPC bus, and is finally connected to a CPLD from an IO1 port; in the BMC, in order to implement CPU serial port shared input/output, a 2500-chip UART routing function is utilized, which is supported at a driver level, and UART1 is routed to UART3(ttyS2), and IO1 is routed to UART4(ttyS3) (which may be understood as a copy, and a copy may also be received through data streams of the original UART/IO).
The method is characterized in that a service of a socket-socket service is deployed on a BMC chip, and the service is automatically started along with the start of a BMC system, and is mainly responsible for establishing a local socket, monitoring the connection of an SOL client and executing the forwarding function of input and output data.
When sending a request to a CPU, both a remote terminal and a local control device (CPLD) can share request information of each other, and a specific implementation method is shown in fig. 2:
when a sol request initiated by an ipmi out-of-band command is connected to a local socket created by a container-sol, and a socket processing module detects that a terminal keyboard is input, the socket processing module sends a data stream to ttyS2 (a function on UART 3); the ttyS2 directly sends the data stream to the serial port of the cpu, and meanwhile, if a processing function specially monitoring the ttyS2 read event finds data, the processing function caches the data stream into a ringbuffer cache module; the local tty processing module is used as a consumer of the ring buffer, and when it is monitored that the cache module stores new data, the registered consumer processing function is called, the data is taken out from the cache module, and the data is sent to the actual physical serial port end through ttyS 3. The effect of this is: on a terminal screen of the SOL client, a keyboard inputs a command, and the command also appears on a terminal screen of a physical serial port;
When the CPU terminal is accessed through the BMC physical serial port, ttyS3 (function on UART 4) is passed. When the local tty processing module detects that the terminal has keyboard input, the data stream is sent to ttyS2(UART 3); the ttyS2 directly sends the data stream to the serial port of the cpu, and meanwhile, if a processing function specially monitoring the ttyS2 read event finds data, the processing function caches the data stream into a ringbuffer cache module; the socket processing module is used as a 'consumer' of the ringbuffer, calls the registered consumer processing function, takes out data from the buffer module, and sends the data to the socket end through the local socket connection. The effect of this is: on the terminal screen of the physical serial port end, the keyboard inputs commands, and simultaneously, the commands appear on the terminal screen of the SOL client.
When the CPU returns the requested data, both the remote terminal and the local control device (CPLD) can share the returned data, and the specific implementation method is shown in fig. 3:
when data is sent to the BMC through the serial port of the CPU, and the processing function specially monitoring the ttyS2 read event finds the data, the data is cached as a ringbuffer cache module; the socket processing module and the local tty module are respectively used as 'consumers' of the ringbuffer, and respectively call the registered consumer processing function, take out data from the buffer module, and respectively display the data stream back to respective terminals through the socket and ttyS 3. The effect of this is: and a command is input from the SOL or the physical serial port terminal, after the carriage return is clicked, a command result is returned from the serial port of the CPU, and the command result is simultaneously displayed on the terminal screens of the SOL and the physical serial port, so that the purpose of shared output is achieved.
Example 2
This embodiment provides a system for setting up a CPU shared serial port, connects the CPU serial port with a BMC chip, the system includes:
the remote connection unit is configured for establishing communication connection between the BMC chip and a remote terminal;
and the data forwarding unit is configured to forward the request of the remote terminal to the CPU by the BMC chip and forward data returned by the CPU to the remote terminal.
Preferably, the system further comprises:
the BMC chip comprises a first communication module, a second communication module, a third communication module and a fourth communication module;
the first communication module is connected with a CPU serial port;
the second communication module is connected with the control end;
synchronously routing the data resources of the first communication module to a third communication module;
synchronously routing the data resource of the second communication module to a fourth communication module;
the BMC chip also comprises a cache module.
Preferably, the system further comprises:
the remote request unit is configured for sending a request, received by the BMC from the remote terminal, to the CPU through the first communication module and backing up the request to the cache module through the third communication module;
the remote data module is configured for the first communication module to forward data returned by the CPU to a remote terminal through a network, and simultaneously, the data is backed up to the cache module through the third communication module;
And the physical sharing module is configured to enable the fourth communication module to output the request and the data in the cache module to the control end through the second communication module.
Preferably, the system further comprises:
the physical request unit is configured for the first communication module to send a request, received by the BMC from the control end through the second communication module, to the CPU;
the request caching unit is configured for the fourth communication module to cache the request passing through the second communication module to the caching module;
the data caching unit is configured for the third communication module to send data returned by the CPU to the caching module;
the cache sharing unit is configured to send the request and the data in the cache module to a remote terminal through a network by the first communication module; and the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (8)
1. A method for setting a CPU shared serial port is characterized in that the CPU serial port is connected with a BMC chip, and the method comprises the following steps:
the BMC chip establishes communication connection with a remote terminal;
and the BMC chip forwards the request of the remote terminal to the CPU and forwards the data returned by the CPU to the remote terminal.
2. The method of claim 1, further comprising:
the BMC chip comprises a first communication module, a second communication module, a third communication module and a fourth communication module;
the first communication module is connected with a CPU serial port;
the second communication module is connected with the control end;
synchronously routing the data resources of the first communication module to a third communication module;
synchronously routing the data resource of the second communication module to a fourth communication module;
the BMC chip also comprises a cache module.
3. The method of claim 2, further comprising:
the first communication module sends a request, received by the BMC from the remote terminal, to the CPU, and simultaneously backs up the request to the cache module through the third communication module;
the first communication module forwards data returned by the CPU to a remote terminal through a network, and simultaneously backs up the data to a cache module through a third communication module;
And the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
4. The method of claim 2, further comprising:
the first communication module sends a request, received by the BMC from the control end through the second communication module, to the CPU;
the fourth communication module caches the request passing through the second communication module to the cache module;
the third communication module sends the data returned by the CPU to the cache module;
the first communication module sends the request and the data in the cache module to a remote terminal through a network; and the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
5. The utility model provides a CPU shared serial ports's setting system which characterized in that, with CPU serial ports connection BMC chip, the system includes:
the remote connection unit is configured for establishing communication connection between the BMC chip and a remote terminal;
and the data forwarding unit is configured to forward the request of the remote terminal to the CPU by the BMC chip and forward data returned by the CPU to the remote terminal.
6. The system of claim 5, further comprising:
The BMC chip comprises a first communication module, a second communication module, a third communication module and a fourth communication module;
the first communication module is connected with a CPU serial port;
the second communication module is connected with the control end;
synchronously routing the data resources of the first communication module to a third communication module;
synchronously routing the data resource of the second communication module to a fourth communication module;
the BMC chip also comprises a cache module.
7. The system of claim 6, further comprising:
the remote request unit is configured for sending a request, received by the BMC from the remote terminal, to the CPU through the first communication module and backing up the request to the cache module through the third communication module;
the remote data module is configured for the first communication module to forward data returned by the CPU to a remote terminal through a network, and simultaneously, the data is backed up to the cache module through the third communication module;
and the physical sharing module is configured to enable the fourth communication module to output the request and the data in the cache module to the control end through the second communication module.
8. The system of claim 6, further comprising:
The physical request unit is configured for the first communication module to send a request, received by the BMC from the control end through the second communication module, to the CPU;
the request caching unit is configured for the fourth communication module to cache the request passing through the second communication module to the caching module;
the data caching unit is configured for the third communication module to send data returned by the CPU to the caching module;
the cache sharing unit is configured to send the request and the data in the cache module to a remote terminal through a network by the first communication module; and the fourth communication module outputs the request and the data in the cache module to the control end through the second communication module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010590021.9A CN111858441A (en) | 2020-06-24 | 2020-06-24 | Method and system for setting CPU shared serial port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010590021.9A CN111858441A (en) | 2020-06-24 | 2020-06-24 | Method and system for setting CPU shared serial port |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111858441A true CN111858441A (en) | 2020-10-30 |
Family
ID=72988508
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010590021.9A Withdrawn CN111858441A (en) | 2020-06-24 | 2020-06-24 | Method and system for setting CPU shared serial port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111858441A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112416839A (en) * | 2020-11-02 | 2021-02-26 | 光华临港工程应用技术研发(上海)有限公司 | System for realizing UART (universal asynchronous receiver transmitter) communication |
-
2020
- 2020-06-24 CN CN202010590021.9A patent/CN111858441A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112416839A (en) * | 2020-11-02 | 2021-02-26 | 光华临港工程应用技术研发(上海)有限公司 | System for realizing UART (universal asynchronous receiver transmitter) communication |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102752150B (en) | Distributed communication equipment capable of providing remote board card debugging and remote board card debugging method | |
US20070233833A1 (en) | Data transmission system for electronic devices with server units | |
CN111585875B (en) | Fire-fighting and security-protection integrated edge computing gateway and application thereof | |
CN1983969A (en) | System and realization for re-directing interface network | |
JPS6387435A (en) | Information transmission control method for elevator system | |
CN104935621A (en) | Remote monitoring system and remote monitoring method | |
US9280426B2 (en) | System and method for server redundancy | |
CN113645047A (en) | Out-of-band management system and server based on intelligent network card | |
CN103676922B (en) | A kind of method of long-range diagnosis | |
CN205353751U (en) | Train network system | |
CN111858441A (en) | Method and system for setting CPU shared serial port | |
CN105450765A (en) | Server KVM remote control method and device | |
CN203554493U (en) | Server remote management interface system | |
CN100450069C (en) | System and parts for realizing communication between first part and secondary part | |
CN101296132A (en) | Method, system and device for monitoring network interface card | |
CN205240980U (en) | Small -size elevator remote monitering system and failure alarm system | |
CN1983977A (en) | Method and system for realizing long-distance loading monoboard fastener | |
CN116089176A (en) | Hot standby dual-redundancy computer control system for AUV | |
CN201750426U (en) | Intelligent blade server | |
CN114337196A (en) | Micro server based PSE power supply control and micro server | |
CN110309031B (en) | Load balancing micro-computing cluster architecture | |
RU186862U1 (en) | Subscriber network device with virtualized network functions | |
CN103458011B (en) | Network card binding method between multi-network card computer in remotely controlling | |
CN109688002B (en) | WEB visualization based virtual machine and container management method and system | |
CN111858433A (en) | SSH (secure Shell) serial port redirection-based method, system, equipment and medium |
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 |
Application publication date: 20201030 |
|
WW01 | Invention patent application withdrawn after publication |