CN117194299A - Hot plug method, PCIE equipment and management controller - Google Patents

Hot plug method, PCIE equipment and management controller Download PDF

Info

Publication number
CN117194299A
CN117194299A CN202310924387.9A CN202310924387A CN117194299A CN 117194299 A CN117194299 A CN 117194299A CN 202310924387 A CN202310924387 A CN 202310924387A CN 117194299 A CN117194299 A CN 117194299A
Authority
CN
China
Prior art keywords
hot plug
pcie
hot
pcie device
configuration
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
CN202310924387.9A
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 CN202310924387.9A priority Critical patent/CN117194299A/en
Publication of CN117194299A publication Critical patent/CN117194299A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application provides a hot plug method, PCIE equipment and a management controller, and relates to the technical field of computers. The method is used for a management controller, the management controller is connected with PCIE equipment which is connected with a quick peripheral component, and hot plug identifiers are stored in the PCIE equipment. Based on the above, under the condition that the PCIE device is hot plugged into the PCIE slot or the PCIE device is requested to be hot plugged, the management controller determines whether the PCIE device supports hot plug by acquiring the hot plug identifier, and under the condition that the PCIE device is indicated to support hot plug by the hot plug identifier, performs configuration operation of hot plug to configure the PCIE device, so that configuration of the PCIE device can be ensured when the PCIE device supports hot plug, configuration of the PCIE device is also ensured to be matched with a hot plug scene, and reliability of hot plug of the PCIE device is improved.

Description

