Card dropping detection method for PCIe equipment and BMC

By obtaining the address information and identification of the PCIe device during the startup phase of the computing device and conducting comparison and detection, the problem of PCIe device card drop detection is solved, accurate card drop detection and timely intervention are achieved, and the user experience and device maintainability are improved. .

CN118733383APending Publication Date: 2024-10-01XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410815525.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively detect the card drop situation of the PCIe device in the computing device, affecting the device operation maintainability and user experience.

Method used

By obtaining the address information of the PCIe device during the startup phase of the computing device, obtain the device identification, and compare it with the pre-stored identification to determine whether the device has lost the card, implement periodic or non-periodic card loss detection, send alarm information and intervene in a timely manner .

Benefits of technology

It achieves accurate card drop detection of PCIe devices during the operation of computing devices, reduces business impact, and improves user experience and device maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733383A_ABST
    Figure CN118733383A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a card dropping detection method for PCIe (Peripheral Component Interconnect Express) equipment and a BMC (Baseboard Management Controller) and relates to the technical field of computers. The method comprises the steps that address information of a first PCIe device is determined, the address information is obtained through a BIOS in the starting stage of the computing device, and the first PCIe device is deployed in the computing device; acquiring an equipment identifier under the address information based on the address information; if the acquisition fails, determining that the first PCIe device is in a card-off state; if the first PCIe device is successfully acquired, comparing the device identifier with a pre-stored identifier, and determining whether the first PCIe device is in a card-off state; the pre-stored identifier and the address information have a preset corresponding relationship so as to realize card-off detection of the PCIe device deployed by the computing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a card drop detection method for a PCIe device and a BMC. Background Art

[0002] With the increasing complexity of the hardware configuration of computing devices (such as AI (Artificial Intelligence) servers and rack servers, etc.), the requirements for the maintainability of computing device operation are becoming higher and higher. Among them, card drop detection of PCIe (Peripheral Component Interconnect Express) devices deployed in computing devices has received special attention.

[0003] Therefore, how to provide a card drop detection method for PCIe devices becomes an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, BMC, system, computing device, computer storage medium and computer program product for detecting card drop of a PCIe device, which can implement card drop detection of a PCIe device deployed by a computing device.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting a card drop of a PCIe device, the method comprising:

[0006] Determine address information of a first PCIe device, where the address information is obtained through BIOS during a startup phase of a computing device, and the first PCIe device is deployed on the computing device;

[0007] Based on the address information, obtaining a device identifier under the address information;

[0008] If the acquisition fails, determining that the first PCIe device is card-off;

[0009] If the acquisition is successful, the device identifier is compared with a pre-stored identifier to determine whether the first PCIe device is card-dropped; the pre-stored identifier and the address information have a preset corresponding relationship.

[0010] In the above process, after the computing device completes startup, the address information of the first PCIe device can be determined from the address information of each PCIe device obtained by BIOS during the startup phase of the computing device. After that, based on the address information of the first PCIe device, an attempt can be made to obtain the device identifier under the address information. If the acquisition fails, it is determined that the first PCIe device is card-off; if the acquisition is successful, the acquired device identifier is compared with a pre-stored identifier having a preset corresponding relationship with the address information of the first PCIe device to determine whether the first PCIe device is card-off. This provides a card-off detection scheme for the PCIe device deployed by the computing device after the computing device completes startup during the operation process of the computing device (i.e., the operation process of the operating system of the computing device). Through this scheme, the PCIe device deployed by the computing device can be periodically or non-periodically detected during the operation of the computing device, so as to determine whether the PCIe device is card-off in a timely manner. Subsequently, when it is determined that the PCIe device of the computing device is card-off, immediate intervention can be performed to reduce the impact on the business running the computing device and improve the user experience.

[0011] In some possible implementations, the device identification includes the manufacturer ID and / or device ID of the first PCIe device. In this example, the device identification includes the manufacturer ID and / or device ID of the first PCIe device, which can uniquely identify the corresponding first PCIe device. Determining whether the first PCIe device has a card drop based on such identification can improve the accuracy of the card drop detection result to a certain extent.

[0012] In some possible implementations, the pre-stored identifier is obtained and stored during the enumeration of PCIe devices deployed by the computing device through BIOS during the startup phase of the computing device; or, it is configured and stored after the computing device completes the configuration of each PCIe device.

[0013] In the above example, the computing device enumerates the pre-stored identifier of the first PCIe device through the running BIOS during the startup phase, indicating that the first PCIe device is in a state of not dropping the card during enumeration. Through this type of pre-stored identifier, the computing device can more conveniently and accurately detect the drop of the card of its PCIe device during operation. In addition, after the computing device completes the configuration of each PCIe device, each PCIe device of the computing device is determined. At this time, the pre-stored identifier of the first PCIe device is configured and stored, which can also more conveniently and accurately detect the drop of the card of the PCIe device during operation of the computing device.

[0014] In some possible implementations, the determining whether the first PCIe device is card-off includes: if the comparison result of the device identifier and the pre-stored identifier indicates that the device identifier and the pre-stored identifier are inconsistent, then determining that the first PCIe device is card-off. In this example, if the comparison result indicates that the device identifier and the pre-stored identifier are inconsistent, it can be determined that the first PCIe device is not accessed based on the address information of the first PCIe device, and accordingly, it is determined that the first PCIe device is card-off, so as to realize the card-off detection of the PCIe device of the computing device during the operation process after the computing device completes the startup, and a relatively accurate card-off detection result can be determined.

[0015] In some possible implementations, the method further includes: sending a first alarm message, wherein the first alarm message indicates that the first PCIe device has lost a card. In this example, after determining that the first PCIe device has lost a card, the first alarm message indicating that the first PCIe device has lost a card is sent to remind the user that the first PCIe device has lost a card, so that the user can intervene in the card loss of the first PCIe device, such as performing maintenance operations, to avoid affecting the operation of the computing device and the implementation of services.

[0016] In some possible implementations, it further includes: if the comparison result indicates that the device identifier is consistent with the pre-stored identifier, determining that the first PCIe device has not lost the card. In this example, if the comparison result indicates that the device identifier is consistent with the pre-stored identifier, it is determined that the first PCIe device is accessed based on the address information of the first PCIe device, and accordingly, it is determined that the first PCIe device has not lost the card, so as to realize the card loss detection of the PCIe device of the computing device during the operation process after the computing device is started, and a relatively accurate card loss detection result can be determined.

[0017] In some possible implementations, the method further includes: in the case where it is determined that the first PCIe device has not lost a card, determining whether the first PCIe device has been detected as lost a card in the previous card loss detection cycle; if the determination is yes, sending a second alarm message, wherein the second alarm message indicates that the first PCIe device has recovered from a card loss. In this exemplary embodiment, the first PCIe device was detected as lost a card in the previous card loss detection cycle, but the current card loss detection is determined to be not lost a card, which to a certain extent indicates that the card loss of the first PCIe device has been repaired after user intervention, and the second alarm message indicating that the card loss of the first PCIe device has been recovered is sent to inform the user of the specific situation.

