WO2014000299A1 - Serial port redirection processing method, device, and system - Google Patents

Serial port redirection processing method, device, and system Download PDF

Info

Publication number
WO2014000299A1
WO2014000299A1 PCT/CN2012/077990 CN2012077990W WO2014000299A1 WO 2014000299 A1 WO2014000299 A1 WO 2014000299A1 CN 2012077990 W CN2012077990 W CN 2012077990W WO 2014000299 A1 WO2014000299 A1 WO 2014000299A1
Authority
WO
WIPO (PCT)
Prior art keywords
motherboard
shared memory
peripheral component
serial port
component device
Prior art date
Application number
PCT/CN2012/077990
Other languages
French (fr)
Chinese (zh)
Inventor
蔡世顺
彭林
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201280000783.2A priority Critical patent/CN102884515B/en
Priority to PCT/CN2012/077990 priority patent/WO2014000299A1/en
Publication of WO2014000299A1 publication Critical patent/WO2014000299A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter

Definitions

  • the present invention relates to a serial port technology, and in particular, to a serial port redirection processing method, device, and system. Background technique
  • PCIE Peripheral Component Interconnect Express
  • I/O Input/Output
  • PCIE uses the popular point-to-point serial connection in the industry to increase the data rate to a very high frequency.
  • Developers based on PCIE offer many PCIE devices with PCIE interfaces, such as accelerator cards, graphics cards, sound cards, and more.
  • PCIE devices With the intelligence of PCIE devices, debugging of PCIE devices is becoming more and more important.
  • the most basic and most common method for debugging PCIE devices is to directly use the serial port to input/output system information.
  • FIG. 1 is a schematic diagram of a PCIE device debugging directly using a serial port in the prior art.
  • the PCIE device is installed on each server.
  • debugging the PCIE device first connect one end of the serial cable to the serial port of the PCIE device, and the other end to the serial port of the computer, and then Turn on the console on your computer, configure the baud rate, and input and output from the console to debug the PCIE device.
  • the embodiment of the invention provides a serial port redirection processing method, device and system, which are used to save the serial port line and avoid manual debugging to the site, thereby improving debugging efficiency.
  • the embodiment of the present invention provides a serial port redirection processing method, including: a motherboard calling redirection program, and writing input information received by the motherboard according to a physical address and a memory size of the shared memory;
  • the input buffer of the shared memory is input as a serial port. Entering information, and reading information in the output buffer of the shared memory as serial port output information; the shared memory is used for the motherboard and the fast peripheral component device inserted on the motherboard Serial port management.
  • the embodiment of the invention further provides another serial port redirection processing method, including:
  • the fast peripheral component device reads the information in the input buffer of the shared memory as the serial port input information according to the physical address and the memory size of the shared memory, and writes the serial port output information to the output buffer of the shared memory.
  • the shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
  • an embodiment of the present invention further provides a motherboard, including:
  • a first writing module configured to write input information received by the motherboard to an input buffer of the shared memory according to a physical address and a memory size of the shared memory after the motherboard invokes the redirecting program Input information as a serial port in the area;
  • a first reading module configured to read information in an output buffer of the shared memory as a serial port output information
  • the shared memory is used for serial port management between the motherboard and a fast peripheral component device inserted on the motherboard.
  • the embodiment of the invention further provides a fast peripheral component device, including:
  • a second reading module configured to read information in the input buffer of the shared memory as serial port input information according to a physical address and a memory size of the shared memory
  • a second writing module configured to write serial port output information into an output buffer area of the shared memory
  • the shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
  • the shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
  • an embodiment of the present invention further provides a serial port redirection processing system, including the motherboard and the fast peripheral component device as described above.
  • the serial port redirection processing method, device and system provided by the embodiments of the present invention perform serial port management between the motherboard and the fast peripheral component device inserted on the motherboard through the shared memory, so that the motherboard and the fast peripheral component device can be Read and write information in shared memory to implement the motherboard
  • the information exchange with the fast peripheral component device When the debugger remotely logs in to the motherboard to invoke the redirector, the information of the motherboard and the fast peripheral components can be exchanged to realize debugging of the PCIE device, and the debugging and maintenance are overcome quickly.
  • the peripheral component device requires the problem of the serial cable and the computer connected to the serial cable, which avoids the problem of arranging personnel to go to the site for the serial port insertion and removal operation, which saves time, improves efficiency, and saves labor and cost.
  • FIG. 1 is a schematic diagram of a PCIE device debugging using a serial port in the prior art
  • FIG. 2 is a schematic flowchart of a serial port redirection processing method according to an embodiment of the present invention
  • FIG. 3 is a serial port redirection process according to another embodiment of the present invention
  • FIG. 4 is a schematic diagram of a serial port redirection processing method according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a motherboard according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural view of a motherboard according to another embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a fast peripheral component device according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a fast peripheral component device according to another embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for processing a serial port redirection according to an embodiment of the present invention.
  • the main body of the embodiment is a motherboard.
  • the serial port redirection processing method provided in this embodiment may include:
  • Step 101 The motherboard calls a redirector;
  • Step 102 According to the physical address and the memory size of the shared memory, input the input information received by the motherboard into the input buffer of the shared memory as the serial port input information, and use the information in the output buffer of the shared memory as Serial output information is read;
  • the shared memory is used for serial port management between the motherboard and the fast peripheral component devices inserted on the motherboard.
  • the redirecting program may be a pre-developed application, and the redirecting program runs on the motherboard as a serial port redirection tool, and presents a serial port console to the user, so that the user can be in the motherboard system.
  • the operation interface performs input and output.
  • step 102 after the motherboard calls the redirector, the motherboard can process the input buffer and the output buffer information in the shared memory in real time, and write the input information in the input buffer of the shared memory.
  • the information in the output buffer is read as the serial port output information.
  • the motherboard can write information for debugging the fast peripheral component device in the input buffer of the shared memory, and at the same time, the motherboard also reads the information in the output buffer of the shared memory, that is, the motherboard. Read the feedback information of the fast peripheral component device to the debugging information, so that the debugger can maintain and debug the fast peripheral component device.
  • the shared memory is serially managed between the motherboard and the fast peripheral component device inserted in the motherboard.
  • the motherboard can read the feedback information of the debugging information of the fast peripheral component device in the shared memory, and the fast peripheral component device also The debugging information in the shared memory can be read, thereby completing the information interaction between the motherboard and the shared memory and between the shared memory and the fast peripheral component device, and finally realizing the information interaction between the motherboard and the fast peripheral component device.
  • the serial port management is performed between the motherboard and the fast peripheral component by calling the redirecting program through the motherboard, and sharing the memory between the motherboard and the fast peripheral component device inserted on the motherboard. Information exchange.
  • the shared memory is determined, and the physical address and memory size of the shared memory are sent to the fast peripheral component device.
  • the driver of the fast peripheral component device is loaded on the motherboard, the driver of the fast peripheral component device
  • the program applies for shared memory, and sends the physical address and memory size information of the shared memory to the fast peripheral component device, so that the fast peripheral component device can know the physical address and memory size of the shared memory, so that the fast peripheral component device and the mother
  • the driver on the board can access the shared memory and establish a memory map.
  • the shared memory can be a contiguous physical memory or a number of registers of the fast peripheral component device, or a contiguous physical memory of the motherboard.
  • the shared memory can also be determined by the fast peripheral component device and that the physical address and memory size of the shared memory are sent to the motherboard.
  • the fast peripheral component device itself is a small system including separate processors, memory, registers, and the like.
  • shared memory when the motherboard loads the fast peripheral component device plugged into the motherboard, the driver of the fast peripheral component device applies for shared memory, which may be a continuous physical memory of the fast peripheral component device, or A number of registers of a fast peripheral component device, or a continuous piece of physical memory on the motherboard.
  • the shared memory is a continuous physical memory or a plurality of registers of the fast peripheral component device, or a continuous physical memory of the motherboard, the user can ensure the overall requirements of the system according to the debugging requirements. Make a choice of shared memory with the best performance.
  • the motherboard call redirector includes: obtaining a physical address and a memory size of the shared memory from the fast peripheral component device driver, and mapping the shared memory from the kernel state to the user state.
  • the process created by the program runs in user mode, and the shared memory is in kernel mode.
  • the kernel state and user mode are at two different run levels, and the low-level user state cannot access the high-level kernel-mode address space, including the address and code. Therefore, if users need to access shared memory in kernel mode, they need to map shared memory from kernel mode to user mode. After the mapping, the redirector can directly access the shared memory. For example, under the Linux operating system, the shared memory can be mapped from the kernel state to the user state using the memory mapping mechanism provided by the operating system.
  • the motherboard can also start two threads in the redirector.
  • the above two threads can be created by the redirector.
  • one thread is used to write the input information received by the motherboard into the input buffer of the shared memory as the serial port input information.
  • the input information received by the motherboard may be a character input through a keyboard.
  • Another thread is used to output the shared memory
  • the information in the buffer is read as the serial output.
  • another thread can print the characters of the read output buffer to the screen.
  • the technical solution of this embodiment maps the shared memory from the kernel state to the user state, so that the user can process the information of the input buffer and the output buffer on the shared memory in real time.
  • the serial port redirection processing method further includes the user remotely logging in to the motherboard, and testing the fast peripheral component device through the motherboard.
  • the user can directly send a remote login request to the motherboard through the Secure Shell (Ssh), and the motherboard receives the request to complete the remote login of the user.
  • the motherboard runs the redirector under the shell.
  • the shell commonly known as the shell, is software that provides the user to use the interface, can receive user commands, and invoke the corresponding application.
  • the motherboard can be logged in to the motherboard according to the IP address of the motherboard, and the corresponding fast peripheral component device can be debugged according to the slot number of the fast peripheral component device on the motherboard or the model of the fast peripheral component device. It can be understood by those skilled in the art that the method for implementing remote login can be applied to the serial port redirection processing method provided by the embodiment of the present invention, and is not particularly limited herein.
  • the redirecting program is called by the motherboard, and as a serial port redirection tool, the user can provide a serial port console, and direct the input and output information of the serial port of the fast peripheral component device to the serial port console of the motherboard, and remotely log in to the motherboard, that is, Control of the PCIE device can be completed.
  • the redirector supports multiple users to view the serial port information at the same time, that is, the information of the fast peripheral component device.
  • Each user logs in to the motherboard, and the serial port information can be seen through the shell running redirect program, which facilitates the multi-user to the fast periphery. Joint debugging of component devices.
  • FIG. 3 is a schematic flowchart of a method for processing a serial port redirection according to another embodiment of the present invention.
  • the embodiment of the present embodiment is a fast peripheral component device.
  • the serial port redirection processing method provided in this embodiment may include:
  • Step 201 The fast peripheral component device reads the information in the input buffer of the shared memory as the serial port input information according to the physical address and the memory size of the shared memory, and writes the serial port output information into the output buffer of the shared memory. ;
  • the shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
  • the input buffer of the shared memory can be used as an input source, and the fast peripheral component device queries the shared memory input buffer for debugging information input in real time, if Yes, the fast peripheral component device uses the input debugging information as the serial port input information of the fast peripheral component device according to the physical address and memory size of the shared memory; the output buffer of the shared memory can be used as an output source, and the fast peripheral component device will The feedback information of the debug information is input to the output buffer.
  • the shared memory is serially managed between the motherboard and the fast peripheral component device inserted in the motherboard.
  • the fast peripheral component device can read the debugging information in the shared memory, and the motherboard can also share the peripheral component device in the shared memory.
  • the feedback information of the debugging information is read, thereby completing the information interaction between the shared memory and the fast peripheral component device and between the motherboard and the shared memory, and finally realizing the information interaction between the fast peripheral component device and the motherboard.
  • the technical solution of the embodiment can complete the motherboard management by reading the information in the shared memory by the fast peripheral component device, and performing serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
  • the information exchange with the fast peripheral components therefore, only need to remotely run the redirection program on the motherboard, the information exchange between the motherboard and the fast peripheral components can realize the operation of the PCIE device, thereby overcoming the debugging.
  • the fast peripheral component device is maintained, the computer problem of the serial cable and the serial cable is required, and the problem of arranging the personnel to go to the site for the serial port insertion and removal operation is avoided, which saves time, improves efficiency, and saves labor and cost.
  • the fast peripheral component device receives the physical address and the memory size of the shared memory sent by the motherboard, and the shared memory is determined by the motherboard when the driver of the fast peripheral component device is loaded.
  • the shared memory is a contiguous physical memory or registers of a fast peripheral component device, or a contiguous physical memory of the motherboard.
  • the fast peripheral component device receives the physical address and the memory size of the shared memory sent by the motherboard, and can obtain the physical address and the memory size of the shared memory. Enables fast peripheral component devices to access shared memory, creating a memory map of fast peripheral component devices and motherboards. Users can also choose between shared memory based on debugging needs and ensuring optimal overall performance across all aspects of the system.
  • FIG. 4 is a schematic diagram of a method for processing a serial port redirection according to an embodiment of the present invention. As shown in Figure 4, there are four main steps in receiving input information from the motherboard and then reading the output information from the motherboard:
  • Step 301 The motherboard writes the input information received in the input buffer of the shared memory according to the enabled thread
  • Step 302 The fast peripheral component device reads the information in the input buffer of the shared memory to The serial port of the fast peripheral component device;
  • Step 303 The fast peripheral component device writes the information output by the serial port to the output buffer of the shared memory
  • Step 304 The motherboard reads the information in the output buffer of the shared memory according to another thread that is enabled.
  • the thread enabled in step 301 is mainly responsible for receiving characters input by the remote computer keyboard and writing characters to the input buffer of the shared memory.
  • another thread enabled by the motherboard is mainly responsible for reading the shared memory output.
  • the characters in the punch area are printed on the screen of the remote computer.
  • the fast peripheral component device may first read the debugging information input from the remote computer to the input buffer in the shared memory to the serial port of the peripheral component device, and the peripheral component device debugs the information through step 302.
  • the feedback information can be written to the output buffer of the shared memory by step 303. That is, the information obtained by the serial port from the input buffer is debugging information, and the information output from the serial port to the output buffer can be feedback information of the debugging information of the fast peripheral component device.
  • the physical address of the shared memory is used to indicate a starting position for writing information to or reading information from the shared memory.
  • the mother board or fast peripheral component device can judge whether the storage space is sufficient according to the memory size of the shared memory before writing the information. If it is enough, it can be directly written. If it is not enough, the method of batch writing can be used first, that is, first Write a part, wait for the peer to read; then write another part.
  • the motherboard or fast peripheral component device When the motherboard or fast peripheral component device reads information from the shared memory, it can read all the information in the shared memory according to the indication of the memory size according to the starting position; of course, it is also possible to pre-determine the termination position of the information, and then share The information in the memory from the start position to the end position is read out (this way can be independent of the memory size), and so on.
  • the information is completed from the motherboard to the input buffer, then to the fast peripheral component device, and the fast peripheral component device outputs information to the output buffer, and then to the motherboard, the mother is completed.
  • the board interacts with information from fast peripheral component devices.
  • the input information in step 301 may be an input letter of the remote computer keyboard.
  • the mother board in step 304 can read the information and print it to the screen of the remote computer for the user to analyze and process the data, thereby avoiding the use of a large number of serial lines, and overcoming the dispatch of people to the computer room to the fast periphery. Component equipment is debugged and maintained, which saves time and cost and increases efficiency.
  • FIG. 5 is a schematic structural diagram of a motherboard according to an embodiment of the present invention.
  • the first board is configured to: The physical address and memory size of the shared memory, the input information received by the motherboard is written in the input buffer of the shared memory as the serial port input information; the first read ear block 402 is used to output the shared memory buffer The information in the information is read as a serial output.
  • Shared memory is used for serial port management between the motherboard and the fast peripheral components that are plugged into the motherboard.
  • the server can be a workgroup server, a departmental server or an enterprise server.
  • the enterprise server has the highest hardware configuration and the strongest system reliability. It is used for networked computers with more than hundreds of devices, and has high processing speed and data security requirements. Large network. Embodiments of the present invention are equally applicable to tower servers of different configurations, rack servers and blade servers.
  • the motherboard provided by the embodiment of the present invention writes the debugging information received by the motherboard to the shared memory through the first writing module 401, and the fast peripheral component pair in the shared memory can be read through the first reading module 402 motherboard.
  • the feedback information of the debugging information is completed, thereby completing the information interaction between the motherboard and the shared memory.
  • serial port management of shared memory information interaction between the motherboard and the shared memory and between the shared memory and the fast peripheral component device can be realized, thereby realizing information interaction between the motherboard and the fast peripheral component device. Therefore, it is only necessary to remotely run the redirection program on the motherboard to realize the operation of the PCIE device through the information exchange between the motherboard and the fast peripheral components, thereby overcoming the need for a serial cable when debugging and maintaining the fast peripheral component device.
  • the computer problem with the serial port line avoids the problem of arranging personnel to go to the site for serial port plugging and unplugging operation, which saves time, improves efficiency, and saves labor and cost.
  • FIG. 6 is a schematic structural diagram of a motherboard according to another embodiment of the present invention.
  • the motherboard provided by the embodiment of the present invention further includes a determining module 403, when the motherboard loads the driver of the fast peripheral component device. Determine within the share Save, and send the physical address and memory size of the shared memory to the fast peripheral component device.
  • the shared memory of the embodiment of the present invention described above may be a continuous physical memory of the motherboard.
  • FIG. 7 is a schematic structural diagram of a fast peripheral component device according to an embodiment of the present invention.
  • the fast peripheral component device provided by the embodiment of the present invention includes: a second read module 501 and a second write module 502, wherein the second read module 501 is configured to use a physical address and a memory according to the shared memory.
  • the size, the information in the input buffer of the shared memory is read as the serial port input information; the second write module 502 is used to write the serial port output information into the output buffer of the shared memory; the shared memory is used for the motherboard and
  • the serial port management is performed between the fast peripheral component devices inserted on the motherboard.
  • the debugging information of the fast peripheral component device in the shared memory can be read by the second read module 501, and the debugging information fed back by the fast peripheral component device is written by the second write module 502. Go to shared memory to complete the information interaction between fast peripheral component devices and shared memory.
  • the serial port management of the shared memory the information exchange between the fast peripheral component device and the shared memory and between the motherboard and the shared memory is realized, thereby realizing the information interaction between the fast peripheral component device and the motherboard. Therefore, it is only necessary to remotely call the redirection program on the motherboard to realize the operation of the PCIE device through the information exchange between the motherboard and the fast peripheral components, thereby overcoming the need for a serial cable when debugging and maintaining the fast peripheral component device.
  • the computer problem with the serial port line avoids the problem of arranging personnel to go to the site for serial port plugging and unplugging operation, which saves time, improves efficiency, and saves labor and cost.
  • FIG. 8 is a schematic structural diagram of a fast peripheral component device according to another embodiment of the present invention.
  • the fast peripheral component device provided by this embodiment is further than the second read module 501 and the second write module 502.
  • the receiving module 503 is configured to receive a physical address and a memory size of the shared memory sent by the motherboard, where the shared memory is determined by the motherboard when the driver of the fast peripheral component device is loaded.
  • the above shared memory can be a continuous physical memory or a number of registers of a fast peripheral component device.
  • the fast peripheral component device provided in this embodiment may be a peripheral component interconnection standard.
  • PCI Peripheral Component Interconnect
  • PCIE Peripheral Component Interconnect
  • PCI-X Peripheral Component Interconnect
  • the fast peripheral component device may be an intelligent network card, an encryption card, a protocol uninstall card, a video acceleration card, etc., and is not particularly limited herein.
  • the embodiment of the present invention further provides a serial port redirection processing system, which includes the motherboard shown in any of FIG. 5 and FIG. 6 and the fast peripheral component device shown in any of FIGS. 7 to 8.
  • serial port redirection processing system corresponds to the serial port redirection processing method provided by the embodiment of the present invention, and is an execution system of the serial port redirection processing method, and the specific process of the serial port redirection processing method can be referred to the present invention.
  • the embodiment of the serial port redirection processing method is not described here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Transfer Systems (AREA)