Hot plug method, PCIE equipment and management controller
Technical Field
The present application relates to the field of computer technologies, and in particular, to a hot plug method, PCIE device, and management controller.
Background
Hot plug (Hot Swap), i.e., hot plug, refers to plugging or unplugging a peripheral component interconnect express (peripheral component interconnect express, PCIE) device on a computing device into or from the computing device without powering off the computing device, without affecting the normal operation of the computer system. Because hot-plug technology can improve the quick maintainability of computing devices, hot-plug technology is widely used in the computer field.
However, after the PCIE device on the computing device 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 management controller, which are beneficial to improving the reliability of the PCIE equipment during hot plug.
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, which is used for a management controller, wherein the management controller is in communication connection with a PCIE device for interconnecting the Peripheral Component Interconnect Express (PCIE) device, and a hot plug identifier is stored in the PCIE device; the method comprises the following steps: acquiring a hot plug identifier under the condition that PCIE equipment is hot plugged into a PCIE slot or the PCIE equipment is requested to be hot plugged, wherein the hot plug identifier is used for indicating that the PCIE equipment supports hot plug or does not support hot plug; if the hot plug identifier indicates that the PCIE equipment supports hot plug, performing hot plug configuration operation on the PCIE equipment; the hot plug configuration operation is used for configuring 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, under the condition that the PCIE device is hot plugged into the PCIE slot or the PCIE device is requested to be hot plugged, the management controller determines whether the PCIE device supports hot plug by acquiring the hot plug identifier, and under the condition that the PCIE device is indicated to support hot plug by the hot plug identifier, performs configuration operation of hot plug to configure the PCIE device, so that configuration of the PCIE device can be ensured when the PCIE device supports hot plug, configuration of the PCIE device is also ensured to be matched with a hot plug scene, and further reliability of hot plug of the PCIE device is improved.
In one possible implementation manner, the PCIE device further stores hot plug configuration information; performing hot plug configuration operations on PCIE devices, including: obtaining hot plug configuration information; the hot plug configuration information comprises configuration content; based on the configuration content, the PCIE device is configured.
In the implementation manner, the hot plug configuration information is stored in the PCIE device, so that configuration content is directly obtained from the PCIE device when the PCIE device supports hot plug, and the PCIE device is configured based on the configuration content. In this way, the configuration content to be set is stored in the PCIE device, and when the configuration operation of hot plug is executed, the hot plug configuration information is directly obtained from the PCIE device, which is helpful for improving the execution convenience of the configuration operation of hot plug. In addition, the method is also beneficial to improving the perfection and reliability of the configuration operation of the hot plug, so that the hot plug process of the PCIE equipment is more complete, the current configuration of the PCIE equipment is ensured to be matched with a hot plug scene, and further damage of the PCIE equipment during hot plug is avoided, or partial functions of the PCIE equipment after hot plug into the PCIE slot cannot be realized due to incomplete configuration operation of the PCIE equipment. In addition, the configuration content is stored in the PCIE device, and the configuration content can be decoupled from the management controller relative to the configuration content stored in the management controller, so that when the configuration content is newly added to the PCIE device, software codes of the management controller do not need to be refreshed, which is helpful for improving the versatility of the management controller.
In another possible implementation, the hot plug configuration information further includes a configuration command; based on the configuration content, configuring the PCIE device includes: sending a configuration command to PCIE equipment; the configuration command is used for indicating that the PCIE device is configured based on the configuration content.
In this implementation manner, by setting the hot plug configuration information to further include a configuration command, after the management controller obtains the hot plug configuration information, the management controller may directly issue the configuration command to the PCIE device, instruct the PCIE device to perform configuration based on the configuration content, and help to improve convenience in executing the configuration operation of the hot plug. In addition, compared with the configuration commands stored in the management controller, the configuration commands can be decoupled from the management controller, so that when the configuration content is newly added to the PCIE equipment, software codes of the management controller do not need to be refreshed, the management controller configures the configuration commands for setting the newly added configuration content, and the universality of the management controller is improved.
In another possible implementation manner, sending the configuration command to the PCIE device includes: configuration commands are sent to the PCIE devices based on a system management bus (system management bus, SMBus) protocol, a modified integrated circuit bus (improved inter integrated circuit, I3C) protocol, a management component transport (management component transport protocol, MCTP) protocol, or a network controller sideband interface (network controller sideband interface, NC-SI) protocol.
In another possible implementation manner, based on the I3C protocol, sending a configuration command to the PCIE device includes: and sending the configuration command to the PCIE equipment based on the configuration command and a write operation instruction in the I3C protocol.
In another possible implementation manner, a hot plug configuration identifier is also stored in the PCIE device; obtaining hot plug configuration information, including: the method comprises the steps of obtaining a hot plug configuration identifier, wherein the hot plug configuration identifier is used for indicating that hot plug configuration information is stored in PCIE equipment or hot plug configuration information is not stored in PCIE equipment; and if the hot plug configuration identification indicates that the hot plug configuration information is stored, acquiring the hot plug configuration information.
According to the implementation mode, the hot plug configuration identifier is 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 is stored in the PCIE equipment or not can be determined according to the hot plug configuration identifier, and when the hot plug configuration identifier indicates that the configuration information is stored, the hot plug configuration information in the PCIE equipment is read, and the number of bytes occupied by the hot plug configuration information is relatively large, so that the hot plug configuration information is acquired relative to the PCIE equipment which is directly read, and the overhead of program processing is saved.
In another possible implementation manner, obtaining the hot plug identifier, the hot plug configuration information, or the hot plug configuration identifier includes: based on a system management bus SMBus protocol, an improved integrated circuit bus I3C protocol, a management component transmission MCTP protocol or a network controller sideband interface NC-SI protocol, sending an acquisition request to PCIE equipment; the obtaining request is used for requesting to obtain the hot plug attribute; the hot plug attribute comprises a hot plug identifier, a hot plug configuration identifier and hot plug configuration information, or the hot plug attribute comprises a hot plug identifier and a hot plug configuration identifier.
In the implementation manner, the obtaining request can be sent to the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol, so that the hot plug identifier, the hot plug configuration information, or the hot plug configuration identifier can be obtained, and diversity and realizability of obtaining information by the PCIE device are improved.
In another possible implementation, the get request includes a command field, the value of which indicates the hot plug attribute.
In this implementation manner, the value of the acquisition command field indicates the specific content requested to be acquired by the acquisition request, which is helpful to improve convenience and realizability of acquiring different contents from PCIE devices.
In another possible implementation manner, based on the I3C protocol, sending the acquisition request to the PCIE device includes: and sending an acquisition request to the PCIE equipment based on the read operation command of the I3C protocol.
Optionally, the method further comprises: and sending a completion notification to the CPU, wherein the completion notification is used for notifying that the configuration operation of the hot plug of the PCIE device is completed.
In the implementation manner, the CPU is helped to know the stage of the hot plug flow of the PCIE equipment, and further helped to determine the operation to be executed subsequently.
In another possible implementation manner, the hot plug configuration information of the PCIE device includes one or more of configuration information of a general purpose input output (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 (option read only memory, options rom).
In another possible implementation manner, the method further includes: if the hot plug identification indicates that the PCIE equipment does not support hot plug, outputting prompt information; the prompt information is used for prompting the PCIE equipment not to support hot plug.
In this implementation manner, 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 one hand, before the user hot-plugs the PCIE device from the PCIE slot, the user is notified that the PCIE device does not support hot plug, so that damage of the PCIE device caused by the user hot-plug of the PCIE device that does not support hot plug can be avoided. On the other hand, after the user thermally inserts the PCIE device into the PCIE slot, the user is informed that the PCIE device does not support hot plug, so that the user can timely know that the reasons of the work abnormality of the PCIE device are that the PCIE device does not support hot plug, and the positioning efficiency of the reasons of the work abnormality of the PCIE device is improved, so that the problem can be solved timely.
In another possible implementation manner, in a case that the PCIE device is hot inserted into the PCIE slot, the method further includes: if the hot plug identifier indicates that the PCIE device does not support hot plug, powering down the PCIE device.
In the implementation manner, after the PCIE device is hot-plugged into the PCIE slot, if the hot plug identifier indicates that the PCIE device does not support hot plug, the PCIE device is powered down, so that a central processing unit CPU of a computing device where the PCIE device is located can be prevented from accessing the PCIE device, and further, the situation that an access process waits and hangs up due to the fact that the central processing unit CPU cannot receive a response of the PCIE device for a long time is avoided, and normal operation of the central processing unit CPU is affected.
In another possible implementation manner, in the case that the PCIE device is hot inserted into the PCIE slot, the configuration operation of hot plug includes at least one configuration operation of a plurality of configuration operations that the central processing unit CPU performs on the PCIE device when the computing device is started.
By the implementation mode, the PCIE device can be ensured to have the same configuration as the PCIE device when the PCIE device is restarted along with the computing device after being hot-plugged into the PCIE slot, so that the configuration perfection and accuracy of the PCIE device are guaranteed, abnormal work or partial function incapability of realizing the PCIE device due to incomplete configuration operation of hot plug executed on the PCIE device is avoided, the hot plug process of the PCIE device is enabled to be more complete, and further the hot plug reliability of the PCIE device is enabled to be further improved.
In another possible implementation, in a case where the PCIE device is requested to be hot-swapped, the configuration operation of the hot-swapped is used to modify the current configuration content of the PCIE device, so that the modified configuration content matches the hot-swapped.
According to the implementation mode, before the PCIE device hot-pulls out the PCIE slot, configuration contents which can cause damage to the PCIE device are modified in advance, so that the modified configuration contents of the PCIE device are matched with the hot-pull, damage to the PCIE device during hot-pull out due to incomplete configuration operation of the PCIE device is avoided, and the reliability of the PCIE device hot-pull out is improved.
In another possible implementation manner, the PCIE slot is disposed on a computing device, where the computing device includes a central processing unit CPU; under the condition that the PCIE device is hot-plugged into the PCIE slot, performing hot-plug configuration operation on the PCIE device comprises the following steps: the CPU allocates PCIE resources for the PCIE devices.
According to the implementation mode, when the fact that the hot plug identification indicates that the PCIE equipment supports hot plug is determined, PCIE resources are allocated to the PCIE equipment, the fact that PCIE resources are allocated to PCIE equipment which does not support hot plug is avoided, and the utilization rate of the PCIE resources is improved.
In another possible implementation manner, the PCIE slot is disposed on a computing device, where the computing device includes a central processing unit CPU; under the condition that the PCIE device is hot-plugged into the PCIE slot, performing hot-plug configuration operation on the PCIE device comprises the following steps: the central processing unit CPU loads the driver of the PCIE device.
In this implementation manner, since the CPU needs to access the PCIE device through the driver, when determining that the hot plug identifier indicates that the PCIE device supports hot plug, the driver of the PCIE device is reloaded, which can avoid that the CPU accesses the PCIE device through the driver under a condition that whether the PCIE device supports hot plug is uncertain, and further helps to avoid that the CPU cannot receive a response of the PCIE device for a long time, and causes waiting and hanging of an access process, which affects normal operation of the CPU.
In another possible implementation manner, in a case where the PCIE device is requested to be hot swapped out, performing a configuration operation of hot swapping on the PCIE device includes: the CPU releases PCIE resources of the PCIE device.
According to the implementation mode, before the PCIE equipment is hot pulled out of the PCIE slot, PCIE resources of the PCIE equipment are released, the PCIE resources can be prevented from being occupied by the PCIE equipment which is not used any more, and the utilization rate of the PCIE resources is improved.
In another possible implementation manner, in a case where the PCIE device is requested to be hot-swapped out, the method further includes: and receiving a third completion notification returned by the CPU, wherein the third completion notification is used for notifying the PCIE device that the PCIE device is unloaded.
The implementation manner is beneficial to the management controller to know the current state of the PCIE equipment, and further to continue to execute other operations.
In another possible implementation manner, in a case where a PCIE device is requested to be hot swapped out, if the hot swap identifier indicates that the PCIE device supports hot swap, the method further includes: the central processing unit CPU stops accessing the PCIE device.
According to the implementation mode, before the PCIE equipment is hot-pulled out of the PCIE slot, the CPU does not access the PCIE equipment any more, so that the situation that after the PCIE equipment is hot-pulled out, the CPU continues to access the PCIE equipment, and the CPU is prevented from waiting and hanging up an access process due to the fact that the response of the PCIE equipment cannot be received for a long time, and the normal operation of the CPU is influenced is avoided.
In another possible implementation manner, in a case where the PCIE device is requested to be hot swapped out, performing a configuration operation of hot swapping on the PCIE device includes: and sending a power-down notification to the hot plug controller, wherein the power-down notification is used for notifying the hot plug controller that the PCIE equipment is powered down.
According to the implementation mode, before the PCIE equipment is hot-pulled out of the PCIE slot, the hot-plug controller is informed of powering down the PCIE equipment, so that the PCIE equipment is hot-pulled out under the condition of powering down, damage during 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, obtaining the hot plug identifier of the PCIE device includes: obtaining a hot plug identifier of a PCIE slot, wherein the hot plug identifier of the PCIE slot is used for indicating that the PCIE slot supports hot plug or does not support hot plug; and if the hot plug identification of the PCIE slot indicates that the PCIE slot supports hot plug, acquiring the hot plug identification of the PCIE device.
According to the implementation mode, the hot plug identification of the PCIE slot is obtained first, and then the hot plug identification of the PCIE device is obtained when the hot plug identification of the PCIE slot indicates that the PCIE slot supports hot plug. Because the PCIE slot belongs to a component of the computing device and the PCIE device belongs to a peripheral component, that is, whether the PCIE slot supports hot plug belongs to a capability of the computing device 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 or not, or it is determined whether the PCIE device supports hot plug directly, which is helpful to improve operation efficiency.
In another possible implementation manner, obtaining the hot plug identifier of the PCIE device includes: receiving determination result information; the determining result information is used for indicating that the PCIE slot supports hot plug or does not support hot plug; if the PCIE slot supports hot plug, acquiring a hot plug identifier of PCIE equipment; if the PCIE slot does not support hot plug, outputting prompt information, wherein the prompt information is used for prompting that the PCIE slot does not support hot plug.
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: an acquisition unit and an execution unit; the device comprises an acquisition unit, a hot plug identification and a hot plug identification, wherein the acquisition unit is used for acquiring a hot plug identification when the PCIE device is hot plugged into a PCIE slot or the PCIE device is requested to be hot plugged out, and the hot plug identification is used for indicating that the PCIE device supports hot plug or does not support hot plug; the execution unit is used for executing configuration operation of hot plug on the PCIE equipment if the hot plug identification indicates that the PCIE equipment supports hot plug; the hot plug configuration operation is used for configuring the PCIE equipment.
In a third aspect, a PCIE device is provided, where a hot plug identifier is stored in the PCIE device; the hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug.
In one possible implementation manner, the PCIE device further stores hot plug configuration information, where the hot plug configuration information indicates configuration content when performing a hot plug configuration operation on the PCIE device.
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 hot plug configuration information is stored in the PCIE device or hot plug configuration information is not stored in the PCIE device.
In a fourth aspect, a management controller is provided, where the management controller is connected with a PCIE device for interconnecting the peripheral component express, and a hot plug identifier is stored in the PCIE device; the management controller is used for obtaining a hot plug identifier when the PCIE device is hot plugged into the PCIE slot or before the PCIE device is requested to be hot plugged, and the hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug; and the management controller is also used for executing configuration operation of hot plug on the PCIE equipment if the hot plug identifier indicates that the PCIE equipment supports hot plug.
It should be noted that, in the fourth aspect, the management controller may also be configured to perform any one of the possible implementations provided in the first aspect.
In a fifth aspect, there is provided a management controller comprising: the processor is connected with the memory, the memory stores computer execution instructions, and the processor executes the computer execution instructions stored in the memory so as to enable the management controller to realize any one of the methods provided in the first aspect; the processor is not the central processing unit CPU described above.
In a sixth 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. The processor is not the central processing unit CPU described above.
In a seventh 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 an eighth 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 eighth 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 computing device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a computing device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data format according to an embodiment of the present application;
FIG. 4 is a flowchart of a hot plug method according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating interaction between a management controller and a CPU according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating interaction between a management controller and a CPU according to another embodiment of the present application;
FIG. 7 is a diagram illustrating a mandatory data field according to an embodiment of the application;
FIG. 8 is a schematic diagram of a data format of a request command for obtaining a hot plug attribute according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a data format of a response command for obtaining a hot plug attribute according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a data format of a configuration command for setting MSI-X according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a data format of a reply command for setting MSI-X according to an embodiment of the present application;
FIG. 12 is a schematic diagram of another data format of a request command for obtaining a hot plug attribute according to an embodiment of the present application;
FIG. 13 is a schematic diagram of another data format of a response command for obtaining a hot plug attribute according to an embodiment of the present application;
FIG. 14 is a diagram illustrating another data format of a configuration command for setting MSI-X according to an embodiment of the present application;
FIG. 15 is a diagram of another data format for setting a response of MSI-X according to an embodiment of the present application;
FIG. 16 is a flow chart of a hot plug method according to an embodiment of the present application;
FIG. 17 is a flowchart of a hot extraction method according to an embodiment of the present application;
fig. 18 is a flowchart 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 embodiment of the present application is described in an exemplary manner.
Hot plug (Hot Swap), i.e., hot plug, refers to plugging or unplugging a peripheral component interconnect express (peripheral component interconnect express, PCIE) device on a computing device into or from the computing device without powering off the computing device, without affecting the normal operation of the computer system. Because hot-plug technology can improve the quick maintainability of computing devices, hot-plug technology is widely used in the computer field.
However, after the PCIE device on the computing device 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.
In view of this, the embodiment of the application provides a hot plug method, which is applied to a management controller, where the management controller is connected with a PCIE device interconnected with a peripheral component express (pci) device, and the PCIE device stores a hot plug identifier, where the hot plug identifier is used to indicate that the PCIE device supports hot plug or does not support hot plug. Based on this, under the condition that the PCIE device is hot plugged into the PCIE slot or under the condition that the PCIE device is requested to be hot plugged, the management controller determines whether the PCIE device supports hot plug by acquiring the hot plug identifier, and under the condition that the PCIE device is indicated to support hot plug by the hot plug identifier, performs a configuration operation of hot plug to configure the PCIE device, so that not only can the configuration of the PCIE device be ensured to be set when the PCIE device supports hot plug, but also the configuration of the PCIE device is ensured to be matched with a hot plug scene, for example: configuration of PCIE equipment is set during hot plug-in, so that functions of the PCIE equipment are complete, and the PCIE equipment and a Central Processing Unit (CPU) system can normally communicate; the hot-plug is to set the configuration of the PCIE device, so that current backflow, voltage spike, etc. do not occur when the PCIE device is hot-plugged, which is helpful to improve the reliability of hot-plug of 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 a slot with a PCIE interface, where the PCIE interface follows the PCIE protocol.
PCIE device: refers to a device with a PCIE interface.
Built-in integrated circuit (inter-integrated circuit, I2C) bus: is a two-wire synchronous serial bus, conforms to a master-slave communication mechanism, uses a clock line (SCL) and a data line (SDA) to communicate, supports a plurality of nodes to share bus connection, and distinguishes different nodes through physical addresses.
Improved integrated circuit (improved inter integrated circuit, I3C) bus: is an improved I2C bus, has the physical form consistent with that of the I2C bus, uses a clock line (SCL) and a data line (SDA) for communication, and is compatible with the I2C. Compared with an I2C bus, the data rate of the I3C bus is greatly improved, the node common bus connection supporting dynamic address allocation to support a plurality of same physical addresses is supported, and an interrupt mechanism is supported to support the slave node to actively send data to the master node.
Out-of-band communication: refers to communication implemented through the out-of-band interface protocol of the PCIE device. "out-of-band" is a description with respect to a traffic interface-PCIE interface (also referred to as "in-band"), that is, a communication manner that does not use a native PCIE interface, e.g., a PCIE configuration space where a central processing unit CPU accesses PCIE devices, etc.
Out-of-band interface protocols include, but are not limited to, SMBus (I2C), I3C, NC-SI (over media independent interface transport (reduced media independent interface based transport, RBT)), and the like. Wherein reduced media independent interface is abbreviated as RMII.
The system architecture of the embodiment of the present application is described below as an example.
Fig. 1 is a schematic structural diagram of a computing device according to the present application.
Referring to fig. 1, the computing device includes a central processing unit CPU (central processing unit, CPU), a management controller, a hot plug controller, a PCIE slot, and a PCIE device.
The PCIE equipment is connected with the PCIE slot in a plug-in mode. The CPU is connected with the PCIE device through the PCIE slot. The hot plug controller is connected with PCIE equipment through PCIE slots. The hot plug controller is also connected with a Central Processing Unit (CPU). The management controller is connected with the hot plug controller.
It should be noted that, the PCIE device may also be other types of hardware devices, such as a power supply device.
The management controller may be used to execute the hot plug method provided by the embodiment of the present application.
Based on the above, the management controller may be connected to the PCIE slot through the first connection line, so as to connect to the PCIE device through the PCIE slot, and/or the management controller may be connected to the central processing unit CPU through the second connection line, so as to connect to the PCIE device through the central processing unit CPU.
By way of example, the first connection line may be an SMBus bus, an I3C bus, an NC-SI bus, or the like. The second connection line may be a PCIE bus or the like. The CPU is connected with the PCIE device through a PCIE bus.
In the embodiment of the application, the management controller can also be used for executing component management, asset management functions and the like, such as power-on and power-off control, fan speed regulation, electronic tag management and the like.
By way of example, the management controller may include a monitoring management unit external to the computing device, a baseboard management controller (baseboard management controller, BMC), 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.
In an embodiment of the present application, the computing device 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 server, or may be two or more physical servers sharing different responsibilities, and cooperate with each other to implement various functions of the server.
The terminal device may include a cell phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (personal digital assistant, PDA), a wearable device (e.g., a smart watch, a smart bracelet, etc.), a smart home device (e.g., a television, etc.), a car machine (e.g., a car computer, etc.), a smart screen, a game machine, headphones, AI sound, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a notebook, a netbook, a desktop computer, an all-in-one machine, etc.
In the embodiment of the present application, PCIE devices may be a network card, a redundant array of independent disks (redundant arrays of independent disks, RAID) card, a Solid State Disk (SSD), an image central processing unit CPU (graphics processing unit, GPU) card, a display card, or an accelerator card, etc.
It should be noted that, the PCIE device may be in the form of a card, or may also be in the form of a disk, which is not limited by the embodiment of the present application.
In an embodiment of the present application, a computing device 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 cpu pu, hot plug controller, management controller, PCIE slot, PCIE device, etc., 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.
It will be appreciated that the following description of the OS performing an operation (e.g., the OS loading driver) may be considered as the OS loading driver during the operation of the OS by the central processing unit CPU.
An application layer includes a series of program code that runs an application program.
In the embodiment of the application, the Central Processing Unit (CPU) module, the OS and the driving of the PCIE device can be collectively called as a CPU system. The central processing unit CPU module includes a central processing unit CPU, a memory (memory), a Flash memory (Flash)/a nonvolatile random access memory (non-volatile random access memory, NVRAM), etc., or the central processing unit CPU module may be a separate central processing unit CPU.
In the embodiment of the present application, the computing device may further include a power supply device, where the power supply device is connected to the PCIE slot and is configured to supply 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.
The PCIE device in the embodiment of the present application is described below.
In the embodiment of 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.
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 embodiment of the present application is described below by way of example based on the system architecture mentioned above.
Hereinafter, with reference to fig. 3, a hot plug identifier (Hot Plug Identification), a hot plug configuration identifier (Hot Plug Setting Identification), and hot plug configuration information stored in the PCIE device are exemplarily described.
In the embodiment of the application, the hot plug identifier, the hot plug configuration 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. 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.
Illustratively, PCIE devices support hot plug, which means PCIE devices support hot plug into PCIE slots and support hot plug from PCIE slots.
The hot plug configuration identifier is used for indicating that hot plug configuration information is stored in the PCIE device or that hot plug configuration information is not stored in the PCIE device.
The hot plug configuration information is used for indicating configuration content. The hot plug configuration information may include a plurality of configuration information, different configuration information indicating different configuration content.
It should be noted that, the embodiment of the present application does not limit the number of configuration information included in the hot plug configuration information.
By way of example, the hot plug configuration information may include 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.
Wherein one configuration information indicates the configuration content of one, for example, the configuration information of the GPIO indicates the configuration content of the GPIO.
Based on this, it can be appreciated that different configuration information indicates different hot-swapped configuration operations. For example, the configuration information of the GPIO indicates a configuration operation for the GPIO, the configuration information of the port mode indicates a configuration operation for the port mode, and the like.
For example, based on the hot plug including hot plug and hot plug, the hot plug configuration information may include hot plug configuration information and hot plug configuration information. The hot plug configuration information is configuration information required to be used when performing hot plug configuration operation after the PCIE slot is hot plugged into the PCIE device. The hot-plug configuration information is configuration information that is required to be used when performing a configuration operation of hot-plug before a PCIE device hot-plug.
Based on the above, the configuration operation of the hot plug may include a hot plug configuration operation or a hot plug configuration operation. The configuration operation indicated by the hot plug configuration information may be referred to as a hot plug configuration operation, and the configuration operation indicated by the hot pull configuration information may be referred to as a hot pull configuration operation.
Because the configuration content of the GPIO, the configuration content of the register, the configuration content of the port mode and the configuration content 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, so that in the process of hot plug of the PCIE device, the configuration operations corresponding to the configuration information are executed for the PCIE device, and the reliability of hot plug of the PCIE device is improved.
As shown in fig. 3, a schematic diagram of a data format of the hot plug identifier, the hot plug configuration identifier, and the hot plug configuration information is shown.
Referring to fig. 3, firmware of the pcie device includes a hot plug identifier field, where the hot plug identifier field is used to store a hot plug identifier. The firmware of the PCIE device further includes a hot plug configuration identifier field, where the hot plug configuration identifier field is used to store a hot plug configuration identifier. The firmware of the PCIE device further includes fields 11 to 14, where the fields 11 to 14 are used to store the configuration information 1. In addition, the firmware of the PCIE device further includes fields M1 to M4, and the fields M1 to M4 are used for storing the configuration information M.
Hereinafter, fields storing 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 (Setting Data) of the configuration information 1. The field 14 may be a Next item (Next) for indicating whether Next item of configuration information exists.
The data area includes a Configuration Command (separating Command) field and a Configuration (Configuration) field.
The configuration Command field is used to store a Setting Command, which is a Command used for performing a hot-plug configuration operation on the PCIE device, in other words, a Command used when configuring the PCIE device. The configuration field is used for storing configuration content, namely, configuration content to be set by the Setting Command.
Setting Command is a Command supported by an interface protocol used when the management controller communicates with the PCIE device (e.g., system management bus (system management bus, SMBus) protocol, I3C protocol, management component transport protocol (management component transport protocol, MCTP), or network controller sideband interface (network controller sideband interface, NC-SI) protocol).
The Configuration Command field and the contents stored in the Configuration field may be directly executed by the management controller, that is, after the management controller obtains the contents stored in the Setting Command field and the Configuration field, the management controller may directly send the Configuration Command and the Configuration content to the PCIE device, to instruct the PCIE device to perform Setting based on the Configuration content.
In this way, the execution of the configuration operation of the management controller and the hot plug can be decoupled, so that the firmware of the management controller does not need to preset the configuration command and the configuration content. Based on the above, when the newly added PCIE device or the original PCIE device has a newly added hot plug function and needs to be configured, software codes of the management controller do not need to be refreshed any more, so that the management controller is supported to manage newly added configuration content of the newly added PCIE device or the original PCIE device.
It should be noted that, the hot plug identifier, the hot plug configuration identifier and the hot plug configuration information may also be stored in the management controller, so that the management controller does not need to obtain the hot plug identifier, the hot plug configuration identifier and the hot plug configuration information from the PCIE device, which is helpful for improving execution efficiency of the hot plug configuration operation.
In the following, with reference to fig. 4 to fig. 6, an exemplary description is given of a hot plug method according to an embodiment of the present application.
FIG. 4 is a flowchart illustrating a hot plug method according to an example embodiment. Illustratively, the hot plug method includes the following S401-S406.
S401: and under the condition that the PCIE device is hot-plugged into the PCIE slot or the PCIE device is requested to be hot-plugged out, acquiring a hot-plug identifier of 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 PCIE device is requested to be hot-swapped out, and may also be considered as a request to hot-swap out the PCIE device.
In the embodiment of the application, the PCIE device is thermally inserted into the PCIE slot, which may be manually inserted into the PCIE slot by a user, or may be thermally inserted into the PCIE slot by an automation device (e.g., a manipulator, a robot, etc.), which is not limited in the embodiment of the application.
In the embodiment of the application, the request for hot-pulling the PCIE device may be that the user requests for hot-pulling the PCIE device through other devices, or may be that an automation device (e.g., a manipulator, a robot, etc.) requests for hot-pulling the PCIE device.
Under the condition that the PCIE device is inserted into the PCIE slot, the hot plug identification of the PCIE device is obtained, wherein the hot plug identification comprises a plurality of implementation modes, and the implementation modes a to c are explained below.
Mode a, based on the received hot plug request, obtains the hot plug identifier of the PCIE device.
In the embodiment of the application, when 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 management controller. Based on the received hot plug request, the management controller determines that the current scene is a PCIE device hot plug PCIE slot, and based on the hot plug request, the management controller can acquire a hot plug identifier of the PCIE device.
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 management controller.
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, and the hot plug event refers to hot plug of PCIE devices on PCIE slots corresponding to the slot identifiers.
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.
Mode b, based on the PCIE slot supporting hot plug, obtaining the hot plug identification of the PCIE equipment.
In one example, when the hot plug controller detects that the PCIE device is hot plugged into a PCIE slot, a hot plug request is sent to the management controller, and the management controller obtains a hot plug identifier of the PCIE slot based on receiving the hot plug request, and determines whether the PCIE slot supports hot plug based on the hot plug identifier of the PCIE slot. Based on the PCIE slot supporting hot plug, the management controller determines that the current scene is the PCIE slot in which the PCIE device is hot plugged, and based on the PCIE slot, the management controller can acquire the hot plug identification of the PCIE device.
In another example, when the hot plug controller detects that the PCIE device is hot plugged into a PCIE slot, the hot plug controller also sends a hot plug request to the central processing unit CPU. The CPU obtains the hot plug identification of the PCIE slot based on the received hot plug request, and determines whether the PCIE slot supports hot plug based on the hot plug identification of the PCIE slot. And then, the CPU sends the determination result information to the management controller, wherein the determination result information is used for indicating that the PCIE slot supports hot plug or does not support hot plug. Based on the determination result information indicating that the PCIE slot supports hot plug, the management controller determines that the current scene is the PCIE slot in which the PCIE device is hot plugged, and based on the determination result information, the management controller can acquire the hot plug identification of the PCIE device.
The description of the hot plug request in the mode b may refer to the description of the mode a, which is not repeated here.
And c, based on the fact that the PCIE equipment is powered on, acquiring the hot plug identification of the PCIE equipment.
In the embodiment of the application, the management controller powers up the PCIE equipment based on the support of hot plug of the PCIE slot or based on the receipt of a hot plug request. And under the condition that the PCIE equipment is powered on, the management controller acquires the hot plug identification of the PCIE equipment based on the fact that the PCIE equipment is powered on.
In an exemplary embodiment, after determining that the PCIE slot supports hot plug based on the hot plug identifier of the PCIE slot, the management controller powers on the PCIE device based on the determination result, or instructs, based on the received determination result information, that the PCIE slot supports hot plug to power on the PCIE device.
Illustratively, after receiving a hot plug request sent by the hot plug controller, the management controller powers up the PCIE device based on the hot plug request.
In the embodiment of the present application, the powering up of the PCIE device by the management controller may include: and the management controller sends a power-on notification to the hot plug controller to inform the hot plug controller of powering up the PCIE. The hot plug controller sends a power-on instruction to the power supply equipment based on the received power-on notification, wherein the power-on instruction is used for indicating the power supply equipment to power on the PCIE slot, so that the power-on of the PCIE equipment is realized. For example, 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 slot.
The hot plug controller sends a power-on result to the management controller after powering on the PCIE device, where the power-on result is used to indicate that the PCIE device is powered on. And the management controller responds to the power-on result to acquire the hot plug identification of the PCIE equipment.
Based on the above, the management controller obtains the triggering condition of the hot plug identifier of the PCIE device, which may include a hot plug request, PCIE slot supporting hot plug, or PCIE device is powered on. Based on this, the management controller may obtain the hot plug identifier of the PCIE device in response to the received hot plug request, the PCIE slot supporting hot plug, or the PCIE device is powered on.
Or, the management controller may obtain the triggering condition of the hot plug identifier of the PCIE device, which may include at least one of a hot plug request, a PCIE slot supporting hot plug, and a PCIE device having been powered on, based on this, the management controller may obtain the hot plug identifier of the PCIE device in response to at least one of a received hot plug request, a PCIE slot supporting hot plug, and a PCIE device having been powered on.
Under the condition of requesting to hot-plug PCIE equipment, acquiring a hot-plug identifier of the PCIE equipment, wherein the hot-plug identifier comprises a plurality of implementation modes, and the implementation modes d to e are explained below.
And d, acquiring the hot plug identification of the PCIE equipment based on the received hot plug request.
In the embodiment of the application, under the condition that the hot plug controller receives the hot plug notification, the hot plug controller sends a hot plug request to the management controller. Based on the received hot-plug request, the management controller determines that the current scene is a request for hot-plug PCIE equipment, and based on the request, the management controller can acquire a hot-plug identifier of the PCIE equipment.
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, and the hot-unplugging event refers to that a PCIE device on a PCIE slot corresponding to the slot identifier requests hot-unplugging.
How the hot plug controller receives the hot plug notification includes various implementations, and is exemplified in two ways below.
The first way is: and the hot plug controller receives a hot plug notification sent by the PCIE slot.
The computing device comprises notification buttons, and the notification buttons are in one-to-one correspondence with the PCIE slots. Wherein the notification button may be disposed on a motherboard of the computing device. 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.
The second way is: the hot plug controller receives a hot plug notification sent by the management controller.
The client of the management controller is operated by the electronic equipment, and the client comprises a notification control which is used for indicating to send the hot pull-out notification. Based on this, when the user needs to pull out the PCIE device from the PCIE slot, the user logs in the client of the management controller through the electronic device, inputs the slot identifier, and performs a triggering operation on the notification control, for example, clicks the notification control, the electronic device 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.
It should be noted that, the hot-pull request is sent before the PCIE device hot-pulls out the PCIE slot, which is equivalent to a request to hot-pull out the PCIE device from the PCIE slot, so the hot-pull request may also be considered as a request to hot-pull out the PCIE device or a request of the PCIE device to hot-pull out the PCIE slot.
And e, based on the PCIE slot position, supporting hot plug, and acquiring a hot plug identifier of the PCIE equipment.
For the description of the mode e, reference may be made to the above mode b, and the principles of the two modes are the same, which is not repeated here.
Based on the above, the management controller obtains the triggering condition of the hot plug identifier of the PCIE device, and may further include a unplug request. Based on this, the management controller may obtain the hot plug identifier of the PCIE device in response to the received unplugging request, or may obtain the hot plug identifier of the PCIE device in response to the received hot plug request and the PCIE slot supporting hot plug.
In the embodiment of the application, obtaining the hot plug identifier of the PCIE device includes: based on SMBus protocol, I3C protocol, MCTP protocol or NC-SI protocol, obtaining hot plug identification of PCIE equipment.
The process of the management controller obtaining the hot plug identifier of the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol will be described in the embodiments shown in fig. 7 to 15, and will not be described herein.
S402: and determining whether the PCIE equipment supports hot plug according to the hot plug identification.
If the determination result is yes, S403 is executed, and if the determination result is no, S404-S406 are executed.
In the embodiment of the application, the management controller can determine whether the PCIE device supports hot plug 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 the embodiment of the present application, how the hot plug identifier specifically indicates whether the PCIE device supports hot plug is not limited, and the foregoing examples are merely illustrative.
S403: and executing hot plug configuration operation on the PCIE equipment.
The configuration operation of the hot plug comprises the hot plug configuration operation or the hot plug configuration operation.
In the case where the PCIE device is hot-inserted into the PCIE slot, S403 may be regarded as "performing hot-plug configuration operation on the PCIE device" to perform hot-plug configuration on the PCIE device. In the case of requesting to hot-pull PCIE, S403 may be regarded as "performing hot-pull configuration operation on PCIE device" to perform hot-pull configuration on PCIE device.
In one example, in a case where the PCIE device is hot-plugged into the PCIE slot, the management controller performs a hot-plug configuration operation, so that after the PCIE device is hot-plugged into the PCIE slot, the PCIE device is hot-plug configured, so that the configuration of the PCIE device is suitable for the hot-plug operation, and the PCIE device can be normally used on the computing device.
In another example, in the case of requesting to hot-pull the PCIE device, the management controller performs a hot-pull configuration operation, so that before the PCIE device is hot-pulled from the PCIE slot, the PCIE device is hot-pulled and configured, so that the configuration of the PCIE device is suitable for the hot-pull operation, and damage caused by hot-pull of the PCIE device is avoided.
In the embodiment of the present application, a hot plug configuration operation is performed on PCIE devices, including multiple cases, and an exemplary description is given below through cases 1 to 3.
Case 1, performing a configuration operation of hot plug in to a PCIE device, including: acquiring hot plug configuration information; based on the hot plug configuration information, a hot plug configuration operation is performed on the PCIE device.
In an embodiment of the present application, the hot plug configuration information includes configuration content. Performing hot plug configuration operations on PCIE devices based on the hot plug configuration information may include: based on the configuration content, the PCIE device is configured.
Illustratively, the hot-plug configuration information includes configuration information of the interrupt register, that is, the configuration content is the configuration content of the interrupt register.
Since PCIE devices communicate with the central processing unit CPU system, message signaled interrupt extensions (message signaled interrupt-extensios, MSI-X) interrupt registers are required to enable the transfer of messages and data. The MSI-X interrupt registers include parameters such as MSI-X interrupt enable, the number of MSI-X interrupts, the memory space size required for MSI-X interrupts, and the like.
Based on this, under the condition that the PCIE device is hot-plugged into the PCIE slot, the management controller configures the MSI-X interrupt register, for example, configures parameters such as MSI-X interrupt enable, number of MSI-X interrupts, memory space size required by MSI-X interrupts, and the like of the MSI-X interrupt register, so when the PCIE device is enumerated by the central processing unit CPU, the required interrupt resources of the central processing unit CPU system can be allocated to the PCIE device according to the configuration of the MSI-X interrupt register, thereby ensuring that the MSI-X interrupt function is complete after the PCIE device is hot-plugged into the PCIE slot, and the PCIE device and the central processing unit CPU system can normally communicate.
It is understood that the configuration content may include an enable state, a first setting value, and a second setting value. The enabling state refers to that MSI-X interrupt is enabled, the first set value is the number of MSI-X interrupts, and the second set value is the memory space size required by MSI-X interrupts.
In the implementation manner, the hot plug configuration information is stored in the PCIE device, so that configuration content is directly obtained from the PCIE device when the PCIE device supports hot plug, and the PCIE device is configured based on the configuration content. In this way, the configuration content to be set is stored in the PCIE device, and when the configuration operation of hot plug is executed, the hot plug configuration information is directly obtained from the PCIE device, which is helpful for improving the execution convenience of the configuration operation of hot plug.
In addition, the method is also beneficial to improving the reliability of the configuration operation of the hot plug, so that the hot plug process of the PCIE equipment is more complete, the current configuration of the PCIE equipment is ensured to be matched with a hot plug scene, and further damage of the PCIE equipment during hot plug is avoided, or partial functions of the PCIE equipment after hot plug into the PCIE slot position cannot be realized due to incomplete configuration operation of the PCIE equipment is avoided.
In addition, the configuration content is stored in the PCIE device, and the configuration content can be decoupled from the management controller relative to the configuration content stored in the management controller, so that when the configuration content is newly added to the PCIE device, software codes of the management controller do not need to be refreshed to support firmware of the management controller, which is helpful for improving versatility of the management controller.
In an embodiment of the present application, obtaining hot plug configuration information includes: based on SMBus protocol, I3C protocol, MCTP protocol or NC-SI protocol, hot plug configuration information is obtained.
For example, the management controller may send an acquisition request to the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol, where the acquisition request is used to request to acquire hot plug configuration information of the PCIE device.
The process of the management controller obtaining the configuration information of the hot plug based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol will be described in the embodiments shown in fig. 7 to 15, and will not be described here again.
In the embodiment of the present application, obtaining hot plug configuration information may include: acquiring a hot plug configuration identifier; and if the hot plug configuration identifier indicates that the PCIE equipment stores hot plug configuration information, acquiring the hot plug configuration information stored in the PCIE equipment.
In this embodiment, the hot plug configuration identifier is stored in the PCIE device and is used to indicate that the PCIE device stores configuration information or does not store configuration information, so that whether the PCIE device stores configuration information can be determined first according to the hot plug configuration identifier, and when the hot plug configuration identifier indicates that the PCIE device stores configuration information, the hot plug configuration information in the PCIE device is read again, and because the number of bytes occupied by the hot plug configuration information is relatively large, the hot plug configuration information is acquired relative to directly reading the PCIE device, which is helpful to saving the overhead of program processing.
The process of the management controller obtaining the hot plug configuration identifier based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol will be described in the embodiments shown in fig. 7 to 15, and will not be described herein.
In the embodiment of the application, the hot plug method further comprises the following steps: and sending a first completion notification to the CPU to notify the management controller that the hot plug configuration operation performed on the PCIE device is completed.
In the embodiment of the application, after the management controller performs the hot plug configuration operation, a first completion notification is sent to the Central Processing Unit (CPU) to notify that the hot plug configuration operation is completed, so that the CPU is facilitated to know the stage of the hot plug flow of the PCIE device, and further the CPU is facilitated to determine the operation to be performed subsequently.
Fig. 5 is an interaction schematic diagram of a management controller and a CPU according to an embodiment of the present application.
Referring to fig. 5, after the PCIE device is hot-plugged into the PCIE slot, the management controller performs a hot-plug configuration operation based on that the PCIE device supports hot-plug. Then, the management controller sends a first completion notification (e.g., complete_1) to the central processing unit CPU to notify the central processing unit CPU that the hot plug configuration operation of the PCIE device is completed. After receiving the first completion notification, the central processing unit CPU transmits acknowledgement information 1 (ack_1) to the management controller to notify the management controller that the first completion notification has been received.
Illustratively, during the execution of the OS by the central processing unit CPU, the OS sends acknowledgement 1 to the management controller.
Case 2, performing a hot plug configuration operation on a PCIE device, including: and distributing PCIE resources for the PCIE equipment.
In the embodiment of the application, after the PCIE device is hot-plugged into the PCIE slot, the CPU allocates PCIE resources for the PCIE device, so that the PCIE device can be normally used.
For example, after receiving the first completion notification sent by the management controller, the central processing unit CPU allocates PCIE resources to the PCIE devices based on the first completion notification. Or the Central Processing Unit (CPU) receives a determination result of the PCIE device sent by the management controller, wherein the determination result of the PCIE device is used for indicating that the PCIE device supports hot plug, and the CPU allocates PCIE resources for the PIE device based on the determination result.
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 of the present application, the OS enumerates PCIE devices and allocates PCIE resources to PCIE devices in the process of the CPU running the OS. 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.
In this embodiment, when determining that the PCIE device supports hot plug, the management controller allocates PCIE resources to the PCIE device, and directly allocates PCIE resources to the PCIE device after hot inserting PCIE slot positions relative to the PCIE device, thereby avoiding allocation of PCIE resources to PCIE devices that do not support hot plug and improving utilization rate of PCIE resources.
Case 3, performing a hot plug configuration operation on a PCIE device, including: and loading a driver of the PCIE device.
In the embodiment of the application, after the PCIE device is hot-inserted into the PCIE slot, the CPU loads the driver of the PCIE device, so that the CPU can access the PCIE device.
The method includes that after receiving a first completion notification sent by a management controller, a Central Processing Unit (CPU) loads a driver of a PCIE device based on the first completion notification, or the CPU receives a determination result of the PCIE device sent by the management controller, where the determination result of the PCIE device is used to indicate that the PCIE device supports hot plug, and the CPU loads the driver of the PCIE device based on the determination result.
In this embodiment, since the CPU accesses the PCIE device through the driver, when determining that the PCIE device supports hot plug, the driver of the PCIE device is loaded again, and the driver of the PCIE device is directly loaded after hot plug is inserted into the PCIE slot relative to the PCIE device, so that the CPU accesses the PCIE device through the driver under the condition that the PCIE device does not support hot plug, and further, it is beneficial to avoid that the CPU cannot receive the response of the PCIE device for a long time, which causes the access process to wait and hang up, and affects the normal operation of the CPU.
It should be noted that, performing the hot plug configuration operation on the PCIE device may include at least one of the cases 1 to 3.
In the embodiment of the present application, the configuration operation of performing hot-unplugging on PCIE devices includes multiple cases, and the following is illustrated by case 4 to case 7.
Case 4, performing a hot-unplug configuration operation on a PCIE device, including: acquiring hot-pull configuration information; based on the hot-pull configuration information, a hot-pull configuration operation is performed.
In the embodiment of the application, the hot-pull configuration information comprises configuration content. Performing hot-unplugged configuration operations on PCIE devices based on the hot-unplugged configuration information may include: based on the configuration content, the PCIE device is configured.
It should be noted that, the configuration items indicated by the configuration content in the hot-swapped configuration information (i.e., GPIO, registers, port modes, and optional rom, etc.) may be the same as or different from the configuration items indicated by the configuration content in the hot-plugged configuration information, which is not limited in this embodiment of the present application.
Illustratively, the hot-swapped configuration information includes configuration information for the GPIO, that is, the configuration content is GPIO.
In the embodiment of the application, 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, the controller 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. The power supply equipment comprises a main power supply and an auxiliary power supply. The main power supply is used for supplying power to the controller, and the auxiliary power supply is used for supplying power to the management module and the environment monitoring module.
Because before the PCIE device is hot-pulled out from the PCIE slot, when the hot-plug controller powers down the PCIE device, the main power supply is only 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, when the PCIE device requests hot-extraction from the PCIE slot, the GPIO of the PCIE device is configured according to the configuration information of the GPIO, for example, the GPIO is turned off or set to a high-impedance state, so that before the PCIE device is hot-extracted from the PCIE slot, the GPIO is turned off or set to a high-impedance state, thereby avoiding damage to the GPIO port of the PCIE device when the PCIE device is hot-extracted from the PCIE slot, avoiding damage to the PCIE device when the PCIE device is hot-extracted, and further improving reliability of hot-extraction of the PCIE device.
It is understood that the configuration content may include an off state or a high resistance state. Wherein the off state or the high resistance state refers to the state of GPIO.
Obtaining hot-pull configuration information, including: based on SMBus protocol, I3C protocol, MCTP protocol or NC-SI protocol, obtaining hot-pull configuration information.
For example, the management controller may send an acquisition request to the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol, where the acquisition request is used to request to acquire hot-pull configuration information of the PCIE device.
The process of the management controller obtaining the hot-pull configuration information based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol will be described in the embodiments shown in fig. 7 to 15, and will not be described here again.
In the embodiment of the application, obtaining hot-pull configuration information comprises the following steps: acquiring a hot plug configuration identifier; and if the hot plug configuration identifier indicates that the hot plug configuration information is stored in the PCIE equipment, acquiring the hot plug configuration information stored in the PCIE equipment.
The process of the management controller obtaining the hot plug configuration identifier based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol will be described in the embodiments shown in fig. 7 to 15, and will not be described herein.
In the embodiment of the application, the hot plug method further comprises the following steps: and sending a second completion notification to the CPU to inform the CPU that the hot-pull configuration operation executed by the management controller on the PCIE device is completed.
In the embodiment of the application, after the management controller performs the hot-pull configuration operation, a second completion notification is sent to the Central Processing Unit (CPU) to notify that the hot-pull configuration operation is completed, so that the CPU is facilitated to know the stage of the hot-plug flow of the PCIE device, and further the CPU is facilitated to determine the operation to be performed subsequently.
Fig. 6 is a schematic diagram showing interaction between another management controller and a CPU according to an embodiment of the present application.
Referring to fig. 6, in the case of requesting hot-plug of a PCIE device, the management controller performs a hot-plug configuration operation based on that the PCIE device supports hot-plug. Then, the management controller sends a second completion notification (e.g., complete_2) to the central processing unit CPU to notify the central processing unit CPU that the hot-pull configuration operation of the PCIE device is completed. After receiving the second completion notification, the central processing unit CPU sends an acknowledgement message 2 (ack_2) to the management controller informing the management controller that the second completion notification has been received.
Illustratively, during the execution of the OS by the central processing unit CPU, the OS sends a confirmation message 2 to the management controller.
Case 5, performing a hot-unplug configuration operation on the PCIE device, including: and releasing PCIE resources of the PCIE equipment.
In the embodiment of the application, under the condition of requesting to hot-pull PCIE equipment, the CPU releases PCIE resources of the PCIE equipment. In an exemplary embodiment, after receiving the second completion notification sent by the management controller, the CPU releases PCIE resources of the PCIE device based on the second completion notification, or the CPU receives a determination result of the PCIE device sent by the management controller, where the determination result of the PCIE device is used to indicate that the PCIE device supports hot plug, and the CPU releases PCIE resources of the PCIE device based on the determination result.
For example, the releasing, by the CPU, the PCIE resource of the PCIE device may be that the OS releases the PCIE resource allocated to the PCIE device in the process that the CPU runs the OS.
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.
For the explanation of PCIE resources, reference may be made to the explanation in case 2, which is not repeated here.
In the embodiment of the application, the hot plug method further comprises the following steps: and receiving a third completion notification returned by the CPU, wherein the third completion notification is used for notifying the PCIE device that the PCIE device is unloaded. In this way, the management controller is facilitated to know the current state of the PCIE device, and further is facilitated to determine whether to continue to perform other operations.
In the embodiment of the present application, referring to fig. 6, after the central processing unit CPU releases the PCIE resources of the PCIE device, the central processing unit CPU sends a third completion notification (complete_3) to the management controller, so as to notify the management controller that the PCIE resources of the PCIE device are released, or that the PCIE setting is unloaded. After receiving the third completion notification, the management controller returns acknowledgement information 3 (ack_3) to the central processing unit CPU to notify the central processing unit CPU that the third completion notification has been received.
Illustratively, during the execution of the OS by the central processing unit CPU, the OS sends a third completion notification to the management controller. In the process of operating the OS by the central processing unit CPU, the management controller transmits acknowledgement information 3 to the OS.
Case 6, performing a hot-unplug configuration operation on a PCIE device, including: powering down the PCIE device.
In the embodiment of the application, under the condition that the PCIE equipment is requested to be hot-pulled, the management controller does not support hot plug based on the PCIE equipment, and powers down the PCIE equipment, so that a central processing unit CPU of the computing equipment where the PCIE equipment is located can be prevented from accessing the PCIE equipment, and further, the situation that the central processing unit CPU waits for and hangs up an access process due to the fact that the CPU cannot receive the response of the PCIE equipment for a long time is avoided, and the normal operation of the central processing unit CPU is influenced. The management controller receives the third completion notification, and powers down the PCIE device based on the third completion notification.
For example, the process of powering down the PCIE device may include: and the management controller sends a power-down notification to the hot plug controller to notify the hot plug controller to power down the PCIE equipment. And the hot plug controller sends a power-down instruction to a power supply controller in the power supply equipment based on the received power-down notification, wherein the power-down instruction is used for indicating the power supply equipment to power down the PCIE slot, so that the power down of the PCIE equipment is realized. For example, the hot plug controller sends a power-down instruction to a power supply controller of the power supply device, and the power supply controller responds to the received power-down instruction to control the power supply to power down for the PCIE slot.
Case 7, performing a hot-unplug configuration operation on a PCIE device, including: the central processing unit CPU stops accessing the PCIE device.
In the embodiment of the application, under the condition of requesting to hot-pull PCIE equipment, the CPU stops accessing the PCIE equipment. Therefore, after the PCIE equipment is hot pulled out, the situation that the CPU of the central processing unit waits for and hangs up an access process because the CPU cannot receive the response of the PCIE equipment for a long time can be avoided, and the normal operation of the CPU of the central processing unit is affected.
In an exemplary embodiment, after receiving the second completion notification sent by the management controller, the CPU stops accessing based on the second completion notification, or the CPU receives a determination result of the PCIE device sent by the management controller, where the determination result of the PCIE device is used to indicate that the PCIE device supports hot plug, and the CPU stops accessing the PCIE device based on the determination result.
Wherein, the process that the central processing unit CPU stops visiting PCIE equipment includes: in the process that the CPU runs the OS, the OS sends a silence notification to the driver of the PCIE device, so that the driver of the PCIE device does not access the PCIE device any more, that is, the driver of the PCIE device does not perform read-write communication on the PCIE device any more, and the CPU stops accessing the PCIE device.
It should be noted that, performing the hot-unplugged configuration operation on the PCIE device may include at least one of the cases 4 to 7.
It should be noted that, the configuration operation of the hot plug executed by the management controller will be described in the following embodiments, which are not described herein.
Optionally, S404: and outputting prompt information to indicate that the PCIE equipment does not support hot plug.
In one example, under the condition that the PCIE device is hot-plugged into the PCIE slot, the management controller outputs a prompt message to indicate that the PCIE device does not support hot-plug, so that the PCIE device that does not support hot-plug cannot be normally used after a user hot-plugs into the PCIE slot, and the improvement of the reliability of hot-plug is facilitated. In addition, when the PCIE device cannot be normally used after being hot-plugged into the PCIE slot, a user can timely know that the reasons of the work abnormality of the PCIE device are that the PCIE device does not support hot plug, and therefore the problem locating efficiency of the work abnormality reasons of the PCIE device is improved, and the problem can be solved timely.
In another example, when a PCIE device is requested to be hot-pulled out of a PCIE slot, the management controller outputs a prompt message indicating that the PCIE device does not support hot-plug, so that it is possible to avoid that a user hot-pulls out a PCIE device that does not support hot-plug from the PCIE slot, resulting in damage to the PCIE device during hot-pull, and further, it is helpful to improve reliability of hot-pull.
How to output the prompt information includes various implementations, and the following description will be given by way of modes a to C.
Mode a: the management controller sends prompt information to the CPU to instruct the CPU to output the prompt information.
After the management control sends the prompt information to the CPU, the CPU outputs the prompt information based on the received prompt information.
Illustratively, during the process of running the OS by the central processing unit CPU, the OS prints a system message (message) that includes the prompt information, thereby implementing output of the prompt information. Wherein the OS print system message may be a pop-up system message at the OS interface.
Mode B: the management controller sends prompt information to the electronic equipment and instructs the electronic equipment to output the prompt information.
The client of the management controller is operated by the electronic equipment, based on the operation, the management controller sends prompt information to the electronic equipment, and the electronic equipment outputs the prompt information through the client after receiving the prompt information. The electronic device may display the prompt information through a display interface of the client.
Mode C: the management controller sends a signal to the first indicator lamp to instruct the first indicator lamp to output prompt information.
The computing device includes a first indicator light for indicating that the PCIE device does not support hot plug. For example, the first indicator light may be mounted on a motherboard of the computing device 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.
Based on this, the management controller sends a signal to the indicator lamp, and the indicator lamp outputs a prompt message based on the signal. For example, the first indicator light is switched to a flashing state or a normally-on state to indicate that the PCIE device does not support hot plug. The initial state of the first indicator light is an on state, and after the first indicator light receives a signal, the first indicator light is switched to a flashing state or an on state.
When the PCIE device does not support hot plug, the modes a to C output the prompt information, which is not only helpful for improving output diversity of the prompt information, but also can accurately present a hot plug state of the PCIE device, so that a user can know that the PCIE device does not support hot plug, avoid the user from continuing to perform hot plug on the PCIE device, and prohibit hot plug of the PCIE device.
In the above embodiment, under the condition that the PCIE device is hot-plugged into the PCIE slot or under the condition that the PCIE device is requested to be hot-plugged out of the PCIE slot, whether the PCIE device supports hot-plug is determined through the obtained hot-plug identification, if the hot-plug identification indicates that the PCIE device supports hot-plug, a configuration operation of hot-plug is performed on the PCIE device to configure the PCIE device, so that a hot-plug flow of the PCIE device is completed, otherwise, prompt information is output to indicate that the PCIE device does not support hot-plug, so that the hot-plug flow of the PCIE device is interrupted.
In this way, on the one hand, under the condition that the PCIE device supports hot plug, the configuration operation of hot plug is executed to configure the PCIE device, so that the configuration of the PCIE device is suitable for the hot plug operation, which is helpful for ensuring that the PCIE device can work normally after hot plug into the PCIE slot or avoiding damage to the PCIE device when hot plug from the PCIE slot, and is further helpful for improving the reliability of hot plug of the PCIE device. On the other hand, under the condition that the PCIE equipment does not support hot plug, the user can stop hot plug of the PCIE equipment in time based on the prompt information, so that the operation of the computing equipment is prevented from being influenced after the PCIE equipment which does not support hot plug is hot plugged into the PCIE slot, or the PCIE equipment is prevented from being damaged when being hot plugged out from the PCIE slot, and further the reliability of hot plug of the PCIE equipment is improved.
Optionally, S405: log information is generated to record that PCIE devices do not support hot plug and/or do not perform hot plug.
In the implementation of the application, the management controller sends a generation instruction to the Central Processing Unit (CPU), the generation instruction is used for instructing the CPU to generate log information, and the CPU generates the log information based on the received generation instruction, so as to record that the PCIE equipment does not support hot plug and/or the PCIE equipment does not execute hot plug, thereby being convenient for system operation and maintenance.
For example, the log information may be stored in a storage medium of the computing device, such as a hard disk of the computing device.
For example, log information (also referred to as an OS log) may be generated by the OS during execution of the OS by the central processing unit CPU.
Optionally, S406: and powering down the PCIE device under the condition that the PCIE device is hot-plugged into the PCIE slot.
In the embodiment of the application, under the condition that the PCIE device is hot-plugged into the PCIE slot, the management controller powers down the PCIE device based on the fact that the PCIE device does not support hot plug, so that a CPU of a computing device where the PCIE device is located can be prevented from accessing the PCIE device, and further, the situation that the CPU of the CPU cannot receive the response of the PCIE device for a long time, and the access process waits and hangs up is avoided, and the normal operation of the CPU is influenced.
It should be noted that, the power-down process for the PCIE device may be referred to the case 6 in S403, which is not described herein.
Hereinafter, in connection with fig. 7 to 15, a communication procedure between the management controller and the PCIE device is exemplarily described.
In the embodiment of the application, communication, that is, data transmission, can be performed between the management controller and the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol.
Based on this, the management controller may obtain the hot plug identifier, the hot plug configuration identifier, and the hot plug configuration information from the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol. The hot plug identifier, the hot plug configuration identifier, and the hot plug configuration information may be collectively referred to as hot plug attributes.
Based on the above, the management controller may send an acquisition request to the PCIE device based on the SMBus protocol, the I3C protocol, the MCTP protocol, or the NC-SI protocol, where the acquisition request is used to request to acquire the hot plug identifier, the hot plug configuration identifier, and the hot plug configuration information. Thus, the convenience of acquiring the hot plug identification, the hot plug configuration identification or the hot plug configuration information is improved.
For example, the get request includes a command field that indicates a hot plug attribute.
Hereinafter, a procedure for acquiring a hot plug attribute from a PCIE device based on an SMBus protocol, an I3C protocol, an MCTP protocol, or an NC-SI protocol will be exemplarily described in modes 1 to 4.
Mode 1, a hot plug attribute is acquired based on the SMBus protocol.
In the embodiment of the application, the management controller and the PCIE device may be connected through an SMBus, that is, the management controller and the PCIE device may perform data transmission through the SMBus. Based on this, the management controller may obtain the hot plug attribute from the PCIE device through the SMBus interface and based on the SMBus protocol.
Illustratively, the management controller sends an obtaining request to the PCIE device based on the SMBus protocol, where the obtaining request is used to request to obtain a hot plug attribute, such as a hot plug identifier, a hot plug configuration identifier, and hot plug configuration information.
Because the SMBus is compatible with the I2C in physical signals, both SCL and SDA buses are used, and in PCIE specification definitions, the signal definitions of PCIE interface connectors on PCIE devices include I2C interface definitions, the physical form of the SMBus may be an I2C bus. Based on this, the management controller and the PCIE device may use the I2C channel to run the SMBus protocol to form an SMBus interface, that is, the PCIE interface connector of the PCIE device may be compatible with the SMBus interface. In this way, no additional physical signals need to be added between the management controller and the PCIE device, which helps to simplify the structure.
When the management controller and the PCIE device communicate through the SMBus, the management controller is a Master node (Master) of the SMBus, and the PCIE device is a Slave node (Slave) of the SMBus.
In the embodiment of the application, the command for acquiring the hot plug attribute can be defined by expanding the SMBus protocol.
The command for acquiring the hot plug attribute includes a request command, where the request command is a command sent by the management controller to the PCIE device, and may also be referred to as an acquiring request, where the request command is used to request to acquire the hot plug attribute.
The command to acquire the hot plug attribute may further include a reply command, which is a command initiated by the management controller, for reading (acquiring) the hot plug attribute in the PCIE device.
Illustratively, based on the SMBus protocol, command field 0xA0 may be defined as a request command to obtain a hot plug attribute (Get Hot Plug Attribute Request), and command field 0xE0 may be defined as a reply command to obtain a hot plug attribute (Get Hot Plug Attribute Response).
Illustratively, the command timing of the request command (0 xA 0) for the hot plug attribute is obtained, as shown in Table 1.
TABLE 1
Wherein the "S" field is used to indicate the start. The "Slave Address" field is used to indicate the SMBus interface physical Address of the PCIE device. The "W" field is used to indicate Write (Write). The "A" field is used to indicate an acknowledgement (Acknowledges), where A is 0 for characterizing an Acknowledgement (ACK) and A is 1 for characterizing a Non-acknowledgement (Non ACK/NACK). The Command (0 xA 0) field is used to indicate the request Command to obtain the hot plug attribute. The "Byte count" field is used to indicate the number of bytes, which may be N, which is a positive integer greater than 1. The "Data1-DataN" field is used to indicate Data1-Data N, where Data1-Data N is a hot plug attribute. The "PEC" field is used to indicate the packet error code (Packet Error Code). The "P" field is used to characterize the end.
Illustratively, the command timing of the answer command (0 xE 0) for the hot plug attribute is obtained, as shown in Table 2.
TABLE 2
Wherein, the Command (0 xE 0) field is used to indicate a response Command for acquiring the hot plug attribute. The "Sr" field is used to indicate Repeated Start (Repeated Start). The "R" field is used to characterize the Read (Read). Wherein the "Data1-DataN" field is used to indicate the Data content of the hot plug attribute.
It should be noted that "→" is used to indicate that the "Data1" field is the next field of the "a (a to the right of Byte count)" field.
The description of other fields in table 2 may be referred to the description of corresponding fields in table 1, and will not be repeated here.
In the embodiment of the application, after obtaining the hot plug attribute, the management controller firstly analyzes the hot plug identifier of the PCIE device from the response command, and is used for determining whether the PCIE device supports hot plug. If the hot plug identifier of the PCIE device indicates that the PCIE device supports hot plug, the hot plug configuration identifier is parsed from the response command, and is used for whether hot plug configuration information is stored in the PCIE device. If the hot plug configuration identifier indicates that hot plug configuration information is stored in the PCIE device, the hot plug configuration information is analyzed from the response command. If the hot plug configuration identifier indicates that the hot plug configuration information is not stored, the response command does not need to be analyzed.
On this basis, in the data format shown in fig. 3, the configuration Command (Setting Command) is an SMBus Command.
Illustratively, the content of the Setting Command field may be as follows:
Setting Command(for SMBus):
0xA2:Set multi PF Request
0xE2:Set multi PF Response
0xA6:Set MSI-X Vector Request
0xE6:Set MSI-X Vector Response
0xA8:Set GPIO state Request
0xE8:Set GPIO state Response
……
wherein the command fields 0xA2 and 0xE2 are used to indicate a configuration command and a response command, respectively, for setting a multi-physical function (multi physical function, multi PF) in a configuration operation of a hot plug. The command fields 0xA6 and 0xE6 are used for a configuration command and a response command, respectively, for setting the MSI-X interrupt register (interrupt vector) in a configuration operation for instructing hot plug. The command fields 0xA8 and 0xE8 are used for a configuration command and a response command, respectively, for indicating that the GPIO state is set in the configuration operation of the hot plug.
In the following, an exemplary description will be given of a command to set an MSI-X interrupt register, taking the MSI-X interrupt register as an example.
The management controller sends a configuration command to the PCIE device based on the SMBus protocol to instruct the PCIE device to set the MSI-X interrupt register.
Illustratively, when setting the MSI-X interrupt registers of the PCIE device, the command timing of the configuration commands of the MSI-X interrupt registers is set, as shown in Table 3.
TABLE 3 Table 3
Wherein Command (0 xA 6) is used to indicate a configuration Command to set the MSI-X interrupt register. Wherein the "Data1-DataN" field is used to indicate the configuration content of MSI-X.
The description of other fields in table 3, see the description of corresponding fields in tables 1-2, will not be repeated here.
After receiving the configuration command for setting the MSI-X interrupt register, the PCIE device sets the MSI-X interrupt register of the PCIE device based on the configuration command. For example, parameters such as MSI-X interrupt enable of MSI-X interrupt register, number of MSI-X interrupts, memory space size required for MSI-X interrupts, etc. are set.
After the PCIE equipment completes the configuration of the MSI-X interrupt register, the management controller initiates a response command and reads the configuration result of the MSI-X interrupt register.
Illustratively, the command timing of the reply command of the MSI-X interrupt register is set as shown in Table 4.
TABLE 4 Table 4
Wherein Command (0 xE 6) is used to indicate a reply Command to obtain configuration information for MSI-X. The "Data1-DataN" field is used to indicate the configuration result of the MSI-X interrupt register.
The description of other fields in table 4, see the description of corresponding fields in tables 1 to 3, will not be repeated here.
It should be noted that, the command timing of other hot plug configuration operations may refer to table 3 and table 4, and will not be described herein.
Mode 2, based on the I3C protocol, obtains the hot plug attribute.
In the embodiment of the application, the management controller and the PCIE device may be connected through an I3C bus, that is, the management controller and the PCIE device may perform data transmission through the I3C bus. Based on the above, the management controller and the PCIE device acquire the hot plug attribute from the PCIE device through the I3C interface and based on the I3C protocol.
Illustratively, the management controller sends an acquisition request to the PCIE device based on the I3C protocol, where the acquisition request is used to request to acquire hot plug attributes, such as a hot plug identifier, a hot plug configuration identifier, and hot plug configuration information.
Because I3C and I2C are compatible in physical signals, both SCL and SDA buses are used, and in PCIE specification definitions, the signal definitions of PCIE connectors on PCIE devices include I2C interfaces, the I3C buses may reuse the physical channels of the I2C buses. Based on this, the management controller and the PCIE device may use the I2C channel to run the I3C protocol to form an I3C interface, that is, the PCIE interface connector of the PCIE device may be compatible with the I3C interface. In this way, no additional physical signals need to be added between the management controller and the PCIE device, which helps to simplify the structure.
When the management Controller communicates with the PCIE Device through the I3C bus, the management Controller is a Master node (Master), that is, a control node (Controller), of the I3C bus, and the PCIE Device is a Slave node (Slave), that is, a Device node (Device), of the SMBus.
In the embodiment of the application, the management controller can acquire the hot plug attribute based on the read operation command of the I3C protocol.
That is, a request command to acquire a hot plug attribute may be defined based on a read operation instruction of the I3C protocol. Alternatively, a read operation instruction of the I3C protocol may be used as a request command to obtain the hot plug attribute.
Illustratively, when the hot plug attribute is obtained based on the read operation instruction of the I3C protocol, the command timing of the request command is as shown in table 5.
TABLE 5
Wherein, the "I3C Reserved Address" field is used for indicating the reserved address of the I3C, and the "I3C Reserved Address" field can take on the value of 7' h7E according to the specification definition. The "I3C Directed CCC" field is used to indicate the common command field (Common Command Codes) for I3C direct communication (point-to-point). The "Par" field is used to indicate the parity bit (Parity Bit in Write) to write. The "Target Address" field is used to indicate the I3C Address of the device node (i.e., PCIE device).
The description of other fields in table 5, see the description of corresponding fields in tables 1 to 4, will not be repeated here.
In the embodiment of the application, the command for acquiring the hot plug attribute can be defined by expanding the I3C protocol.
In the I3C specification, a part of reserved command field is defined in a common command field, and the value range of the reserved command field comprises 0xE0-0xFE and can be used as manufacturer Extension (Vendor Extension). Wherein different command fields may be used to represent different functions.
For example, when extending the I3C protocol, a command to obtain a hot plug attribute may be defined using a reserved command field in the I3C common command field, that is, using a value in the range of 0xE0-0 xFE. For example, a request command to obtain a hot plug attribute may be indicated using 0xE2 in the 0xE0-0xFE range.
Based on this, the command timing of the request command of the hot plug attribute is acquired as shown in table 6.
TABLE 6
Wherein 0xE2 is used to indicate a request command to obtain a hot plug attribute.
For the description of other fields in table 6, refer to the description of related fields in tables 1 to 5, and are not repeated here.
In the embodiment of the application, the management controller can send the configuration command to the PCIE device based on the write operation command of the I3C protocol.
That is, a configuration command may be sent to the PCIE device based on a write operation instruction of the I3C protocol, so as to instruct the PCIE device to perform configuration based on the configuration content. Alternatively, the write operation instruction of the I3C protocol may be used as a configuration command for setting the PCIE device.
Illustratively, based on the write operation instruction of the I3C protocol, the command timing of the configuration command is sent to the PCIE device, as shown in table 7.
TABLE 7
The description of the fields in table 7, see the descriptions of the corresponding fields in tables 1 to 6, will not be repeated here.
In the embodiment of the application, the CPU can send a response command to the management controller based on the interrupt operation command of the I3C protocol.
That is, the central processing unit CPU may send a response command of the configuration command, that is, a response command of the setting PCIE device, to the management controller based on the interrupt operation command of the I3C protocol. Alternatively, the interrupt operation command of the I3C protocol may be used as a reply command for setting the PCIE device.
For example, the PCIE device may actively initiate communication with the management controller through an interrupt operation command of the I3C protocol, so as to send a setting result of the configuration operation of the hot plug to the management controller.
Illustratively, the command timing of the reply command sent is based on the interrupt operation command of the I3C protocol, as shown in table 8.
TABLE 8
Wherein the "Target MDB" field indicates a mandatory data byte (mandatory data byte, MDB) of the PCIE device in the I3C interrupt operation, for the device node (i.e., PCIE device) to transmit an interrupt group number and an interrupt number to the control node (i.e., management controller), wherein different interrupt group numbers and interrupt numbers indicate different interrupt types and contents. "Target IBIData1-Target IBIDataN" is interrupt data content transmitted by an I3C device node to a control node, and is used to indicate an execution result of a configuration operation of hot plug, that is, a setting result of a PCIE device.
Exemplary, the data format of the "Target MDB" field is shown in FIG. 7. Wherein, the upper three bits (3 bits) of the "Target MDB" field are the Interrupt Group (Interrupt Group) identification, and the lower five bits (5 bits) of the "Target MDB" field are the reserved specific Interrupt number identification (Interrupt Identifier).
The description of other fields in table 8 refers to the description of related fields in tables 1 to 7, and the description thereof will not be repeated.
In the I3C protocol, a partially Reserved interrupt group number and interrupt number are defined, wherein the Reserved interrupt group number takes on a value of 3' b000, and the Reserved interrupt number takes on a value of 5' h00-5' h1f (i.e., 5' b00000-5' b 11111), which can be used as a Vendor Reserved (Vendor Reserved). Based on this, when the I3C protocol is extended, the interrupt group number and the interrupt number reserved in the I3C protocol may be used to indicate the setting result of the configuration operation of the hot plug of the PCIE device.
For example, the reserved interrupt group number 3'b000 and interrupt number 5' h12 may be used to indicate the set result of the configuration operation of the hot plug of the PCIE device.
Based on the above, in the data format shown in fig. 3, the configuration Command (Setting Command) is an I3C Directed CCC Command. Illustratively, the content of the Setting Command field may be as follows:
Setting Command(for I3C):
0xF1:Set multi PF Request
0x11:Set multi PF Response(Interrupt)
0xF2:Set MSI-X Vector Request
0xF2:Set MSI-X Vector Response(Interrupt)
0xF3:Set GPIO state Request
0x13:Set GPIO state Response(Interrupt)
......
Wherein, the command field 0xF1 is used for indicating a configuration command for setting multi PF (Multi physical function) in a configuration operation of the hot plug. The Interrupt operation command (Interrupt) corresponding to the command field 0x11 is used to indicate a response command for setting a multi PF in the configuration operation of the hot plug. The command word field 0xF2 is used to indicate the set MSI-X interrupt register (interrupt vector) configuration command in the configuration operation of the hot plug. The command field 0xF3 is used to indicate a configuration command to set the GPIO state in a configuration operation of a hot plug.
In the following, an exemplary description will be given of a command to set an MSI-X interrupt register, taking the MSI-X interrupt register as an example.
Illustratively, when the MSI-X interrupt registers of the PCIE device are configured, the command timing of the configuration commands of the MSI-X interrupt registers is set as shown in Table 9.
TABLE 9
Wherein 0xF2 is used to indicate a configuration command to set the MSI-X interrupt register. Wherein the "Data1-DataN" field is used to indicate the configuration content of MSI-X.
The descriptions of other fields in table 9 refer to the descriptions of related fields in tables 1 to 8, and the descriptions of other fields are not repeated.
Illustratively, the command timing of the reply command of the MSI-X interrupt register is set, as shown in Table 10.
Table 10
Wherein, "Target IBIData1-Target IBIDataN" is used to indicate the contents of the setting result of the MSI-X interrupt register.
The description of other fields in table 10 refers to the descriptions of related fields in tables 1 to 9, and the descriptions thereof are not repeated.
And 3, acquiring the hot plug attribute based on the NC-SI protocol.
In the embodiment of the application, the management controller and the PCIE device can be connected through an NC-SI bus, that is, the management controller and the PCIE device can perform data transmission through the NC-SI bus. Based on the above, the management controller obtains the hot plug attribute from the PCIE device through the NC-SI interface and based on the NC-SI protocol. For example, when the PCIE device is an Eth network card, the management controller obtains the hot plug attribute from the PCIE device through the NC-SI interface and based on the NC-SI protocol.
Illustratively, the management controller sends an acquisition request to the PCIE device based on the NC-SI protocol, where the acquisition request is used to request to acquire hot plug attributes, such as a hot plug identifier, a hot plug configuration identifier, and hot plug configuration information.
In the NC-SI specification, it is defined that NC-SI sideband communication data can be transmitted using a media independent interface transmission (RMII Based Transport, RBT) based interface. In addition, the data format of the original equipment manufacturer (original equipment manufacturer, OEM) Command when transmitting data is also defined to include commands (commands) and responses (responses).
In the embodiment of the application, the OEM command of NC-SI can be expanded to be a Vendor Defined command for defining a command for acquiring the hot plug attribute (Get Hot Plug Attribute), and the command can be used for acquiring the hot plug attribute of PCIE equipment.
As shown in fig. 8, a schematic diagram of a data format of a command for acquiring a hot plug attribute is shown.
Referring to fig. 8, from above and below, the first field is used to indicate the destination media access controller (destination media access control, DMAC), i.e., the MAC of the PCIE device, and the first field occupies 6 Bytes (Bytes) and has a value of 0xFFFFFFFFFFFF. The second field is used to indicate the source media access controller (source media access control, SMAC), i.e. the MAC of the management controller, and the second field takes up 6 Bytes (Bytes). The third field is used to indicate the Ethernet type (EtherType), a value of 0x88F8, and a type of NC-SI. The fourth field is used to indicate a Command packet header (Command packet header), wherein the control packet type of the Command packet header (control packet type) =0x50, which is an original equipment manufacturer Command (OEM Command). The fifth field is used to indicate the Manufacturer identification (Manufacturer ID), the supplier identification being IANA. The sixth field is used to indicate a vendor defined command (Vendor Defined Command), which is the get hot plug property command (Get Hot Plug Attribute Command).
As shown in fig. 9, a schematic diagram of a data format of a response command for acquiring a hot plug attribute is shown.
Referring to fig. 9, from top to bottom, left to right, the value of the second field is 0xFFFFFFFFFFFF. Control packet type (control packet type) of the fourth field=0xd0. The fifth field is used to indicate a Response Code (Response Code), and the sixth field is used to indicate a Reason Code (Reason Code). The eighth field is used to indicate a vendor defined answer (Vendor Defined Resonse), which is hot plug attribute data (Hot Plug Attribute Data).
For the description of the first to fourth fields and the seventh field in fig. 9, reference may be made to the description of the first to fifth fields in fig. 8, and the description is omitted herein.
Based on the above, in the data format shown in FIG. 3, the configuration Command (Setting Command) is an OEM NC-SI Command. Illustratively, the content of the Setting Command field may be as follows:
Setting Command(for NC-SI):
0xA2:Set multi PF Request
0xE2:Set multi PF Response
0xA6:Set MSI-X Vector Request
0xE6:Set MSI-X Vector Response
0xA8:Set GPIO state Request
0xE8:Set GPIO state Response
......
wherein, the command words 0xA2 and 0xE2 are respectively used for indicating a configuration command and a response command for setting the multi PF in the configuration operation of the hot plug. Command words 0xA6 and 0xE6 are used to indicate the configuration commands and response commands, respectively, for setting the MSI-X interrupt registers in a hot-plug configuration operation. Command words 0xA8 and 0xE8 indicate a configuration command and a response command, respectively, to set the GPIO state in a configuration operation of hot plug.
In the following, an exemplary description will be given of a command to set an MSI-X interrupt register, taking the MSI-X interrupt register as an example.
As shown in fig. 10, the data format of the configuration command is schematically shown when the MSI-X interrupt register is set.
Referring to FIG. 10, from top to bottom, a sixth field is used to indicate a Set MSI-X Vector Command to Set the MSI-X interrupt register.
The description of other fields in fig. 10 may be referred to the description of corresponding fields in fig. 8, and will not be repeated here.
As shown in fig. 11, the data format of the reply command is schematically shown when the MSI-X interrupt register is set.
Referring to fig. 11, from top to bottom, from left to right, an eighth field is used to indicate a reply (Set MSI-X Vector Response) to Set the MSI-X interrupt register.
The description of other fields in fig. 11 may be referred to the description of corresponding fields in fig. 9, and will not be repeated here.
And 4, acquiring the hot plug attribute based on the MCTP protocol.
In the embodiment of the application, the management controller can be connected with the PCIE device through a Central Processing Unit (CPU), wherein the management controller is connected with the CPU through a PCIE bus, and the Central Processing Unit (CPU) is connected with the PCIE device through the PCIE bus. Based on the above, the management controller obtains the hot plug attribute from the PCIE device through the PCIE interface based on the MCTP over PCIE protocol.
It is understood that the central processing unit CPU may be considered as a bridge and bus controller for communication based on MCTP.
The management controller sends an acquisition request to the Central Processing Unit (CPU) based on the MCTP protocol, and after the CPU receives the acquisition request, the CPU forwards the acquisition request to the PCIE device based on the PCIE protocol, where the acquisition request is used to request to acquire hot plug attributes, such as a hot plug identifier, a hot plug configuration identifier, and hot plug configuration information. The MCTP protocol is a management component transport protocol, which is a management protocol framework, and the lower layer supports the physical interface support PCIE, SMBus, UART, USB of the bearer, etc. Based on this, the management controller may communicate with the PCIE device based on MCTP over PCIE, MCTP over SMBus, MCTP over UART, or MCTP over USB protocol structures.
Wherein, the management protocol carried by the MCTP protocol upper layer supports NC-SI, (platform level data model, PLDM) and the like. Based on this, the management controller and the PCIE device can communicate with each other using a management protocol carried by an MCTP upper layer such as PLDM or NC-SI.
Based on the above, the protocol structure between the management controller and the PCIE device may be PLDM over MCTP over PCIE.
According to the embodiment of the application, the OEM command for obtaining the hot plug attribute of the PCIE device can be defined by expanding the PLDM protocol. The PLDM protocol defines OEM Specific (i.e., vendor-defined) data types and command formats, including Request (Request) and Response (Response), among others.
Illustratively, by extending the OEM Specific data type of the PLDM, a command and a response for obtaining the hot plug attribute (Get Hot Plug Attribute) are defined, which are used for the management controller to obtain the hot plug attribute of the PCIE device.
Based on the above, in the data format shown in fig. 3, the configuration Command (Setting Command) is an OEM PLDM Command. Illustratively, the content of the Setting Command field may be as follows:
Setting Command(for PLBM over MCTP):
0xA2:Set multi PF Request
0xA6:Set MSI-X Vector Request
0xA8:Set GPIO state Request
......
wherein the command field 0xA2 is used to indicate a configuration command to set a multi PF (multi physical function) in a configuration operation of the hot plug. The command field 0xA6 is used to indicate a configuration command for a configuration operation setup MSI-X interrupt register of a hot plug. The command field 0xA8 is used to indicate a configuration command to set the GPIO state in the configuration operation of the hot plug.
As shown in fig. 12, a schematic diagram of a data format of a request command for obtaining a hot plug attribute is shown.
Referring to fig. 12, from top to bottom, a first field is used to indicate a flash component interconnection Vendor Defined message header (PCIE Vendor Defined message (abbreviated as VDM) header) of 12 bytes (bytes), and a message code (message code) has a value of 01111111, which is Vendor Defined (Vendor Defined). The second field is used to indicate the management component transport protocol header (MCTP header) for a total of 4 bytes (bytes). The third field is used to indicate an Integrity Check (IC), which is 1 bit (bit) in length, and the value of IC is used to indicate whether the MCTP message contains an integrity check field, where a 0x1 value indicates a contain and a 0x0 value indicates no contain. The fourth field is used to indicate a Message Type (Message Type), the Message Type is PLDM, and the value is 0x01. The fifth field is used to indicate a platform level data model Header (PLDM Header), 4 bytes total, a PLDM Type (PLDM Type) value of 111111, and manufacturer defined (OEM Specific). The sixth field is used to indicate that the content of the PLDM message data (PLDM Message Data), PLDM Message Data is the data content of the request command to obtain the hot plug attribute.
Illustratively, the process of sending the request command to the PCIE device by the management controller includes: the management controller sends a request command to the Central Processing Unit (CPU) based on a management Protocol (PLDM) protocol borne by an MCTP protocol upper layer, and after the CPU receives the request command, the CPU forwards the request command to the PCIE equipment based on the PCIE protocol so as to request to acquire hot plug attributes such as a hot plug identifier, a hot plug configuration identifier and hot plug configuration information.
As shown in fig. 13, a schematic diagram of a data format of a response command for acquiring a hot plug attribute is shown.
Referring to fig. 13, from top to bottom, a sixth field is used to indicate that the content of PLDM Message Data, PLDM Message Data is the data content of the acquired hot plug attribute.
The description of other fields in fig. 13, referring to the description of corresponding fields in fig. 12, will not be repeated here.
Illustratively, the process of sending the reply command to the management controller by the PCIE device includes: the PCIE device sends a response command to the CPU based on the PCIE protocol, and after the CPU receives the response command, the CPU forwards the response command to the management controller based on the PLDM protocol, and the management controller receives the response command sent by the CPU based on the PLDM protocol.
In the following, an exemplary description will be given of a command to set an MSI-X interrupt register, taking the MSI-X interrupt register as an example.
Illustratively, when setting the MSI-X interrupt registers of PCIE devices, a schematic diagram of the data format of the configuration commands for setting the MSI-X interrupt registers is shown in FIG. 14.
Referring to FIG. 14, from top to bottom, a sixth field is used to indicate a Set MSI-X Vector Command to Set the MSI-X interrupt register.
It should be noted that, for the description of other fields in fig. 14, refer to the description of corresponding fields in fig. 12, and are not repeated here.
Illustratively, when setting the MSI-X interrupt register of the PCIE device, a schematic diagram of the data format of the reply of the MSI-X interrupt register is set, as shown in FIG. 15.
Referring to fig. 15, from top to bottom, from left to right, an eighth field is used to indicate a reply (Set MSI-X Vector Response) to Set the MSI-X interrupt register.
The description of other fields in fig. 15, referring to the description of corresponding fields in fig. 13, will not be repeated here.
Hereinafter, with reference to fig. 16, an exemplary description will be given of a scheme of the hot inserting method provided by the present application.
FIG. 16 is a flowchart illustrating a method of hot insertion according to an exemplary embodiment. The hot-plug method includes, for example, the following S1601-S1616.
S1601: the hot plug controller sends a hot plug request in response to detecting that the PCIE device is hot plugged into the PCIE slot.
In the embodiment of the application, the hot plug controller can send a hot plug request to the Central Processing Unit (CPU) and/or the management controller.
The relevant description of S1601 may be referred to mode a and mode b in S401, and will not be described herein.
Optionally, S1602: the CPU obtains the hot plug identification of the PCIE slot,
in the embodiment of the application, after receiving a hot plug request, a Central Processing Unit (CPU) responds to the hot plug request to obtain a hot plug identifier of a PCIE slot, wherein the hot plug identifier of the PCIE slot is used for indicating that the PCIE slot supports hot plug or does not support hot plug.
For example, after the central processing unit CPU receives the hot plug request, during the process of running the OS by the central processing unit CPU, the OS responds to the hot plug request to obtain the hot plug identifier of the PCIE slot.
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 that includes a hot plug identifier of the PCIE Slot.
Optionally, S1603: based on the hot plug identification of the PCIE slot, the CPU determines whether the PCIE slot supports hot plug.
Illustratively, during the process of running the OS by the central processing unit CPU, the OS determines whether the PCIE slot supports hot plug based on the obtained hot plug identifier of the PCIE slot. Because the hot plug identifier of the PCIE slot indicates that the PCIE slot supports hot plug or does not support hot plug, the central processing unit CPU may determine whether the PCIE slot supports hot plug based on the hot plug identifier of the PCIE slot.
For example, when the hot plug flag bit is 1, the PCIE slot is indicated to support hot plug, and when it is 0, the PCIE slot is indicated to not support hot plug.
Optionally, S1604: the central processing unit CPU transmits the determination result to the management controller.
The determination result refers to the determination result of S1603, where the determination result is used to indicate that the PCIE slot supports hot plug or does not support hot plug.
Optionally, S1605: based on that the PCIE slots do not support hot plug, the management controller outputs prompt information of the PCIE slots.
In the embodiment of the application, after determining that the PCIE slot does not support hot plug, the CPU sends a prompting message of the PCIE slot to the management controller, where the prompting message is used to indicate that the PCIE slot does not support hot plug. And after receiving the prompt information of the PCIE slot, the management controller outputs the prompt information of the PCIE slot.
For the description of S1605, refer to S404, which are the same principle, and are not described here again.
S1606: the management controller supports hot plug based on the PCIE slots and sends a power-on notification to the hot plug controller.
S1607: and the hot plug controller responds to the power-on notification to power on the PCIE equipment.
It should be noted that S1606-S1607 may be considered as an implementation of "the management controller powers up the PCIE device". In addition, for the description of S1606-S1607, reference may be made to the mode c in S401, and the description thereof will not be repeated here.
S1608: and the management controller acquires the hot plug identification of the PCIE equipment.
The relevant description of S1608 may refer to S401, and will not be described herein.
S1609: the management controller determines whether the PCIE device supports hot plug based on the hot plug identification of the PCIE device.
If the determination is yes, S1610-S1613 are executed, and if the determination is no, S1614-S1616 are executed.
For a description of S1609, reference may be made to S402, which is not described herein.
S1610: the management controller performs hot plug configuration operations on the PCIE devices based on the hot plug configuration information.
The relevant description of S1610 may be referred to case 1 in S403, and will not be described herein.
S1611: the management controller notifies the central processing unit CPU of the first completion to notify the PCIE device that the hot plug configuration operation is completed.
S1612: and the CPU responds to the received first completion notification and allocates PCIE resources for the PCIE equipment.
The relevant descriptions of S1611-S1612 can be referred to as case 2 in S403, and will not be repeated here.
S1613: the central processing unit CPU loads the driver of the PCIE device.
The relevant description of S1613 may be referred to as case 3 in S403, and will not be described herein.
S1614: and the management controller outputs prompt information for prompting that the PCIE equipment does not support hot plug.
For the description of S1614, refer to S404, and are not described herein.
S1615: and the management controller sends a power-down notification to the hot plug controller, and the power-down notification is used for notifying that the PCIE equipment is powered down.
S1616: and the hot plug controller responds to the power-down notification to power down the PCIE equipment.
It should be noted that S1615-S1616 may be considered as an implementation of "power down of the management controller for the PCIE device". In addition, for the description of S1615-S1616, reference may be made to S406, which will not be repeated here.
In the following, an exemplary description is given of a scheme of the hot extraction method provided by the present application with reference to fig. 17.
Fig. 17 is a flowchart illustrating a hot extraction method according to an exemplary embodiment. Illustratively, the hot pull method includes the following S1701-S1714.
S1701: the hot plug controller sends a hot plug request in response to the received hot plug notification.
In the embodiment of the application, the hot plug controller can send a hot plug request to the Central Processing Unit (CPU) and/or the management controller.
The relevant description of S1701 may refer to the manner d and the manner e in S401, which are not described herein.
S1702: and the CPU acquires the hot plug identification of the PCIE slot.
In the embodiment of the application, after receiving the hot-pull request, the Central Processing Unit (CPU) responds to the hot-pull request to obtain the hot-plug identification of the PCIE slot.
For other descriptions of S1702, refer to the descriptions of S702, and are not repeated here.
S1703: based on the hot plug identification of the PCIE slot, the CPU determines whether the PCIE slot supports hot plug.
For other descriptions of S1703, refer to the descriptions of S1603, and are not repeated here.
S1704: the central processing unit CPU transmits the determination result to the management controller.
The determination result refers to the determination result of S1703, where the determination result is used to indicate that the PCIE slot supports hot plug or does not support hot plug.
For other descriptions of S1704, refer to the descriptions of S1604, and are not repeated here.
S1705: based on that the PCIE slots do not support hot plug, the management controller outputs prompt information of the PCIE slots.
In the embodiment of the application, the management controller indicates that the PCIE slot does not support hot plug based on the determination result, and outputs the prompt information of the PCIE slot.
For the description of S1705, refer to S404 and S1605, which are the same in principle, and are not described herein.
S1706: and the management controller supports hot plug based on the PCIE slot position, and acquires a hot plug identifier of the PCIE device.
In the embodiment of the application, the management controller indicates that the PCIE slot supports hot plug based on the determination result, and obtains the hot plug identification of the PCIE device.
For a description of S1706, reference may be made to S401, which is not described herein.
S1707: the management controller determines whether the PCIE device supports hot plug based on the hot plug identification of the PCIE device.
If the determination is no, S1708 is executed, and if the determination is yes, S1709-S1714 are executed.
For a description of S1707, reference may be made to S402, which is not described herein.
S1708: and the management controller outputs prompt information for prompting that the PCIE equipment does not support hot plug.
For the description of S1708, refer to S404, and are not described herein.
S1709: and the management controller executes hot-unplugged configuration operation on the PCIE equipment based on the hot-unplugged configuration information.
The relevant description of S1709 may be referred to case 4 in S403, and will not be described herein.
S1710: the management controller notifies the central processing unit CPU of the completion of the hot-unplugged configuration operation for the PCIE device.
S1711: and the CPU responds to the received second notification to release PCIE resources of the PCIE equipment.
The relevant descriptions of S1710-S1711 may be referred to case 5 in S403, and will not be described here.
S1712: and the CPU sends an unloading result notification to the management controller, and the unloading result notification is used for notifying the PCIE equipment that the unloading is completed.
In the embodiment of the application, after releasing the PCIE resource of the PCIE device, the CPU sends an unloading result notification to the management controller to notify the management controller that the PCIE device has completed unloading.
S1713: and the management controller sends a power-down notification to the hot plug controller, and the power-down notification is used for notifying that the PCIE equipment is powered down.
S1714: and the hot plug controller responds to the power-down notification to power down the PCIE equipment.
It should be noted that S1713-S1714 may be considered as an implementation of "power down management controller for PCIE device". In addition, for the description of S1713-S1714, reference may be made to S406, which is not repeated here.
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. 18 shows a schematic diagram of a possible configuration of the hot plug device (denoted as hot plug device 1800) according to the foregoing embodiment, where the actions performed by the hot plug device 1800 are implemented by a management controller of a computer device or implemented by the management controller executing corresponding software, where the computer device includes a PCIE device and a PCIE slot, and the management controller is communicatively connected to the PCIE device, and the PCIE device is connected to the PCIE slot in a plug-in manner. The hot plug apparatus 1800 may include an acquisition unit 1801 and an execution unit 1802. The obtaining unit 1801 is configured to obtain a hot plug identifier when the PCIE device is hot plugged into the PCIE slot or when the PCIE device is requested to be hot plugged out, where the hot plug identifier is used to indicate that the PCIE device supports hot plug or does not support hot plug. For example, S401 shown in fig. 4. The execution unit is used for executing configuration operation of hot plug on the PCIE equipment if the hot plug identification indicates that the PCIE equipment supports hot plug; the hot plug configuration operation is used for configuring the PCIE equipment. For example, as shown in fig. 4, S403.
Optionally, the PCIE device further stores hot plug configuration information; the acquiring unit 1801 is further configured to acquire hot plug configuration information; the hot plug configuration information comprises configuration content; the execution unit 1802 is specifically configured to: based on the configuration content, the PCIE device is configured.
Optionally, the hot plug configuration information includes a configuration command and configuration content; the execution unit 1802 is specifically configured to: sending a configuration command to PCIE equipment; the configuration command is used for indicating that the PCIE device is configured based on the configuration content.
Optionally, the execution unit 1802 is specifically configured to: based on SMBus protocol, I3C protocol, MCTP protocol or NC-SI protocol, configuration command is sent to PCIE device.
Optionally, the execution unit 1802 is specifically configured to: based on the write operation instruction in the I3C protocol, a configuration command is sent to the PCIE device.
Optionally, the PCIE device further stores a hot plug configuration identifier; the acquisition unit 1801 specifically functions to: acquiring a hot plug configuration identifier; the hot plug configuration identifier is used for indicating that hot plug configuration information is stored in the PCIE equipment or hot plug configuration information is not stored in the PCIE equipment; and if the hot plug configuration identification indicates that the hot plug configuration information is stored, acquiring the hot plug configuration information.
Alternatively, the acquiring unit 1801 is specifically configured to: based on a system management bus SMBus protocol, an improved integrated circuit bus I3C protocol, a management component transmission MCTP protocol or a network controller sideband interface NC-SI protocol, sending an acquisition request to PCIE equipment; the acquisition request is used for requesting to acquire the hot plug attribute; the hot plug attribute comprises a hot plug identifier, a hot plug configuration identifier and hot plug configuration information, or the hot plug attribute comprises a hot plug identifier and a hot plug configuration identifier.
Alternatively, the acquiring unit 1801 is specifically configured to: and sending an acquisition request to the PCIE equipment based on the read operation command of the I3C protocol.
Optionally, the execution unit 1802 is further configured to: and sending a completion notification to the CPU, wherein the completion notification is used for indicating that the configuration operation of the hot plug of the PCIE device is completed.
Optionally, the execution unit 1802 is further configured to: if the hot plug identification indicates that the PCIE equipment does not support hot plug, outputting prompt information; the prompt information is used for prompting the PCIE equipment not to support hot plug.
Optionally, in the case that the PCIE device is hot inserted into a PCIE slot, the execution unit 1802 is further configured to: if the hot plug identifier indicates that the PCIE device does not support hot plug, powering down the PCIE device.
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 1800 provided above may refer to the corresponding method embodiments described above, and will not be repeated.
The embodiment of the application also provides a computing device which comprises a management controller, PCIE slots and PCIE devices, wherein the PCIE devices are connected with the PCIE slots in a plug-in manner, and the management controller is connected with the PCIE devices. The management controller is used for the hot plug method in the embodiment.
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 specifically be a mobile phone, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, a tablet computer, a notebook computer, 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 a computer program stored thereon that, when run on a management controller, causes the management controller to perform a method performed by any one of the management controllers 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 management controller 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 central processing unit CPU described above may also be replaced by a general purpose central processing unit CPU, 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 management controller, cause the management controller 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 the management controller, the processes or functions in accordance with embodiments of the present application are produced in whole or in part.
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 the management controller, the processes or functions in accordance with embodiments of the present application are produced in whole or in part.
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 central processing unit CPU 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. The hot plug method is characterized by being used for a management controller, wherein the management controller is in communication connection with PCIE equipment which is interconnected with a quick peripheral component, and hot plug identification is stored in the PCIE equipment; the method comprises the following steps:
acquiring the hot plug identifier under the condition that the PCIE device is hot plugged into a PCIE slot or the PCIE device is requested to be hot plugged out, wherein the hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug;
if the hot plug identifier indicates that the PCIE equipment supports hot plug, executing configuration operation of hot plug on the PCIE equipment; the hot plug configuration operation is used for configuring the PCIE device.
2. The method of claim 1, wherein the PCIE device further stores hot plug configuration information; the performing a hot plug configuration operation on the PCIE device includes:
acquiring the hot plug configuration information;
and configuring the PCIE equipment based on the configuration information.
3. The method of claim 2, wherein the hot plug configuration information further comprises a configuration command; the configuring the PCIE device based on the configuration information includes:
Sending a configuration command to the PCIE equipment; the configuration command is used for indicating to configure the PCIE equipment based on the configuration information.
4. The method of claim 3, wherein the sending the configuration command to the PCIE device comprises:
and sending the configuration command to the PCIE equipment based on a system management bus (SMBus) protocol, an improved integrated circuit bus (I3C) protocol, a Management Component Transmission (MCTP) protocol or a network controller sideband interface (NC-SI) protocol.
5. The method of claim 4, wherein the sending the configuration command to the PCIE device based on an I3C protocol comprises:
and sending the configuration command to the PCIE equipment based on the write operation instruction in the I3C protocol.
6. The method of any of claims 2-5, wherein the PCIE device further stores a hot plug configuration identifier; the obtaining the hot plug configuration information includes:
acquiring the hot plug configuration identifier; the hot plug configuration identifier is used for indicating that the PCIE device stores the hot plug configuration information or does not store the hot plug configuration information;
and if the hot plug configuration identification indicates that the hot plug configuration information is stored, acquiring the hot plug configuration information.
7. The method according to any one of claims 1 to 6, wherein,
the hot plug configuration information packet 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.
8. The method of any of claims 1-7, wherein in the event that the PCIE device is hot plugged into a PCIE slot, the method further comprises:
and if the hot plug identifier indicates that the PCIE equipment does not support hot plug, powering down the PCIE equipment.
9. A PCIE device is characterized in that,
the PCIE equipment stores a hot plug identifier; the hot plug identifier is used for indicating that the PCIE device supports hot plug or does not support hot plug.
10. A management controller, comprising: a processor and a memory are provided for the processor,
the processor is connected to the memory, the memory stores computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to cause the management controller to implement the method of any one of claims 1-8.
CN202310924387.9A 2023-07-25 2023-07-25 Hot plug method, PCIE equipment and management controller Pending CN117194299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310924387.9A CN117194299A (en) 2023-07-25 2023-07-25 Hot plug method, PCIE equipment and management controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310924387.9A CN117194299A (en) 2023-07-25 2023-07-25 Hot plug method, PCIE equipment and management controller

Publications (1)

Publication Number Publication Date
CN117194299A true CN117194299A (en) 2023-12-08

Family

ID=88991366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310924387.9A Pending CN117194299A (en) 2023-07-25 2023-07-25 Hot plug method, PCIE equipment and management controller

Country Status (1)

Country Link
CN (1) CN117194299A (en)

Similar Documents

Publication Publication Date Title
US20210004343A1 (en) Switching Device, Peripheral Component Interconnect Express System, and Method for Initializing Peripheral Component Interconnect Express System
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
JP5054201B2 (en) Unified connector architecture
TW591413B (en) A common boot environment for a modular server system
WO2016037503A1 (en) Configuration method and device of pcie topology
US10127170B2 (en) High density serial over LAN management system
JP2018533120A (en) Bridging and virtualization of input / output signals in multi-node networks
EP3035187B1 (en) Hard disk and management method
US20160306634A1 (en) Electronic device
EP3716084A1 (en) Apparatus and method for sharing a flash device among multiple masters of a computing platform
CN107506323B (en) Hot plug processing method and device
EP3813308A1 (en) Message forwarding method, intermediate device and computer device
AU2004215948B2 (en) System and method for configuring and deploying input/output cards in a communications environment
CN112988637A (en) Promotion and I2C backward compatible I3C hub
CN117194299A (en) Hot plug method, PCIE equipment and management controller
US20230418703A1 (en) Autonomic troubleshooting of a system of devices
US10645166B2 (en) Network interface card
US20100088477A1 (en) Memory share system and memory share apparatus
TW202343237A (en) Datacenter-ready secure control module and control method
CN110321263B (en) Hard disk monitoring system
WO2023160691A1 (en) Connector-based port management method and related device
CN116860680A (en) Hot plug method, PCIE equipment and computer system
CN110955629B (en) Computing device
CN116860681A (en) Hot plug method and computer system
KR20080010791A (en) Web-based monitoring module, hardware system including the same and monitoring method of web-based monitoring module

Legal Events

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