[0018] In some possible implementations, the computing device deploys a first module, wherein the first module includes a specified number of PCIe devices; before determining the address information of the first PCIe device, it also includes: determining the address information of several PCIe devices enumerated by the BIOS and their respective corresponding identifiers, wherein the several PCIe devices are deployed in the computing device; obtaining the identifiers of each PCIe device in the first module; if it is determined that the address information of the several PCIe devices does not include the address information of the second PCIe device in the first module based on the identifiers of each PCIe device in the first module and the respective corresponding identifiers of the address information of the several PCIe devices enumerated by the BIOS, a third alarm message is sent, wherein the third alarm message indicates that the second PCIe device is disconnected. In this example, the detection of the disconnection of the PCIe device in the module can be realized, so that the user can determine the working status of the PCIe device in the module.

[0019] In some possible implementations, the obtaining of the device identification under the address information based on the address information includes: obtaining the device identification based on the address information through a management engine ME. In this example, an implementation scheme for obtaining the device identification under the address information of a first PCIe device during the operation of an operating system of a computing device is provided, which provides a basis for detecting a card drop of a PCIe device of the computing device during the operation of the operating system of the computing device.

[0020] In some possible implementations, the method is applied to a BMC, and the BMC is used to manage the computing device; the obtaining of the device identification based on the address information through the running management engine ME includes: the BMC sending the address information to the computing device so that the computing device obtains the device identification based on the address information through the running management engine ME; and obtaining the device identification sent by the computing device.

[0021] In the above example, since the BMC cannot directly access the PCIe device, the BME sends the address information of the first PCIe device to the computing device, so that the computing device can obtain the device identifier under the address information based on the address information of the first PCIe device, thereby obtaining the device identifier under the address information of the current first PCIe device, so as to facilitate the execution of the card drop detection process of the PCIe device, realize the card drop detection of the PCIe device during the operation of the computing device, and better ensure the operation of the computing device and business implementation.

[0022] In some possible implementations, the address information includes a bus number, a device number, and a function number. In this example, the address information including the bus number, the device number, and the function number can uniquely identify the corresponding PCIe device in the computing device to better ensure the accuracy of subsequent card drop detection results.

[0023] In a second aspect, an embodiment of the present application provides a card drop detection device for a PCIe device, the device comprising:

[0024] A first determination module is configured to determine address information of a first PCIe device, wherein the address information is obtained through BIOS during a startup phase of a computing device, and the first PCIe device is deployed on the computing device;

[0025] A first acquisition module is configured to acquire a device identifier under the address information based on the address information;

[0026] A second determination module is configured to determine that the first PCIe device is card-off if the acquisition fails;

[0027] The comparison and determination module is configured to compare the device identification with a pre-stored identification to determine whether the first PCIe device is card-dropped if the acquisition is successful; the pre-stored identification and the address information have a preset corresponding relationship.

[0028] In a third aspect, an embodiment of the present application provides a baseboard management controller BMC, which is used to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0029] In a fourth aspect, an embodiment of the present application provides a card drop detection system for a PCIe device, the system comprising: a first processor, a second processor and a baseboard management controller BMC;

[0030] The first processor is configured to, during a startup phase of the computing device where the first processor is located, enumerate the PCIe devices deployed by the computing device, obtain address information of one or more enumerated PCIe devices, and send the address information of the one or more PCIe devices to the BMC, wherein the address information of the one or more PCIe devices includes the address information of the first PCIe device;

[0031] The BMC is configured to determine address information of a first PCIe device; based on the address information, obtain a device identifier under the address information from the second processor; if the acquisition fails, determine that the first PCIe device is card-off; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device is card-off; the pre-stored identifier and the address information have a preset corresponding relationship.

[0032] In a fifth aspect, an embodiment of the present application provides a card drop detection system for a PCIe device, the system comprising: a processor and a baseboard management controller BMC;

[0033] The processor is configured to, during a startup phase of the computing device where the processor is located, enumerate the PCIe devices deployed by the computing device, obtain address information of one or more enumerated PCIe devices, and send the address information of the one or more PCIe devices to the BMC, wherein the address information of the one or more PCIe devices includes address information of the first PCIe device;

[0034] The BMC is configured to determine address information of a first PCIe device; based on the address information, obtain a device identifier under the address information from the processor; if the acquisition fails, determine that the first PCIe device is card-off; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device is card-off; the pre-stored identifier and the address information have a preset corresponding relationship.

[0035] In a sixth aspect, an embodiment of the present application provides a computing device, comprising a baseboard management controller BMC; the BMC is used to determine address information of a first PCIe device, the address information being obtained through BIOS during the startup phase of the computing device, and the first PCIe device being deployed on the computing device; based on the address information, obtaining a device identifier under the address information; if the acquisition fails, determining that the first PCIe device is card-off; if the acquisition is successful, comparing the device identifier with a pre-stored identifier to determine whether the first PCIe device is card-off; the pre-stored identifier has a preset correspondence with the address information.

[0036] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0037] In an eighth aspect, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0038] It can be understood that the beneficial effects of the second to eighth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1AIt is a schematic diagram of an application scenario of card drop detection for a PCIe device provided by an embodiment of the present application;

[0040] Figure 1B This is a schematic diagram of another application scenario of card drop detection for a PCIe device provided in an embodiment of the present application;

[0041] Figure 2A This is a schematic diagram of another application scenario of card drop detection for a PCIe device provided in an embodiment of the present application;

[0042] Figure 2B This is a schematic diagram of another application scenario of card drop detection for a PCIe device provided in an embodiment of the present application;

[0043] Figure 3 It is a flow chart of a method for detecting a card drop of a PCIe device provided in an embodiment of the present application;

[0044] Figure 4 It is a flowchart of a method for detecting a card drop of a PCIe device in a specific embodiment of the present application;

[0045] Figure 5 This is a flow chart of a card drop detection system for a PCIe device in a specific embodiment of the present application;

[0046] Figure 6 It is a flowchart of another card drop detection system for a PCIe device in a specific embodiment of the present application;

[0047] Figure 7 It is a structural schematic diagram of a card drop detection device for a PCIe device provided in an embodiment of the present application;

[0048] Figure 8 It is a structural diagram of a BMC provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.

[0050] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.

[0051] In the description of this document, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.

[0052] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0053] To facilitate understanding of the technical solutions of the embodiments of the present application, the terms involved in this document are explained below.

