Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The schematic flow sheet of the serial ports re-orientation processes method that Fig. 2 provides for one embodiment of the invention.The present embodiment executive agent is motherboard, and as shown in Figure 2, the serial ports re-orientation processes method that the present embodiment provides can comprise:
Step 101: motherboard calls redirector;
Step 102: according to physical address and the memory size of shared drive, the input information received by motherboard is written in as serial ports input information in the input block of shared drive, and the information in the output buffer of shared drive is read as serial ports output information;
Wherein, shared drive is for carrying out serial interface management between motherboard and the quick peripheral assembly equipment being plugged on motherboard.
Particularly, in a step 101, redirector can for the application program developed in advance, this redirector operates on motherboard, be redirected instrument as serial ports, present a serial ports control desk to user, make user can carry out input and output at the operation interface of motherboard.
In a step 102, namely after motherboard calls this redirector, motherboard can process the information of input block and output buffer on shared drive in real time, and input information is written in the input block of shared drive as serial ports input information, the information in output buffer is read as serial ports output information.Particularly, the information of debugging quick peripheral assembly equipment can be written in the input block of shared drive by motherboard, simultaneously, information in the output buffer of shared drive also reads by motherboard, namely motherboard reads quick peripheral assembly equipment to the feedback information of Debugging message, so that debugging person safeguards quick peripheral assembly equipment and debugs.
Shared drive carries out serial interface management between motherboard and the quick peripheral assembly equipment being plugged on motherboard, motherboard can read the feedback information of quick peripheral assembly equipment to Debugging message in shared drive, quick peripheral assembly equipment also can read the Debugging message in shared drive, thus the information interaction that can complete between motherboard and shared drive and between shared drive and quick peripheral assembly equipment, finally realize the information interaction between motherboard and quick peripheral assembly equipment.The technical scheme of the present embodiment, calls redirector by motherboard, and shared drive carries out serial interface management between motherboard and the quick peripheral assembly equipment being plugged on motherboard, can complete the information interaction between motherboard and quick peripheral assembly.Therefore, only need the long-range redirector operated on motherboard, namely by the information interaction of motherboard and quick peripheral assembly, realize the operation to PCIE device, thus need Serial Port Line and the computer problem connecing Serial Port Line when overcoming in debugging and safeguard quick peripheral assembly equipment, avoiding arrangement personnel goes to scene to carry out the problem of serial ports plug operation, reaches and namely saves time, raises the efficiency, and saves again effect that is artificial and cost.
Alternatively, when motherboard loads the driver of quick peripheral assembly equipment, determine shared drive, and the physical address of shared drive and memory size are sent to quick peripheral assembly equipment.Particularly, when motherboard loads the driver of quick peripheral assembly equipment, the driver application shared drive of quick peripheral assembly equipment, and the physical address of the shared drive applied for and memory size information are sent to quick peripheral assembly equipment, with the physical address and the memory size that enable quick peripheral assembly equipment know shared drive, make the driver on quick peripheral assembly equipment and motherboard all can access this shared drive, establish memory-mapped.
Alternatively, shared drive can be one section of continuous print physical memory of quick peripheral assembly equipment or several register, or is one section of continuous print physical memory of motherboard.Those skilled in the art are known also by quick peripheral assembly equipment to determine shared drive, and can send to motherboard by the physical address of shared drive and memory size.Particularly, quick peripheral assembly equipment himself is just a mini system, comprises independently processor, internal memory and register etc.Thus, when motherboard loads the quick peripheral assembly equipment be plugged on motherboard, the driver application shared drive of quick peripheral assembly equipment, this shared drive can be one section of continuous print physical memory of quick peripheral assembly equipment, also can be several registers of quick peripheral assembly equipment, can also be one section of continuous print physical memory on motherboard.
The technical scheme of the present embodiment, because shared drive is one section of continuous print physical memory of quick peripheral assembly equipment or several register, or be one section of continuous print physical memory of motherboard, therefore user according to debugging needs, and can make a choice to shared drive when ensureing system aspects overall performance the best.
Alternatively, motherboard calls redirector and comprises, and obtains physical address and the memory size of shared drive, shared drive is mapped to User space from kernel state from quick peripheral assembly device drives.
Due to user on motherboard, run redirector time, the process that this program creates operates in User space, and shared drive is then in kernel state.In an operating system, kernel state and User space are in two kinds of different runlevels, and the low User space of rank can not the address space of the high kernel state of access level, comprises address and code.Therefore, if user needs access to be in the shared drive of kernel state, then need shared drive to be mapped to User space from kernel state.After mapping, redirector directly can access shared drive.Such as, under linux operating system, shared drive is mapped to User space from kernel state by the memory-mapped mechanism that operating system can be utilized to provide.
Meanwhile, motherboard also can start two threads in redirector, and two above-mentioned threads can be that redirector creates.Wherein, a thread is written in the input block of shared drive as serial ports input information for the input information received by motherboard.Particularly, the input information that motherboard receives can for the character by input through keyboard.Another thread is used for the information in the output buffer of shared drive to read as serial ports output information.Particularly, another thread can by the character print of the output buffer of reading on screen.
The technical scheme of the present embodiment, is mapped to User space by shared drive from kernel state, enables user process the information of input block and output buffer on shared drive in real time.
In the various embodiments described above, serial ports re-orientation processes method also comprises user's Telnet motherboard, and by motherboard to quick peripheral assembly testing equipment.Particularly, user directly can pass through safety shell protocol (Secure Shell is called for short ssh) and send Remote Login request to motherboard, and motherboard receives the Telnet of request completing user.Then, motherboard runs redirector under shell, and wherein, Shell is commonly called as shell, is to provide the software that user uses interface, can receives user's, calls corresponding application program.Particularly, according to the IP address registration of motherboard to motherboard, according to the slot numbering of quick peripheral assembly equipment on motherboard or the model etc. of quick peripheral assembly equipment, corresponding quick peripheral assembly equipment can be debugged.It will be understood by those skilled in the art that every method that can realize Telnet, all may be used on the serial ports re-orientation processes method that the embodiment of the present invention provides, at this, be not particularly limited.
Redirector is called by motherboard, be redirected instrument as serial ports, a serial ports control desk can be provided to user, the input/output information of the serial ports of quick peripheral assembly equipment is directed to the serial ports control desk of motherboard, by Telnet motherboard, the control to PCIE device can be completed.Meanwhile, redirector supports that multi-user checks Serial Port Information, i.e. the information of quick peripheral assembly equipment simultaneously, each user signs in motherboard, run redirector by shell, all can see Serial Port Information, facilitate the uniting and adjustment of multi-user to quick peripheral assembly equipment.
The schematic flow sheet of the serial ports re-orientation processes method that Fig. 3 provides for another embodiment of the present invention.The present embodiment executive agent is quick peripheral assembly equipment, and as shown in Figure 3, the serial ports re-orientation processes method that the present embodiment provides can comprise:
Step 201: quick peripheral assembly equipment is according to the physical address of shared drive and memory size, and the information read in the input block of shared drive inputs information as serial ports, and is written in the output buffer of shared drive by serial ports output information;
Wherein, shared drive is for carrying out serial interface management between motherboard and the described quick peripheral assembly equipment being plugged on motherboard.
Particularly, in step 201, the input block of shared drive can as an input source, whether quick peripheral assembly equipment real-time query shared drive input block has Debugging message to input, if have, then quick peripheral assembly equipment is according to the physical address of shared drive and memory size, using the serial ports input information of the Debugging message of input as quick peripheral assembly equipment; The output buffer of shared drive can as an output source, and the feedback information of Debugging message is input in output buffer by quick peripheral assembly equipment.
Shared drive carries out serial interface management between motherboard and the quick peripheral assembly equipment being plugged on motherboard, quick peripheral assembly equipment can read the Debugging message in shared drive, motherboard also can read the feedback information of peripheral component devices in shared drive to Debugging message, thus the information interaction completed between shared drive and quick peripheral assembly equipment and between motherboard and shared drive, finally realize the information interaction between quick peripheral assembly equipment and motherboard.
The technical scheme of the present embodiment, by the reading of quick peripheral assembly equipment to the information in shared drive, and shared drive carries out serial interface management between motherboard and the quick peripheral assembly equipment being plugged on motherboard, the information interaction between motherboard and quick peripheral assembly can be completed, therefore, only need the long-range redirector operated on motherboard, namely by the information interaction of motherboard and quick peripheral assembly, realize the operation to PCIE device, thus need Serial Port Line and the computer problem connecing Serial Port Line when overcoming in debugging and safeguard quick peripheral assembly equipment, avoiding arrangement personnel goes to scene to carry out the problem of serial ports plug operation, reach and namely save time, raise the efficiency, save again effect that is artificial and cost.
Alternatively, quick peripheral assembly equipment receives physical address and the memory size of the shared drive that motherboard sends, and shared drive is that motherboard is determined when loading the driver of quick peripheral assembly equipment.Shared drive is one section of continuous print physical memory of quick peripheral assembly equipment or several register, or is one section of continuous print physical memory of motherboard.
The technical scheme that the present embodiment provides, quick peripheral assembly equipment receives physical address and the memory size of the shared drive that motherboard sends, and can know physical address and the memory size of shared drive.Enable quick peripheral assembly equipment access shared drive, establish the memory-mapped of quick peripheral assembly equipment and motherboard.User according to debugging needs, and can also make a choice to shared drive when ensureing system aspects overall performance the best.
The schematic diagram of the serial ports re-orientation processes method that Fig. 4 provides for one embodiment of the invention.As shown in Figure 4, from motherboard receive input information again to motherboard reading output information mainly through four steps:
Step 301: the input information received is written in the input block of shared drive by motherboard according to the thread enabled;
Step 302: quick peripheral assembly equipment reads the serial ports of the information in the input block of shared drive to quick peripheral assembly equipment;
Step 303: the information that serial ports exports is written in the output buffer of shared drive by quick peripheral assembly equipment;
Step 304: the information in the output buffer of shared drive reads according to another thread enabled by motherboard.
Particularly, the thread primary responsibility enabled in step 301 receives the character of remote computer input through keyboard and character is written to the input block of shared drive, and another thread primary responsibility that in step 304, motherboard is enabled reads the character of shared drive output buffer and prints on the screen of remote computer.
Especially, in a debug process, first can pass through step 302, quick peripheral assembly equipment reads the serial ports of Debugging message to peripheral component devices being input to input block in shared drive from remote computer, and the feedback information of peripheral component devices to Debugging message is written in the output buffer of shared drive by step 303.Namely the information that serial ports obtains from input block is Debugging message, and the information that serial ports outputs to output buffer can be that quick peripheral assembly equipment is to the feedback information of Debugging message.
It will be understood by those skilled in the art that, in concrete debug process, above-mentioned steps there is no strict sequential relationship, is cooperatively interact between step, jointly completes being redirected of serial ports.
In the various embodiments described above, the physical address of described shared drive is for representing to shared drive written information or the reference position reading information from shared drive.According to the memory size of shared drive, motherboard or quick peripheral assembly equipment first can judge that whether storage space was enough before written information, if enough can write direct, if the mode such as write in batches can be adopted not, namely first write a part, wait for that opposite end is read; And then write another part.When motherboard or quick peripheral assembly equipment read information from shared drive, according to the instruction of reference position according to memory size, the information in shared drive all can be read out; The final position of information can certainly be prejudged, then the information in shared drive from reference position to final position is read out (this mode can have nothing to do with memory size), etc.
Pass through above-mentioned steps, namely the information that completes from motherboard to input block, then arrives quick peripheral assembly equipment, and information is outputted to output buffer again by quick peripheral assembly equipment, arrive the process of motherboard again, namely complete the information interaction of motherboard and quick peripheral assembly equipment.When user is remotely logged into motherboard by ssh, input information in step 301 can be the input information of remote computer keyboard, motherboard in step 304 prints in the screen of remote computer after information can being read, for user, treatment and analysis is carried out to data, thus avoid and use Serial Port Line in a large number, overcome machine room scene of sending someone debug quick peripheral assembly equipment and safeguard, namely save time and cost, improve efficiency again.
The motherboard structure schematic diagram that Fig. 5 provides for one embodiment of the invention.As shown in Figure 5, the motherboard that the embodiment of the present invention provides comprises: the first writing module 401 and the first read module 402, wherein, first writing module 401 is for after motherboard calls redirector, according to physical address and the memory size of shared drive, the input information received by motherboard is written in the input block of shared drive as serial ports input information; First read module 402 is for reading the information in the output buffer of shared drive as serial ports output information.Shared drive is for carrying out serial interface management between motherboard and the quick peripheral assembly equipment being plugged on motherboard.
Motherboard involved in the embodiment of the present invention can include but not limited to server, or other is with the veneer of quick peripheral assembly apparatus slot.Server can be Workgroup Servers, department level server or enterprise-level server, wherein the hardware configuration of enterprise-level server is the highest, and system reliability is also the strongest, for Net-connected computer more than hundreds, to processing speed and the very high catenet of security request data.For the tower server of different structure, the embodiment of the present invention such as rack-mount server and blade server is applicable equally.
The motherboard that the embodiment of the present invention provides, the Debugging message received by motherboard by the first writing module 401 is written to shared drive, to can read in shared drive quick peripheral assembly to the feedback information of Debugging message by the first read module 402 motherboard, thus complete the information interaction between motherboard and shared drive.By the serial interface management of shared drive, the information interaction between motherboard and shared drive and between shared drive and quick peripheral assembly equipment can be realized, thus realize the information interaction between motherboard and quick peripheral assembly equipment.Therefore, only need the long-range redirector operated on motherboard, namely by the information interaction of motherboard and quick peripheral assembly, realize the operation to PCIE device, thus need Serial Port Line and the computer problem connecing Serial Port Line when overcoming in debugging and safeguard quick peripheral assembly equipment, avoiding arrangement personnel goes to scene to carry out the problem of serial ports plug operation, reaches and namely saves time, raises the efficiency, and saves again effect that is artificial and cost.
The motherboard structure schematic diagram that Fig. 6 provides for another embodiment of the present invention.As shown in Figure 6, except the first writing module 401 and the first read module 402, the motherboard that the embodiment of the present invention provides also comprises determination module 403, for when motherboard loads the driver of quick peripheral assembly equipment, determine shared drive, and the physical address of shared drive and memory size are sent to quick peripheral assembly equipment.
The shared drive of the above-mentioned embodiment of the present invention can be one section of continuous print physical memory of motherboard.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of above-mentioned motherboard, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
The structural representation of the quick peripheral assembly equipment that Fig. 7 provides for one embodiment of the invention.As shown in Figure 7, the quick peripheral assembly equipment that the embodiment of the present invention provides comprises: the second read module 501 and the second writing module 502, wherein, second read module 501 is for according to the physical address of shared drive and memory size, and the information read in the input block of shared drive inputs information as serial ports; Second writing module 502 is for being written in the output buffer of shared drive by serial ports output information; Shared drive is for carrying out serial interface management between motherboard and the described quick peripheral assembly equipment being plugged on motherboard.
The embodiment of the present invention provides, the Debugging message to quick peripheral assembly equipment in shared drive is can read by the second read module 501 motherboard, by the second writing module 502, the Debugging message that quick peripheral assembly equipment feeds back is written to shared drive, thus completes the information interaction between quick peripheral assembly equipment and shared drive.By the serial interface management of shared drive, realize the information interaction between quick peripheral assembly equipment and shared drive and between motherboard and shared drive, thus realize the information interaction between quick peripheral assembly equipment and motherboard.Therefore, only need the redirector of far call on motherboard, namely by the information interaction of motherboard and quick peripheral assembly, realize the operation to PCIE device, thus need Serial Port Line and the computer problem connecing Serial Port Line when overcoming in debugging and safeguard quick peripheral assembly equipment, avoiding arrangement personnel goes to scene to carry out the problem of serial ports plug operation, reaches and namely saves time, raises the efficiency, and saves again effect that is artificial and cost.
The structural representation of the quick peripheral assembly equipment that Fig. 8 provides for another embodiment of the present invention, as shown in Figure 8, the quick peripheral assembly equipment that the present embodiment provides is except the second read module 501 and the second writing module 502, also comprise receiver module 503, for receiving physical address and the memory size of the shared drive that motherboard sends, shared drive is that motherboard is determined when loading the driver of quick peripheral assembly equipment.
Above-mentioned shared drive can be one section of continuous print physical memory of quick peripheral assembly equipment or several register.
Alternatively, the quick peripheral assembly equipment that the present embodiment provides can be peripheral component interconnect standard (Peripheral Component Interconnect is called for short PCI), PCIE or PCI-X equipment.Particularly, for meeting equipment or other similar equipment of PCI, PCIE, PCI-X peripheral component interconnection, the quick peripheral assembly equipment on PCI, PCIE, PCI-X slot of motherboard can be plugged in.Wherein PCI-X is the renewal version of PCI, still adopts the bussing technique of PCI, but has the wiring stitch of greater number, has distensible frequency, can change with the change of equipment.In embodiments of the present invention, quick peripheral assembly equipment can be intelligent network adapter, add the card that decompresses, agreement unloading card, and video accelerators etc., are not particularly limited at this.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of above-mentioned quick peripheral assembly equipment, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
The embodiment of the present invention additionally provides a kind of serial ports re-orientation processes system, and it comprises the arbitrary shown motherboard of Fig. 5 and Fig. 6 and the arbitrary shown quick peripheral assembly equipment of Fig. 7 to Fig. 8.
The serial ports re-orientation processes system that the present embodiment provides, corresponding with the serial ports re-orientation processes method that the embodiment of the present invention provides, for the executive system of serial ports re-orientation processes method, the detailed process of its serial ports re-orientation processes method see serial ports re-orientation processes embodiment of the method provided by the invention, can not repeat them here.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.