CN113360443B - Serial port card communication realization method, device, equipment and readable storage medium - Google Patents

Serial port card communication realization method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113360443B
CN113360443B CN202110598748.6A CN202110598748A CN113360443B CN 113360443 B CN113360443 B CN 113360443B CN 202110598748 A CN202110598748 A CN 202110598748A CN 113360443 B CN113360443 B CN 113360443B
Authority
CN
China
Prior art keywords
serial port
port card
corresponding resource
allocated
card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110598748.6A
Other languages
Chinese (zh)
Other versions
CN113360443A (en
Inventor
张国奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202110598748.6A priority Critical patent/CN113360443B/en
Publication of CN113360443A publication Critical patent/CN113360443A/en
Application granted granted Critical
Publication of CN113360443B publication Critical patent/CN113360443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a serial port card communication realization method, a device, equipment and a computer readable storage medium, wherein the method is applied to a BIOS and comprises the following steps: judging whether the operating system successfully loads the drive of the serial port card; if the loading is not successful, loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so as to enable the serial port card to communicate by utilizing the resources; if the loading is successful, whether the serial port card is allocated to the corresponding resource is judged, if not, the driver is loaded for the serial port card according to the driving information, and the corresponding resource is allocated for the serial port card. According to the technical scheme, when the communication of the serial port card cannot be realized by the operating system, the BIOS is utilized to realize the communication, and the BIOS is hardly influenced by the mode, so that the serial port card can be normally used in communication no matter in an X86 framework or a non-X86 framework, and the reliability and universality of the use of the serial port card are improved.

Description

Serial port card communication implementation method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of serial port card communication technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for implementing serial port card communication.
Background
Currently, the CPU (Central Processing Unit) architecture includes various architectures such as an X86 architecture, an ARM (Advanced RISC Machine) architecture, and the like.
As a communication device, a serial port card belongs to a device of X86, and belongs to a serial port device in legacy mode, and when the serial port card is applied to a CPU architecture other than X86 architecture, a situation may occur that a driver of the serial port card cannot be loaded or an operating system cannot allocate resources to the serial port card because the serial port card is not compatible with the mode of the CPU architecture, for example: when the serial port card is adapted on the ARM framework, because the ARM framework is mainly based on a UEFI (Unified Extensible Firmware Interface) mode, an operating system may have problems due to mode incompatibility when loading a driver of the serial port card and allocating resources for the serial port card, thereby causing the serial port card to be incapable of normal communication use; in addition, when the method is applied to the X86 architecture, the serial port card may not be able to communicate and use normally due to abnormal loading of the driver or failure to allocate resources by the operating system.
In summary, how to enable the serial port card to be used for normal communication is a technical problem to be urgently solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, a device, and a computer-readable storage medium for implementing serial port card communication, so as to enable a serial port card to be used for normal communication.
In order to achieve the above purpose, the present application provides the following technical solutions:
a serial port card communication implementation method is applied to a BIOS and comprises the following steps:
judging whether the operating system successfully loads the drive of the serial port card;
if the loading is not successful, loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so that the serial port card can communicate by utilizing the resources;
if the loading is successful, whether the serial port card is allocated with the corresponding resource is judged, if not, a driver is loaded for the serial port card according to the driving information, and the corresponding resource is allocated for the serial port card.
Preferably, after allocating the corresponding resource to the serial port card, the method further includes:
judging whether the operating system allocates corresponding resources for the serial port card or not;
if so, stopping allocating corresponding resources for the serial port card;
if not, returning to the step of judging whether the serial port card is distributed to the corresponding resource.
Preferably, the determining whether the operating system allocates a corresponding resource to the serial port card includes:
judging whether the occupation amount of resources corresponding to the serial port card in the CPU is increased or not;
and if so, determining that the operating system allocates corresponding resources for the serial port card.
Preferably, the determining whether the serial port card is allocated to the corresponding resource includes:
judging whether a resource corresponding to the serial port card in the CPU is occupied or not;
and if so, determining that the serial port card is allocated to the corresponding resource.
Preferably, if the serial port card is connected to a communication device, determining whether the serial port card is allocated to a corresponding resource includes:
judging whether the serial port card is in normal communication with the communication equipment or not;
and if so, determining that the serial port card is allocated to the corresponding resource.
Preferably, if it is determined that the serial port card is allocated to the corresponding resource, the method further includes:
and returning to execute the step of judging whether the serial port card is allocated to the corresponding resource.
A serial port card communication implementation device is applied to BIOS and comprises:
the first judging module is used for judging whether the operating system successfully loads the drive of the serial port card;
the allocation module is used for loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card and allocating a corresponding resource for the serial port card so as to enable the serial port card to communicate by using the resource if the loading is not successful;
and the second judging module is used for judging whether the serial port card is allocated with the corresponding resource if the loading is successful, and loading a driver for the serial port card according to the driving information and allocating the corresponding resource for the serial port card if the loading is not allocated.
Preferably, the method further comprises the following steps:
a third determining module, configured to determine whether the operating system allocates a corresponding resource to the serial port card after allocating the corresponding resource to the serial port card;
the allocation stopping module is used for stopping allocating the corresponding resources to the serial port card if the operating system allocates the corresponding resources to the serial port card;
a first executing module, configured to return to execute the step of determining whether the serial port card is allocated with the corresponding resource if the operating system does not allocate the corresponding resource to the serial port card.
A serial port card communication implementation device includes:
a memory for storing a computer program;
a processor, configured to implement the steps of the serial port card communication implementation method according to any one of the above embodiments when executing the computer program.
A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the steps of the serial port card communication implementation method according to any one of the above claims.
The application provides a serial port card communication implementation method, a device, equipment and a computer readable storage medium, wherein the method is applied to a BIOS and comprises the following steps: judging whether the operating system successfully loads the drive of the serial port card; if the loading is not successful, loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so as to enable the serial port card to communicate by utilizing the resources; if the loading is successful, whether the serial port card is allocated with the corresponding resource is judged, if not, the driver is loaded for the serial port card according to the driving information, and the corresponding resource is allocated for the serial port card.
According to the technical scheme disclosed by the application, when the BIOS determines that the operating system does not successfully load the drive of the serial port card or the serial port card is not allocated with the corresponding resource although the operating system successfully loads the drive of the serial port card, the BIOS loads the drive for the serial port card according to the drive information which is registered in advance and corresponds to the serial port card, and allocates the corresponding resource for the serial port card after the drive is loaded, so that the serial port card can communicate by using the resource allocated to the resource, namely when the operating system cannot realize the communication of the serial port card, the BIOS is used for realizing, and the BIOS is hardly influenced by the mode, so that the serial port card can normally communicate and use in an X86 architecture or a non-X86 architecture, and the reliability and universality of the use of the serial port card are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a serial port card communication implementation method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another serial port card communication implementation method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a serial port card communication implementation apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a serial port card communication implementation device according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a serial port card communication implementation method, a device, equipment and a computer readable storage medium, which are used for enabling the serial port card to be used in normal communication.
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, which shows a flowchart of a serial port card communication implementation method provided in an embodiment of the present application, the serial port card communication implementation method provided in the embodiment of the present application, applied to a BIOS, may include:
s11: judging whether the operating system successfully loads the drive of the serial port card; if not, step S12 is executed, and if yes, step S13 is executed.
Inserting a serial port card into a server, powering on the server, installing a serial port card driver, and executing a corresponding running script (specifically, a start script) to run the serial port card. It should be noted that the CPU architecture in the server may be an ARM architecture (at this time, the boot method defaults to UEFI) or other architectures as long as the architectures can recognize the inserted serial port card. The serial port card mentioned here may be a PCIE (Peripheral Component Interconnect express, a high speed serial computer extended bus standard) serial port card or a PCI (Peripheral Component Interconnect, or the like.
In the process of starting up and initializing the server, because the BIOS (Basic Input/Output System ) may obtain information related to the driver of the serial port card, the BIOS may determine whether the operating System successfully loads the driver of the serial port card, and if it is determined that the operating System does not successfully load the driver of the serial port card, it indicates that the serial port card cannot normally communicate and use, at this time, step S12 may be performed, and if it is determined that the operating System successfully loads the driver of the serial port card, it indicates that the serial port card can subsequently run, at this time, step S13 may be performed.
S12: and loading a drive for the serial port card according to the drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so that the serial port card utilizes the resources to carry out communication.
If the operating system is determined not to successfully load the drive of the serial port card, the BIOS calls drive information which is registered in advance and corresponds to the serial port card, the called drive information is registered in the serial port card to load the drive for the serial port card, and after the drive is loaded for the serial port card, the BIOS directly distributes resources to the serial port card through the logic interruption of the CPU, so that the serial port card can utilize the distributed resources to carry out communication, namely, the serial port card can be normally used. The above-mentioned pre-registered drive information includes, but is not limited to, bus (bus), dev (device), and fun (function) information of the serial port card, and the information may be pre-registered in the BIOS for subsequent direct retrieval and use by the BIOS.
S13: judging whether the serial port card is distributed to corresponding resources or not; if not, step S14 is executed.
If the operating system is determined to successfully load the driver of the serial port card, it indicates that the serial port card can run (i.e. the driver of the serial port card can be loaded normally). After initialization is completed and the serial port cards run, the BIOS can perform polling monitoring on each serial port card, judge whether the serial port cards are allocated with corresponding resources during running through the polling monitoring, and if the serial port cards are determined to be allocated with the corresponding resources, the serial port cards can be normally communicated and used; if it is determined that the serial port card is not allocated to the corresponding resource, step S14 is executed.
S14: and loading a drive for the serial port card according to the drive information, and distributing corresponding resources for the serial port card.
If the BIOS determines that the serial port card is not allocated to the corresponding resource, the serial port card cannot be normally communicated and used, and at this time, a problem may occur in driver loading of the serial port card, and a problem may also occur in resource allocation of the serial port card. Considering that after the initialization is completed, the BIOS cannot scan and acquire information related to the driver of the serial port card to determine whether the operating system successfully loads the driver of the serial port card, and therefore, after it is determined that the serial port card is not allocated with the corresponding resource, the BIOS directly loads the driver for the serial port card according to the driver information which is registered in advance and corresponds to the serial port card, and allocates the corresponding resource to the serial port card, so that the serial port card can communicate by using the allocated resource, that is, the same step as step S12 can be performed.
Specifically, the process of loading the driver for the serial port card by the BIOS according to the driver information that is registered in advance and corresponds to the serial port card is the same as the specific implementation of the step S12, that is, the BIOS calls the driver information that is registered in advance and corresponds to the serial port card, registers the called driver information in the serial port card to load the driver for the serial port card, and after loading the driver for the serial port card, may allocate the resource in the CPU corresponding to the serial port card, so that the serial port card can communicate using the allocated resource.
According to the process, the technical scheme that the BIOS is used for automatically identifying and assisting the operating system to allocate resources and the BIOS is used for allocating resources when the drive cannot be loaded is adopted, and the condition that the serial port card cannot be used can be effectively avoided. If the serial port card is adapted in the non-X86 architecture, the BIOS is hardly influenced by the architecture and the mode, so the serial port card can normally communicate and use in the non-X86 architecture through the process; if the serial port card is adapted in the X86 architecture, the BIOS may replace the os to provide services for the communication of the serial port card in case the os cannot load a driver and/or allocate resources to the serial port card, so that the serial port card can communicate normally.
According to the technical scheme disclosed by the application, when the BIOS determines that the operating system does not successfully load the drive of the serial port card or the serial port card is not allocated with the corresponding resource although the operating system successfully loads the drive of the serial port card, the BIOS loads the drive for the serial port card according to the drive information which is registered in advance and corresponds to the serial port card, and allocates the corresponding resource for the serial port card after the drive is loaded, so that the serial port card can communicate by using the resource allocated to the resource, namely when the operating system cannot realize the communication of the serial port card, the BIOS is used for realizing, and the BIOS is hardly influenced by the mode, so that the serial port card can normally communicate and use in an X86 architecture or a non-X86 architecture, and the reliability and universality of the use of the serial port card are improved.
Referring to fig. 2, a flowchart of another method for implementing serial port card communication according to an embodiment of the present application is shown. The method for implementing serial port card communication provided in the embodiment of the present application, after allocating corresponding resources to the serial port card, may further include:
s15: judging whether the operating system allocates corresponding resources for the serial port card; if yes, go to step S16, otherwise, go back to step S13;
s16: the allocation of the corresponding resources to the serial port card is stopped, and step S13 is performed.
After allocating the corresponding resources to the serial port card, the BIOS determines whether the operating system allocates the corresponding resources to the serial port card, and if it is determined that the operating system allocates the corresponding resources to the serial port card, the BIOS stops allocating the corresponding resources to the serial port card, that is, the operating system is only used to allocate the corresponding resources to the serial port card, so as to avoid the occurrence of a situation of resource repeated allocation, thereby avoiding resource waste, and avoiding a conflict that the serial port card occupies the resources due to the operating system and the BIOS allocating the resources to the serial port card at the same time. In addition, after stopping allocating the corresponding resource to the serial port card, the BIOS may return to step S13, that is, continuously monitor the serial port card, so as to find the abnormality of the serial port card in time and handle the abnormality of the serial port card in time, thereby enabling the serial port card to be used in normal communication.
When step S15 is executed, if the BIOS determines that the operating system does not allocate corresponding resources to the serial port card, it indicates that only the BIOS is allocating resources to the serial port card at this time, and there is no situation of resource repeated allocation, so the BIOS may directly return to step S13 to continuously monitor the serial port card, thereby facilitating to find the abnormality of the serial port card, and timely handle the abnormality of the serial port card, so that the serial port card can be used for normal communication.
The method for implementing serial port card communication provided in the embodiment of the present application, determining whether an operating system allocates a corresponding resource to a serial port card, may include:
judging whether the occupation amount of resources corresponding to the serial port card in the CPU is increased or not;
and if so, determining that the operating system allocates corresponding resources for the serial port card.
When determining whether the operating system allocates the corresponding resource to the serial port card, it may specifically be determined whether an occupied amount of the resource corresponding to the serial port card in the CPU is increased, where the increase is relative to the occupied amount when the BIOS allocates the resource corresponding to the serial port card.
If the occupation amount of the resources corresponding to the serial port card in the CPU is determined to be increased, the resources corresponding to the serial port card are indicated to be repeatedly occupied, namely the operating system is determined to be recovered to be normal and the resources corresponding to the serial port card are distributed, and if the occupation amount of the resources corresponding to the serial port card in the CPU is determined not to be increased, the resources corresponding to the serial port card are indicated not to be repeatedly occupied, namely the operating system is determined not to distribute the resources corresponding to the serial port card.
The mode of determining whether the operating system allocates the corresponding resources to the serial port card by judging whether the occupation amount of the resources is increased can be directly and efficiently determined.
The method for implementing serial port card communication provided in the embodiment of the present application, determining whether a serial port card is allocated to a corresponding resource, may include:
judging whether a resource corresponding to the serial port card in the CPU is occupied or not;
and if so, determining that the serial port card is allocated to the corresponding resource.
When judging whether the serial port card is allocated with the corresponding resource, the BIOS may implement the determination by judging whether the resource corresponding to the serial port card in the CPU is occupied, specifically, if the resource corresponding to the serial port card in the CPU is occupied, it is determined that the serial port card is allocated with the corresponding resource, and if the resource corresponding to the serial port card in the CPU is unoccupied, it is determined that the serial port card is not allocated with the corresponding resource, which facilitates directly and efficiently determining whether the serial port card is allocated with the corresponding resource.
In the method for implementing serial port card communication provided in the embodiment of the present application, if the serial port card is connected to a communication device, it is determined whether the serial port card is allocated to a corresponding resource, which may include:
judging whether the serial port card is in normal communication with the communication equipment or not;
and if so, determining that the serial port card is allocated to the corresponding resource.
In this application, if the serial port card is connected with a communication device, the manner of determining whether the serial port card allocates the corresponding resource may be: judging whether the serial port card is normally communicated with the connected communication equipment, if the serial port card is normally communicated with the connected communication equipment, indicating that the serial port card can be normally communicated and used, determining that the serial port card equipment is allocated with corresponding resources, if the serial port card is not normally communicated with the connected communication equipment, indicating that the serial port card cannot be normally communicated and used, and at the moment, determining that the serial port card equipment is not allocated with the corresponding resources.
The judging mode can be convenient for directly and accurately judging whether the resources are distributed or not, thereby being convenient for improving the reliability of realizing the serial port card communication.
In the method for implementing serial port card communication provided in the embodiment of the present application, if it is determined that the serial port card is allocated to the corresponding resource, the method may further include:
and returning to execute the step of judging whether the serial port card is allocated to the corresponding resource.
In this application, when step S13 is executed, if it is determined that the serial port card is allocated to the corresponding resource, it indicates that the serial port card can communicate and use normally, at this time, while the serial port card is used normally, the BIOS may continue to perform polling monitoring on the serial port card, determine whether the serial port card is allocated to the corresponding resource, and return to step S13, so as to find out that the serial port card is abnormal in time, and facilitate processing according to step S14 when the abnormality is found, thereby ensuring that the serial port card can allocate the resource, and further enabling the serial port card to be used normally.
A serial port card communication implementation device provided in an embodiment of the present application is applied to a BIOS, see fig. 3, which shows a schematic structural diagram of a serial port card communication implementation device provided in an embodiment of the present application, and may include:
a first judging module 31, configured to judge whether the operating system successfully loads the driver of the serial port card;
the allocation module 32 is configured to, if loading is unsuccessful, load a driver for the serial port card according to driver information that is registered in advance and corresponds to the serial port card, and allocate a corresponding resource to the serial port card, so that the serial port card communicates by using the resource;
the second determining module 33 is configured to determine whether the serial port card is allocated with the corresponding resource if the loading is successful, and if the loading is not allocated with the corresponding resource, load a driver for the serial port card according to the driver information and allocate the corresponding resource to the serial port card.
The device for realizing serial port card communication provided by the embodiment of the application can also comprise:
the third judging module is used for judging whether the operating system allocates the corresponding resource for the serial port card after allocating the corresponding resource for the serial port card;
the allocation stopping module is used for stopping allocating the corresponding resources to the serial port card if the operating system allocates the corresponding resources to the serial port card;
and the first execution module is used for returning to execute the step of judging whether the serial port card is allocated with the corresponding resource or not if the operating system does not allocate the corresponding resource for the serial port card.
The device for realizing serial port card communication provided by the embodiment of the application, the third judging module can comprise:
the first judgment unit is used for judging whether the occupation amount of resources corresponding to the serial port card in the CPU is increased or not;
the first determining unit is used for determining that the operating system allocates the corresponding resource to the serial port card if the occupation amount of the resource corresponding to the serial port card in the CPU is increased.
In the device for implementing serial port card communication provided in the embodiment of the present application, the second determining module 33 may include:
the second judgment unit is used for judging whether the resources corresponding to the serial port card in the CPU are occupied or not;
and the second determining unit is used for determining that the serial port card is allocated to the corresponding resource if the resource corresponding to the serial port card in the CPU is occupied.
The embodiment of the application provides a serial port card communication realizes device, if the serial port card is connected with communications facilities, then second judgement module 33 can include:
the third judging unit is used for judging whether the serial port card is in normal communication with the communication equipment or not;
and the third determining unit is used for determining that the serial port card is allocated to the corresponding resource if the serial port card is in normal communication with the communication equipment.
The device for realizing serial port card communication provided by the embodiment of the application can also comprise:
and the second execution module is used for returning to execute the step of judging whether the serial port card is allocated to the corresponding resource if the serial port card is determined to be allocated to the corresponding resource.
An embodiment of the present application further provides a serial port card communication implementation device, and referring to fig. 4, it shows a schematic structural diagram of the serial port card communication implementation device provided in the embodiment of the present application, and the schematic structural diagram may include:
a memory 41 for storing a computer program;
a processor 42, configured to implement the following steps when executing the computer program stored in the memory 41:
judging whether the operating system successfully loads the drive of the serial port card; if the loading is not successful, loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so as to enable the serial port card to communicate by utilizing the resources; if the loading is successful, whether the serial port card is allocated to the corresponding resource is judged, if not, the driver is loaded for the serial port card according to the driving information, and the corresponding resource is allocated for the serial port card.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps may be implemented:
judging whether the operating system successfully loads the drive of the serial port card; if the loading is not successful, loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so as to enable the serial port card to communicate by utilizing the resources; if the loading is successful, whether the serial port card is allocated to the corresponding resource is judged, if not, the driver is loaded for the serial port card according to the driving information, and the corresponding resource is allocated for the serial port card.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For a description of a relevant part in a serial port card communication implementation apparatus, a device, and a computer readable storage medium provided in the embodiments of the present application, reference may be made to a detailed description of a corresponding part in a serial port card communication implementation method provided in the embodiments of the present application, and details are not repeated herein.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A serial port card communication implementation method is applied to a BIOS and comprises the following steps:
judging whether the operating system successfully loads the drive of the serial port card;
if the loading is not successful, loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card, and distributing corresponding resources for the serial port card so that the serial port card can communicate by utilizing the resources;
if the loading is successful, whether the serial port card is allocated with the corresponding resource is judged, if not, a driver is loaded for the serial port card according to the driving information, and the corresponding resource is allocated for the serial port card.
2. The method for implementing serial port card communication according to claim 1, further comprising, after allocating the corresponding resource to the serial port card:
judging whether the operating system allocates corresponding resources for the serial port card or not;
if so, stopping allocating corresponding resources for the serial port card;
if not, returning to execute the step of judging whether the serial port card is distributed to the corresponding resource.
3. The method of claim 2, wherein determining whether the operating system allocates a corresponding resource to the serial port card comprises:
judging whether the occupation amount of resources corresponding to the serial port card in the CPU is increased or not;
and if so, determining that the operating system allocates corresponding resources to the serial port card.
4. The method of claim 1, wherein determining whether the serial port card is allocated to a corresponding resource comprises:
judging whether a resource corresponding to the serial port card in the CPU is occupied or not;
and if so, determining that the serial port card is allocated to the corresponding resource.
5. The method of claim 1, wherein if the serial port card is connected to a communication device, determining whether the serial port card is allocated to a corresponding resource comprises:
judging whether the serial port card is in normal communication with the communication equipment or not;
and if so, determining that the serial port card is allocated to the corresponding resource.
6. The method of claim 1, wherein if it is determined that the serial port card is allocated to the corresponding resource, the method further comprises:
and returning to execute the step of judging whether the serial port card is allocated to the corresponding resource.
7. A serial port card communication implementation device is applied to a BIOS and comprises:
the first judging module is used for judging whether the operating system successfully loads the drive of the serial port card;
the allocation module is used for loading a drive for the serial port card according to drive information which is registered in advance and corresponds to the serial port card and allocating a corresponding resource for the serial port card so as to enable the serial port card to communicate by using the resource if the loading is not successful;
and the second judging module is used for judging whether the serial port card is allocated with the corresponding resource if the loading is successful, and loading a driver for the serial port card according to the driving information and allocating the corresponding resource for the serial port card if the loading is not allocated.
8. The serial port card communication implementation device of claim 7, further comprising:
a third determining module, configured to determine whether the operating system allocates a corresponding resource to the serial port card after allocating the corresponding resource to the serial port card;
the allocation stopping module is used for stopping allocating the corresponding resources to the serial port card if the operating system allocates the corresponding resources to the serial port card;
a first executing module, configured to return to execute the step of determining whether the serial port card is allocated with the corresponding resource if the operating system does not allocate the corresponding resource to the serial port card.
9. A serial port card communication implementation device is characterized by comprising:
a memory for storing a computer program;
processor for implementing the steps of the serial port card communication implementation method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the serial port card communication implementation method according to any one of claims 1 to 6.
CN202110598748.6A 2021-05-31 2021-05-31 Serial port card communication realization method, device, equipment and readable storage medium Active CN113360443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110598748.6A CN113360443B (en) 2021-05-31 2021-05-31 Serial port card communication realization method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110598748.6A CN113360443B (en) 2021-05-31 2021-05-31 Serial port card communication realization method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113360443A CN113360443A (en) 2021-09-07
CN113360443B true CN113360443B (en) 2022-07-08

Family

ID=77528385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110598748.6A Active CN113360443B (en) 2021-05-31 2021-05-31 Serial port card communication realization method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113360443B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN101719212A (en) * 2009-12-11 2010-06-02 北京飞天诚信科技有限公司 Identification method and device of serial-port card reader
CN102323909A (en) * 2011-09-13 2012-01-18 北京北大众志微系统科技有限责任公司 Memory management method and device for realizing application of high-capacity cache
CN102546347A (en) * 2010-12-17 2012-07-04 中兴通讯股份有限公司 Implementation method and implementation system for hot plugging of virtual serial port based on proc technology
CN102567268A (en) * 2010-12-31 2012-07-11 重庆重邮信科通信技术有限公司 Detection method for USB to virtual serial port/MODEM
CN102695281A (en) * 2011-03-21 2012-09-26 中国移动通信集团公司 Method, device, system and related equipments for resource allocation
CN104219795A (en) * 2013-06-04 2014-12-17 中兴通讯股份有限公司 Wireless access terminal driving method and device and terminal
CN106326160A (en) * 2015-06-26 2017-01-11 华为技术有限公司 Processing system and processing method
CN107179998A (en) * 2017-06-22 2017-09-19 湖南国科微电子股份有限公司 A kind of method and device for configuring peripheral hardware core buffer
CN107562670A (en) * 2017-08-01 2018-01-09 杭州迪普科技股份有限公司 A kind of method and device using Serial Port Transmission data
CN107911372A (en) * 2017-11-24 2018-04-13 杭州迪普科技股份有限公司 The method and apparatus that a kind of logic-based device realizes serial equipment access network based on ethernet
CN108536477A (en) * 2018-03-02 2018-09-14 烽火通信科技股份有限公司 A kind of method of centralized device port resource distribution setting
CN108804230A (en) * 2018-06-11 2018-11-13 郑州云海信息技术有限公司 A kind of method, apparatus and medium for distributing resource according to the type of device PCI
CN109857541A (en) * 2018-12-12 2019-06-07 浪潮(北京)电子信息产业有限公司 A kind of resource allocation methods of server, system and associated component
CN111858064A (en) * 2020-07-29 2020-10-30 山东有人信息技术有限公司 Dynamic memory allocation method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729264B (en) * 2011-10-17 2020-06-16 康佳集团股份有限公司 Method for controlling peripheral serial port equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN101719212A (en) * 2009-12-11 2010-06-02 北京飞天诚信科技有限公司 Identification method and device of serial-port card reader
CN102546347A (en) * 2010-12-17 2012-07-04 中兴通讯股份有限公司 Implementation method and implementation system for hot plugging of virtual serial port based on proc technology
CN102567268A (en) * 2010-12-31 2012-07-11 重庆重邮信科通信技术有限公司 Detection method for USB to virtual serial port/MODEM
CN102695281A (en) * 2011-03-21 2012-09-26 中国移动通信集团公司 Method, device, system and related equipments for resource allocation
CN102323909A (en) * 2011-09-13 2012-01-18 北京北大众志微系统科技有限责任公司 Memory management method and device for realizing application of high-capacity cache
CN104219795A (en) * 2013-06-04 2014-12-17 中兴通讯股份有限公司 Wireless access terminal driving method and device and terminal
CN106326160A (en) * 2015-06-26 2017-01-11 华为技术有限公司 Processing system and processing method
CN107179998A (en) * 2017-06-22 2017-09-19 湖南国科微电子股份有限公司 A kind of method and device for configuring peripheral hardware core buffer
CN107562670A (en) * 2017-08-01 2018-01-09 杭州迪普科技股份有限公司 A kind of method and device using Serial Port Transmission data
CN107911372A (en) * 2017-11-24 2018-04-13 杭州迪普科技股份有限公司 The method and apparatus that a kind of logic-based device realizes serial equipment access network based on ethernet
CN108536477A (en) * 2018-03-02 2018-09-14 烽火通信科技股份有限公司 A kind of method of centralized device port resource distribution setting
CN108804230A (en) * 2018-06-11 2018-11-13 郑州云海信息技术有限公司 A kind of method, apparatus and medium for distributing resource according to the type of device PCI
CN109857541A (en) * 2018-12-12 2019-06-07 浪潮(北京)电子信息产业有限公司 A kind of resource allocation methods of server, system and associated component
CN111858064A (en) * 2020-07-29 2020-10-30 山东有人信息技术有限公司 Dynamic memory allocation method and system

Also Published As

Publication number Publication date
CN113360443A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN101216772A (en) Embedded equipment startup method and software upgrading method
CN109408122B (en) Equipment starting method, electronic equipment and computer storage medium
CN112948310A (en) Resource allocation method, device, equipment and computer readable storage medium
CN113849272A (en) Method and device for adding GPU (graphics processing Unit) resources in virtual machine
JP5866430B2 (en) Dynamic allocation of processor cores running operating systems
CN113360443B (en) Serial port card communication realization method, device, equipment and readable storage medium
CN115981685A (en) Application upgrading method and device, computing equipment and chip system
US20100241840A1 (en) System and method for resource assignment
CN105630599A (en) Video memory distribution method and device based on 32/64-bit hybrid operating system
CN111045789B (en) Virtual machine starting method and device, electronic equipment and storage medium
CN110286953B (en) Method and device for starting embedded system, embedded device and storage medium
CN110502282B (en) Loading method, device and equipment of multi-channel NTB card and readable storage medium
CN115328833B (en) Multiplexing method and device of hardware resources, hardware platform and storage medium
CN109669727B (en) Server configuration method, system and related components
CN108958837B (en) Method, system and medium for dynamically configuring ME firmware
CN116450046A (en) Cloud disk implementation method and device, intelligent network card, server and storage medium
CN114064128B (en) Kernel restarting method
CN114035901B (en) Method and device for constructing container for running process and electronic equipment
CN112532430B (en) PCIe bandwidth allocation method, device and storage medium
CN103019790B (en) Computer system power-on Acceleration of starting method and apparatus
CN115576613A (en) PXE-based operating system installation method, computing device and communication system
US8949587B2 (en) Method for dynamic loading of operating systems on bootable devices
EP4086756A1 (en) Method and apparatus for processing virtual machine component
CN114020681A (en) Method, device and system for distributing logical drive letter, electronic equipment and storage medium
CN112115092A (en) Method, device, equipment and storage medium for distributing PCIE bus numbers

Legal Events

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