[0054] BMC (Baseboard Management Controller) is a dedicated controller for monitoring and managing computing devices (such as servers). It is a small operating system. BMC includes two parts: BMC hardware and BMC software. BMC hardware includes, for example, independent processors and peripheral circuits, which are independently powered and work independently. Even if the connected (or deployed) computing device is not powered on (which may mean that the computing device's operating system is not started), BMC can still work independently.

[0055] BDF (Bus Device Function) is an addressing mechanism used to uniquely identify each PCIe (PCI Express) device connected to the motherboard of a computing device. Each PCIe device connected to the motherboard of a computing device has unique BDF information, which can be called the address information of the PCIe device. The BDF information is determined according to the physical location (e.g., slot location) of the PCIe device on the PCIe bus of the computing device.

[0056] PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard used to connect computer motherboards and external devices (such as PCIe devices). PCIe devices refer to various types of hardware components of computing devices that use the PCIe bus standard, such as but not limited to graphics cards, network cards, storage devices, and various expansion cards. Each PCIe device has a unique vendor ID (Vendor ID) and device ID (Device ID). The vendor ID and device ID of a PCIe device are codes used to uniquely identify and recognize the PCIe device at the hardware level. The vendor ID represents the manufacturer that invented or produced the PCIe device, while the device ID is used to distinguish between different models or types of devices produced by the same manufacturer.

[0057] BIOS (Basic Input Output System) is a set of programs fixed on a ROM (Read-Only Memory) chip on the motherboard of a computing device. It stores the basic input and output programs of the computing device, system setting information, self-test programs after power-on, and system self-starting programs. The main function of BIOS is to provide the lowest-level and most direct hardware settings and controls for computing devices. After the computing device is powered on, the BIOS is started and run first. During the BIOS operation, the devices connected to the PCIe bus of the computing device (i.e., PCIe devices) can be automatically detected and identified, which is also called enumeration of PCIe devices deployed by the computing device; then the enumerated PCIe devices are initialized and configured so that the computing device's operating system and application programs can communicate and control these PCIe devices.

[0058] ME (Management Engine) is an independent subsystem in Intel chipsets, which runs on a microprocessor independent of the CPU (central processing unit) of the computing device. ME has the function of remotely managing the computing devices it deploys. When a vulnerability occurs in the computing device, the computing device can be remotely managed without user control. In the embodiment of the present application, ME can manage the PCIe devices deployed by the computing device and access the configuration space of the PCIe device.

[0059] A module (also called a module) refers to a specific functional component composed of several basic functional components, which can be used to form a system, device or program with complete functions. A module is one of the core components of modern electronic products. It is composed of electronic components, printed circuit boards and other components, and can be embedded in electronic devices. For example, multiple PCIe devices can be integrated into a printed circuit board to form a module.

[0060] Next, the solutions in the embodiments of the present application are introduced.

[0061] In one implementation, a card drop detection process of a PCIe device includes:

[0062] Step 1: After computing device A is powered on, the CPU (Central Processing Unit / Processor) of computing device A loads and runs BIOS, and enumerates the PCIe devices in computing device A through the running BIOS to obtain address information of several enumerated PCIe devices, such as BDF information. Among them, the address information of the enumerated PCIe device can indicate that the CPU can access the PCIe device through the running BIOS, that is, the PCIe device is in a connected state and can be accessed by computing device A.

[0063] Step 2: The CPU of computing device A sends the BDF information of the aforementioned several PCIe devices to the BMC used to manage computing device A through the running BIOS.

[0064] Step 3, the BMC determines whether there is a PCIe device card dropout based on the physical presence signal of the PCIe device and the BDF information of several PCIe devices obtained; wherein the physical presence signal of the PCIe device is obtained after the PCIe device is inserted into the corresponding slot of the computing device A, indicating that the slot is inserted with a PCIe device. Exemplarily, if the physical presence signal of the PCIe device indicates that the corresponding slot is inserted with a PCIe device, but the BDF information of the PCIe device is not obtained, it can indicate that the PCIe device enumeration fails, and accordingly, the BMC determines that the PCIe device is card dropped.

[0065] In the above process, the detection of whether the PCIe device is card-dropped is performed during the BIOS enumeration phase of the PCIe device. After the operating system OS of the computing device A is running (i.e., during the OS running process), the PCIe device card-dropping detection cannot be continued.

[0066] In view of this, an embodiment of the present application also provides a method for detecting a card drop of a PCIe device, so as to implement a card drop detection of a PCIe device of a computing device during the operation of the computing device (i.e., the operation of the operating system OS of the computing device).

[0067] Exemplarily, the card drop detection process for the PCIe device can be executed by the computing device itself to save hardware costs.

[0068] Specifically, during the startup phase of the computing device, the computing device enumerates the PCIe devices deployed by it through BIOS, obtains the address information of each enumerated PCIe device, and stores it in a preset storage space; then, the boot loader is loaded through the BIOS, and the operating system OS is loaded and run through the boot loader to provide data processing and computing services through the OS; during the operation of the OS by the computing device, the computing device can periodically or non-periodically perform the card drop detection process for the PCIe device. Specifically, the computing device determines the address information of the first PCIe device, and the address information is obtained through the BIOS during the startup phase of the computing device, which means that the first PCIe device has not dropped the card during the enumeration process; then the computing device obtains the device identifier under the address information based on the address information; if the acquisition fails, it is determined that the first PCIe device cannot be accessed, and the first PCIe device is correspondingly determined to be dropped; if the acquisition is successful, the device identifier is compared with the pre-stored identifier to determine whether the first PCIe device is dropped; the pre-stored identifier has a preset corresponding relationship with the address information, for example, it can be obtained from the first PCIe device by the computing device based on the address information during the enumeration process.

[0069] Another example, Figure 1A and Figure 1B An application scenario of a method for detecting a card drop of a PCIe device is shown. In this application scenario, in order to detect a card drop of a PCIe device of a computing device without affecting the service operation of the computing device, Figure 1A and Figure 1B The card drop detection system shown includes a basic management controller BMC and a computing device managed by it. The BMC can access the computing device through a designated interface (as shown in FIG1 , the BMC accesses the designated interface 2 of the computing device through its designated interface 1 to access the computing device). The card drop detection process of the PCIe device of the computing device is performed through the BMC. Figure 1A As shown, the computing device may include a processor. Figure 1B As shown, the computing device may include a first processor and a second processor.

[0070] Another example, Figure 2A and Figure 2B Another application scenario of a method for detecting a card drop of a PCIe device is shown. In this application scenario, in order to detect a card drop of a PCIe device of a computing device without affecting the service operation of the computing device, Figure 2A and Figure 2B The card drop detection system shown includes a basic management controller BMC and a computing device managed by the basic management controller BMC, wherein the BMC is deployed on the computing device, and the card drop detection process of the PCIe device of the computing device is executed through the BMC. Figure 2AAs shown, the computing device includes a BMC and a processor. Figure 2B As shown, the computing device includes a BMC, a first processor and a second processor.

[0071] In some possible examples, when the computing device includes a processor, the processor may be a CPU. In some other possible examples, when the computing device includes a first processor and a second processor, the first processor is, for example, the CPU of the computing device, and the second processor is, for example, a microprocessor different from the CPU. In this case, the computing device may run corresponding business software through the first processor to provide corresponding business services to the device user; and the second processor may receive the scheduling of the BMC to assist the BMC in executing the card drop detection process for the PCIe device of the computing device to avoid occupying the first processor.

[0072] The computing device is also equipped with one or more PCIe devices (such as Figure 1A , Figure 1B and Figure 2A , Figure 2B PCIe device 1, PCIe device 2, ..., PCIe device M, where M is a positive integer) is shown. The second processor can manage the PCIe devices deployed by the computing device and access the configuration space of the PCIe devices.

[0073] The following takes the example that the card drop detection system includes a BMC and a computing device managed by the BMC, and the computing device includes a first processor and a second processor to introduce the overall process of card drop detection of a PCIe device.

[0074] When the computing device is powered on, the first processor can load and run the BIOS to perform an enumeration operation on one or more PCIe devices included in the computing device, obtain address information of each enumerated PCIe device, and send the address information of each PCIe device to the BMC so that the BMC can perform a card drop detection process for the PCIe device.

[0075] Subsequently, after the first processor completes self-test and initialization of the hardware of the computing device (for example, including PCIe devices) through the running BIOS, the boot loader is loaded through the running BIOS, and the operating system OS is loaded and run through the boot loader. Then the first processor runs the OS to provide data processing and computing services.

[0076] In some possible examples, during the enumeration process of the PCIe device, the first processor can also obtain the identifier of each PCIe device (including the pre-stored identifier of the mentioned first PCIe device) from the configuration space of the enumerated PCIe device through the running BIOS. Then, the running BIOS can send the address information and identifier of the enumerated PCIe device to the BMC, so that the BMC can execute the card drop detection process for the PCIe device.

[0077] The second processor can receive the address information of the PCIe device sent by the BMC during the card drop detection of the PCIe device through the management engine ME, and manage and access the configuration space of the corresponding PCIe device based on the received address information of the PCIe device.

[0078] BMC can run a specified software program to implement the card drop detection process for PCIe devices provided in the embodiment of the present application. Exemplarily, the specified software program can be a functional program in the server intelligent management system (Intelligent Baseboard Management Controller, hereinafter referred to as iBMC). The iBMC is an embedded management system for the entire life cycle of computing devices (such as servers). It provides a series of management tools such as hardware status monitoring, deployment, energy saving, and security, and a standardized interface builds a more complete ecosystem for the management of computing devices (such as servers). iBMC is based on the management chip Hi 1710 and adopts a number of innovative technologies to fully realize the refined management of computing devices (such as servers).

[0079] In some possible examples, the computing device may be a server or a terminal, etc. The server may be, for example but not limited to: a rack server, an AI server, a blade server, a high-density server, and a tower server, etc.

[0080] The following is an introduction to a card drop detection method for a PCIe device according to an embodiment of the present application.

[0081] For example, Figure 3 FIG. 4 is a flow chart of a method for detecting a card drop of a PCIe device provided by an embodiment of the present application. Figure 3 As shown, the method may include steps S310-S340:

[0082] In step S310, address information of a first PCIe device is determined. The address information is obtained through BIOS during the startup phase of a computing device. The first PCIe device is deployed in the computing device.

[0083] In some possible examples, the card drop detection method for PCIe devices can be applied to computing devices, and can also be applied to the BMC of the application management and monitoring computing devices. The following takes the application of the card drop detection method of the PCIe device to the BMC as an example to illustrate the specific implementation of the card drop detection process. When the card drop detection method of the PCIe device is applied to the computing device, the specific implementation of the card drop detection process can refer to the specific implementation of the card drop detection process when the card drop detection method of the PCIe device is applied to the BMC. The computing device deploys one or more PCIe devices.

[0084] Exemplarily, during its startup phase, the computing device may enumerate one or more PCIe devices deployed by it through BIOS, and if a certain PCIe device is enumerated, the address information of the enumerated PCIe device is determined. The computing device then sends the address information of the one or more PCIe devices enumerated to the BMC. In some possible examples, when the computing device is provided with a first processor and a second processor, the computing device may run BIOS through its first processor to determine the address information of each enumerated PCIe device through the first processor, and send the address information of the one or more PCIe devices enumerated to the BMC.

[0085] Accordingly, the BMC can obtain the address information of one or more PCIe devices sent by the computing device, and then store the obtained address information of the one or more PCIe devices in a designated storage space, so that when the PCIe deployed by the computing device is subjected to card drop detection during the operation of the OS of the computing device, the address information of each PCIe device in the one or more PCIe devices can be read from the designated storage space respectively, and based on the address information of each PCIe device read, a card drop detection can be performed on each PCIe device.

[0086] In some possible implementations, during the process of the computing device running the OS, the BMC may periodically perform card drop detection on the PCIe device of the computing device, so as to periodically and actively identify whether the PCIe device of the computing device has dropped a card. In some specific examples, when the BMC detects that the moment corresponding to the preset card drop detection cycle has arrived, the BMC may read the address information of each PCIe device in one or more PCIe devices from the designated storage space, and perform card drop detection on each PCIe device based on the address information of each PCIe device. In the exemplary embodiment, the BMC may read the address information of each PCIe device in sequence according to the storage location of the address information of one or more PCIe devices from front to back.

[0087] In some specific examples, the card drop detection cycle can be set to xx hours. Accordingly, when the moment T1 corresponding to the first card drop detection cycle arrives, the BMC can read the address information of each PCIe device therein from the specified storage space, and perform card drop detection for each PCIe device; when the moment T2 corresponding to the second card drop detection cycle arrives (i.e., T1+xx hours), the BMC can read the address information of each PCIe device therein from the specified storage space again, and perform card drop detection for each PCIe device, and so on. The length of the card drop detection cycle can be set according to business needs. The card drop detection cycle can also be set to xx minutes, one day, or one week, etc. The embodiment of the present application does not limit the length of the card drop detection cycle.

[0088] It can be understood that the process of BMC performing card drop detection on each PCIe device is similar. The following takes any first PCIe device among one or more PCIe devices as an example to introduce the card drop detection process for the PCIe device. For the card drop detection process of other PCIe devices, please refer to the card drop detection process for the first PCIe device.

[0089] During this card drop detection cycle, the BMC can determine the address information of the first PCIe device. In some specific examples, the BMC can read the address information of the first PCIe device from the aforementioned specified storage space. The first PCIe device is deployed in the computing device, and its address information is obtained by the BIOS during the startup phase of the computing device and sent to the BMC.

[0090] In some possible examples, the address information may be BDF (bus number, device number, and function number) information, including a bus number, a device number, and a function number.

[0091] In step S320, based on the aforementioned address information, a device identification under the address information is obtained. Exemplarily, the device identification may include a manufacturer ID and / or a device ID of the first PCIe device.

[0092] In some examples, the BMC cannot directly access the PCIe device based on the address information of the PCIe device, but when the PCIe device is not disconnected, the computing device can access the configuration space of the PCIe device based on the address information of the PCIe device, i.e., the BDF information, wherein the configuration space of the PCIe device stores the identification of the PCIe device, i.e., the identification of the PCIe device can be obtained by accessing the configuration space of the PCIe device; and when the PCIe device is disconnected (i.e., the connection is lost), the computing device cannot access the configuration space of the PCIe device based on the address information of the PCIe device, i.e., the BDF information, and accordingly, the computing device cannot obtain the identification of the PCIe device itself.

[0093] In view of the above situation, after the BMC determines the address information of the first PCIe device, that is, the BDF information, the address information can be sent to the computing device to obtain the device identifier under the address information of the first PCIe device through the computing device. In some specific examples, after the address information is sent to the computing device, the computing device can obtain the device identifier under the address information through the management engine ME based on the received address information. Exemplarily, the second processor of the computing device can manage and access each PCIe device of the computing device through the management engine ME to reduce the occupancy of the first processor of the computing device, so that the computing device can run the business through the first processor and provide users with better services.

[0094] Correspondingly and specifically, the BMC may send the determined address information of the first PCIe device to the second processor of the computing device, so that the second processor obtains the device identification under the address information based on the received address information through the management engine ME.

[0095] In some possible examples, when the first PCIe device is not disconnected, the second processor can access the configuration space of the first PCIe device based on the address information of the first PCIe device through the management engine ME, and accordingly, the device identifier may be the identifier of the first PCIe device itself; and when the first PCIe device is disconnected, the second processor cannot access the configuration space of the first PCIe device based on the address information of the first PCIe device through the management engine ME, and accordingly, the second processor cannot obtain the identifier of the first PCIe device itself through the management engine ME. When the second processor cannot obtain the identifier of the first PCIe device itself through the management engine ME, the following possibilities may occur: first, the second processor cannot obtain the device identifier through the management engine ME based on the address information it receives, that is, the device identifier acquisition fails; second, the second processor may obtain the identifier of a non-first PCIe device through the management engine ME based on the address information it receives. For example, when the first PCIe device is a PCIe device extended by a switch chip (for example, a PCIe device is connected to a Switch chip and then to a slot of a computing device), the second processor may obtain the identifier of the Switch chip through the management engine ME based on the address information it receives, that is, the device identifier is successfully acquired, but the device identifier is the identifier of another device (for example, the identifier of the aforementioned Switch chip).

[0096] In view of the above situation, in one case, when the computing device (e.g., its second processor) fails to obtain the device identification through the management engine ME based on the address information it receives, it can feedback information indicating that it failed to obtain the device identification (e.g., directly feedback an empty device identification, or feedback preset information indicating that the device identification failed to be obtained) to the BMC. Accordingly, the BMC determines that the acquisition fails when it obtains the above information. Accordingly, in step S330, if the acquisition fails, it is determined that the first PCIe device is card-dropped. This implements card-drop detection of the first PCIe device.

[0097] In another case, the computing device (such as its second processor) obtains the device identifier under the address information through the management engine ME based on the address information it receives, and can feed back the device identifier to the BMC, and the BMC obtains the device identifier and determines that the device identifier is successfully obtained. At this time, in order to accurately determine the current state of the first iPCIe device (i.e., whether the card is dropped), after the BMC obtains the device identifier under the address information of the first PCIe device, it is also necessary to verify the device identifier, that is, to verify whether the device identifier is the identifier of the first PCIe device itself. Correspondingly, in step S340, if the acquisition is successful, the device identifier is compared with the pre-stored identifier to determine whether the first PCIe device is dropped; the pre-stored identifier has a preset corresponding relationship with the aforementioned address information.

[0098] In some possible examples, the pre-stored identifier of the first PCIe device may be obtained and stored during the enumeration of PCIe devices deployed by the computing device through BIOS during the startup phase of the computing device.

[0099] It can be understood that when the computing device enumerates the deployed PCIe devices through BIOS, the PCIe bus of the computing device can be scanned, and all possible combinations of bus Bus, device Device and function Funct ion can be traversed (constituting each address information, that is, BDF information) to find the PCIe device connected to the PCIe bus. Exemplarily, taking any address information X as an example, the computing device through BIOS, when the corresponding configuration space can be read based on the corresponding address information X, determines that the address information X, that is, the position indicated by the BDF information X, is connected to the PCIe device X, that is, the PCIe device X is enumerated, and accordingly, the address information X can be determined, and the identification of the PCIe device X is obtained from the configuration space of the corresponding PCIe device X, and the corresponding relationship between the address information of the PCIe device X and the identification of the PCIe device X is recorded. In this way, the computing device can obtain the address information and identification of each enumerated PCIe device through BIOS in the above manner.

[0100] Next, the computing device sends the address information and identification of the one or more enumerated PCIe devices to the BMC through the BIOS, and the BMC obtains the address information and identification of the one or more PCIe devices, and stores the address information and identification of the one or more PCIe devices in a corresponding manner. The address information and identification of the one or more PCIe devices stored in a corresponding manner include the address information and pre-stored identification of the first PCIe device.

[0101] Exemplarily, the above-mentioned process of enumerating the deployed PCIe devices through BIOS and the process of sending the address information and identification of the enumerated one or more PCIe devices to the BMC can be executed by the computing device through its first processor.

[0102] In some other possible examples, the pre-stored identifier of the first PCIe device may also be configured and stored after the computing device completes the configuration of each PCIe device. After the computing device has completely configured each PCIe device, before updating and replacing other PCIe devices, the identifier and address information of each PCIe device can be considered unchanged. Accordingly, after the computing device has completely configured each PCIe device, the address information and identifier of each PCIe device can be configured. Furthermore, the BMC can store the address information and identifier of each PCIe device obtained by the configuration accordingly. The correspondingly stored address information and identifier of each PCIe device include the address information and pre-stored identifier of the first PCIe device.

[0103] The BMC determines that the device identification is successfully obtained. That is, after obtaining the device identification, the device identification is compared with the pre-stored identification (that is, the pre-stored identification that has a preset corresponding relationship with the address information of the first PCIe device) to obtain a comparison result; then based on the comparison result, it is determined whether the first PCIe device is card-lost.

[0104] In some specific examples, if the comparison result indicates that the device identifier and the pre-stored identifier are inconsistent, it is determined that the first PCIe device is disconnected, that is, the connection is lost, that is, the computing device and the BMC cannot access the configuration space of the first PCIe device. In another specific example, if the comparison result indicates that the device identifier is consistent with the pre-stored identifier, it is determined that the first PCIe device is not disconnected.

[0105] In some possible examples, when the PCIe device is a PCIe device extended by a computing device through a Switch chip, the vendor ID of the PCIe device may be the same as the vendor ID of the Switch chip. Moreover, when such a PCIe device loses a card, based on the address information of the PCIe device (for example, PCIe device W), the vendor ID obtained may be the vendor ID of the Switch chip. In combination with the above situation, when comparing the device identification obtained based on the address information of the PCIe device W in real time (for example, the vendor ID obtained by the computing device based on the address information sent by the BMC) with the pre-stored identification (for example, the vendor ID obtained by the BIOS during the startup phase of the computing device or the pre-configured stored vendor ID), the comparison result indicates that the device identification obtained based on the address information of the PCIe device W in real time is consistent with the pre-stored identification, thereby determining that the PCIe device W has not lost a card, while the actual PCIe device W has lost a card, resulting in a misjudgment result.

[0106] In order to solve the above problem, it can be set that the manufacturer ID and device ID of the PCIe device need to be obtained (that is, the obtained device identification includes the manufacturer ID and device ID), and the pre-stored identification includes the manufacturer ID and device ID of the PCIe device (that is, the identification of the PCIe device obtained during the enumeration process includes the manufacturer ID and device ID), so as to better improve the accuracy of the card drop detection results and avoid the occurrence of the above-mentioned misjudgment.

[0107] In some possible examples, the PCIe devices deployed by the computing device may include PCIe devices belonging to the module and PCIe devices not belonging to the module (which may be referred to as independent PCIe devices). Exemplarily, the PCIe devices in the module may include, but are not limited to, GPU (Graphics Processing Unit), NPU (Neural Processing Unit) processor and other devices.

[0108] For PCIe devices belonging to a module, i.e., PCIe devices in a module, during the startup phase of a computing device, when the PCIe devices deployed by the computing device are enumerated by BIOS, some modules cannot generate corresponding physical presence signals after being inserted into the slots of the computing device. Accordingly, it is impossible to determine whether the PCIe devices in the module are card-off based on their physical presence signals and whether the address information of the PCIe devices in the module is obtained during enumeration, i.e., it is impossible to detect the card-off of the PCIe devices in the module. In order to remedy this defect, in one embodiment of the present application, when the PCIe devices configured by the computing device include PCIe devices belonging to a module, the corresponding relationship between the module identifier of the module deployed by the computing device and the identifier of the PCIe device contained in the module can be configured in any storage space readable by the BMC to identify during the startup phase of the computing device whether the address information of one or more PCIe devices enumerated by the BIOS contains the address information of the PCIe device in the module, i.e., to determine whether the PCIe device in the module is enumerated.

[0109] In some possible examples, the computing device deploys a first module, wherein the first module includes a specified number of PCIe devices. It is understandable that the computing device may be deployed with one or more modules, and the first module may be any module deployed by the computing device.

[0110] Before step S310, steps 21-23 are also included: in step 21, the address information of several PCIe devices enumerated by BIOS and their corresponding identifiers are determined, and the several PCIe devices are deployed on the computing device. In this step, when the computing device is powered on, that is, in the startup phase, the computing device (for example, through the first processor of the computing device) loads and runs the BIOS, and performs PCIe device enumeration through the BIOS to obtain the address information of one or more enumerated PCIe devices, and the identifier of the PCIe device can be obtained from the configuration space of the one or more enumerated PCIe devices. Then, the address information and identifier of the one or more enumerated PCIe devices can be sent to the BMC, and accordingly, the BMC obtains the address information and identifier of one or more PCIe devices. After that, the BMC can store it in the designated storage space on the one hand to perform card drop detection on the PCIe device, and on the other hand, step 22 can be executed.

[0111] In step 22, the identification of each PCIe device in the first module is obtained. In this step, the identification of each PCIe device in the first module and the module identification of the corresponding first module can be stored in any storage space readable by the BMC. Accordingly, the BMC can obtain the identification of each PCIe device in the first module from the storage space storing the identification of each PCIe device in the first module.

[0112] Next, the BMC may compare the identifiers of one or more PCIe devices obtained from the computing device with the identifiers of each PCIe device in the first module to determine whether the identifiers of one or more PCIe devices obtained from the computing device include the identifiers of each PCIe device in the first module; if the identifiers of one or more PCIe devices obtained from the computing device include the identifiers of each PCIe device in the first module, it can be determined that each PCIe device in the first module has been enumerated.

[0113] Subsequently, when the computing device is further deployed with other modules, it can continue to determine whether all PCIe devices in other modules are enumerated based on the identification of one or more PCIe devices obtained from the computing device. After determining that all PCIe devices in all modules are enumerated, the subsequent card drop detection process can be performed based on the address information of one or more PCIe devices obtained from the computing device.

[0114] If the identifiers of one or more PCIe devices obtained from the computing device do not include the identifiers of one or some PCIe devices in the first module (using PCIe device Y as an example), it can be determined that the computing device has not sent the identifier of the PCIe device Y in the first module to the BMC through the BIOS. At this time, there may be the following two situations: the first is that the computing device has not enumerated the PCIe device Y in the first module through the BIOS; the second is that an error occurs when the computing device sends the identifiers and address information of one or more enumerated PCIe devices through the BIOS, and the identifier of the PCIe device Y in the first module (or the identifier and address information of the PCIe device Y, when the PCIe device Y is enumerated) is not successfully sent to the BMC.

[0115] Subsequently, in step 23, if, based on the identifiers of each PCIe device in the first module and the identifiers corresponding to the address information of the several PCIe devices enumerated by BIOS, it is determined that the address information of the several PCIe devices does not include the address information of the second PCIe device in the first module, a third alarm message is sent, and the third alarm message indicates that the second PCIe device has lost its card.

[0116] In the above example, it is possible to identify the situations where the PCIe devices are not enumerated in the module and the address information of the PCIe devices in the module is not sent to the BMC, and send a third alarm message to better remind the user that the second PCIe device in the first module has lost its card, so as to remind the user to intervene and solve the problem, thereby providing the user with better service.

[0117] The third warning information may be any form of information, for example, including but not limited to: warning information in the form of sound, warning information in the form of text, warning information in the form of light, or warning information in any combination of the forms of sound, text, and light. Exemplarily, the third warning information may include the address information of the second PCIe device and / or an identifier sent by the computing device through BIOS to help the user locate the corresponding second PCIe device.

[0118] Exemplarily, for the PCIe devices deployed in the module, it is considered that there is a full configuration constraint. For example, the first module is designed to be able to deploy N PCIe devices. The existence of the full configuration constraint may mean that in the card drop detection process for the PCIe device, it is considered that the first module actually deploys N PCIe devices, that is, the aforementioned specified number is N. Accordingly, the BMC may be pre-configured to store the identifiers of the N PCIe devices in the first module.

[0119] In some possible examples, there may be at least two PCIe devices in the first module with the same vendor ID. For example, when the first module is an Ascend module, the vendor IDs of the PCIe devices in the first module may all be 0x19e5; for another example, when the first module is a module such as H800, A800 or A100, the vendor IDs of the PCIe devices in the first module may all be 0x10de. At this time, in order to better and clearly determine the card drop situation of each PCIe device in the first module, the identification of one or more PCIe devices obtained during enumeration may include the vendor ID and the device ID, and the identification of each PCIe device in the first module stored may include the vendor ID and the device ID, so as to better distinguish different PCIe devices in the first module, and then, the card drop situation of each PCIe device in the first module can be clearly determined.

[0120] Continuing with the above example, when the first PCIe device is a PCIe device belonging to a module, for example, an Ascend module, and the device identifier includes a manufacturer ID, the aforementioned comparison of the device identifier with the pre-stored identifier can be specifically as follows: determining whether the device identifier is 0x19e5; if it is not 0x19e5, it is determined that the comparison result indicates that the device identifier is inconsistent with the pre-stored identifier of the first PCIe device, and it is determined that the first PCIe device is card-dropped.

[0121] In some possible examples, there may also be a situation where the computing device only sends the address information of certain PCIe devices (hereinafter, PCIe device Z is used as an example for explanation) through BIOS, but does not send its identification. In view of this, the BMC can obtain the device identification under the address information of PCIe device Z from the computing device based on the address information of PCIe device Z obtained, and then compare the device identification under the address information of PCIe device Z with the identification of each PCIe device in the pre-stored module to obtain the corresponding comparison result Z.

[0122] Subsequently, if the comparison result Z indicates that the device identifier under the address information of the PCIe device Z is consistent with one of the identifiers of the pre-stored PCIe devices corresponding to the module, it can also be determined that the PCIe device Y is not dropped.

[0123] If the comparison result Z indicates that the device identifier under the address information of the PCIe device Z is inconsistent with all the identifiers of the PCIe devices corresponding to the pre-stored modules, it can be determined that the PCIe device Y is disconnected. Subsequently, when it is determined that the PCIe device Z is disconnected, an alarm message can be sent to indicate that the PCIe device Z is disconnected. Exemplarily, the alarm message may include the address information of the PCIe device Z to help the user locate the PCIe device Z.

[0124] In the above process, a scheme for detecting the card loss of PCIe devices deployed on the computing device after the computing device is successfully started and during the operation of the computing device is provided, which can detect the card loss of PCIe devices deployed on the computing device during the operation of the computing device and provide better auxiliary services for maintenance personnel of the computing device. In addition, the identification and alarm of the situation that the PCIe devices are not enumerated in the module and the address information of the PCIe devices in the module are not sent to the BMC can be realized.

[0125] For example, Figure 4 FIG. 4 is a flow chart of another method for detecting a card drop of a PCIe device provided in an embodiment of the present application. Figure 4 As shown, the method may include steps S410-S490:

[0126] In step S410, address information of a first PCIe device is determined, where the address information is obtained through BIOS during the startup phase of a computing device, and the first PCIe device is deployed in the computing device.

[0127] In step S420, based on the aforementioned address information, the device identification under the address information is obtained.

[0128] In step S430, if the acquisition fails, it is determined that the first PCIe device is disconnected. Then, step S460 may be performed.

[0129] In step S440, if the acquisition is successful, the device identification is compared with the pre-stored identification.

[0130] Among them, the implementation principle of steps S410-S440 is the same as Figure 3 The implementation principle of steps S310-S330 is similar to that of steps S410-S430. Figure 3 The implementation process of steps S310-S330 is shown.

[0131] In step S450, if the comparison result indicates that the device identifier and the pre-stored identifier are inconsistent, it is determined that the first PCIe device is card-dropped.

[0132] In step S460, a first alarm message is sent, where the first alarm message indicates that a card of the first PCIe device is dropped.

[0133] When the BMC determines that the comparison result indicates that the device identifier and the pre-stored identifier are inconsistent, it determines that the first PCIe device has lost its card. In order to provide users with better services, when it is determined that the first PCIe device has lost its card, it sends a first alarm message indicating that the first PCIe device has lost its card. In some possible examples, the first alarm message can be information in any form, for example, it can include but is not limited to: alarm information in the form of sound, alarm information in the form of text, alarm information in the form of light, or alarm information in any combination of sound, text and light. Through the first alarm message, users can be helped to intervene and solve the problem of the first PCIe device losing its card in a timely manner, so as to ensure the normal operation of the computing device and the normal execution of the business. In some possible examples, the first alarm message can include the address information and / or pre-stored identifier of the first PCIe device to help users accurately locate the first PCIe device.

[0134] In step S470, if the comparison result indicates that the device identifier is consistent with the pre-stored identifier, it is determined that the first PCIe device is not dropped.

[0135] In step S480, when it is determined that the first PCIe device has not been card-dropped, it is determined whether the first PCIe device has been detected as being card-dropped in a previous card-drop detection cycle.

[0136] In step S490, if the judgment is yes, a second alarm message is sent, and the second alarm message indicates that the first PCIe device is recovered from card loss.

[0137] When the BMC determines that the comparison result indicates that the device identifier and the pre-stored identifier are consistent, it determines that the first PCIe device has not lost a card. In this case, the first PCIe device may not have lost a card in the previous card loss detection cycle, or the first PCIe device may have lost a card in the previous card loss detection cycle, and then restored the connection after user intervention, that is, it is determined that the card has not been lost in this card loss detection cycle.

[0138] For the above situation, in order to let the user know whether the PCIe device that was determined to be a card dropped in the previous card drop detection cycle has restored its connection, that is, whether the card drop has been recovered, after its intervention. Accordingly, when the BMC determines that the first PCIe device has not been dropped, it can continue to determine whether the first PCIe device was detected as a card dropped in the previous card drop detection cycle; when it is determined that the first PCIe device was detected as a card dropped in the previous card drop detection cycle, a second alarm message indicating that the first PCIe device has been recovered is sent, so as to prompt the user that the first PCIe device has been recovered through the second alarm message. In some possible examples, the second alarm message may include the address information and / or pre-stored identifier of the first PCIe device to help the user accurately locate the first PCIe device.

[0139] If it is determined that the first PCIe device was detected as not having a card dropped in the previous card drop detection cycle, the second alarm information may not be sent, and the card drop detection may continue to be performed on other PCIe devices that have not been detected in this card drop detection cycle, that is, the card drop detection process provided in the embodiment of the present application is executed.

[0140] In some possible examples, the second warning information may also be information in any form, for example, including but not limited to: warning information in sound form, warning information in text form, warning information in light form, or warning information in any combination of sound form, text form and light form.

[0141] It can be understood that the embodiment of the present application does not limit the specific forms of the first alarm information, the second alarm information and the third alarm information, and any form of information that can serve as a reminder to the user can be applied to the embodiment of the present application.

[0142] Based on the method in the above embodiment, Figure 5 As shown, the embodiment of the present application provides a structural schematic diagram of a card drop detection system for a PCIe device, such as Figure 5 As shown, the system includes: a first processor 510, a second processor 520 and a baseboard management controller BMC530;

[0143] The first processor 510 is configured to enumerate the PCIe devices deployed by the computing device during the startup phase of the computing device where the first processor 510 is located, obtain address information of one or more enumerated PCIe devices, and send the address information of the one or more PCIe devices to the BMC 530, wherein the address information of the one or more PCIe devices includes the address information of the first PCIe device;

[0144] The BMC530 is configured to determine the address information of the first PCIe device; based on the address information, obtain the device identifier under the address information from the second processor 520; if the acquisition fails, determine that the first PCIe device is card-off; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device is card-off; the pre-stored identifier and the address information have a preset corresponding relationship.

[0145] Some possible examples include Figure 5 As shown, the BMC 530, in the process of obtaining the device identification under the address information from the second processor 520 based on the address information, is specifically configured to send the address information of the first PCIe device to the second processor 520;

[0146] The second processor 520 is configured to obtain the device identification based on the address information of the first PCIe device through the management engine ME, and send the device identification to the BMC 530;

[0147] The BMC530 is further configured to obtain the device identification sent by the second processor.

[0148] Based on the method in the above embodiment, the embodiment of the present application provides another card drop detection system for a PCIe device, such as Figure 6 As shown, the system includes: a processor 610 and a baseboard management controller BMC620;

[0149] The processor 610 is configured to, during a startup phase of the computing device where the processor 610 is located, enumerate the PCIe devices deployed by the computing device, obtain address information of one or more enumerated PCIe devices, and send the address information of the one or more PCIe devices to the BMC, wherein the address information of the one or more PCIe devices includes the address information of the first PCIe device;

[0150] The BMC620 is configured to determine the address information of the first PCIe device; based on the address information, obtain the device identifier under the address information from the processor 620; if the acquisition fails, determine that the first PCIe device is card-off; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device is card-off; the pre-stored identifier and the address information have a preset corresponding relationship.

[0151] Some possible examples include Figure 6 As shown, the BMC 620, in the process of obtaining the device identification under the address information from the processor 620 based on the address information, is specifically configured to send the address information of the first PCIe device to the processor 610;

[0152] The processor 610 is configured to obtain the device identification based on the address information of the first PCIe device through the management engine ME, and send the device identification to the BMC 620;

[0153] The BMC 620 is further configured to obtain the device identification sent by the processor 610 .

[0154] Based on the method in the above embodiment, the present application embodiment provides a card drop detection device for a PCIe device. Figure 7 , Figure 7 It is a structural schematic diagram of a card drop detection device for a PCIe device provided in an embodiment of the present application.

[0155] like Figure 7 As shown, the card drop detection device 700 for the PCIe device may include: a first determination module 710, configured to determine the address information of the first PCIe device, the address information is obtained through the BIOS during the startup phase of the computing device, and the first PCIe device is deployed on the computing device; a first acquisition module 720, configured to obtain the device identifier under the address information based on the address information; a second determination module 730, configured to determine that the first PCIe device is dropped if the acquisition fails; a comparison determination module 740, configured to compare the device identifier with a pre-stored identifier if the acquisition is successful, to determine whether the first PCIe device is dropped; the pre-stored identifier and the address information have a preset corresponding relationship.

[0156] It should be understood that the above-mentioned systems and devices are used to execute the methods in the above-mentioned embodiments. The implementation principles and technical effects of the corresponding devices in the system and the corresponding program modules in the device are similar to those described in the above-mentioned methods. The working process of the system and device can refer to the corresponding process in the above-mentioned method, which will not be repeated here.

[0157] Based on the method in the above embodiment, an embodiment of the present application provides a computing device. The computing device includes a baseboard management controller BMC; the BMC is used to determine the address information of a first PCIe device, the address information is obtained through BIOS during the startup phase of the computing device, and the first PCIe device is deployed on the computing device; based on the address information, the device identifier under the address information is obtained; if the acquisition fails, it is determined that the first PCIe device is off; if the acquisition is successful, the device identifier is compared with a pre-stored identifier to determine whether the first PCIe device is off; the pre-stored identifier and the address information have a preset corresponding relationship.

[0158] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0159] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0160] Based on the method in the above embodiment, the embodiment of the present application further provides a BMC. Figure 8 A schematic diagram of the hardware structure of a BMC is shown, wherein the BMC 800 may include a processor 810, a memory 820, and a communication interface 830. Information may be transmitted between the processor 810, the memory 820, and the communication interface 830 via a bus 840. In addition to a data bus, the bus 840 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as buses 840 in the figure.