Abstract

Embodiments of the present invention provide a serial port redirection processing method, device, and system. A method comprises: A motherboard calls a redirection program, writes, according to the physical address and memory size of a shared memory, the input information received by the motherboard into the input buffer of the shared memory as the serial port input information, and reads the information in the output buffer of the shared memory as the serial port output information; the shared memory is used for serial port management between the motherboard and a peripheral component interconnect express (PCIE) device inserted on the mother board. The embodiments of the present invention conserve serial port connection wires, and require no manual on-site debugging, thereby enhancing debugging efficiency.

Description

串口重定向处理方法、 设备和系统  Serial port redirection processing method, device and system
技术领域 本发明实施例涉及串口技术, 尤其涉及一种串口重定向处理方法、 设备 和系统。 背景技术 The present invention relates to a serial port technology, and in particular, to a serial port redirection processing method, device, and system. Background technique
夕卜设组件快速互连 ( Peripheral Component Interconnect Express , 简称 PCIE )标准是最新的总线和接口标准,代表着下一代输入 /输出( Input/Output, 简称 I/O )接口标准。 PCIE釆用了目前业内流行的点对点串行连接, 可以把数 据传输率提高到一个很高的频率。 开发者基于 PCIE提供了许多具有 PCIE接口 的 PCIE设备,例如加速卡,显卡,声卡等等。随着 PCIE设备的智能化,对 PCIE 设备的调试显得越来越重要。 目前对 PCIE设备调试最基本也最常用的方法就 是直接使用串口来输入 /输出系统的信息。  The Peripheral Component Interconnect Express (PCIE) standard is the latest bus and interface standard and represents the next generation of Input/Output (I/O) interface standards. PCIE uses the popular point-to-point serial connection in the industry to increase the data rate to a very high frequency. Developers based on PCIE offer many PCIE devices with PCIE interfaces, such as accelerator cards, graphics cards, sound cards, and more. With the intelligence of PCIE devices, debugging of PCIE devices is becoming more and more important. The most basic and most common method for debugging PCIE devices is to directly use the serial port to input/output system information.
图 1为现有技术直接使用串口进行 PCIE设备调试的示意图。 如图 1所示, 机拒中每一台服务器上都安装有 PCIE设备, 在对 PCIE设备进行调试时, 首先 将串口线一端连接 PCIE设备的串口, 另一端连接到计算机的串口上, 然后再 打开计算机上的控制台,配置好波特率,从控制台进行输入输出,从而对 PCIE 设备进行调试。  FIG. 1 is a schematic diagram of a PCIE device debugging directly using a serial port in the prior art. As shown in Figure 1, the PCIE device is installed on each server. When debugging the PCIE device, first connect one end of the serial cable to the serial port of the PCIE device, and the other end to the serial port of the computer, and then Turn on the console on your computer, configure the baud rate, and input and output from the console to debug the PCIE device.
现有技术中对 PCIE设备的调试时, 不仅需要在机房中使用串口线, 还需要安排人员在现场进行串口线的插拔操作, 特别是同时调试维护多个 设备时, 现场还需要多根串口线, 调试过程非常不便, 效率低下, 还需要 浪费人力。 发明内容  In the prior art, when debugging a PCIE device, it is not only necessary to use a serial cable in the equipment room, but also to arrange a person to perform the plugging and unplugging operation of the serial cable in the field, especially when debugging and maintaining multiple devices at the same time, multiple serial ports are needed at the site. Line, the debugging process is very inconvenient, inefficient, and it takes a lot of manpower. Summary of the invention
本发明实施例提供一种串口重定向处理方法、 设备和系统, 用以节省串 口线和避免人工到现场进行调试, 提高调试效率。  The embodiment of the invention provides a serial port redirection processing method, device and system, which are used to save the serial port line and avoid manual debugging to the site, thereby improving debugging efficiency.
一方面, 本发明实施例提供了一种串口重定向处理方法, 包括: 母板调用重定向程序, 根据共享内存的物理地址和内存大小, 将所述 母板接收到的输入信息写入在所述共享内存的输入緩冲区中作为串口输 入信息, 并将所述共享内存的输出緩冲区中的信息作为串口输出信息进行 读取; 所述共享内存用于所述母板和插设在所述母板上的快速外围组件设 备之间进行串口管理。 In one aspect, the embodiment of the present invention provides a serial port redirection processing method, including: a motherboard calling redirection program, and writing input information received by the motherboard according to a physical address and a memory size of the shared memory; The input buffer of the shared memory is input as a serial port. Entering information, and reading information in the output buffer of the shared memory as serial port output information; the shared memory is used for the motherboard and the fast peripheral component device inserted on the motherboard Serial port management.
本发明实施例还提供另一种串口重定向处理方法, 包括:  The embodiment of the invention further provides another serial port redirection processing method, including:
快速外围组件设备根据共享内存的物理地址和内存大小, 读取所述共 享内存的输入緩冲区中的信息作为串口输入信息, 并将串口输出信息写入 到所述共享内存的输出緩冲区中; 所述共享内存用于母板和插设在所述母 板上的所述快速外围组件设备之间进行串口管理。  The fast peripheral component device reads the information in the input buffer of the shared memory as the serial port input information according to the physical address and the memory size of the shared memory, and writes the serial port output information to the output buffer of the shared memory. The shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
另一方面, 本发明实施例还提供一种母板, 包括:  In another aspect, an embodiment of the present invention further provides a motherboard, including:
第一写入模块, 用于在所述母板调用重定向程序后, 根据共享内存的 物理地址和内存大小, 将所述母板接收到的输入信息写入在所述共享内存 的输入緩冲区中作为串口输入信息;  a first writing module, configured to write input information received by the motherboard to an input buffer of the shared memory according to a physical address and a memory size of the shared memory after the motherboard invokes the redirecting program Input information as a serial port in the area;
第一读取模块, 用于将所述共享内存的输出緩冲区中的信息作为串口 输出信息进行读取;  a first reading module, configured to read information in an output buffer of the shared memory as a serial port output information;
所述共享内存用于所述母板和插设在所述母板上的快速外围组件设 备之间进行串口管理。  The shared memory is used for serial port management between the motherboard and a fast peripheral component device inserted on the motherboard.
本发明实施例还提供一种快速外围组件设备, 包括:  The embodiment of the invention further provides a fast peripheral component device, including:
第二读取模块, 用于根据共享内存的物理地址和内存大小, 读取所述 共享内存的输入緩冲区中的信息作为串口输入信息;  a second reading module, configured to read information in the input buffer of the shared memory as serial port input information according to a physical address and a memory size of the shared memory;
第二写入模块, 用于将串口输出信息写入到所述共享内存的输出緩冲 区中;  a second writing module, configured to write serial port output information into an output buffer area of the shared memory;
所述共享内存用于母板和插设在所述母板上的所述快速外围组件设 备之间进行串口管理。  The shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
所述共享内存用于母板和插设在所述母板上的所述快速外围组件设 备之间进行串口管理。  The shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
再一方面, 本发明实施例还提供一种串口重定向处理系统, 包括如上 所述的母板和快速外围组件设备。  In another aspect, an embodiment of the present invention further provides a serial port redirection processing system, including the motherboard and the fast peripheral component device as described above.
本发明实施例提供的串口重定向处理方法、 设备和系统, 通过共享内存 在母板和插设在母板上的快速外围组件设备之间进行串口管理, 使母板和 快速外围组件设备均可对共享内存中的信息进行读取和写入, 实现了母板 和快速外围组件设备之间的信息交互, 当调试人员远程登录母板调用重定 向程序, 即可通过母板与快速外围组件的信息交互, 实现对 PCIE设备的 调试, 克服了在调试和维护快速外围组件设备时需要串口线和接串口线的 计算机的问题, 避免了安排人员赴现场进行串口插拔操作的问题, 达到了 即节省时间、 提高效率, 又节省人工和成本的效果。 附图说明 The serial port redirection processing method, device and system provided by the embodiments of the present invention perform serial port management between the motherboard and the fast peripheral component device inserted on the motherboard through the shared memory, so that the motherboard and the fast peripheral component device can be Read and write information in shared memory to implement the motherboard The information exchange with the fast peripheral component device. When the debugger remotely logs in to the motherboard to invoke the redirector, the information of the motherboard and the fast peripheral components can be exchanged to realize debugging of the PCIE device, and the debugging and maintenance are overcome quickly. The peripheral component device requires the problem of the serial cable and the computer connected to the serial cable, which avoids the problem of arranging personnel to go to the site for the serial port insertion and removal operation, which saves time, improves efficiency, and saves labor and cost. DRAWINGS
施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are required to be used in the description of the prior art, are briefly described. It is obvious that the drawings in the following description are some embodiments of the present invention, and no one would be creative to those skilled in the art Other drawings can also be obtained from these drawings on the premise of labor.
图 1为现有技术直接使用串口进行 PCIE设备调试的示意图; 图 2为本发明一实施例提供的串口重定向处理方法的流程示意图; 图 3为本发明另一实施例提供的串口重定向处理方法的流程示意图; 图 4为本发明一实施例提供的串口重定向处理方法的示意图;  1 is a schematic diagram of a PCIE device debugging using a serial port in the prior art; FIG. 2 is a schematic flowchart of a serial port redirection processing method according to an embodiment of the present invention; FIG. 3 is a serial port redirection process according to another embodiment of the present invention; FIG. 4 is a schematic diagram of a serial port redirection processing method according to an embodiment of the present invention; FIG.
图 5为本发明一实施例提供的母板结构示意图;  FIG. 5 is a schematic structural diagram of a motherboard according to an embodiment of the present invention; FIG.
图 6为本发明另一实施例提供的母板结构示意图;  6 is a schematic structural view of a motherboard according to another embodiment of the present invention;
图 7为本发明一实施例提供的快速外围组件设备的结构示意图; 图 8为本发明另一实施例提供的快速外围组件设备的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。  FIG. 7 is a schematic structural diagram of a fast peripheral component device according to an embodiment of the present invention; FIG. 8 is a schematic structural diagram of a fast peripheral component device according to another embodiment of the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 2为本发明一实施例提供的串口重定向处理方法的流程示意图。本实 施例执行主体为母板, 如图 2所示, 本实施例提供的串口重定向处理方法可 以包括:  FIG. 2 is a schematic flowchart of a method for processing a serial port redirection according to an embodiment of the present invention. The main body of the embodiment is a motherboard. As shown in FIG. 2, the serial port redirection processing method provided in this embodiment may include:
步骤 101 : 母板调用重定向程序; 步骤 102: 根据共享内存的物理地址和内存大小, 将母板接收到的输 入信息写入在共享内存的输入緩冲区中作为串口输入信息, 并将共享内存 的输出緩冲区中的信息作为串口输出信息进行读取; Step 101: The motherboard calls a redirector; Step 102: According to the physical address and the memory size of the shared memory, input the input information received by the motherboard into the input buffer of the shared memory as the serial port input information, and use the information in the output buffer of the shared memory as Serial output information is read;
其中, 共享内存用于母板和插设在母板上的快速外围组件设备之间进 行串口管理。  Among them, the shared memory is used for serial port management between the motherboard and the fast peripheral component devices inserted on the motherboard.
具体地, 在步骤 101中, 重定向程序可以为预先开发的应用程序, 该 重定向程序运行在母板上, 作为串口重定向工具, 给用户呈现一个串口控 制台, 使得用户可以在母板系统的操作界面进行输入输出。  Specifically, in step 101, the redirecting program may be a pre-developed application, and the redirecting program runs on the motherboard as a serial port redirection tool, and presents a serial port console to the user, so that the user can be in the motherboard system. The operation interface performs input and output.
在步骤 102中, 即母板调用该重定向程序后, 母板可以实时处理共享 内存上输入緩冲区以及输出緩冲区的信息, 并将输入信息写入在共享内存 的输入緩冲区中作为串口输入信息, 将输出緩冲区中的信息作为串口输出 信息进行读取。 具体地, 母板可将对快速外围组件设备进行调试的信息写 入在共享内存的输入緩冲区, 同时, 母板还将共享内存的输出緩冲区中的 信息进行读取, 即母板读取快速外围组件设备对调试信息的反馈信息, 以 便调试者对快速外围组件设备进行维护和调试。  In step 102, after the motherboard calls the redirector, the motherboard can process the input buffer and the output buffer information in the shared memory in real time, and write the input information in the input buffer of the shared memory. As the serial port input information, the information in the output buffer is read as the serial port output information. Specifically, the motherboard can write information for debugging the fast peripheral component device in the input buffer of the shared memory, and at the same time, the motherboard also reads the information in the output buffer of the shared memory, that is, the motherboard. Read the feedback information of the fast peripheral component device to the debugging information, so that the debugger can maintain and debug the fast peripheral component device.
共享内存在母板和插设在母板上的快速外围组件设备之间进行串口 管理, 母板可以对共享内存中的快速外围组件设备对调试信息的反馈信息 进行读取, 快速外围组件设备也可以对共享内存中的调试信息进行读取, 从而可以完成母板与共享内存之间以及共享内存与快速外围组件设备之 间的信息交互, 最终实现母板与快速外围组件设备之间的信息交互。 本实 施例的技术方案, 通过母板调用重定向程序, 以及共享内存在母板和插设 在母板上的快速外围组件设备之间进行串口管理, 可完成母板与快速外围 组件之间的信息交互。 因此, 只需远程运行在母板上的重定向程序, 即可 通过母板与快速外围组件的信息交互, 实现对 PCIE设备的操作, 从而克 服了在调试和维护快速外围组件设备时需要串口线和接串口线的计算机 问题, 避免了安排人员赴现场进行串口插拔操作的问题, 达到了即节省时 间、 提高效率, 又节省人工和成本的效果。  The shared memory is serially managed between the motherboard and the fast peripheral component device inserted in the motherboard. The motherboard can read the feedback information of the debugging information of the fast peripheral component device in the shared memory, and the fast peripheral component device also The debugging information in the shared memory can be read, thereby completing the information interaction between the motherboard and the shared memory and between the shared memory and the fast peripheral component device, and finally realizing the information interaction between the motherboard and the fast peripheral component device. . In the technical solution of the embodiment, the serial port management is performed between the motherboard and the fast peripheral component by calling the redirecting program through the motherboard, and sharing the memory between the motherboard and the fast peripheral component device inserted on the motherboard. Information exchange. Therefore, it is only necessary to remotely run the redirection program on the motherboard to realize the operation of the PCIE device through the information exchange between the motherboard and the fast peripheral components, thereby overcoming the need for a serial cable when debugging and maintaining the fast peripheral component device. The computer problem with the serial port line avoids the problem of arranging personnel to go to the site for serial port plugging and unplugging operation, which saves time, improves efficiency, and saves labor and cost.
可选地, 当母板加载快速外围组件设备的驱动程序时,确定共享内存, 并将共享内存的物理地址和内存大小发送给快速外围组件设备。 具体地, 在母板上加载快速外围组件设备的驱动程序时, 快速外围组件设备的驱动 程序申请共享内存, 并将申请到的共享内存的物理地址以及内存大小信息 发送给快速外围组件设备, 以使快速外围组件设备能够获知共享内存的物 理地址和内存大小, 使快速外围组件设备和母板上的驱动程序均能访问该 共享内存, 建立了内存映射。 Optionally, when the motherboard loads the driver of the fast peripheral component device, the shared memory is determined, and the physical address and memory size of the shared memory are sent to the fast peripheral component device. Specifically, when the driver of the fast peripheral component device is loaded on the motherboard, the driver of the fast peripheral component device The program applies for shared memory, and sends the physical address and memory size information of the shared memory to the fast peripheral component device, so that the fast peripheral component device can know the physical address and memory size of the shared memory, so that the fast peripheral component device and the mother The driver on the board can access the shared memory and establish a memory map.
可选地, 共享内存可以为快速外围组件设备的一段连续的物理内存或 数个寄存器, 或者为母板的一段连续的物理内存。 本技术领域的普通技术 人员可是获知也可以由快速外围组件设备来确定共享内存, 并将共享内存 的物理地址和内存大小发送给母板。 具体地, 快速外围组件设备其自身就 为一个小系统, 包括独立的处理器、 内存以及寄存器等。 由此, 当母板加 载插设在母板上的快速外围组件设备时, 快速外围组件设备的驱动程序申 请共享内存, 该共享内存可以为快速外围组件设备的一段连续的物理内 存, 也可以为快速外围组件设备的数个寄存器, 还可以是母板上的一段连 续的物理内存。  Alternatively, the shared memory can be a contiguous physical memory or a number of registers of the fast peripheral component device, or a contiguous physical memory of the motherboard. One of ordinary skill in the art will recognize that the shared memory can also be determined by the fast peripheral component device and that the physical address and memory size of the shared memory are sent to the motherboard. Specifically, the fast peripheral component device itself is a small system including separate processors, memory, registers, and the like. Thus, when the motherboard loads the fast peripheral component device plugged into the motherboard, the driver of the fast peripheral component device applies for shared memory, which may be a continuous physical memory of the fast peripheral component device, or A number of registers of a fast peripheral component device, or a continuous piece of physical memory on the motherboard.
本实施例的技术方案, 由于共享内存为快速外围组件设备的一段连续 的物理内存或数个寄存器, 或者为母板的一段连续的物理内存, 因此用户 可以根据调试需要, 以及保证系统各方面整体性能最佳的情况下对共享内 存做出选择。  In the technical solution of the embodiment, since the shared memory is a continuous physical memory or a plurality of registers of the fast peripheral component device, or a continuous physical memory of the motherboard, the user can ensure the overall requirements of the system according to the debugging requirements. Make a choice of shared memory with the best performance.
可选地, 母板调用重定向程序包括, 从快速外围组件设备驱动中获取 共享内存的物理地址和内存大小, 将共享内存从内核态映射到用户态。  Optionally, the motherboard call redirector includes: obtaining a physical address and a memory size of the shared memory from the fast peripheral component device driver, and mapping the shared memory from the kernel state to the user state.
由于用户在母板上运行重定向程序时, 该程序所创建的进程运行在用 户态, 共享内存则处于内核态。 在操作系统中, 内核态和用户态处在两种 不同的运行级别, 级别低的用户态不能访问级别高的内核态的地址空间, 包括地址和代码。 因此, 用户如果需要访问处于内核态的共享内存, 则需 要将共享内存从内核态映射到用户态。 映射之后, 重定向程序可以直接访 问共享内存。 例如, 在 linux操作系统下, 可利用操作系统提供的内存映 射机制将共享内存从内核态映射到用户态。  When the user runs the redirector on the motherboard, the process created by the program runs in user mode, and the shared memory is in kernel mode. In the operating system, the kernel state and user mode are at two different run levels, and the low-level user state cannot access the high-level kernel-mode address space, including the address and code. Therefore, if users need to access shared memory in kernel mode, they need to map shared memory from kernel mode to user mode. After the mapping, the redirector can directly access the shared memory. For example, under the Linux operating system, the shared memory can be mapped from the kernel state to the user state using the memory mapping mechanism provided by the operating system.
同时, 母板还可在重定向程序中启动两个线程, 上述的两个线程可以 是重定向程序所创建的。 其中, 一个线程用于将母板接收到的输入信息写 入在共享内存的输入緩冲区中作为串口输入信息。 具体地, 母板接收到的 输入信息可以为通过键盘输入的字符。 另一个线程用于将共享内存的输出 緩冲区中的信息作为串口输出信息进行读取。 具体地, 另一个线程可以将 读取的输出緩冲区的字符打印到屏幕上。 At the same time, the motherboard can also start two threads in the redirector. The above two threads can be created by the redirector. Among them, one thread is used to write the input information received by the motherboard into the input buffer of the shared memory as the serial port input information. Specifically, the input information received by the motherboard may be a character input through a keyboard. Another thread is used to output the shared memory The information in the buffer is read as the serial output. Specifically, another thread can print the characters of the read output buffer to the screen.
本实施例的技术方案, 将共享内存从内核态映射到用户态, 使用户能 够实时处理共享内存上输入緩冲区和输出緩冲区的信息。  The technical solution of this embodiment maps the shared memory from the kernel state to the user state, so that the user can process the information of the input buffer and the output buffer on the shared memory in real time.
上述各实施例中, 串口重定向处理方法还包括用户远程登录母板, 并 通过母板对快速外围组件设备进行测试。 具体地, 用户可以直接通过安全 外壳协议 (Secure Shell, 简称 ssh)向母板发送远程登录请求,母板接收请求 完成用户的远程登录。 然后, 母板在 shell下运行重定向程序, 其中, Shell 俗称壳, 是提供用户使用界面的软件, 可以接收用户命令, 调用相应的应 用程序。 具体地, 可以根据母板的 IP 地址登录到母板, 根据母板上快速 外围组件设备的槽位编号或者快速外围组件设备的型号等, 对相应的快速 外围组件设备进行调试。 本领域技术人员可以理解, 凡是能够实现远程登 录的方法, 均可应用到本发明实施例提供的串口重定向处理方法, 在此, 不作特别限制。  In the above embodiments, the serial port redirection processing method further includes the user remotely logging in to the motherboard, and testing the fast peripheral component device through the motherboard. Specifically, the user can directly send a remote login request to the motherboard through the Secure Shell (Ssh), and the motherboard receives the request to complete the remote login of the user. Then, the motherboard runs the redirector under the shell. The shell, commonly known as the shell, is software that provides the user to use the interface, can receive user commands, and invoke the corresponding application. Specifically, the motherboard can be logged in to the motherboard according to the IP address of the motherboard, and the corresponding fast peripheral component device can be debugged according to the slot number of the fast peripheral component device on the motherboard or the model of the fast peripheral component device. It can be understood by those skilled in the art that the method for implementing remote login can be applied to the serial port redirection processing method provided by the embodiment of the present invention, and is not particularly limited herein.
通过母板调用重定向程序, 作为串口重定向工具, 能够给用户提供一 个串口控制台, 将快速外围组件设备的串口的输入输出信息定向到母板的 串口控制台, 通过远程登录母板, 即可完成对 PCIE设备的控制。 同时, 重定向程序支持多用户同时查看串口信息, 即快速外围组件设备的信息, 每个用户登录到母板, 通过 shell运行重定向程序, 均可以看到串口信息, 方便了多用户对快速外围组件设备的联调。  The redirecting program is called by the motherboard, and as a serial port redirection tool, the user can provide a serial port console, and direct the input and output information of the serial port of the fast peripheral component device to the serial port console of the motherboard, and remotely log in to the motherboard, that is, Control of the PCIE device can be completed. At the same time, the redirector supports multiple users to view the serial port information at the same time, that is, the information of the fast peripheral component device. Each user logs in to the motherboard, and the serial port information can be seen through the shell running redirect program, which facilitates the multi-user to the fast periphery. Joint debugging of component devices.
图 3为本发明另一实施例提供的串口重定向处理方法的流程示意图。 本 实施例执行主体为快速外围组件设备, 如图 3所示, 本实施例提供的串口重 定向处理方法可以包括:  FIG. 3 is a schematic flowchart of a method for processing a serial port redirection according to another embodiment of the present invention. The embodiment of the present embodiment is a fast peripheral component device. As shown in FIG. 3, the serial port redirection processing method provided in this embodiment may include:
步骤 201 : 快速外围组件设备根据共享内存的物理地址和内存大小, 读取共享内存的输入緩冲区中的信息作为串口输入信息, 并将串口输出信 息写入到共享内存的输出緩冲区中;  Step 201: The fast peripheral component device reads the information in the input buffer of the shared memory as the serial port input information according to the physical address and the memory size of the shared memory, and writes the serial port output information into the output buffer of the shared memory. ;
其中, 共享内存用于母板和插设在母板上的所述快速外围组件设备之 间进行串口管理。  The shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
具体地, 在步骤 201中, 共享内存的输入緩冲区可以作为一个输入源, 快速外围组件设备实时查询共享内存输入緩冲区是否有调试信息输入, 若 有, 则快速外围组件设备根据共享内存的物理地址和内存大小, 将输入的调 试信息作为快速外围组件设备的串口输入信息; 共享内存的输出緩冲区可 以作为一个输出源, 快速外围组件设备将调试信息的反馈信息输入到输出 緩冲区中。 Specifically, in step 201, the input buffer of the shared memory can be used as an input source, and the fast peripheral component device queries the shared memory input buffer for debugging information input in real time, if Yes, the fast peripheral component device uses the input debugging information as the serial port input information of the fast peripheral component device according to the physical address and memory size of the shared memory; the output buffer of the shared memory can be used as an output source, and the fast peripheral component device will The feedback information of the debug information is input to the output buffer.
共享内存在母板和插设在母板上的快速外围组件设备之间进行串口 管理, 快速外围组件设备可以对共享内存中的调试信息进行读取, 母板也 可以对共享内存中外围组件设备对调试信息的反馈信息进行读取, 从而完 成共享内存与快速外围组件设备之间以及母板与共享内存之间的信息交 互, 最终实现快速外围组件设备与母板之间的信息交互。  The shared memory is serially managed between the motherboard and the fast peripheral component device inserted in the motherboard. The fast peripheral component device can read the debugging information in the shared memory, and the motherboard can also share the peripheral component device in the shared memory. The feedback information of the debugging information is read, thereby completing the information interaction between the shared memory and the fast peripheral component device and between the motherboard and the shared memory, and finally realizing the information interaction between the fast peripheral component device and the motherboard.
本实施例的技术方案, 通过快速外围组件设备对共享内存中的信息的 读取, 以及共享内存在母板和插设在母板上的快速外围组件设备之间进行 串口管理, 可完成母板与快速外围组件之间的信息交互, 因此, 只需远程 运行在母板上的重定向程序, 即可通过母板与快速外围组件的信息交互, 实现对 PCIE设备的操作, 从而克服了在调试和维护快速外围组件设备时 需要串口线和接串口线的计算机问题, 避免了安排人员赴现场进行串口插 拔操作的问题, 达到了即节省时间、提高效率, 又节省人工和成本的效果。  The technical solution of the embodiment can complete the motherboard management by reading the information in the shared memory by the fast peripheral component device, and performing serial port management between the motherboard and the fast peripheral component device inserted on the motherboard. The information exchange with the fast peripheral components, therefore, only need to remotely run the redirection program on the motherboard, the information exchange between the motherboard and the fast peripheral components can realize the operation of the PCIE device, thereby overcoming the debugging. When the fast peripheral component device is maintained, the computer problem of the serial cable and the serial cable is required, and the problem of arranging the personnel to go to the site for the serial port insertion and removal operation is avoided, which saves time, improves efficiency, and saves labor and cost.
可选地, 快速外围组件设备接收母板发送的共享内存的物理地址和内 存大小, 共享内存为母板在加载快速外围组件设备的驱动程序时所确定 的。 共享内存为快速外围组件设备的一段连续的物理内存或数个寄存器, 或者为母板的一段连续的物理内存。  Optionally, the fast peripheral component device receives the physical address and the memory size of the shared memory sent by the motherboard, and the shared memory is determined by the motherboard when the driver of the fast peripheral component device is loaded. The shared memory is a contiguous physical memory or registers of a fast peripheral component device, or a contiguous physical memory of the motherboard.
本实施例提供的技术方案, 快速外围组件设备接收母板发送的共享内 存的物理地址和内存大小, 能够获知共享内存的物理地址和内存大小。 使 快速外围组件设备能够访问共享内存, 建立了快速外围组件设备和母板的 内存映射。 用户还可以根据调试需要, 以及保证系统各方面整体性能最佳 的情况下对共享内存做出选择。  In the technical solution provided by the embodiment, the fast peripheral component device receives the physical address and the memory size of the shared memory sent by the motherboard, and can obtain the physical address and the memory size of the shared memory. Enables fast peripheral component devices to access shared memory, creating a memory map of fast peripheral component devices and motherboards. Users can also choose between shared memory based on debugging needs and ensuring optimal overall performance across all aspects of the system.
图 4为本发明一实施例提供的串口重定向处理方法的示意图。 如图 4所 示, 从母板接收输入信息再到母板读取输出信息主要经过四个步骤:  FIG. 4 is a schematic diagram of a method for processing a serial port redirection according to an embodiment of the present invention. As shown in Figure 4, there are four main steps in receiving input information from the motherboard and then reading the output information from the motherboard:
步骤 301 : 母板根据启用的线程将接收到的输入信息写入在共享内存的 输入緩冲区;  Step 301: The motherboard writes the input information received in the input buffer of the shared memory according to the enabled thread;
步骤 302: 快速外围组件设备读取共享内存的输入緩冲区中的信息到 快速外围组件设备的串口; Step 302: The fast peripheral component device reads the information in the input buffer of the shared memory to The serial port of the fast peripheral component device;
步骤 303 : 快速外围组件设备将串口输出的信息写入到共享内存的输出 緩冲区中;  Step 303: The fast peripheral component device writes the information output by the serial port to the output buffer of the shared memory;
步骤 304: 母板根据启用的另一线程将共享内存的输出緩冲区中的信息 进行读取。  Step 304: The motherboard reads the information in the output buffer of the shared memory according to another thread that is enabled.
具体地, 步骤 301中启用的线程主要负责接收远程计算机键盘输入的 字符并将字符写入到共享内存的输入緩冲区, 步骤 304中母板启用的另一 线程主要负责读取共享内存输出緩冲区的字符并打印到远程计算机的屏 幕上。  Specifically, the thread enabled in step 301 is mainly responsible for receiving characters input by the remote computer keyboard and writing characters to the input buffer of the shared memory. In step 304, another thread enabled by the motherboard is mainly responsible for reading the shared memory output. The characters in the punch area are printed on the screen of the remote computer.
特别地, 在一次调试过程中, 可先通过步骤 302 , 快速外围组件设备 读取共享内存中从远程计算机输入到输入緩冲区的调试信息到外围组件 设备的串口, 外围组件设备对调试信息的反馈信息可通过步骤 303将其写 入到共享内存的输出緩冲区中。 即串口从输入緩冲区获得的信息为调试信 息, 串口输出到输出緩冲区的信息可以为快速外围组件设备对调试信息的 反馈信息。  Specifically, in a debugging process, the fast peripheral component device may first read the debugging information input from the remote computer to the input buffer in the shared memory to the serial port of the peripheral component device, and the peripheral component device debugs the information through step 302. The feedback information can be written to the output buffer of the shared memory by step 303. That is, the information obtained by the serial port from the input buffer is debugging information, and the information output from the serial port to the output buffer can be feedback information of the debugging information of the fast peripheral component device.
本领域技术人员可以理解, 在具体的调试过程中, 上述步骤并无严格 的时序关系, 步骤之间是相互配合, 共同完成串口的重定向。  Those skilled in the art can understand that in the specific debugging process, the above steps have no strict timing relationship, and the steps cooperate with each other to complete the redirection of the serial port.
上述各实施例中, 所述共享内存的物理地址用于表示向共享内存写入 信息或从共享内存读取信息的起始位置。 母板或快速外围组件设备在写入 信息之前可以先根据共享内存的内存大小判断一下存储空间是否足够, 若 足够可以直接写入, 若不够可以釆用例如分批次写入的方式, 即先写入一 部分, 等待对端读取; 然后再写入另一部分。 母板或快速外围组件设备从 共享内存读取信息时, 可以根据起始位置按照内存大小的指示将共享内存 中的信息全部读取出来; 当然也可以预先判断一下信息的终止位置, 然后 将共享内存内从起始位置到终止位置的信息读取出来(此方式可以和内存 大小无关) , 等等。  In the above embodiments, the physical address of the shared memory is used to indicate a starting position for writing information to or reading information from the shared memory. The mother board or fast peripheral component device can judge whether the storage space is sufficient according to the memory size of the shared memory before writing the information. If it is enough, it can be directly written. If it is not enough, the method of batch writing can be used first, that is, first Write a part, wait for the peer to read; then write another part. When the motherboard or fast peripheral component device reads information from the shared memory, it can read all the information in the shared memory according to the indication of the memory size according to the starting position; of course, it is also possible to pre-determine the termination position of the information, and then share The information in the memory from the start position to the end position is read out (this way can be independent of the memory size), and so on.
通过上述步骤, 即完成了信息从母板到输入緩冲区, 再到快速外围组 件设备, 以及快速外围组件设备又将信息输出到输出緩冲区, 再到母板的 过程, 即完成了母板与快速外围组件设备的信息交互。 当用户通过 ssh远 程登录到母板时, 步骤 301中的输入信息可以是远程计算机键盘的输入信 息, 步骤 304中的母板可以将信息读取之后打印到远程计算机的屏幕中, 以供用户对数据进行分析和处理, 从而避免了大量使用串口线, 克服了派 人到机房现场对快速外围组件设备进行调试和维护, 即节省了时间和成 本, 又提升了效率。 Through the above steps, the information is completed from the motherboard to the input buffer, then to the fast peripheral component device, and the fast peripheral component device outputs information to the output buffer, and then to the motherboard, the mother is completed. The board interacts with information from fast peripheral component devices. When the user remotely logs in to the motherboard through ssh, the input information in step 301 may be an input letter of the remote computer keyboard. The mother board in step 304 can read the information and print it to the screen of the remote computer for the user to analyze and process the data, thereby avoiding the use of a large number of serial lines, and overcoming the dispatch of people to the computer room to the fast periphery. Component equipment is debugged and maintained, which saves time and cost and increases efficiency.
图 5为本发明一实施例提供的母板结构示意图。 如图 5所示, 本发明实 施例提供的母板包括: 第一写入模块 401和第一读取模块 402, 其中, 第一 写入模块 401用于在母板调用重定向程序后, 根据共享内存的物理地址和 内存大小, 将母板接收到的输入信息写入在共享内存的输入緩冲区中作为 串口输入信息; 第一读耳 莫块 402用于将共享内存的输出緩冲区中的信息 作为串口输出信息进行读取。 共享内存用于母板和插设在母板上的快速外 围组件设备之间进行串口管理。 速外围组件设备插槽的单板。 服务器可以为工作组服务器, 部门级服务器 或者企业级服务器, 其中企业级服务器的硬件配置最高, 系统可靠性也最 强, 用于联网计算机在数百台以上、 对处理速度和数据安全要求非常高的 大型网络。 对于不同结构的塔式服务器, 机架式服务器和刀片服务器等本 发明实施例同样适用。  FIG. 5 is a schematic structural diagram of a motherboard according to an embodiment of the present invention. The first board is configured to: The physical address and memory size of the shared memory, the input information received by the motherboard is written in the input buffer of the shared memory as the serial port input information; the first read ear block 402 is used to output the shared memory buffer The information in the information is read as a serial output. Shared memory is used for serial port management between the motherboard and the fast peripheral components that are plugged into the motherboard. The board of the peripheral component device slot. The server can be a workgroup server, a departmental server or an enterprise server. The enterprise server has the highest hardware configuration and the strongest system reliability. It is used for networked computers with more than hundreds of devices, and has high processing speed and data security requirements. Large network. Embodiments of the present invention are equally applicable to tower servers of different configurations, rack servers and blade servers.
本发明实施例提供的母板, 通过第一写入模块 401将母板接收到的调试 信息写入到共享内存, 通过第一读耳 莫块 402母板可读取共享内存中快速外 围组件对调试信息的反馈信息, 从而完成母板与共享内存之间的信息交互。 通过共享内存的串口管理, 可以实现母板与共享内存之间以及共享内存与 快速外围组件设备之间的信息交互, 从而实现母板与快速外围组件设备之 间的信息交互。 因此, 只需远程运行在母板上的重定向程序, 即可通过母 板与快速外围组件的信息交互, 实现对 PCIE设备的操作, 从而克服了在 调试和维护快速外围组件设备时需要串口线和接串口线的计算机问题, 避 免了安排人员赴现场进行串口插拔操作的问题, 达到了即节省时间、 提高 效率, 又节省人工和成本的效果。  The motherboard provided by the embodiment of the present invention writes the debugging information received by the motherboard to the shared memory through the first writing module 401, and the fast peripheral component pair in the shared memory can be read through the first reading module 402 motherboard. The feedback information of the debugging information is completed, thereby completing the information interaction between the motherboard and the shared memory. Through serial port management of shared memory, information interaction between the motherboard and the shared memory and between the shared memory and the fast peripheral component device can be realized, thereby realizing information interaction between the motherboard and the fast peripheral component device. Therefore, it is only necessary to remotely run the redirection program on the motherboard to realize the operation of the PCIE device through the information exchange between the motherboard and the fast peripheral components, thereby overcoming the need for a serial cable when debugging and maintaining the fast peripheral component device. The computer problem with the serial port line avoids the problem of arranging personnel to go to the site for serial port plugging and unplugging operation, which saves time, improves efficiency, and saves labor and cost.
图 6为本发明另一实施例提供的母板结构示意图。 如图 6所示, 除了第 一写入模块 401和第一读取模块 402, 本发明实施例提供的母板还包括确定 模块 403 , 用于当母板加载快速外围组件设备的驱动程序时, 确定共享内 存, 并将共享内存的物理地址和内存大小发送给快速外围组件设备。 FIG. 6 is a schematic structural diagram of a motherboard according to another embodiment of the present invention. As shown in FIG. 6, in addition to the first writing module 401 and the first reading module 402, the motherboard provided by the embodiment of the present invention further includes a determining module 403, when the motherboard loads the driver of the fast peripheral component device. Determine within the share Save, and send the physical address and memory size of the shared memory to the fast peripheral component device.
上述的本发明实施例的共享内存, 可以为母板的一段连续的物理内 存。  The shared memory of the embodiment of the present invention described above may be a continuous physical memory of the motherboard.
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述 母板的具体工作过程, 可以参考前述方法实施例中的对应过程, 在此不再 赘述。  A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the foregoing motherboard may refer to the corresponding process in the foregoing method embodiments, and details are not described herein again.
图 7为本发明一实施例提供的快速外围组件设备的结构示意图。 如图 7 所示, 本发明实施例提供的快速外围组件设备包括: 第二读取模块 501和第 二写入模块 502, 其中, 第二读取模块 501用于根据共享内存的物理地址 和内存大小, 读取共享内存的输入緩冲区中的信息作为串口输入信息; 第 二写入模块 502用于将串口输出信息写入到共享内存的输出緩冲区中; 共 享内存用于母板和插设在母板上的所述快速外围组件设备之间进行串口 管理。  FIG. 7 is a schematic structural diagram of a fast peripheral component device according to an embodiment of the present invention. As shown in FIG. 7, the fast peripheral component device provided by the embodiment of the present invention includes: a second read module 501 and a second write module 502, wherein the second read module 501 is configured to use a physical address and a memory according to the shared memory. The size, the information in the input buffer of the shared memory is read as the serial port input information; the second write module 502 is used to write the serial port output information into the output buffer of the shared memory; the shared memory is used for the motherboard and The serial port management is performed between the fast peripheral component devices inserted on the motherboard.
本发明实施例提供的, 通过第二读耳 莫块 501母板可读取共享内存中对 快速外围组件设备的调试信息, 通过第二写入模块 502将快速外围组件设备 反馈的调试信息写入到共享内存, 从而完成快速外围组件设备与共享内存之 间的信息交互。 通过共享内存的串口管理, 实现快速外围组件设备与共享内 存之间以及母板与共享内存之间的信息交互, 从而实现快速外围组件设备 与母板之间的信息交互。 因此, 只需远程调用在母板上的重定向程序, 即 可通过母板与快速外围组件的信息交互, 实现对 PCIE设备的操作, 从而 克服了在调试和维护快速外围组件设备时需要串口线和接串口线的计算 机问题, 避免了安排人员赴现场进行串口插拔操作的问题, 达到了即节省 时间、 提高效率, 又节省人工和成本的效果。  According to the embodiment of the present invention, the debugging information of the fast peripheral component device in the shared memory can be read by the second read module 501, and the debugging information fed back by the fast peripheral component device is written by the second write module 502. Go to shared memory to complete the information interaction between fast peripheral component devices and shared memory. Through the serial port management of the shared memory, the information exchange between the fast peripheral component device and the shared memory and between the motherboard and the shared memory is realized, thereby realizing the information interaction between the fast peripheral component device and the motherboard. Therefore, it is only necessary to remotely call the redirection program on the motherboard to realize the operation of the PCIE device through the information exchange between the motherboard and the fast peripheral components, thereby overcoming the need for a serial cable when debugging and maintaining the fast peripheral component device. The computer problem with the serial port line avoids the problem of arranging personnel to go to the site for serial port plugging and unplugging operation, which saves time, improves efficiency, and saves labor and cost.
图 8为本发明另一实施例提供的快速外围组件设备的结构示意图, 如图 8所示, 本实施例提供的快速外围组件设备除了第二读取模块 501和第二写 入模块 502, 还包括接收模块 503 , 用于接收母板发送的共享内存的物理 地址和内存大小, 共享内存为母板在加载快速外围组件设备的驱动程序时 所确定的。  FIG. 8 is a schematic structural diagram of a fast peripheral component device according to another embodiment of the present invention. As shown in FIG. 8, the fast peripheral component device provided by this embodiment is further than the second read module 501 and the second write module 502. The receiving module 503 is configured to receive a physical address and a memory size of the shared memory sent by the motherboard, where the shared memory is determined by the motherboard when the driver of the fast peripheral component device is loaded.
上述的共享内存, 可以为快速外围组件设备的一段连续的物理内存或 数个寄存器。 可选地, 本实施例提供的快速外围组件设备可以为外设组件互联标准The above shared memory can be a continuous physical memory or a number of registers of a fast peripheral component device. Optionally, the fast peripheral component device provided in this embodiment may be a peripheral component interconnection standard.
( Peripheral Component Interconnect, 简称 PCI ) 、 PCIE、 或者 PCI-X设 备。 具体地, 可以为符合 PCI、 PCIE、 PCI-X外设组件互连标准的设备或 其他类似的设备, 能够插设在母板的 PCI、 PCIE、 PCI-X插槽上的快速外 围组件设备。 其中 PCI-X为 PCI的更新版本, 仍釆用 PCI的总线技术, 不 过具有更多数量的接线针脚,具有可扩张的频率,可随设备的变化而变化。 在本发明实施例中, 快速外围组件设备可以是智能网卡、 加解压缩卡、 协 议卸载卡, 视频加速卡等, 在此不作特别限制。 (Peripheral Component Interconnect, PCI for short), PCIE, or PCI-X device. Specifically, it can be a fast peripheral component device that can be plugged into the PCI, PCIE, and PCI-X slots of the motherboard for devices that conform to PCI, PCIE, and PCI-X peripheral component interconnection standards or other similar devices. Among them, PCI-X is an updated version of PCI, which still uses PCI bus technology, but has a larger number of wiring pins, and has an expandable frequency, which can vary with the device. In the embodiment of the present invention, the fast peripheral component device may be an intelligent network card, an encryption card, a protocol uninstall card, a video acceleration card, etc., and is not particularly limited herein.
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述 快速外围组件设备的具体工作过程, 可以参考前述方法实施例中的对应过 程, 在此不再赘述。  A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-mentioned fast peripheral component device can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
本发明实施例还提供了一种串口重定向处理系统, 其包括图 5和图 6任 一所示的母板和图 7至图 8任一所示的快速外围组件设备。  The embodiment of the present invention further provides a serial port redirection processing system, which includes the motherboard shown in any of FIG. 5 and FIG. 6 and the fast peripheral component device shown in any of FIGS. 7 to 8.
本实施例提供的串口重定向处理系统, 与本发明实施例提供的串口重 定向处理方法相对应, 为串口重定向处理方法的执行系统, 其串口重定向处 理方法的具体过程可参见本发明提供的串口重定向处理方法实施例, 在此 不再赘述。  The serial port redirection processing system provided in this embodiment corresponds to the serial port redirection processing method provided by the embodiment of the present invention, and is an execution system of the serial port redirection processing method, and the specific process of the serial port redirection processing method can be referred to the present invention. The embodiment of the serial port redirection processing method is not described here.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程 序代码的介质。  A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。  It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 书 claims
1、 一种串口重定向处理方法, 其特征在于, 包括: 1. A serial port redirection processing method, characterized by including:
母板调用重定向程序, 根据共享内存的物理地址和内存大小, 将所述 母板接收到的输入信息写入在所述共享内存的输入緩冲区中作为串口输 入信息, 并将所述共享内存的输出緩冲区中的信息作为串口输出信息进行 读取; 所述共享内存用于所述母板和插设在所述母板上的快速外围组件设 备之间进行串口管理。 The motherboard calls the redirection program, writes the input information received by the motherboard into the input buffer of the shared memory as serial port input information according to the physical address and memory size of the shared memory, and writes the shared The information in the output buffer of the memory is read as serial port output information; the shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法包括: 当所述母板加载所述快速外围组件设备的驱动程序时, 确定所述共享 内存, 并将所述共享内存的物理地址和内存大小发送给所述快速外围组件 设备。 2. The method according to claim 1, characterized in that, the method includes: when the motherboard loads the driver of the fast peripheral component device, determine the shared memory, and save the shared memory. The physical address and memory size are sent to the Rapid Peripheral Device.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述共享内存为 所述快速外围组件设备的一段连续的物理内存或数个寄存器, 或者为所述 母板的一段连续的物理内存。 3. The method according to claim 1 or 2, characterized in that the shared memory is a continuous physical memory or several registers of the fast peripheral component device, or a continuous physical memory of the motherboard. Memory.
4、 根据权利要求 1或 2所述的方法, 其特征在于, 所述母板调用重 定向程序包括: 4. The method according to claim 1 or 2, characterized in that the motherboard calls a redirection program including:
从所述快速外围组件设备驱动中获取所述共享内存的物理地址和内 存大小, 将所述共享内存从内核态映射到用户态。 Obtain the physical address and memory size of the shared memory from the fast peripheral component device driver, and map the shared memory from the kernel state to the user state.
5、 根据权利要求 1或 2所述的方法, 其特征在于, 所述方法还包括: 所述母板接收用户的远程登录请求后, 对所述快速外围组件设备进行 测试。 5. The method according to claim 1 or 2, characterized in that the method further includes: after the motherboard receives the user's remote login request, test the fast peripheral component device.
6、 一种串口重定向处理方法, 其特征在于, 包括: 6. A serial port redirection processing method, characterized by including:
快速外围组件设备根据共享内存的物理地址和内存大小, 读取所述共 享内存的输入緩冲区中的信息作为串口输入信息, 并将串口输出信息写入 到所述共享内存的输出緩冲区中; 所述共享内存用于母板和插设在所述母 板上的所述快速外围组件设备之间进行串口管理。 The fast peripheral component device reads the information in the input buffer of the shared memory as the serial port input information according to the physical address and memory size of the shared memory, and writes the serial port output information to the output buffer of the shared memory. ; The shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
7、 根据权利要求 6所述的方法, 其特征在于, 所述方法包括: 所述快速外围组件设备接收所述母板发送的所述共享内存的物理地 址和内存大小, 所述共享内存为所述母板在加载所述快速外围组件设备的 驱动程序时所确定的。 7. The method according to claim 6, wherein the method includes: the fast peripheral component device receiving the physical address and memory size of the shared memory sent by the motherboard, and the shared memory is the The motherboard is determined when loading the driver of the fast peripheral component device.
8、 根据权利要求 6或 7所述的方法, 其特征在于, 所述共享内存为 所述快速外围组件设备的一段连续的物理内存或数个寄存器, 或者为所述 母板的一段连续的物理内存。 8. The method according to claim 6 or 7, characterized in that the shared memory is a continuous physical memory or several registers of the fast peripheral component device, or a continuous physical memory of the motherboard. Memory.
9、 一种母板, 其特征在于, 包括: 9. A motherboard, characterized in that it includes:
第一写入模块, 用于在所述母板调用重定向程序后, 根据共享内存的 物理地址和内存大小, 将所述母板接收到的输入信息写入在所述共享内存 的输入緩冲区中作为串口输入信息; The first writing module is configured to write the input information received by the motherboard into the input buffer of the shared memory according to the physical address and memory size of the shared memory after the motherboard calls the redirection program. The area is used as a serial port to input information;
第一读取模块, 用于将所述共享内存的输出緩冲区中的信息作为串口 输出信息进行读取; The first reading module is used to read the information in the output buffer of the shared memory as serial port output information;
所述共享内存用于所述母板和插设在所述母板上的快速外围组件设 备之间进行串口管理。 The shared memory is used for serial port management between the motherboard and fast peripheral component devices inserted on the motherboard.
10、 根据权利要求 9所述的母板, 其特征在于, 还包括: 10. The motherboard according to claim 9, further comprising:
确定模块, 用于当所述母板加载所述快速外围组件设备的驱动程序 时, 确定所述共享内存, 并将所述共享内存的物理地址和内存大小发送给 所述快速外围组件设备。 A determining module, configured to determine the shared memory when the motherboard loads the driver of the fast peripheral component device, and send the physical address and memory size of the shared memory to the fast peripheral component device.
1 1、 根据权利要求 9或 10所述的母板, 其特征在于, 所述共享内存 为所述母板的一段连续的物理内存。 11. The motherboard according to claim 9 or 10, characterized in that the shared memory is a continuous physical memory of the motherboard.
12、 一种快速外围组件设备, 其特征在于, 包括: 12. A fast peripheral component device, characterized by including:
第二读取模块, 用于根据共享内存的物理地址和内存大小, 读取所述 共享内存的输入緩冲区中的信息作为串口输入信息; The second reading module is used to read the information in the input buffer of the shared memory as serial port input information according to the physical address and memory size of the shared memory;
第二写入模块, 用于将串口输出信息写入到所述共享内存的输出緩冲 区中; The second writing module is used to write the serial port output information into the output buffer of the shared memory;
所述共享内存用于母板和插设在所述母板上的所述快速外围组件设 备之间进行串口管理。 The shared memory is used for serial port management between the motherboard and the fast peripheral component device inserted on the motherboard.
13、 根据权利要求 12所述的快速外围组件设备, 其特征在于, 还包 括: 13. The fast peripheral component device according to claim 12, further comprising:
接收模块, 用于接收所述母板发送的所述共享内存的物理地址和内存 大小, 所述共享内存为所述母板在加载所述快速外围组件设备的驱动程序 时所确定的。 A receiving module, configured to receive the physical address and memory size of the shared memory sent by the motherboard, where the shared memory is determined by the motherboard when loading the driver of the fast peripheral component device.
14、 根据权利要求 12或 13所述的快速外围组件设备, 其特征在于, 所述共享内存为所述快速外围组件设备的一段连续的物理内存或数个寄 存器。 14. The fast peripheral component device according to claim 12 or 13, characterized in that, The shared memory is a continuous physical memory or several registers of the fast peripheral component device.
15、 根据权利要求 12或 13所述的快速外围组件设备, 其特征在于, 所述快速外围组件设备为 PCI、 PCIE或 PCI-X设备。 15. The fast peripheral component device according to claim 12 or 13, characterized in that the fast peripheral component device is a PCI, PCIE or PCI-X device.
16、 一种串口重定向处理系统, 其特征在于, 包括如权利要求 9-11 任一所述的母板, 以及如权利要求 12-15任一所述的快速外围组件设备。 16. A serial port redirection processing system, characterized in that it includes the motherboard according to any one of claims 9-11, and the fast peripheral component device according to any one of claims 12-15.
PCT/CN2012/077990 2012-06-30 2012-06-30 Serial port redirection processing method, device, and system WO2014000299A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201280000783.2A CN102884515B (en) 2012-06-30 2012-06-30 Serial ports re-orientation processes method, apparatus and system
PCT/CN2012/077990 WO2014000299A1 (en) 2012-06-30 2012-06-30 Serial port redirection processing method, device, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/077990 WO2014000299A1 (en) 2012-06-30 2012-06-30 Serial port redirection processing method, device, and system

