[go: up one dir, main page]

CN116860680A - Hot plug method, PCIE equipment and computer system - Google Patents

Hot plug method, PCIE equipment and computer system Download PDF

Info

Publication number
CN116860680A
CN116860680A CN202310613536.XA CN202310613536A CN116860680A CN 116860680 A CN116860680 A CN 116860680A CN 202310613536 A CN202310613536 A CN 202310613536A CN 116860680 A CN116860680 A CN 116860680A
Authority
CN
China
Prior art keywords
pcie
hot plug
configuration
pcie device
hot
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.)
Pending
Application number
CN202310613536.XA
Other languages
Chinese (zh)
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.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202310613536.XA priority Critical patent/CN116860680A/en
Publication of CN116860680A publication Critical patent/CN116860680A/en
Pending legal-status Critical Current

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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a hot plug method, PCIE equipment and a computer system, and relates to the technical field of hot plug. The method is executed by a processor, the processor is in communication connection with PCIE equipment, and hot plug identifiers are stored in the PCIE equipment and are used for indicating that the PCIE equipment supports hot plug or does not support hot plug. Based on the above, when the processor receives the hot plug request, by acquiring the hot plug identifier, determining whether the PCIE device supports hot plug, and executing hot plug configuration operation on the PCIE device under the condition that the hot plug identifier indicates that the PCIE device supports hot plug, so that the PCIE device supporting hot plug can be ensured to be executed with the hot plug configuration operation, configuration of the PCIE device is ensured to be matched with hot plug, and further, reliability of hot plug of the PCIE device is improved.

Description