[0161] Exemplarily, the processor 810 may include one or more processors. For example, the processor 710 may include one or more of an application processor (AP), a central processing unit and / or a controller, etc. Different processors may be independent devices or integrated into one or more processors.

[0162] Exemplarily, the memory 820 is used to store instructions and data. In some examples, the memory 820 may include a cache memory. The memory can store instructions or data that the processor has just used or cyclically used. If the processor needs to use the instruction or data again, it can be directly called from this type of memory to avoid repeated access, reduce the waiting time of the processor, and improve the efficiency of the system.

[0163] In some examples, the memory 820 can also be used to store executable program codes, and the processor 810 executes various functional applications of the BMC 800 (for example, functional applications that implement the method steps described in the above method embodiments in the embodiments of the present application) and data processing by running the executable program codes stored in the memory.

[0164] Exemplarily, the communication interface 830 may include one or more interfaces, which are responsible for the transmission of data / instructions between the BMC 800 and various components. For example, the communication interface 830 may include an inter-integrated circuit (I2C) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general purpose I / O port (GPIO), and / or a universal serial bus (USB) interface.

[0165] It is to be understood that the interface connection relationship between the various components of BMC800 illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on BMC800. In other embodiments of the present application, BMC800 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods. In addition, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on BMC800. In other embodiments of the present application, BMC800 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0166] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in a processor.