Publications (1)

Publication Number Publication Date
WO2014000299A1 true WO2014000299A1 (en) 2014-01-03

Family

ID=47484671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/077990 WO2014000299A1 (en) 2012-06-30 2012-06-30 Serial port redirection processing method, device, and system

Country Status (2)

Country Link
CN (1) CN102884515B (en)
WO (1) WO2014000299A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688486A (en) * 2017-08-10 2018-02-13 深圳市证通电子股份有限公司 Serial ports sharing method, sharing means and storage medium based on shared service

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016186628A1 (en) * 2015-05-15 2016-11-24 Hewlett-Packard Development Company, L.P. Hardware bus redirection
CN109002404B (en) * 2018-06-26 2021-12-24 联想(北京)有限公司 PCIE equipment and monitoring method thereof
US11082410B2 (en) 2019-04-26 2021-08-03 Advanced New Technologies Co., Ltd. Data transceiving operations and devices
CN110177083B (en) * 2019-04-26 2021-07-06 创新先进技术有限公司 Network card, data sending/receiving method and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987705A (en) * 2006-12-30 2007-06-27 中国科学院电工研究所 Real time multiple task distributive control system based on VME bus
CN101000550A (en) * 2006-12-13 2007-07-18 青岛大学 Remote on-line reconfiguration method of embedded system
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN102075389A (en) * 2011-01-27 2011-05-25 大唐移动通信设备有限公司 Debugging method and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000550A (en) * 2006-12-13 2007-07-18 青岛大学 Remote on-line reconfiguration method of embedded system
CN1987705A (en) * 2006-12-30 2007-06-27 中国科学院电工研究所 Real time multiple task distributive control system based on VME bus
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN102075389A (en) * 2011-01-27 2011-05-25 大唐移动通信设备有限公司 Debugging method and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688486A (en) * 2017-08-10 2018-02-13 深圳市证通电子股份有限公司 Serial ports sharing method, sharing means and storage medium based on shared service