Hot plug method, PCIE equipment and computer system
Technical Field
The present application relates to the field of computer technologies, and in particular, to a hot plug method, PCIE device, and computer system.
Background
Hot plug (Hot Swap), i.e., hot plug, refers to the insertion or removal of a peripheral component interconnect express (peripheral component interconnect express, PCIE) device on a computer system without affecting the normal operation of the computer system, without powering off the computer system. Because the hot plug technology can improve the quick maintainability of the computer system, the hot plug technology is widely applied to the field of computers.
However, after the PCIE device on the computer system is hot plugged, situations such as failure or damage to the PCIE device often occur, which results in low reliability of the PCIE device hot plug.
Therefore, how to improve the reliability of hot plug of PCIE devices is a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a hot plug method, PCIE equipment and a computer system, which are beneficial to improving the reliability of hot plug of the PCIE equipment.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, a hot plug method is provided, where the method is executed by a processor, and the processor is communicatively connected to PCIE devices; the method comprises the following steps: receiving a hot plug request; the hot plug request is used for indicating that hot plug is requested to be carried out on PCIE equipment, hot plug identifiers are stored in the PCIE equipment, and the hot plug identifiers are used for indicating that the PCIE equipment supports hot plug or does not support hot plug; obtaining a hot plug identifier of PCIE equipment; and if the hot plug identifier indicates that the PCIE equipment supports hot plug, executing hot plug configuration operation on the PCIE equipment.
In the scheme, the PCIE device stores a hot plug identifier, and the hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug. Based on the above, when the processor receives the hot plug request, by acquiring the hot plug identifier, determining whether the PCIE device supports hot plug, and executing hot plug configuration operation on the PCIE device under the condition that the hot plug identifier indicates that the PCIE device supports hot plug, so that the PCIE device supporting hot plug can be ensured to be executed with the hot plug configuration operation, configuration of the PCIE device is ensured to be matched with hot plug, and further, reliability of hot plug of the PCIE device is improved.
In another possible implementation manner, the PCIE device further stores configuration information of the PCIE device; performing a hot plug configuration operation on PCIE devices includes: acquiring configuration information of PCIE equipment stored in the PCIE equipment; and executing the configuration operation indicated by the configuration information of the PCIE equipment on the PCIE equipment.
According to the implementation mode, the configuration information of the PCIE equipment is further included in the PCIE equipment, the configuration information of the PCIE equipment stored in the PCIE equipment is obtained under the condition that the PCIE equipment supports hot plug, and configuration operation indicated by the configuration information is executed on the PCIE equipment, so that the hot plug process of the PCIE equipment can be more complete, the current configuration of the PCIE equipment is ensured to be matched with the hot plug, damage of the PCIE equipment when the PCIE equipment is hot-plugged is avoided, or partial functions of the PCIE equipment after hot plug cannot be realized due to incomplete configuration operation executed on the PCIE equipment is avoided.
In another possible implementation manner, a hot plug configuration identifier is also stored in the PCIE device, where the hot plug configuration identifier is used to indicate that configuration information is stored in the PCIE device or no configuration information is stored in the PCIE device; the method for obtaining the configuration information of the PCIE equipment stored in the PCIE equipment comprises the following steps: and under the condition that the hot plug configuration identifier indicates that the configuration information of the PCIE device is stored in the PCIE device, acquiring the configuration information of the PCIE device stored in the PCIE device.
According to the implementation mode, the hot-plug configuration identifier is further stored in the PCIE equipment and used for indicating that the configuration information is stored in the PCIE equipment or not, so that whether the configuration information of the PCIE equipment is stored in the PCIE equipment or not can be determined according to the hot-plug configuration identifier, the configuration information is indicated to be stored in the hot-plug configuration identifier, the configuration information of the PCIE equipment stored in the PCIE equipment is obtained, and the cost of program processing is saved compared with the case of directly reading the PCIE equipment.
In another possible implementation, the hot plug identifier is stored in a PCIE configuration space mapped by firmware of the PCIE device.
According to the implementation mode, the hot plug identification is stored in the PCIE configuration space, and the CPU of the computer device and the OS running on the CPU have the function of reading and executing the content in the PCIE configuration space, so that the achievement and convenience of determining whether the PCIE device supports hot plug are improved.
In another possible implementation manner, the PCIE configuration space includes an extension configuration space, where the extension configuration space is used to store capability attribute information of the PCIE device, and the hot plug identifier is stored in the extension configuration space.
In the implementation manner, the user-defined capability of the PCIE expansion configuration space is fully utilized, and the hot plug identifier is stored in the PCIE expansion configuration space, so that the PCIE expansion configuration space is expanded, the basic configuration space of the PCIE expansion configuration space is not required to be changed, and the achievement and compatibility are improved.
In another possible implementation manner, the PCIE configuration space includes an extension space, where the extension space is used to store an image file of the PCIE device, and the hot plug identifier is stored in the extension space.
In the implementation mode, the self-defining capability of the expansion space is fully utilized, and the hot plug identification is stored in the expansion space, so that the expansion of the expansion space is equivalent, the basic configuration space of the PCIE configuration space is not required to be changed, and the achievement and the compatibility are improved.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, the configuration operation indicated by the configuration information of the PCIE device includes at least one configuration operation of a plurality of configuration operations that the PCIE device needs to perform when the computer system is started.
By the implementation mode, the perfection and the accuracy of the configuration of the PCIE equipment can be ensured after the PCIE equipment is electrified, and abnormal work or partial function incapability of the PCIE equipment caused by incomplete configuration operation executed on the PCIE equipment is avoided, so that the hot plug process of the PCIE equipment is more complete, and further the hot plug reliability of the PCIE equipment is further improved.
In another possible implementation manner, in the case that the hot plug request is a hot plug request, the configuration operation indicated by the configuration information of the PCIE device is used to modify the current configuration of the PCIE device, so that the modified configuration of the PCIE device matches with the hot plug.
According to the implementation mode, before the PCIE equipment is hot-pulled, the configurations which can cause damage to the PCIE equipment are modified in advance, so that the modified configurations of the PCIE equipment are matched with the hot-pulled, damage to the PCIE equipment when the PCIE equipment is hot-pulled due to incomplete configuration operation of the PCIE equipment is avoided, and the reliability of the PCIE equipment in hot-pulled is improved.
In another possible implementation manner, the configuration information of the PCIE device includes one or more of configuration information of a general purpose input/output (GPIO) port of the PCIE device, configuration information of a register, configuration information of a port mode of the PCIE device, and configuration information of an option read only memory (OptionROM) of the PCIE device.
In another possible implementation manner, the hot plug configuration identifier and the configuration information of the PCIE device are stored in a PCIE configuration space mapped by firmware of the PCIE device.
In the implementation manner, the PCIE configuration space technology is utilized for expansion, so that the hot plug identification and the hot plug configuration information are stored in the PCIE configuration space, and the PCIE configuration space supports CPU and OS read-write, thereby being beneficial to improving the realizability and convenience of reading the hot plug identification and the hot plug configuration information.
In another possible implementation manner, the PCIE configuration space includes an extension configuration space, where the extension configuration space is used to store capability attribute information of the PCIE device, and the hot plug configuration identifier and configuration information of the PCIE device are stored in the extension configuration space.
In the implementation manner, the user-defined capability of the PCIE expansion configuration space is fully utilized, and the hot plug configuration identifier and the configuration information of the PCIE equipment are specifically stored in the PCIE expansion configuration space, so that the PCIE expansion configuration space is expanded, the basic configuration space of the PCIE expansion configuration space is not required to be changed, and the achievement and compatibility are improved.
In another possible implementation manner, the PCIE configuration space includes an extension space, where the extension space is used to store an image file of the PCIE device, and the hot plug configuration identifier and configuration information of the PCIE device are stored in the extension space.
In the implementation manner, the user-defined capability of the expansion space is fully utilized, and the hot plug configuration identifier and the configuration information of the PCIE equipment are specifically stored in the expansion space, so that the expansion of the expansion space is equivalent, the basic configuration space of the PCIE configuration space is not required to be changed, and the achievement and compatibility are improved.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, performing a hot plug configuration operation on the PCIE device includes: and running the drive of the PCIE device.
According to the implementation mode, when the PCIE device is requested to be hot plugged, if the PCIE device supports hot plug, the drive of the PCIE device is operated, and compared with the drive of the PCIE device operated when whether the PCIE device supports hot plug is uncertain, the drive is beneficial to avoiding the situation that when the PCIE device does not support hot plug, the PCIE device is accessed through the drive to generate abnormality, and further the normal application of a computer system is prevented from being influenced.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, performing a hot plug configuration operation on the PCIE device includes: releasing PCIE resources allocated to the PCIE device.
According to the implementation mode, when the PCIE equipment is requested to be hot-swapped and the PCIE equipment supports hot-swapped, PCIE resources allocated to the PCIE equipment are released, the PCIE equipment which is not used any more can be prevented from occupying the PCIE resources, and the utilization rate of the PCIE resources is improved.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, performing a hot plug configuration operation on the PCIE device includes: and stopping accessing the PCIE device.
In the implementation manner, when the PCIE device is requested to be hot-swapped and the PCIE device supports hot-swap, the PCIE device is stopped from being accessed, so that the situation that after the PCIE device is hot-swapped, the processor continues to access the PCIE device, and the processor is prevented from waiting and hanging up due to the fact that the response of the PCIE device cannot be received for a long time, and the normal operation of the processor is influenced is avoided.
In another possible implementation manner, the method further includes: if the hot plug identifier indicates that the PCIE device does not support hot plug, outputting prompt information, where the prompt information is used to indicate that the PCIE device does not support hot plug.
In this implementation manner, when a hot plug request is received, if the hot plug identifier indicates that the PCIE device does not support hot plug, a prompt message is output to indicate that the PCIE device does not support hot plug. On the one hand, the method and the device can inform the user that the current PCIE equipment does not support hot plug, avoid abnormal work or damage of the PCIE equipment which does not support hot plug after hot plug of the PCIE equipment caused by the fact that the user does not support hot plug, influence the application of a computer system, and therefore help to improve the reliability of hot plug of the PCIE equipment. On the other hand, under the condition that the PCIE equipment supports hot plug, hot plug configuration operation can be guaranteed to be carried out on the PCIE equipment, so that configuration of the PCIE equipment is matched with hot plug, the probability that the PCIE equipment can work normally on a computer system after hot plug is improved, and further the reliability of hot plug of the PCIE equipment is improved.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, performing a hot plug configuration operation on the PCIE device includes: powering down the PCIE device.
According to the implementation mode, when the PCIE equipment is requested to be hot-pulled out and the PCIE equipment supports hot plug, the PCIE equipment is powered down, so that the PCIE equipment is hot-pulled out under the condition of power down, damage caused by hot-pulling out of the PCIE equipment is avoided, and further improvement of reliability of hot-pulling out of the PCIE equipment is facilitated.
In another possible implementation manner, the method further includes: if the hot plug identification indicates that the PCIE equipment does not support hot plug, generating log information; the log information is used for recording that the PCIE device does not support hot plug and/or that the PCIE device does not perform hot plug.
In the implementation manner, when the plug identifier indicates that the PCIE device does not support hot plug, log information is generated so as to be used for system operation and maintenance.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, the method further includes: if the hot plug identifier indicates that the PCIE device does not support hot plug, powering down the PCIE device.
According to the implementation mode, when hot plug is requested to be carried out on the PCIE equipment and the PCIE equipment does not support hot plug, the PCIE equipment is powered down, so that the situation that after the PCIE equipment which does not support hot plug is subjected to wrong hot plug, due to the fact that the PCIE equipment is used by a computer system, working abnormality occurs is avoided, normal application of the computer system is prevented from being influenced due to the fact that the PCIE equipment works abnormally, and further improvement of the reliability of hot plug of the PCIE equipment is facilitated.
In another possible implementation manner, in a case where the hot plug request is a hot plug request, the method further includes: and if the hot plug identification indicates that the PCIE equipment does not support hot plug, releasing PCIE resources allocated to the PCIE equipment.
In the implementation manner, when the hot plug request is a hot plug request and the PCIE device does not support hot plug, PCIE resources allocated to the PCIE device are released, so that the PCIE device that is not currently used can be prevented from occupying PCIE resources, and the utilization rate of PCIE resources is improved.
In another possible implementation manner, the processor is further in communication with a PCIE slot; after receiving the hot plug request, obtaining the hot plug identifier of the PCIE device includes: acquiring a first hot plug identifier of a PCIE slot, wherein the first hot plug identifier is used for indicating that the PCIE slot supports hot plug or does not support hot plug; and if the first hot plug identifier indicates that the PCIE slot supports hot plug, acquiring a hot plug identifier of the PCIE device.
In the implementation manner, a first hot plug identifier of the PCIE slot is obtained first, and then the hot plug identifier of the PCIE device is obtained when the first hot plug identifier indicates that the PCIE slot supports hot plug. Because the PCIE slot belongs to a component of the computer system and the PCIE device belongs to a peripheral component, that is, whether the PCIE slot supports hot plug belongs to a capability of the computer system itself, it is determined whether the PCIE slot supports hot plug first, if the PCIE slot does not support hot plug, it is unnecessary to determine whether the PCIE device supports hot plug any more, and compared with determining whether the PCIE device supports hot plug first, it is determined whether the PCIE slot supports hot plug any more, which is helpful to improve operation efficiency.
In a second aspect, there is provided a hot plug apparatus, the apparatus comprising: the functional units for executing any of the methods provided in the first aspect, and actions executed by the respective functional units are implemented by hardware or implemented by hardware running corresponding software. For example, the hot plug device may include: the device comprises a receiving unit, an acquisition unit and a processing unit; the receiving unit is used for receiving the hot plug request; the hot plug request is used for requesting hot plug of the PCIE equipment, a hot plug identifier is stored in the PCIE equipment, and the hot plug identifier is used for indicating that the PCIE equipment supports hot plug or does not support hot plug; the obtaining unit is used for obtaining the hot plug identification of the PCIE equipment; and the processing unit is used for executing hot plug configuration operation on the PCIE equipment if the hot plug identification indicates that the PCIE equipment supports hot plug.
In a third aspect, a PCIE device is provided, where the PCIE device includes a storage medium; the storage medium stores configuration information comprising a hot plug identifier and PCIE equipment, wherein the hot plug identifier is used for indicating that the PCIE equipment supports hot plug or does not support hot plug; the configuration information of the PCIE device is used to execute the configuration operation indicated by the configuration information of the PCIE device on the PCIE device when the hot plug identifier indicates that the PCIE device supports hot plug.
In the third aspect, regarding other realizations of PCIE devices, reference may be made to the first aspect, which is not described herein.
In a fourth aspect, there is provided a computer system comprising: the device comprises a processor and a memory, wherein the processor is connected with the memory. The memory is configured to store computer-executable instructions and the processor executes the computer-executable instructions stored in the memory to implement any one of the methods provided in the first aspect.
In a fifth aspect, there is provided a chip comprising: a processor and interface circuit; the interface circuit is used for receiving the code instruction and transmitting the code instruction to the processor; a processor for executing code instructions to perform any of the methods provided in the first aspect above.
In a sixth aspect, there is provided a computer readable storage medium storing computer executable instructions that when run on a computer cause the computer to perform any one of the methods provided in the first aspect above.
In a seventh aspect, there is provided a computer program product comprising: computer-executable instructions that, when executed on a computer, cause the computer to perform any of the methods provided in the first aspect above.
The technical effects caused by any implementation manner of the second aspect to the seventh aspect may refer to the technical effects caused by different implementation manners of the first aspect, and are not repeated here.
Drawings
FIG. 1 is a schematic diagram of a computer system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a hierarchical structure of a computer system according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data structure of a basic configuration space and an extended configuration space according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a data structure of an expansion space according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a data structure of a vendor specific extended capability attribute according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a data structure of a hot plug identifier and hot plug configuration information according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another data structure of a hot plug identifier and hot plug configuration information according to an embodiment of the present application;
FIG. 8 is a flowchart of a hot plug method according to an embodiment of the present application;
FIG. 9 is a schematic diagram of reading a hot plug identifier according to an embodiment of the present application;
FIG. 10 is a flow chart of a hot plug method according to an embodiment of the present application;
FIG. 11 is a flowchart of another hot-plug method according to an embodiment of the present application;
FIG. 12 is a flowchart of a hot extraction method according to an embodiment of the present application;
FIG. 13 is a flowchart of another hot extraction method according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a hot plug device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
Wherein, in the description of the present application, "/" means that the related objects are in a "or" relationship, unless otherwise specified, for example, a/B may mean a or B; the "and/or" in the present application is merely an association relationship describing the association object, and indicates that three relationships may exist, for example, a and/or B may indicate: there are three cases, a alone, a and B together, and B alone, wherein a, B may be singular or plural.
Also, in the description of the present application, unless otherwise indicated, "a plurality" means two or more than two. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion that may be readily understood.
In the following, an application scenario of the present application is exemplarily described.
Hot plug (Hot Swap), i.e., hot plug, refers to plugging or unplugging PCIE devices on a computer system into or from the computer system without affecting the normal operation of the computer system, without powering off the computer system. Because the hot plug technology can improve the quick maintainability of the computer system, the hot plug technology is widely applied to the field of computers.
However, after the PCIE device on the computer system is hot plugged, the PCIE device often cannot work normally or is damaged, which results in low reliability of the PCIE device hot plug.
Therefore, how to improve the reliability of hot plug of PCIE devices is a technical problem to be solved.
In view of this, the present application provides a hot plug method, in which a PCIE device stores a hot plug identifier and configuration information of the PCIE device, where the hot plug identifier is used to indicate that the PCIE device supports hot plug or does not support hot plug. When the processor receives the hot plug request, whether the PCIE device supports hot plug is determined by acquiring the hot plug identifier, and on the basis of the configuration information of the PCIE device stored in the PCIE device, the hot plug configuration operation is executed on the PCIE device under the condition that the hot plug identifier indicates that the PCIE device supports hot plug. On the other hand, based on the configuration information of the PCIE device, the hot plug configuration operation is performed on the PCIE device, so that the hot plug process of the PCIE device can be more complete, and therefore the current configuration of the PCIE device is guaranteed to be matched with the hot plug, and further damage of the PCIE device during hot plug is avoided, or partial functions of the PCIE device cannot be achieved due to incomplete configuration operation performed on the PCIE device.
Hereinafter, related terms related to the present application will be briefly described.
Firmware (firmware): code running on the device chip to implement the device functions. For example, the network card firmware is used for realizing functions of network connection, message transceiving, protocol unloading and the like of the network card.
Drive (driver): code running on an Operating System (OS) for enabling communication and interaction between the OS and the device. For example, a network card driver, which is used to implement communication and data transfer between the OS and the network card, and network card configuration and status monitoring.
PCIE slot: refers to slots with PCIE interfaces that follow the PCIE protocol.
PCIE device: refers to a device with a PCIE interface.
The system architecture of the present application is described below by way of example.
Fig. 1 is a schematic diagram of a computer system according to the present application.
Referring to fig. 1, a computer system includes a central processing unit (central processing unit, CPU) system, a hot plug controller, a PCIE slot, and PCIE devices.
The PCIE equipment is connected with the PCIE slot in a plug-in mode. The CPU is connected with PCIE equipment through PCIE slots. The hot plug controller is connected with PCIE equipment through PCIE slots. The hot plug controller is also connected with the CPU.
In the present application, the computer system may include a network device or a terminal device.
The network device may include a server or the like. The server may be one physical or logical server, or may be two or more physical or logical servers sharing different responsibilities, and cooperate to implement various functions of the server.
The terminal device may include an ultra-mobile personal computer (UMPC), tablet, notebook, netbook, desktop, all-in-one, etc.
In the present application, PCIE devices may be network cards, redundant array of independent disks (redundant arrays of independent disks, RAID) cards, PCI Solid State Disks (SSDs), image processor (graphics processing unit, GPU) cards, graphics cards, or accelerator cards.
In the present application, a computer system includes a hardware layer and a software layer, the software layer being program code running on the hardware layer. The software layer can be divided into a plurality of layers, and the layers are communicated through software interfaces.
The hardware layer includes computer hardware such as a CPU, a hot plug controller, a PCIE slot, and a PCIE device, as shown in fig. 1.
The software layers include, in order from top to bottom, an application layer, an Operating System (OS) layer, and a basic input output system (base input output system, BIOS) layer, as shown in fig. 2.
The BIOS layer is the most basic software code loaded on the computer hardware system. The BIOS layer is a bottom layer running program below the OS layer, which is used to set up hardware in preparation for the OS layer running.
And the OS layer comprises program codes of the OS and driving codes of the PCIE equipment. The operating system may be Linux, windows or vxWorks, etc. The OS layer runs on the CPU, and the driver code of the PCIE device runs in the OS.
It should be noted that, the BIOS layer may be simply referred to as BIOS, and the OS layer may be simply referred to as OS. Based on this, the OS hereinafter may also be understood as an OS layer.
It will be appreciated that, hereinafter, the description of the OS performing a certain operation (e.g., the OS reading the hot plug identifier) may be considered as the OS reading the hot plug identifier during the process of the CPU running the OS.
An application layer includes a series of program code that runs an application program.
In the present application, the CPU module, the OS, and the driving of PCIE devices may be collectively referred to as a CPU system. The CPU module includes a CPU, a memory (memory), a Flash memory (Flash)/a nonvolatile random access memory (NVRAM), or the like, or the CPU module may be a separate CPU.
In the application, the computer system further comprises a power supply device, wherein the power supply device is connected with the PCIE slot and is used for supplying power to the PCIE device on the PCIE slot. The power supply device is also connected with the hot plug controller, and the hot plug controller is used for controlling the power supply device to supply power for the PCIE device or controlling the power supply device to supply power for the PCIE device.
For example, the power supply device may include a power supply controller and a power supply.
The power supply is connected with the PCIE slot and is used for supplying power to the PCIE equipment.
The power supply is connected with the power supply controller, and the power supply controller is connected with the hot plug controller, so that the hot plug controller can control the power supply to supply power to the PCIE equipment through the power supply controller, or control the power supply to supply power to the PCIE equipment.
In the application, the computer system comprises a management controller, and the management controller is connected with the hot plug controller. The management controller is used for sending a hot-pull request to the hot-plug controller, wherein the hot-pull request is used for requesting hot-pull of PCIE equipment.
By way of example, the management controller may include a monitoring management unit external to the computer device, a management system in a management chip external to the processor, a baseboard out-of-band controller (baseboard management controller, BMC), a system management module (system management mode, SMM), and the like. It should be noted that the embodiments of the present application are not limited to the form of the management controller, and the above description is merely exemplary. In the following embodiments, only a management controller will be described as an example of a BMC.
It should be noted that different computer devices may be referred to as BMCs differently, for example, some computer devices may be referred to as BMCs, some computer devices may be referred to as iLO, and another computer device may be referred to as iDRAC. Either called BMC or iLO or iracc may be understood as BMC in embodiments of the present application.
The PCIE device in the present application is described below.
In the present application, the PCIE device includes a storage medium, for example, the storage medium may be Flash, NVRAM, or the like. The storage medium stores firmware of the PCIE device, where the firmware of the PCIE device includes PCIE configuration space information.
Firmware of a PCIE device maps with a logical address space according to a specification definition, which is called PCIE configuration space. The firmware of the PCIE equipment maps the data content of the PCIE configuration space information to the PCIE configuration space, so that the CPU can access the PCIE configuration space.
The PCIE configuration space information is actually stored in a physical address (i.e., a physical address of a storage medium) corresponding to the PCIE configuration space, where the physical location is determined by firmware of the PCIE device itself. The physical address is not presented to devices external to the PCIE device for which PCIE configuration space information is stored in the logical address space. That is, when the CPU accesses the PCIE device and requests to read the content in the logical address space, the PCIE device returns the content in the physical address space corresponding to the logical address space to the CPU.
In the application, the PCIE configuration space comprises a basic configuration space.
In the PCIE specification, the basic configuration space is referred to as a PCI configuration space (PCI Configuration Space). In the present application, the basic configuration space may also be referred to as PCIE basic configuration space (PCIE Base Configuration Space).
The basic configuration space includes a base address register (Base Address Registers, BAR), an extended space base address (Expansion ROM Base Address), a capability attribute pointer (Capability Pointer), etc., as shown in fig. 3.
It should be noted that, the base address register in the present application is a data field.
In the application, the configuration space of the PCIE device may further include an extended configuration space. Wherein the base address of the extended configuration space is indicated by a capability attribute pointer (Capability Pointer). In the PCIE specification, the extension configuration space is also referred to as PCIE extension configuration space (PCIE Extended Configuration Space).
The PCIE extension configuration space includes various Capability attribute (Capability) information related to the PCIE interface protocol, such as Capability attribute identification (Capability ID), capability attribute version (Capability Version), capability attribute Data (Capability Data), and a next Capability attribute offset address (Next Capability Offset), as shown in fig. 3.
By way of example, capability attributes may include message signaled interrupt extension (MSI-X) Capability attributes (Capability), power Management (Power Management) Capability attributes (Capability), vital product data (vital product data, VPD) Capability attributes (Capability), and so forth.
In the present application, the PCIE configuration space may further include an extension space (extension ROM). Wherein the base address of the extension space is indicated by the extension space base address (Expansion ROM Base Address).
The expansion space supports multiple read only images (ROM images) to be stored sequentially, as shown in fig. 4. For example, the plurality of read-only images includes image 0, image N, N being a positive integer greater than 1. The plurality of read-only images includes parameter configuration, initialization, boot functions, etc. of the PCIE device, e.g., pre-boot execution environment (preboot execution environment, PXE).
It should be noted that, the system architecture and the application scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided by the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of the new application scenario, the technical solution provided by the embodiments of the present application is equally applicable to similar technical problems.
In order to facilitate understanding, the hot plug method provided by the present application is described below based on the system architecture mentioned above.
Hereinafter, with reference to fig. 5 to 7, an exemplary description will be given of how to store the hot plug identifier (Hot Plug Identification) and the hot plug configuration information.
In the application, the hot plug identifier and the hot plug configuration information can be stored in firmware of the PCIE device, and the firmware of the PCIE device can be stored in a storage medium of the PCIE device. That is, the hot plug identification and the hot plug configuration information may be stored in a storage medium of the PCIE device.
The hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug. Hot plug includes hot plug and hot plug. PCIE device support hot plug includes PCIE device support hot plug and hot unplug. The PCIE device not supporting hot plug includes the PCIE device not supporting hot plug and hot unplug.
For example, whether the PCIE device supports hot plug may be determined according to the content of the hot plug identifier. For example, if the hot plug flag is 1, the PCIE device is indicated to support hot plug, and if the hot plug flag is 0, the PCIE device is indicated to not support hot plug.
It should be noted that, in this embodiment, how the hot plug identifier specifically indicates whether the PCIE device supports hot plug is not limited, and the above examples are merely illustrative.
The hot plug configuration information comprises a hot plug configuration identifier and configuration information of PCIE equipment. The hot plug configuration identifier is used to indicate the presence or absence of configuration information.
It may be understood that the presence configuration information refers to configuration information of PCIE devices stored in PCIE devices, and the absence configuration information refers to configuration information of PCIE devices not stored in PCIE devices.
In the application, the configuration information of the PCIE device includes one or more of configuration information of GPIOs of the PCIE device, configuration information of registers, configuration information of port modes, and configuration information of an optional read-only memory.
In the application, the configuration information of the PCIE equipment comprises hot plug configuration information and hot unplug configuration information.
The hot plug configuration information is configuration information executed when the PCIE device is hot plugged, and the configuration operation indicated by the hot plug configuration information may be referred to as a hot plug configuration operation, specifically, a configuration operation executed on the PCIE device after the PCIE device is hot plugged. The hot-pull configuration information is configuration information executed when the PCIE device is hot-pulled, and a configuration operation indicated by the hot-pull configuration information may be referred to as a hot-pull configuration operation, specifically, a configuration operation executed on the PCIE device before the PCIE device is hot-pulled.
Because the configuration of the GPIO, the configuration of the register, the configuration of the port mode and the configuration of the optional read-only memory affect the working safety and the unplugging safety of the PCIE device, the configuration information of the GPIO, the configuration information of the register, the configuration information of the port mode and the configuration information of the optional read-only memory are stored in the PCIE device in advance, so that when the PCIE device is hot plugged, the configuration operations corresponding to the configuration information are executed, and the improvement of the reliability of the hot plug of the PCIE device is facilitated.
In the application, the firmware of the PCIE equipment maps the data content of the hot plug identification and the hot plug configuration information to the logic address segment of the PCIE configuration space, so that the CPU of the computer system can access the hot plug identification and the hot plug configuration information. That is, the hot plug identifier and the hot plug configuration information may be stored in the PCIE configuration space.
Because the PCIE configuration space technology is utilized for expansion, the hot plug identification and the hot plug configuration information are stored in the PCIE configuration space, and the PCIE configuration space supports CPU and OS read-write, the achievement and convenience of reading the hot plug identification and the hot plug configuration information are improved.
In the present application, how to store hot plug identification and hot plug configuration information in a PCIE configuration space includes multiple implementation manners, and hereinafter, an exemplary description is made through modes 1 to 2.
Mode 1: and storing the hot plug identification and the hot plug configuration information in the PCIE expansion configuration space.
That is, the PCIE extension configuration space includes a hot plug identifier and hot plug configuration information.
The method fully utilizes the self-defining capability of the PCIE expansion configuration space, and specifically stores the hot plug identification and the hot plug configuration information in the PCIE expansion configuration space, so that the method is equivalent to expanding the PCIE expansion configuration space, does not need to change the basic configuration space of the PCIE configuration space, and is beneficial to improving the realizability and compatibility.
The PCIE extension configuration space includes a Vendor specific extension capability attribute (Vendor-Specific Extended Capability). Wherein the data structure of vendor specific extended capability attributes is shown in fig. 5.
Referring to fig. 5, vendor specific extended capability attributes include PCIE extended capability attribute header (PCIE Extened Capability Header), vendor specific header (Vendor Specific Header), and vendor specific register (Vendor Specific Registers). Wherein the PCIE extended Capability attribute header includes a Capability attribute identification (Capability ID), a Capability attribute version (Capability Version), and a next Capability attribute offset address (Next Capability Offset).
In mode 1, the hot plug identification and hot plug configuration information may be stored in a vendor specific register of vendor specific scalability attributes.
The PCIE extends the data structures of the hot plug identifier and the hot plug configuration information in the configuration space, as shown in fig. 6.
Referring to fig. 6, the vendor specific registers include therein a hot plug identifier (Hot Plug Identification), a hot plug configuration identifier (Hot Plug Setting Identification), and fields 11 through 14, … …, and N1 through N4. The fields 11 to 14 are used for storing the content of the configuration information 1, … …, and the fields N1 to N4 are used for storing the content of the configuration information N.
Hereinafter, the contents of the hot plug configuration information will be exemplarily described using the fields 11 to 14 as examples.
The field 11 may be a Length (Length) for indicating the data area Length of the configuration information 1. The field 12 may be a Mask (Mask) for indicating whether the configuration information 1 needs to be executed. The field 13 may be a Data area of configuration information (Setting Data), which is the content of configuration information 1. The field 14 may be a Next item (Next) for indicating whether Next item of configuration information exists.
In mode 1, the PCIE extension configuration space is used to store hot plug identification and hot plug configuration information, for example, vendor specific extension capability attribute (Vendor-Specific Extended Capability) is helpful to provide a unified interface for CPU and OS, so as to improve compatibility of PCIE devices, and avoid differentiation when reading hot plug identification and hot plug configuration information of different PCIE devices.
Mode 2: the hot plug identification and the hot plug configuration information are stored in the expansion space.
That is, the expansion space includes a hot plug identifier and hot plug configuration information.
According to the method, the self-defining capability of the expansion space is fully utilized, and the hot plug identification and the hot plug configuration information are specifically stored in the expansion space, so that the expansion of the expansion space is equivalent, the basic configuration space of the PCIE configuration space is not required to be changed, and the achievement and the compatibility are improved.
In mode 2, based on the expansion space including a plurality of sequentially stored read-only images, the hot plug identifier and the hot plug configuration information may be stored in a last read-only image of the plurality of read-only images. Thus, the method is equivalent to one expansion of the existing data structure of the expansion space, the original data structure of the expansion space does not need to be changed, and the method is beneficial to improving the realizability and compatibility.
The data structures of the hot plug identifier and the hot plug configuration information in the expansion read-only memory are shown in fig. 7.
Referring to fig. 7, the extension space includes mirror 0, mirror N. Wherein, mirror 0 includes the contents of extension space header (expansion ROM header), PCI data structure (PCI Data Structure), mirror 0.
Illustratively, the PCI data structure includes an Image identifier (Identification), a Length (Length), an Image Type (Image Type), a last Image identifier (Last Image Indicator), and so on. The contents of mirror 0 include unified extensible firmware interface (unified extensible firmware interface, UEFI) drivers.
For example, when the expansion space includes N read-only images and the last read-only image is image N, then image N includes a hot plug identifier and hot plug configuration information. For a description of the data structure of the hot plug identifier and the hot plug configuration information, refer to mode 1, and details thereof are not repeated here.
The data formats of the extended space header (expansion ROM header) and the PCI data structure (PCI Data Structure) area are defined by specifications.
It should be noted that, the other mirrored data structures refer to mirror 0, which is not described herein.
Hereinafter, an embodiment of the hot plug method of the present application will be exemplarily described with reference to fig. 8 to 9.
FIG. 8 is a flowchart illustrating a hot plug method according to an example embodiment. Illustratively, the hot plug method includes the following S801-S805.
S801: the CPU receives a hot plug request, and the hot plug request is used for requesting hot plug of PCIE equipment.
Wherein the hot plug request includes a hot plug request or a hot unplug request. Wherein, the hot plug request is used for requesting hot plug, and the hot pull request is used for requesting hot pull.
In this embodiment, if the hot plug controller detects that the PCIE device is hot plugged into the PCIE slot, the hot plug controller sends a hot plug request to the CPU.
Illustratively, the hot-plug request includes a slot identification and a first event identification. The slot position identification is used for indicating the PCIE slot position, and the slot position identification and the PCIE slot position have unique corresponding relation. The first event identifier is used for indicating a hot plug event of the PCIE device on the PCIE slot corresponding to the slot identifier.
For example, after the PCIE device inserts the PCIE slot, the PCIE slot may generate an in-place signal, and when the hot plug controller detects the in-place signal, it may determine that the PCIE device inserts the PCIE slot, and send a hot plug request to the CPU.
Note that, since the hot-plug request is sent after the PCIE device inserts the PCIE slot, the hot-plug request may also be considered as the PCIE device requesting hot-plug.
In this embodiment, if the hot plug controller receives a hot plug notification, the hot plug controller sends a hot plug request to the CPU.
Illustratively, the hot-pull request includes a slot identification and a second event identification. The second event identifier is used for indicating a hot unplugging event of the PCIE device on the PCIE slot corresponding to the slot identifier.
How the hot plug controller receives the hot plug notification includes various implementations, and the following exemplary descriptions are made in modes a to b.
Mode a: and the hot plug controller receives a hot plug notification sent by the PCIE slot.
In this way, the computer system includes notification buttons, where the notification buttons correspond to PCIE slots one by one. The notification button may be disposed on a motherboard of the computer system. The notification button includes a trigger state for indicating to send a hot-pull notification, e.g., to a hot-plug controller.
When the user needs to pull out the PCIE device from the PCIE slot, the user sets the notification button to a trigger state, for example, may be to press the notification button to make the notification button be in the trigger state, so that the PCIE slot corresponding to the notification button sends a hot-pull notification to the hot-plug controller.
Mode 2: the hot plug controller receives a hot plug notification sent by the management controller.
In this manner, the client of the management controller includes a notification control. The notification control is used for indicating to send a hot pull notification.
When a user needs to pull out a PCIE device from a PCIE slot, the user logs in a client of the management controller through the electronic device, inputs a slot identifier, and performs a triggering operation on the notification control, for example, clicks the notification control, the management controller obtains the slot identifier in response to the triggering operation and the input operation on the notification control, and sends a hot-pull notification to the hot-plug controller, where the hot-pull notification includes the slot identifier, the slot identifier is used to indicate the PCIE slot, and the hot-pull notification is used to notify that hot-pull is to be performed on the PCIE device on the PCIE slot indicated by the slot identifier.
Since the hot-pull request is sent before the PCIE device pulls out the PCIE slot, the hot-pull request may be considered as a request for hot-pulling out the PCIE device.
S802: and the CPU responds to the hot plug request to acquire the hot plug identification of the PCIE equipment.
In this embodiment, after receiving the hot plug request, the CPU reads or checks the hot plug identifier in the firmware of the PCIE device, and determines, according to the hot plug identifier, whether the PCIE device supports hot plug.
Illustratively, the CPU sends a read instruction to the PCIE device, where the read instruction includes a logical address a, where the logical address a is used to store a hot plug identifier. After receiving the reading instruction, the PCIE device returns the data content in the physical address a corresponding to the logical address a to the CPU, where the physical address a stores the hot plug identifier.
Referring to fig. 9, during the process of running the OS by the CPU, the OS reads or checks the hot plug identifier in the PCIE device space to determine whether the PCIE device supports hot plug.
S803: and the CPU determines whether the PCIE equipment supports hot plug according to the hot plug identification.
If the determination result is yes, S803 is executed, and if the determination result is no, S804 is executed.
In this embodiment, whether the PCIE device supports hot plug may be determined according to the content of the hot plug identifier. For example, if the hot plug flag is 1, the PCIE device is indicated to support hot plug, and if the hot plug flag is 0, the PCIE device is indicated to not support hot plug.
S804: and the CPU executes hot plug configuration operation on the PCIE equipment.
In this embodiment, the hot plug configuration operation includes a hot plug configuration operation or a hot plug configuration operation. In the case where the hot plug request is a hot plug request, S804 may be regarded as "performing a hot plug configuration operation on the PCIE device". In the case where the hot plug request is a hot plug request, S804 may be regarded as "performing a hot plug configuration operation on the PCIE device".
For example, if the hot plug request is a hot plug request and the PCIE device supports hot plug, the PCIE device is allowed to insert a PCIE slot when the computer system is not powered off, that is, the PCIE device hot plug is operated. If the hot plug request is a hot plug request and the PCIE device supports hot plug, the PCIE device is allowed to be pulled out from the PCIE slot under the condition that the computer system is not powered off, that is, the PCIE device is allowed to be pulled out.
It should be noted that, for a specific implementation manner of "performing hot plug configuration operation on PCIE devices", reference may be made to S1006-S1008 and S1109-S1111 in the following embodiments, and for a specific implementation manner of "performing hot unplug configuration operation on PCIE devices", reference may be made to S1204-S1209 and S1306-S1311 in the following embodiments, which are not described herein again.
Optionally, S805: and outputting prompt information, wherein the prompt information is used for indicating that the PCIE equipment does not support hot plug.
In this embodiment, if the PCIE device does not support hot plug, hot plug of the PCIE device should be prohibited, that is, the PCIE device is not allowed to be hot plugged into the PCIE slot, or the PCIE slot is hot plugged out.
For example, if the hot plug request is a hot plug request and the PCIE device does not support hot plug, then the PCIE device is not allowed to insert PCIE slots if the computer system is not powered down. If the hot plug request is a hot plug request and the PCIE device does not support hot plug, the PCIE device is not allowed to be pulled out from the PCIE slot under the condition that the computer system is not powered off.
It should be noted that, as to how to prohibit hot plug of PCIE devices, reference may be made to S1009-S1012 and S1113-S1116 in the following embodiments, and as to how to prohibit hot unplug of PCIE devices, reference may be made to S1210-S1211 and S1312-S1313 in the following embodiments, which are not described herein.
In the above embodiment, after receiving the hot plug request, the hot plug request is used for requesting to perform hot plug on the PCIE device, determining whether the PCIE device supports hot plug through the obtained hot plug identifier, if the hot plug identifier indicates that the PCIE device supports hot plug, performing hot plug configuration operation on the PCIE device, so as to complete a hot plug flow of the PCIE device, otherwise, outputting prompt information to indicate that the PCIE device does not support hot plug, so as to interrupt the hot plug flow of the PCIE device. Therefore, on one hand, the PCIE equipment hot plug which does not support hot plug can be prevented from working abnormally or being damaged after hot plug of the PCIE equipment which does not support hot plug, the application of a computer system is affected, and further the reliability of the PCIE equipment hot plug is improved. On the other hand, under the condition that the PCIE device supports hot plug, hot plug configuration operation can be guaranteed to be executed on the PCIE device, so that configuration of the PCIE device is matched with hot plug, the probability that the PCIE device can work normally after hot plug of the PCIE device is improved, and further the reliability of hot plug of the PCIE device is improved.
In the following, an exemplary description is given of a scheme of the hot insertion method provided by the present application with reference to fig. 10.
Fig. 10 is a flowchart illustrating a hot-plug method according to an example embodiment. Illustratively, the hot-plug method includes the following S1001-S1012.
S1001: and the hot plug controller responds to the detection that the PCIE equipment is inserted into the PCIE slot, and sends a hot plug request to the CPU.
For the description of S1001, reference may be made to S801, which is not described herein.
S1002: and the CPU responds to the received hot plug request and sends a power-on notification to the hot plug controller.
The power-on notification is used for notifying the hot plug controller to power on PCIE equipment.
In this embodiment, the CPU forwards the power-on notification to the hot plug controller to instruct the hot plug controller to power on the PCIE slot, thereby implementing power on the PCIE device on the PCIE slot.
S1003: and the hot plug controller responds to the power-on notification to power on the PCIE equipment.
In this embodiment, the hot plug controller sends a power-on instruction to the power supply device, where the power-on instruction is used to instruct the power supply device to power up the PCIE device. The hot plug controller sends a power-on instruction to a power supply controller of the power supply device, and the power supply controller responds to the power-on instruction to control the power supply to power on the PCIE device.
S1004: and the CPU acquires the hot plug identification of the PCIE equipment.
For a description of S1004, reference may be made to S802 described above, which is not repeated here.
It should be noted that S1003-S1004 may be regarded as a specific implementation of S802.
S1005: and the CPU determines whether the PCIE equipment supports hot plug according to the hot plug identification.
If the determination is yes, S1006 to S1008 are performed, and if the determination is no, S1009 to S1012 are performed.
In this embodiment, if the PCIE device is powered on, during the process of running the OS by the CPU, the OS reads the hot plug identifier in the PCIE device, so as to determine whether the PCIE device supports hot plug according to the hot plug identifier.
For other descriptions of S1005, reference may be made to S803, which is not described herein.
Optionally, S1006: and the CPU determines whether the PCIE equipment stores hot plug configuration information according to the hot plug configuration identifier.
If the determination is yes, S1007 is performed. If the result is negative, the execution is ended.
In this embodiment, when the PCIE device supports hot plug, the CPU reads or checks a hot plug configuration identifier in firmware of the PCIE device, and determines, according to the hot plug configuration identifier, whether the PCIE device configures hot plug configuration information.
Illustratively, during the process of running the OS by the CPU, the OS reads the hot plug configuration identifier in the PCIE configuration space to determine whether hot plug configuration information is stored in the PCIE device.
In this embodiment, through the hot plug configuration identifier, it is determined whether hot plug configuration information is stored in the PCIE device, if the determination result is yes, execution is performed, otherwise, not performed. Compared with directly reading the firmware of the PCIE device and executing when the hot plug configuration information is read, the method is beneficial to saving the overhead of program processing.
S1007: the CPU executes the hot plug configuration operation indicated by the hot plug configuration information on the PCIE device.
The hot plug configuration operation comprises at least one configuration operation in a plurality of configuration operations required to be executed by the PCIE device when the computer system is powered on.
In this embodiment, the hot-plug configuration information includes one or more of configuration information of a register of the PCIE device, configuration information of a port mode, and configuration information of an optional read-only memory.
It should be noted that, the hot plug configuration information of different PCIE devices may be the same or may be different, which is merely illustrative, and this embodiment is not limited to this.
If the PCIE device needs to configure part of the configuration information after powering up, so that the PCIE device can work normally on the computer system, the part of the configuration information may be stored in the PCIE device as hot plug configuration information.
In this embodiment, when it is determined that the PCIE device stores hot plug configuration information, the CPU obtains the hot plug configuration information, and executes hot plug configuration operation indicated by the hot plug configuration information on the PCIE device, so that the PCIE device normally completes the hot plug configuration operation, and therefore the PCIE device can normally work on the computer system.
Illustratively, during the process of running the OS by the CPU, the OS obtains hot plug configuration information, and executes hot plug configuration operations indicated by the hot plug configuration information on the PCIE device.
Because the PCIE device and the computer system are powered up together when the computer system is conventionally powered up for initialization, during the process of the CPU running the BIOS, the BIOS performs a plurality of configuration operations on the PCIE device, so that the PCIE device may work normally on the computer system. When the PCIE device is inserted into the PCIE slot when the computer system is already in the normal running state, the CPU does not run the BIOS any more, that is, the BIOS cannot perform the configuration operation on the PCIE device any more.
Based on the above, under the condition that the PCIE device is hot-plugged into the PCIE slot, by executing the hot-plug configuration operation indicated by the hot-plug configuration information, configuration perfection and accuracy of the PCIE device after the PCIE device is powered on again can be ensured, and abnormal work or partial function incapability of realizing of the PCIE device due to incomplete configuration of the PCIE device is avoided, so that the hot plug of the PCIE device is controlled more perfectly, and further, the reliability of the hot plug of the PCIE device is further improved.
Hereinafter, S1007 is exemplarily described using PCIE devices as network cards, such as Ethernet (Eth), where the network cards include configuration information of port modes.
For example, the Eth network card supports a multi-channel characteristic, that is, a physical port support of the Eth network card is divided into a plurality of logical channels, where one logical channel corresponds to one Eth port in the OS. The multi-channel feature needs to be configured in the port mode setting of the Eth network card, for example, the multi-channel feature may include enabling/disabling of the multi-channel feature, bandwidth of each logical channel, virtual local area network (virtual local area network, VLAN) identification of each logical channel, and so on.
When the Eth network card is inserted into the slot, the OS executes configuration operation corresponding to the configuration information of the port mode, that is, configuration operation of the port mode with multi-channel characteristics, so that after the Eth network card is inserted into the PCIE slot, the multi-channel function can operate normally, the condition of losing the network port is avoided, the functional integrity of the Eth network card is affected, and further the Eth network card is facilitated to realize the complete function.
It should be noted that S1006-S1007 may be regarded as a specific implementation of "performing hot plug configuration operation on PCIE device" in S804.
Optionally, S1008: the CPU runs the driver of the PCIE device.
The driving of the PCIE device is used for accessing the PCIE device.
In this embodiment, in the process that the CPU runs the OS, the OS runs the driver of the PCIE device, so that the driver of the PCIE device may run in the OS, and further, the OS may access the PCIE device through the driver of the PCIE device.
The driving of the PCIE device is operated only when the hot plug identification indicates that the PCIE device supports hot plug, so that the situation that the PCIE device is abnormal when the PCIE device is accessed through the driving when the PCIE device does not support hot plug is avoided compared with the driving of the PCIE device operated when the PCIE device is uncertain whether the PCIE device supports hot plug is avoided, and the normal application of a computer system is not affected because the PCIE device works abnormally.
It should be noted that S1008 may be regarded as another specific implementation of "performing hot plug configuration operation on PCIE device" in S804.
In this scheme, the computer system may further include a first indicator light, where the first indicator light is used to indicate a hot plug state of the PCIE device. Wherein the hot plug state includes one or more of a first state, a second state, and a third state. The first state is that the PCIE device has been operating normally. The second state is that hot plug configuration information or hot unplug configuration information is being executed on the PCIE device, and the third state is that the PCIE device can be unplugged from the PCIE slot.
The first state may be indicated by the first indicator light being on, the second state may be indicated by the first indicator light flashing, and the third state may be indicated by the first indicator light being off.
It should be noted that, the present embodiment does not limit how the first indicator light indicates the first state, the second state and the third state, and the above is only exemplary.
It can be appreciated that, when performing hot unplugging configuration information on PCIE devices, PCIE devices cannot be unplugged from PCIE slots.
For example, the first indicator light may be mounted on a motherboard of the computer system or on the PCIE device.
It should be noted that, in this embodiment, the installation position of the first indicator lamp is not limited, and the above is only exemplary.
Optionally, S1009: the CPU outputs prompt information, and the prompt information is used for indicating that the PCIE equipment does not support hot plug.
In this embodiment, how to output the prompt information includes various implementations, and in the following, exemplary descriptions are made through modes a to C.
Mode a: the OS outputs the hint information.
In the method, in the process of operating the OS by the CPU, the OS prints a system message which comprises prompt information, so that the prompt information is output.
The OS prints a system message (message), which may be a pop-up system message at the OS interface, for example.
Mode B: the management controller outputs prompt information.
In this mode, the CPU sends the prompt message to the management controller, and after receiving the prompt message, the management controller sends the prompt message to the client of the management controller, and the client of the management controller outputs the prompt message.
Mode C: the indicator light outputs a prompt message.
In this manner, the computer system includes a second indicator for indicating that the PCIE device does not support hot plug. For example, when the second indicator is in a flashing state or a normally-on state, the PCIE device is indicated not to support hot plug.
The initial state of the second indicator light is a normally-off state, and after the user inserts the PCIE device into the PCIE slot, the user finds that the second indicator light is switched to a blinking state or a normally-on state, and at this time, the user may determine that the PCIE device does not support hot plug.
For example, the second indicator light may be mounted on a motherboard of the computer system or on a PCIE device. It should be noted that, the present embodiment does not limit the installation position of the second indicator lamp, and the above is only exemplary.
According to the embodiment, the prompt information is output in the mode A to the mode C, so that the output diversity of the prompt information is improved, the hot plug state of PCIE equipment can be accurately presented, a user is informed that the PCIE equipment does not support hot plug, the user can timely replace the PCIE equipment, abnormal work or damage of the PCIE equipment which does not support hot plug after hot plug is caused by the fact that the user hot plug of the PCIE equipment which does not support hot plug is avoided, the application of a computer system is affected, and the reliability of the hot plug of the PCIE equipment is improved.
Optionally, S1010: and the CPU generates log information, and the log information is used for recording that the PCIE equipment does not support hot plug and/or the PCIE equipment does not execute hot plug.
In this embodiment, during the process of running the OS by the CPU, the OS generates log information (also referred to as an OS log) for recording that the PCIE device does not support hot plug and/or the PCIE device does not execute hot plug, so as to be used for system operation and maintenance.
By way of example, the log information may be stored in a storage medium of the computer system, for example, in a hard disk of the computer system.
Alternatively, S1011: and the CPU sends a power-down notification to the hot plug controller, wherein the power-down notification is used for notifying that the PCIE equipment is powered down.
In this embodiment, during the process of running the OS by the CPU, the OS sends a power-down notification to the CPU. The CPU forwards a power-down notification to the hot plug controller to instruct the hot plug controller to power down the PCIE slot, thereby realizing power down of PCIE equipment on the PCIE slot.
Optionally, S1012: and the hot plug controller responds to the power-down notification to power down the PCIE equipment.
The execution order of S1009 to S1012 is not limited by the present application.
In this embodiment, the hot plug controller sends a power-down instruction to the power supply device, where the power-down instruction is used to instruct the power supply device to power down the PCIE device. The hot plug controller sends a power-down instruction to a power controller of the power supply device, and the power controller responds to the power-down instruction to control the power supply to power down the PCIE device.
In this embodiment, when the PCIE device does not support hot plug, the PCIE device is powered down, so that the situation that the PCIE device does not support hot plug is hot plugged and is used by the computer system to cause abnormal operation is avoided, thereby avoiding affecting normal application of the computer system due to abnormal operation of the PCIE device, and further helping to improve reliability of hot plug of the PCIE device.
The hot plug method described in the above embodiment is a scheme for managing hot plug of PCIE devices according to whether the PCIE devices support hot plug. In the following, referring to fig. 11, another hot plug method provided by the present application is described as an example, and unlike the above embodiment, this embodiment is a scheme for managing hot plug of PCIE devices according to whether PCIE devices support hot plug and whether PCIE slots support hot plug.
FIG. 11 is a flowchart illustrating a method of hot insertion according to an exemplary embodiment. The hot-plug method includes, for example, the following S1101-S1116.
S1101: see S1001 above.
S1102: and the CPU responds to the received hot plug request, and determines whether the PCIE slot supports hot plug.
If the determination result is negative, S1103 is executed. If the determination is yes, S1104 is executed.
In this embodiment, after receiving the hot plug request, the CPU responds to the hot plug request to obtain a first hot plug identifier of the PCIE slot, where the first hot plug identifier is used to indicate that the PCIE slot supports hot plug or does not support hot plug. Based on this, the CPU may determine, according to the obtained first hot plug identifier, whether the PCIE slot supports hot plug.
Illustratively, upon receiving the hot plug request, the CPU forwards the hot plug request to the OS. During the process of operating the OS by the CPU, the OS responds to the hot plug request to determine whether the PCIE slot supports hot plug.
Illustratively, the OS reads a Slot Capability (Slot Capability) register of the PCIE Slot, where the Slot Capability register includes a hot plug flag bit, where the hot plug flag bit includes a first hot plug identifier of the PCIE Slot, and is configured to indicate whether the PCIE Slot performs hot plug. For example, when the hot plug flag bit is 1, the PCIE slot bit is indicated to support hot plug, and when the hot plug flag bit is 0, the PCIE slot bit is indicated to not support hot plug.
S1103: the CPU outputs first prompt information, wherein the first prompt information is used for indicating that the PCIE slot does not support hot plug.
The relevant description of S1103 may refer to S1009, and will not be repeated here.
In this embodiment, the user is notified that the PCIE slot does not support hot plug through the first output prompt information, so that the user can detect the slot configuration of the computer system according to the first prompt information, which is helpful for the user to replace the PCIE slot in time, so as to configure the slot supporting hot plug for the computer system.
S1104: the CPU sends a power-up notification to the hot plug controller, which is used to notify power-up for the PCIE device.
For a description of S1104, reference may be made to S1002, which is not repeated herein.
S1105: see S1003 above.
S1106: and the CPU allocates PCIE resources for the PCIE equipment.
The PCIE resources include a memory space, a Bus (Bus) number, a Device (Device) number, and a Function (Function) number. By allocating a memory space, a Bus (Bus) number, a Device (Device) number and a Function (Function) number to the PCIE Device, the OS and an application layer running on the OS may perform data interaction with the PCIE Device.
In this embodiment, during the process of running the OS by the CPU, the OS enumerates PCIE devices, and allocates PCIE resources for the PCIE devices. The OS then writes the Bus (Bus) number, device (Device) number, and Function (Function) number into the PCIE Device's basic configuration space for subsequent communications.
Illustratively, enumerating PCIE devices may include reading register configuration information on PCIE devices, which may include Vendor identification (Vendor ID), device identification (Device ID), and so forth, for example.
S1107-S1111: see S1004-S1008 above.
S1112: the CPU releases the PCIE resources allocated to the PCIE device.
In this embodiment, during the process of running the OS by the CPU, the OS releases the PCIE resource allocated to the PCIE device. After the OS releases the PCIE resources allocated to the PCIE devices, the memory space may be reallocated to other applications or other PCIE devices, and PCIE addresses may be reallocated to other PCIE devices, so that it is possible to avoid that PCIE devices that are not currently used occupy PCIE resources, and this is helpful for improving the utilization rate of PCIE resources.
S1113-S1116: see S1009-S1012 above.
The execution order of S1112 to S1116 is not limited by the present application.
In the above embodiment, when the hot plug request is received, it is first determined whether the PCIE slot supports hot plug, if so, it is determined whether the PCIE device supports hot plug, otherwise, a prompt message that the PCIE slot does not support hot plug is output, so that when the PCIE slot does not support hot plug and the PCIE device supports hot plug, the PCIE device is prevented from being hot-plugged into the PCIE slot, so that after the PCIE device is hot-plugged into the PCIE slot, the PCIE device cannot work normally, and further the reliability of hot plug of the PCIE device is improved.
In addition, because the PCIE slot belongs to a component of the computer system and the PCIE device belongs to a peripheral component, that is, whether the PCIE slot supports hot plug belongs to a capability of the computer system itself, it is determined whether the PCIE slot supports hot plug first, if the PCIE slot does not support hot plug, it is unnecessary to determine whether the PCIE device supports hot plug any more, and compared with determining whether the PCIE device supports hot plug first and then determining whether the PCIE slot supports hot plug, it is helpful to improve operation efficiency.
The above embodiments describe a scheme of the hot-plug method. The hot extraction scheme is described below by way of example with reference to fig. 12.
Fig. 12 is a flowchart illustrating a hot extraction method according to an exemplary embodiment. The hot extraction method includes, for example, the following S1201-S1211.
S1201: the hot plug controller sends a hot plug request to the CPU in response to the received hot plug notification.
For the description of S1201, reference may be made to S801, which is not repeated here.
S1202: and the CPU acquires the hot plug identification of the PCIE equipment.
For the description of S1202, reference may be made to S802, which is not described herein.
S1203: and the CPU determines whether the PCIE equipment supports hot plug according to the hot plug identification.
If the determination is yes, S1204-1209 are performed. If the determination result is negative, S1210-S1211 is performed.
For the description of S1203, reference may be made to S803 above, and the description is omitted here.
Optionally, S1204: and the CPU determines whether the PCIE equipment stores the hot plug configuration information according to the hot plug configuration identifier.
If the determination is yes, S1205 is executed, and if the determination is no, the process ends.
For the description of S1204, reference may be made to S1006, which are the same principle and are not repeated here.
S1205: and the CPU executes the hot-pull configuration operation indicated by the hot-pull configuration information on the PCIE equipment.
The hot-unplugged configuration operation is used for modifying the configuration of the PCIE device.
In this embodiment, the hot-unplugged configuration information includes one or more of configuration information of GPIOs of PCIE devices, configuration information of registers, configuration information of port modes, and configuration information of an optional read-only memory.
It should be noted that, the hot-unplugged configuration information of different PCIE devices may be the same or may be different, which is merely illustrative, and this embodiment is not limited to this.
In this embodiment, during the process of operating the OS by the CPU, the OS reads the hot-pull configuration information in the PCIE device, and executes the hot-pull configuration operation indicated by the hot-pull configuration information on the PCIE device, so that configurations that may cause damage to the PCIE device can be modified before the PCIE device is hot-pulled, which is helpful for ensuring that the modified configurations of the PCIE device are matched with the hot-pull, thereby helping to avoid the problem that the PCIE device is powered down and pulled out due to the configuration of the PCIE device, for example, causing damage to the PCIE device when the PCIE device is hot-pulled out, and further helping to improve the reliability of hot-plug of the PCIE device.
Hereinafter, S1204 will be exemplarily described taking the example that the hot-pull configuration information includes configuration information of GPIOs.
In this embodiment, the PCIE device includes a controller, a GPIO, a management module, and an environment monitoring module, where the controller is connected to the management module and the environment monitoring module through the GPIO, for example, may be connected by setting the GPIO to an interface of an internal integrated circuit (inter integrated circuit, I2C). The management module comprises management information such as board type number and version number information. The environment monitoring module comprises monitoring information such as monitoring environment temperature.
In this embodiment, the power supply apparatus includes a main power source and an auxiliary power source. The auxiliary power supply is used for supplying power to the management module and the environment monitoring module.
In the related art, if the PCIE device supports hot-plug, when the hot-plug controller powers down the PCIE device, only the main power supply is turned off and the auxiliary power supply is kept continuously powered, that is, the management module and the environment monitoring module are kept in the power supply and working states. Therefore, when PCIE equipment is hot pulled out from the PCIE slot, GPIO used for connecting the controller, the management module and the environment monitoring module is easy to generate current backflow and voltage spike, and the risk of port latch and even port damage exists.
Based on the above, before the PCIE device is hot-pulled out from the PCIE slot, GPIO configuration operations are performed on the PCIE device according to the configuration information of the GPIO, for example, the GPIO is turned off or set to a high-impedance state, so that damage to the GPIO port of the PCIE device is avoided when the PCIE device is hot-pulled out from the PCIE slot, damage to the PCIE device is avoided when the PCIE device is hot-pulled out, and further reliability of hot-pulled out of the PCIE device is improved.
For the description of S1205, reference may be made to S1007, which is the same principle, and will not be repeated here.
It should be noted that S1204-S1205 may be regarded as a specific implementation of "performing hot unplugging configuration operation on PCIE device" in S803.
Optionally, S1206: the CPU stops accessing the PCIE device.
In this embodiment, during the process of running the OS by the CPU, the OS sends a silence notification to the driver of the PCIE device, so that the driver of the PCIE device no longer accesses the PCIE device, that is, the driver of the PCIE device no longer performs read-write communication on the PCIE device, thereby enabling the CPU to stop accessing the PCIE device. Therefore, after the PCIE equipment is hot pulled out, the OS continues to access the PCIE equipment through the drive of the PCIE equipment, so that the problem that an access process waits and hangs up to influence the normal operation of the OS due to the fact that the response of the PCIE equipment cannot be received for a long time is avoided.
Note that S1206 may be regarded as a specific implementation of "perform hot unplugging configuration operation on PCIE device" in S804.
Optionally, S1207: the CPU releases the PCIE resources allocated to the PCIE device.
For the description of S1207, reference may be made to S1112, which is not repeated here.
It should be noted that S1207 may be regarded as a specific implementation of "performing hot-unplugged configuration operation on PCIE device" in S804.
S1208: and the CPU sends a power-down notification to the hot plug controller, wherein the power-down notification is used for notifying that the PCIE equipment is powered down.
For the description of S1208, reference may be made to S1010 described above, which is not repeated here.
S1209: and the hot plug controller responds to the power-down notification to power down the PCIE equipment.
For the description of S1209, reference may be made to S1011, which is not described here.
It should be noted that S1208-S1209 may be regarded as a specific implementation manner of "performing hot-unplugged configuration operation on PCIE device" in S804.
The execution sequence of S1206 to S1209 is not limited by the present application.
Alternatively, S1210: the CPU outputs prompt information, and the prompt information is used for prompting that the PCIE equipment does not support hot plug.
For the description of S1210, reference may be made to S1009, which is not repeated here.
It should be noted that S1210 may be regarded as a specific implementation manner of prohibiting hot-unplugging of PCIE devices in S805.
Optionally, S1211: and the CPU generates log information, and the log information is used for recording that the PCIE equipment does not support hot plug and/or the PCIE equipment does not execute hot plug.
The relevant description of S1211 may refer to S1010 described above, and will not be repeated here.
It should be noted that S1211 may be considered as a specific implementation manner of prohibiting hot-unplugging of PCIE devices in S804.
The hot-plug method described in the above embodiment is a scheme for managing hot-plug of PCIE devices according to whether the PCIE devices support hot-plug. In the following, referring to fig. 13, another hot-plug method provided by the present application is described as an example, and unlike the above embodiment, this embodiment is a scheme for managing hot-plug of PCIE devices according to whether PCIE devices support hot-plug and whether PCIE slots support hot-plug.
Fig. 13 is a flowchart illustrating a hot extraction method according to an exemplary embodiment. The hot extraction method includes, for example, the following S1301 to S1313.
S1301: see S1201 above.
S1302: the CPU responds to the hot-plug request to determine whether the PCIE slots support hot-plug.
If the determination result is no, S1303 is executed. If the determination is yes, S1304 is performed.
For the description of S1302, reference may be made to S1102, which are the same as the above description, and the description thereof is omitted here.
S1303: the CPU outputs first prompt information, and the first prompt information is used for prompting that the PCIE slot does not support hot plug.
For the description of S1303, reference may be made to S1103, which is not described herein.
S1304-S1313: see S1202-S1211 above.
In the above embodiment, when the hot plug notification is received, it is first determined whether the PCIE slot supports hot plug, if so, it is determined whether the PCIE device supports hot plug, otherwise, a prompt message that the PCIE slot does not support hot plug is output, so that when the PCIE slot does not support hot plug and the PCIE device supports hot plug, the PCIE slot is hot-plugged, and further, the PCIE device is helped to improve the reliability of hot plug of the PCIE device.
In addition, because the PCIE slot belongs to a component of the computer system and the PCIE device belongs to a peripheral component, that is, whether the PCIE slot supports hot plug belongs to a capability of the computer system itself, it is determined whether the PCIE slot supports hot plug first, if the PCIE slot does not support hot plug, it is unnecessary to determine whether the PCIE device supports hot plug any more, and compared with determining whether the PCIE device supports hot plug first and then determining whether the PCIE slot supports hot plug, it is helpful to improve operation efficiency.
The foregoing description of the solution provided by the embodiments of the present application has been mainly presented in terms of a method. In order to realize the functions, the hot plug device comprises a hardware structure and/or a software module for executing the functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
According to the method, the functional modules of the hot plug device can be divided, for example, the hot plug device can comprise each functional module corresponding to each functional division, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
By way of example, fig. 14 shows a schematic diagram of a possible configuration of a hot plug device (denoted as hot plug device 1400) according to the foregoing embodiment, where actions performed by the hot plug device 1400 are implemented by a processor of a computer system or implemented by the processor executing corresponding software, where the computer system includes a PCIE device, and the PCIE device has a hot plug identifier stored therein, where the hot plug identifier is used to indicate that the PCIE device supports hot plug or does not support hot plug. The hot plug apparatus 1400 includes a receiving unit 1401, an acquiring unit 1402, and a processing unit 1403. A receiving unit 1401, configured to receive a hot plug request; the hot plug request is used for requesting hot plug of the PCIE device. For example, S801 shown in fig. 8. The obtaining unit 1402 is configured to obtain a hot plug identifier of the PCIE device. For example, S802 shown in fig. 8. The processing unit 1403 is configured to execute a hot plug configuration operation on the PCIE device if the hot plug identifier indicates that the PCIE device supports hot plug. For example, S803-S804 as shown in FIG. 8.
Optionally, the PCIE device further stores configuration information of the PCIE device; the processing unit 1403 specifically functions to: acquiring configuration information of PCIE equipment stored in the PCIE equipment; and executing the configuration operation indicated by the configuration information of the PCIE equipment on the PCIE equipment.
Optionally, the configuration information of the PCIE device includes one or more of configuration information of a general purpose input output GPIO of the PCIE device, configuration information of a register, configuration information of a port mode, and configuration information of an optional read only memory.
Optionally, the PCIE device further stores a hot plug configuration identifier; the processing unit 1403 specifically functions to: and under the condition that the hot plug configuration identifier indicates that the PCIE equipment stores configuration information, acquiring the configuration information of the PCIE equipment stored in the PCIE equipment.
Optionally, the hot plug configuration identifier and the configuration information of the PCIE device are stored in a PCIE configuration space mapped by firmware of the PCIE device.
Optionally, the PCIE configuration space includes a PCIE extension configuration space, where the extension configuration space is used to store capability attribute information of the PCIE device, and the PCIE extension configuration space includes a hot plug configuration identifier and configuration information of the PCIE device; or the PCIE configuration space comprises an expansion space, the expansion space is used for storing the image file of the PCIE device, and the expansion space comprises a hot plug configuration identifier and configuration information of the PCIE device.
Alternatively, in the case where the hot plug request is a hot plug request, the processing unit 1403 is specifically configured to: and running the drive of the PCIE device.
Optionally, in the case that the hot plug request is a hot plug request, the processing unit 1403 is further configured to: releasing PCIE resources allocated to the PCIE equipment; and/or controlling PCIE equipment to power down; and/or cease accessing PCIE devices.
Optionally, the processing unit 1403 is further configured to: if the hot plug identifier indicates that the PCIE device does not support hot plug, outputting prompt information, where the prompt information is used to indicate that the PCIE device does not support hot plug.
Optionally, the processing unit 1403 is further configured to: if the hot plug identification indicates that the PCIE equipment does not support hot plug, generating log information; the log information is used for recording that the PCIE device does not support hot plug and/or that the PCIE device does not perform hot plug.
Optionally, in the case that the hot plug request is a hot plug request, the processing unit 1403 is further configured to: if the hot plug identifier indicates that the PCIE device does not support hot plug, powering down the PCIE device.
Optionally, in the case that the hot plug request is a hot plug request, the processing unit 1403 is further configured to: and if the hot plug identification indicates that the PCIE equipment does not support hot plug, releasing PCIE resources allocated to the PCIE equipment.
Optionally, the hot plug identifier is stored in a PCIE configuration space mapped by firmware of the PCIE device.
Optionally, the PCIE configuration space includes a PCIE extension configuration space, where the extension configuration space is used to store capability attribute information of the PCIE device, and the PCIE extension configuration space includes a hot plug identifier; or the PCIE configuration space comprises an expansion space, the expansion space is used for storing the image file of the PCIE device, and the expansion space comprises a hot plug identifier.
For a specific description of the above alternative modes, reference may be made to the foregoing method embodiments, and details are not repeated here. In addition, any explanation and description of the beneficial effects of the hot plug device 1400 provided above may refer to the corresponding method embodiments described above, and will not be repeated.
The embodiment of the application also provides a computer device, which comprises a processor and a memory, wherein the processor is connected with the memory, the memory stores computer execution instructions, and the processor realizes the data processing method in the embodiment when executing the computer execution instructions. The embodiments of the present application are not limited in any way to the specific form of the computer device. For example, the computer device may be a terminal device or a network device. Wherein the terminal device may be referred to as: a terminal, user Equipment (UE), a terminal device, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, a user equipment, or the like. The terminal device may be a mobile phone, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, a tablet, a notebook, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), or the like. The network device may be a server or the like in particular. The server may be one physical or logical server, or may be two or more physical or logical servers sharing different responsibilities, and cooperate to implement various functions of the server.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform a method performed by any of the computer devices provided above.
For the explanation of the relevant content and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, and the description thereof will not be repeated here.
The embodiment of the application also provides a chip. The chip has integrated therein control circuitry and one or more ports for implementing the functions of the computer device described above. Optionally, the functions supported by the chip may be referred to above, and will not be described herein. Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above-described embodiments may be implemented by a program to instruct associated hardware. The program may be stored in a computer readable storage medium. The above-mentioned storage medium may be a read-only memory, a random access memory, or the like. The processing unit or processor may be a central processing unit, a general purpose processor, an application specific integrated circuit (application specific integrated circuit, ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic device, transistor logic device, hardware components, or any combination thereof.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the methods of the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, a website, computer, server, or data center via a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.
It should be noted that the above-mentioned devices for storing computer instructions or computer programs, such as, but not limited to, the above-mentioned memories, computer-readable storage media, communication chips, and the like, provided by the embodiments of the present application all have non-volatility.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, a website, computer, server, or data center via a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Although the application is described herein in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Although the application has been described in connection with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made without departing from the spirit and scope of the application. Accordingly, the specification and drawings are merely exemplary illustrations of the present application as defined in the appended claims and are considered to cover any and all modifications, variations, combinations, or equivalents that fall within the scope of the application. It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A method of hot-plug, the method being performed by a processor communicatively coupled to a Peripheral Component Interconnect Express (PCIE) device, the method comprising:
receiving a hot plug request; the hot plug request is used for requesting to perform hot plug on the PCIE equipment, the PCIE equipment stores a hot plug identifier, and the hot plug identifier is used for indicating that the PCIE equipment supports hot plug or does not support hot plug;
acquiring a hot plug identifier of the PCIE equipment;
and executing hot plug configuration operation on the PCIE equipment under the condition that the hot plug identifier indicates that the PCIE equipment supports hot plug.
2. The method of claim 1, wherein the PCIE device further stores configuration information of the PCIE device; the performing a hot plug configuration operation on the PCIE device includes:
acquiring configuration information of the PCIE equipment stored in the PCIE equipment;
and executing the configuration operation indicated by the configuration information of the PCIE equipment on the PCIE equipment.
3. The method of claim 2, wherein the PCIE device further stores a hot plug configuration identifier; the obtaining the configuration information of the PCIE device stored in the PCIE device includes:
And under the condition that the hot plug configuration identifier indicates that the configuration information of the PCIE equipment is stored in the PCIE equipment, acquiring the configuration information of the PCIE equipment stored in the PCIE equipment.
4. A method according to claim 2 or 3, characterized in that,
the configuration information of the PCIE device includes one or more of configuration information of a General Purpose Input Output (GPIO) of the PCIE device, configuration information of a register, configuration information of a port mode, and configuration information of an optional read only memory.
5. The method of claim 3, wherein the step of,
the hot plug identifier is stored in a PCIE configuration space mapped by firmware of the PCIE device; and/or
And the hot plug configuration identifier and the configuration information of the PCIE equipment are stored in the PCIE configuration space.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
the PCIE configuration space comprises an expansion configuration space, wherein the expansion configuration space is used for storing capability attribute information of the PCIE equipment, and the hot plug configuration identifier and the configuration information of the PCIE equipment are stored in the expansion configuration space;
or (b)
The PCIE configuration space comprises an expansion space, wherein the expansion space is used for storing an image file of the PCIE device, and the hot plug configuration identifier and the configuration information of the PCIE device are stored in the expansion space.
7. The method of any of claims 1-6, wherein, in the case where the hot plug request is a hot plug request, the performing a hot plug configuration operation on the PCIE device comprises:
and running the drive of the PCIE equipment.
8. The method of any of claims 1-7, wherein, in the case where the hot plug request is a hot plug request, the performing a hot plug configuration operation on the PCIE device comprises:
releasing PCIE resources allocated to the PCIE equipment; and/or
Powering down the PCIE equipment; and/or
And stopping accessing the PCIE equipment.
9. A PCIE device, wherein the PCIE device includes a storage medium;
the storage medium stores configuration information comprising a hot plug identifier and the PCIE device, wherein the hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug; the configuration information of the PCIE device is used to execute, on the PCIE device, a configuration operation indicated by the configuration information of the PCIE device when the hot plug identifier indicates that the PCIE device supports hot plug.
10. A computer system, comprising: a processor and a memory;
The processor is connected to the memory, the memory is used for storing computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, so that the computer system implements the method according to any one of claims 1-8.
CN202310613536.XA 2023-05-24 2023-05-24 Hot plug method, PCIE equipment and computer system Pending CN116860680A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310613536.XA CN116860680A (en) 2023-05-24 2023-05-24 Hot plug method, PCIE equipment and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310613536.XA CN116860680A (en) 2023-05-24 2023-05-24 Hot plug method, PCIE equipment and computer system

Publications (1)

Publication Number Publication Date
CN116860680A true CN116860680A (en) 2023-10-10

Family

ID=88234799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310613536.XA Pending CN116860680A (en) 2023-05-24 2023-05-24 Hot plug method, PCIE equipment and computer system

Country Status (1)

Country Link
CN (1) CN116860680A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118964263A (en) * 2024-09-27 2024-11-15 苏州元脑智能科技有限公司 A network card hot-swap configuration method, device, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118964263A (en) * 2024-09-27 2024-11-15 苏州元脑智能科技有限公司 A network card hot-swap configuration method, device, system and storage medium

Similar Documents

Publication Publication Date Title
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
TWI610167B (en) Computing device-implemented method and non-transitory medium holding computer-executable instructions for improved platform management, and computing device configured to provide enhanced management information
US8645594B2 (en) Driver-assisted base address register mapping
US20180267920A1 (en) Expansion component
US10866737B2 (en) Apparatus, method and system to store information for a solid state drive
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
WO2016074127A1 (en) Computer device and memory starting method for computer device
US10831897B2 (en) Selective enforcement of secure boot database entries in an information handling system
US9026698B2 (en) Apparatus, system and method for providing access to a device function
US10649832B2 (en) Technologies for headless server manageability and autonomous logging
CN114253749A (en) An interactive method, device, electronic device and storage medium
US10871970B1 (en) Memory channel storage device detection
US8499142B1 (en) UEFI boot loader for loading non-UEFI compliant operating systems
US10838861B1 (en) Distribution of memory address resources to bus devices in a multi-processor computing system
CN116860680A (en) Hot plug method, PCIE equipment and computer system
CN116860681A (en) Hot plug method and computer system
US11372792B1 (en) Automatic bus resource adjustment in a multiple root bridge computing system
US20150326684A1 (en) System and method of accessing and controlling a co-processor and/or input/output device via remote direct memory access
TWI840849B (en) Computing system, computer-implemented method, and computer-program product
WO2024022212A1 (en) Configuration information management method and apparatus, and server
CN116627472A (en) Firmware program upgrading method and server of high-speed peripheral component equipment
CN117453242A (en) Application updating method of virtual machine, computing equipment and computing system
CN116166493A (en) Baseboard management controller system and information recording method thereof
US11593121B1 (en) Remotely disabling execution of firmware components
CN115858274A (en) Hard disk monitoring method, electronic device and storage medium

Legal Events

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