[0167] It is understandable that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In addition, in some possible implementations, each step in the above embodiment can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here.

[0168] It is understandable that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0169] The method steps in the embodiments of the present application can be implemented by hardware, or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0170] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0171] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A method for detecting a card drop of a PCIe device, characterized in that: The method comprises: Determine address information of a first PCIe device, where the address information is obtained through BIOS during a startup phase of a computing device, and the first PCIe device is deployed on the computing device; Based on the address information, obtaining a device identifier under the address information; If the acquisition fails, determining that the first PCIe device is card-off; If the acquisition is successful, the device identifier is compared with a pre-stored identifier to determine whether the first PCIe device is card-dropped; the pre-stored identifier and the address information have a preset corresponding relationship.

2. The method according to claim 1, characterized in that The device identification includes a vendor ID and / or a device ID of the first PCIe device.

3. The method according to claim 1, characterized in that The pre-stored identifier is obtained and stored during the enumeration of the PCIe devices deployed by the computing device through the BIOS during the startup phase of the computing device; or is configured and stored after the computing device completes the configuration of each PCIe device.

4. The method according to claim 1, characterized in that The determining whether the first PCIe device is card-off includes: If the comparison result between the device identification and the pre-stored identification indicates that the device identification and the pre-stored identification are inconsistent, it is determined that the first PCIe device is card-dropped.