Also Published As

Publication number Publication date
CN102884515B (en) 2015-09-09
CN102884515A (en) 2013-01-16

Similar Documents

Publication Publication Date Title
US10509758B1 (en) Emulated switch with hot-plugging
US20160080210A1 (en) High density serial over lan managment system
US9026687B1 (en) Host based enumeration and configuration for computer expansion bus controllers
TWI531958B (en) Mass storage virtualization for cloud computing
CN111258930A (en) Emulated endpoint configuration
US8726298B1 (en) Cloud-based instrument driver system
US10261880B1 (en) Error generation using a computer add-in card
US9418181B2 (en) Simulated input/output devices
WO2014000299A1 (en) Serial port redirection processing method, device, and system
WO2018218954A1 (en) Verification platform and verification method, and computer storage medium
WO2021248788A1 (en) Methods for implementing multi-device compatibility testing, apparatuses for implementing multi-device compatibility testing, system for implementing multi-device compatibility testing, and electronic device
CN108052449B (en) Operating system running state detection method and device
CN113657069A (en) SOC simulation verification method and device, verification server and storage medium
CN114003445B (en) BMC I2C monitoring function test method, system, terminal and storage medium
JP4598086B2 (en) Equipment and components with communication protocol emulation
CN109992556A (en) A kind of I2C driving method and device
US20160026602A1 (en) Method and System for Communication of Device Information
CN115454881B (en) Debugging system and debugging method of RISC-V architecture
CN115048255A (en) Automatic test method, device, host and storage medium
JP2013045163A (en) Computer system, information processing system, virtual media method, and program
US20070174034A1 (en) Transparent intellectual network storage device
Camredon USBiquitous: USB intrusion toolkit
CN216014148U (en) Server and server backboard
US20220171642A1 (en) Script-based emulation of devices
KR20080010791A (en) Web-based monitoring module, hardware system including the same and monitoring method of web-based monitoring module

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201280000783.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12879908

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12879908

Country of ref document: EP

Kind code of ref document: A1