5. The method according to claim 4, characterized in that Also includes: A first alarm message is sent, where the first alarm message indicates that the first PCIe device has a card dropped.

6. The method according to claim 4, characterized in that Also includes: If the comparison result indicates that the device identifier is consistent with the pre-stored identifier, it is determined that the first PCIe device is not dropped.

7. The method according to claim 6, characterized in that Also includes: In the case where it is determined that the first PCIe device has not lost a card, determining whether the first PCIe device is detected as having lost a card in a previous card loss detection cycle; If the judgment is yes, a second alarm message is sent, wherein the second alarm message indicates that the first PCIe device has recovered from card loss.

8. The method according to any one of claims 1 to 7, characterized in that: The computing device deploys a first module, wherein the first module includes a specified number of PCIe devices; Before determining the address information of the first PCIe device, the method further includes: Determine address information of a plurality of PCIe devices enumerated by the BIOS and their respective corresponding identifiers, wherein the plurality of PCIe devices are deployed on the computing device; Obtaining an identifier of each PCIe device in the first module; If, based on the identifiers of each PCIe device in the first module and the identifiers corresponding to the address information of the several PCIe devices enumerated by BIOS, it is determined that the address information of the several PCIe devices does not include the address information of the second PCIe device in the first module, a third alarm message is sent, and the third alarm message indicates that the second PCIe device has lost its card.

9. The method according to any one of claims 1 to 7, characterized in that: The acquiring, based on the address information, a device identification under the address information, includes: The device identification is obtained based on the address information through the management engine ME.

10. A baseboard management controller BMC, characterized in that: The BMC is used to execute the method according to any one of claims 1-9.

Citation Information

Cited By

  • Disconnection detection method for pcie device, and bmc

    WO2025260846A1