Disconnection detection method for pcie device, and bmc
By obtaining the address information of PCIe devices during the startup phase of computing devices and comparing device identifiers using the BIOS and management engine ME, the problem of detecting lost PCIe devices is solved, enabling accurate detection and timely alarms during operation, thus improving device maintainability and user experience.
Patent Information
- Application Number
- PCT/CN2025/081659
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-21
- Filing Date
- 2025-03-10
- Publication Date
- 2025-12-26
AI Technical Summary
Existing technologies are insufficient to effectively detect PCIe device card loss during computing device operation, affecting device maintainability and user experience.
By obtaining the address information of the PCIe device during the startup phase of the computing device, using the BIOS to enumerate and store the device identifier, and combining the management engine ME and BMC, the device identifier is compared with the pre-stored identifier periodically or non-periodically to determine whether the PCIe device has been lost and to send alarm information.
It enables timely detection of PCIe device card loss during computing device operation, reducing the impact on business operations and improving detection accuracy and user experience.
Smart Images

Figure CN2025081659_26122025_PF_FP_ABST
Abstract
Description
A method for detecting lost cards in PCIe devices and BMC
[0001] This application claims priority to Chinese patent application No. 202410815525.4, filed on June 21, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to a method for detecting card loss in PCIe devices and a BMC. Background Technology
[0003] As the complexity of hardware configurations for computing devices (such as AI (Artificial Intelligence) servers and rack servers) increases, the requirements for the maintainability of computing device operation are also becoming more stringent. Among these requirements, the detection of card loss in PCIe (Peripheral Component Interconnect Express) devices deployed in computing devices has become a key focus.
[0004] Therefore, how to provide a method for detecting card loss in PCIe devices has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, BMC, system, computing device, computer storage medium, and computer program product for detecting card loss in PCIe devices, which can realize the detection of card loss in PCIe devices deployed on computing devices.
[0006] In a first aspect, embodiments of this application provide a method for detecting card loss in PCIe devices, the method comprising:
[0007] The address information of the first PCIe device is determined. The address information is obtained through the BIOS during the boot phase of the computing device. The first PCIe device is deployed on the computing device.
[0008] Based on the address information, obtain the device identifier under the address information;
[0009] If the acquisition fails, it is determined that the first PCIe device has lost its card.
[0010] If the acquisition is successful, the device identifier is compared with the pre-stored identifier to determine whether the first PCIe device has lost its card; the pre-stored identifier and the address information have a preset correspondence.
[0011] 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 through the BIOS during the startup phase. Then, based on this address information, an attempt can be made to obtain the device identifier associated with that address. If the attempt fails, the first PCIe device is considered to have lost its card; if the attempt succeeds, the obtained device identifier is compared with a pre-stored identifier that has a preset correspondence with the address information of the first PCIe device to determine whether the first PCIe device has lost its card. This provides a scheme for detecting card loss of PCIe devices deployed on the computing device after startup, during the computing device's operation (i.e., the operation of the computing device's operating system). This scheme allows for periodic or non-periodic detection of PCIe devices deployed on the computing device during operation, enabling timely determination of whether a PCIe device has lost its card. Subsequently, when a PCIe device loss is determined, immediate intervention can be implemented to minimize the impact on the computing device's operational services and improve user experience.
[0012] In some possible implementations, the device identifier includes the vendor ID and / or device ID of the first PCIe device. In this example, the device identifier includes identifiers that can uniquely identify the corresponding first PCIe device, such as the vendor ID and / or device ID of the first PCIe device. Determining whether the first PCIe device has lost its card based on such identifiers can improve the accuracy of card loss detection results to some extent.
[0013] In some possible implementations, the pre-stored identifier is obtained and stored during the startup phase of the computing device when the BIOS enumerates the PCIe devices deployed on the computing device; or, it is configured and stored after the computing device has configured each PCIe device.
[0014] In the example above, during the startup phase, the computing device enumerates the pre-stored identifier of the first PCIe device through the running BIOS. This indicates that the first PCIe device is in a non-disconnected state during enumeration. This type of pre-stored identifier allows for more convenient and accurate detection of PCIe device disconnections during operation. Furthermore, after the computing device has configured all its PCIe devices and the devices are determined, configuring and storing the pre-stored identifier of the first PCIe device at this point also facilitates more convenient and accurate detection of PCIe device disconnections during operation.
[0015] In some possible implementations, determining whether the first PCIe device has lost its card includes: if the comparison result between the device identifier and the pre-stored identifier indicates that the device identifier and the pre-stored identifier are inconsistent, then the first PCIe device is determined to have lost its card. 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 has not been accessed based on the address information of the first PCIe device, and accordingly, the first PCIe device is determined to have lost its card. This enables the detection of card loss of the PCIe device of the computing device during the operation of the computing device after it has completed startup, and a relatively accurate card loss detection result can be determined.
[0016] In some possible implementations, the method further includes sending a first alarm message indicating that the first PCIe device has lost its card. In this example, after determining that the first PCIe device has lost its card, a first alarm message is sent to indicate that the first PCIe device has lost its card, so that the user can intervene in the situation, such as performing maintenance, to avoid affecting the operation of the computing device and the implementation of services.
[0017] In some possible implementations, the method further includes: if the comparison result indicates that the device identifier matches the pre-stored identifier, determining that the first PCIe device has not lost its card. In this example, if the comparison result indicates that the device identifier and the pre-stored identifier match, it is determined that the first PCIe device has been accessed based on its address information, and accordingly, it is determined that the first PCIe device has not lost its card. This enables card loss detection of the PCIe device of the computing device during its operation after startup, and allows for the determination of a relatively accurate card loss detection result.
[0018] In some possible implementations, the method further includes: if it is determined that the first PCIe device has not lost its SIM card, determining whether the first PCIe device was detected as having lost its SIM card in the previous SIM card loss detection cycle; if so, sending a second alarm message, the second alarm message indicating that the first PCIe device has recovered from SIM card loss. In this example, if the first PCIe device was detected as having lost its SIM card in the previous SIM card loss detection cycle, but is determined not to have lost its SIM card in this current detection, it can, to some extent, indicate that the SIM card loss situation of the first PCIe device has been resolved through user intervention. Sending a second alarm message to indicate that the first PCIe device has recovered from SIM card loss allows the user to be aware of the specific situation.
[0019] 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 devices, the method further includes: determining the 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 the identifiers 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 plurality of PCIe devices enumerated by the BIOS, it is determined that the address information of the plurality of PCIe devices does not include the address information of a second PCIe device in the first module, a third alarm message is sent, wherein the third alarm message indicates that the second PCIe device has lost its card. In this example, the detection of lost cards of PCIe devices within the module can be realized, so that the user can determine the working status of the PCIe devices within the module.
[0020] In some possible implementations, obtaining the device identifier under the address information includes: obtaining the device identifier based on the address information through the management engine (ME). This example provides an implementation scheme for obtaining the device identifier under the address information of a first PCIe device during the operation of the operating system of a computing device, providing a foundation for detecting card loss of PCIe devices during the operation of the computing device's operating system.
[0021] In some possible implementations, the method is applied to a BMC, which manages the computing device; obtaining the device identifier based on the address information through a running management engine ME includes: the BMC sending the address information to the computing device, so that the computing device obtains the device identifier based on the address information through the running management engine ME; and obtaining the device identifier sent by the computing device.
[0022] In the example above, since the BMC cannot directly access the PCIe device, the BME sends the address information of the first PCIe device to the computing device. The computing device then obtains the device identifier under the address information of the first PCIe device, thereby obtaining the device identifier under the current address information of the first PCIe device. This facilitates the execution of the PCIe device card drop detection process, enabling the detection of PCIe device card drop during the operation of the computing device, and better ensuring the operation of the computing device and the implementation of services.
[0023] 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, device number, and function number, can uniquely identify the corresponding PCIe device in the computing device, thereby better ensuring the accuracy of subsequent card loss detection results.
[0024] Secondly, embodiments of this application provide a device for detecting card loss in PCIe devices, the device comprising:
[0025] The first determining module is configured to determine the address information of a first PCIe device, wherein 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.
[0026] The first acquisition module is configured to acquire the device identifier under the address information based on the address information;
[0027] The second determining module is configured to determine that the first PCIe device has lost its card if the acquisition fails.
[0028] The comparison and determination module is configured to compare the device identifier with the pre-stored identifier if the acquisition is successful, and determine whether the first PCIe device has lost its card; the pre-stored identifier and the address information have a preset correspondence.
[0029] Thirdly, embodiments of this application provide a baseboard management controller (BMC) for performing the method described in the first aspect or any possible implementation thereof.
[0030] Fourthly, embodiments of this application provide a PCIe device card loss detection system, the system comprising: a first processor, a second processor, and a baseboard management controller (BMC);
[0031] The first processor is configured to enumerate the PCIe devices deployed on the computing device during the startup phase of the computing device, obtain the 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.
[0032] The BMC 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; if the acquisition fails, it is determined that the first PCIe device has lost its card; if the acquisition is successful, the device identifier is compared with a pre-stored identifier to determine whether the first PCIe device has lost its card; the pre-stored identifier and the address information have a preset correspondence.
[0033] Fifthly, embodiments of this application provide a system for detecting card loss in PCIe devices, the system comprising: a processor and a baseboard management controller (BMC);
[0034] The processor is configured to enumerate the PCIe devices deployed on the computing device during the startup phase of the computing device, obtain the 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.
[0035] The BMC 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; if the acquisition fails, determine that the first PCIe device has lost its card; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device has lost its card; the pre-stored identifier and the address information have a preset correspondence.
[0036] Sixthly, embodiments of this application provide a computing device, the computing device including a baseboard management controller (BMC); the BMC is used to: determine address information of a first PCIe device, the address information being obtained through the BIOS during the startup phase of the computing device, the first PCIe device being deployed on the computing device; based on the address information, obtain a device identifier under the address information; if the acquisition fails, determine that the first PCIe device has been disconnected; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device has been disconnected; the pre-stored identifier and the address information have a preset correspondence.
[0037] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.
[0038] Eighthly, embodiments of this application provide a computer program product, characterized in that, when the computer program product is run on a processor, it causes the processor to execute the method described in the first aspect or any possible implementation of the first aspect.
[0039] It is understood that the beneficial effects of aspects two through eight above can be found in the relevant descriptions in aspect one above, and will not be repeated here. Attached Figure Description
[0040] Figure 1A is a schematic diagram of an application scenario for detecting card loss in a PCIe device provided in an embodiment of this application;
[0041] Figure 1B is a schematic diagram of another application scenario for detecting lost cards in PCIe devices provided in the embodiments of this application;
[0042] Figure 2A is a schematic diagram of another application scenario for detecting lost cards in PCIe devices provided in the embodiments of this application;
[0043] Figure 2B is a schematic diagram of another application scenario for detecting lost cards in PCIe devices provided in the embodiments of this application;
[0044] Figure 3 is a flowchart illustrating a method for detecting card loss in a PCIe device according to an embodiment of this application;
[0045] Figure 4 is a flowchart illustrating a method for detecting card loss in a PCIe device according to a specific embodiment of this application;
[0046] Figure 5 is a flowchart of a PCIe device card loss detection system according to a specific embodiment of this application.
[0047] Figure 6 is a flowchart of another PCIe device card loss detection system in a specific embodiment of this application;
[0048] Figure 7 is a schematic diagram of a PCIe device card loss detection device provided in an embodiment of this application;
[0049] Figure 8 is a schematic diagram of the structure of a BMC provided in an embodiment of this application. Detailed Implementation
[0050] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0051] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0052] In the description herein, it should be understood that the terms “center,” “longitudinal,” “lateral,” “length,” “width,” “thickness,” “upper,” “lower,” “front,” “rear,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” “outer,” and “circumferential” indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation.
[0053] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0054] To facilitate understanding of the technical solutions of the embodiments of this application, the terms used herein are explained below.
[0055] A Baseboard Management Controller (BMC) is a dedicated controller used to monitor and manage computing devices (such as servers). It is a small operating system and consists of both hardware and software. The hardware includes a separate processor and peripheral circuitry, and it is independently powered and operates. Even if the connected (or deployed) computing device is not powered on (meaning the operating system of the computing device is not running), the BMC can still function independently.
[0056] 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 PCIe device address information. This BDF information is determined based on the physical location of the PCIe device on the PCIe bus of the computing device (e.g., slot location).
[0057] 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 in computing devices that use the PCIe bus standard, including but not limited to graphics cards, network cards, storage devices, and various expansion cards. Each PCIe device has a unique Vendor ID and Device ID. The Vendor ID and Device ID are codes used to uniquely identify and recognize the PCIe device at the hardware level. The Vendor ID represents the company that invented or manufactured the PCIe device, while the Device ID is used to distinguish different models or types of devices produced by the same manufacturer.
[0058] BIOS (Basic Input Output System) is a set of programs embedded in a ROM (Read-Only Memory) chip on the motherboard of a computing device. It stores the device's basic input / output programs, system settings, power-on self-test (POST) programs, and system boot programs. The main function of BIOS is to provide the lowest-level, most direct hardware settings and control for the computing device. After the computing device is powered on, the BIOS starts running first. During BIOS operation, it automatically detects and identifies devices connected to the computing device's PCIe bus (i.e., PCIe devices), also known as enumerating the PCIe devices deployed on the computing device. Then, it initializes and configures the enumerated PCIe devices so that the operating system and applications of the computing device can communicate and control these PCIe devices.
[0059] The Management Engine (ME) is an independent subsystem within Intel chipsets, running on a microprocessor independent of the computing device's CPU (Central Processing Unit). The ME has the capability to remotely manage the computing devices it deploys, enabling remote management of the devices without user intervention in the event of vulnerabilities. In this embodiment, the ME can manage the PCIe devices deployed on the computing device and access their configuration space.
[0060] A module (also known as a component) is a specific functional component composed of several basic functional parts, which can be used to form a system, device, or program with complete functionality. Modules are one of the core components of modern electronic products, consisting of electronic components, printed circuit boards, and other parts, and can be embedded into electronic devices. For example, multiple PCIe devices can be integrated onto a single printed circuit board to form a module.
[0061] Next, the solutions in the embodiments of this application will be described.
[0062] In one implementation, the PCIe device card loss detection process includes:
[0063] Step 1: After computing device A is powered on, its CPU (Central Processing Unit / Processor) loads and runs the BIOS. The running BIOS enumerates the PCIe devices in computing device A, obtaining the address information of the enumerated PCIe devices, such as BDF information. The enumerated address information of the PCIe devices indicates that the CPU can access the PCIe devices through the running BIOS, meaning that the PCIe device is in a connected state and can be accessed by computing device A.
[0064] Step 2: The CPU of computing device A sends the BDF information of the aforementioned PCIe devices to the BMC used to manage computing device A through the running BIOS.
[0065] Step 3: The BMC determines whether a PCIe device has been lost based on the PCIe device's physical presence signal and the acquired BDF information of several PCIe devices. The PCIe device's physical presence signal is obtained after the PCIe device is inserted into the corresponding slot of computing device A, indicating that a PCIe device is inserted into that slot. For example, if the PCIe device's physical presence signal indicates that a PCIe device is inserted into the corresponding slot, but the PCIe device's BDF information is not acquired, it indicates that the PCIe device enumeration has failed, and the BMC determines that the PCIe device has been lost.
[0066] In the above process, the detection of whether a PCIe device has lost its card is performed during the PCIe device enumeration phase of the BIOS. After the operating system OS of computing device A starts running (i.e. during OS operation), the detection of lost PCIe devices can no longer continue.
[0067] In view of this, embodiments of this application also provide a method for detecting card loss of PCIe devices, so as to realize the detection of card loss of PCIe devices of computing devices during the operation of computing devices (i.e., the operation of the operating system OS of computing devices).
[0068] For example, the card loss detection process for the PCIe devices can be performed by the computing device itself to save hardware costs.
[0069] Specifically, during the startup phase, the computing device enumerates the deployed PCIe devices through the BIOS, obtaining the address information of each enumerated PCIe device and storing it in a preset storage space. Next, the BIOS loads a bootloader, which then loads and runs the operating system (OS) to provide data processing and computing services. While the OS is running, the computing device can periodically or non-periodically execute a PCIe device loss detection process. Specifically, the computing device determines the address information of the first PCIe device, which is obtained through the BIOS during the startup phase, indicating that the first PCIe device did not lose its card during the enumeration process. Then, based on the address information, the computing device obtains the device identifier associated with that address. If the acquisition fails, it is determined that the first PCIe device cannot be accessed, and the first PCIe device is considered lost. If the acquisition is successful, the device identifier is compared with a pre-stored identifier to determine whether the first PCIe device has lost its card. The pre-stored identifier and the address information have a preset correspondence; for example, it could be obtained by the computing device from the first PCIe device based on the address information during the enumeration process.
[0070] As an example, Figures 1A and 1B illustrate an application scenario for a PCIe device card loss detection method. In this scenario, to achieve PCIe device card loss detection on a computing device without affecting the device's service operation, the card loss detection system shown in Figures 1A and 1B includes a Basic Management Controller (BMC) and the computing devices it manages. The BMC can access the computing devices through a designated interface (as shown in Figure 1, the BMC accesses the computing device through its designated interface 1 and then through its designated interface 2). The BMC executes the PCIe device card loss detection process on the computing device. As shown in Figure 1A, the computing device may include a processor. As shown in Figure 1B, the computing device may include a first processor and a second processor.
[0071] As another example, Figures 2A and 2B illustrate another application scenario of a PCIe device card loss detection method. In this scenario, to achieve PCIe device card loss detection on a computing device without affecting the service operation of the computing device, the card loss detection system shown in Figures 2A and 2B includes a Basic Management Controller (BMC) and the computing devices it manages. The BMC is deployed on the computing device, and the PCIe device card loss detection process is executed through the BMC. As shown in Figure 2A, the computing device includes a BMC and a processor. As shown in Figure 2B, the computing device includes a BMC, a first processor, and a second processor.
[0072] In some possible examples, where the computing device includes a processor, the processor can be a CPU. In still other possible examples, where 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 can run the corresponding business software through the first processor to provide corresponding business services to the device users; and it can receive scheduling from the BMC through the second processor to assist the BMC in performing the card loss detection process for the PCIe device of the computing device, so as to avoid occupying the first processor.
[0073] The computing device also deploys one or more PCIe devices (PCIe device 1, PCIe device 2...PCIe device M as shown in Figures 1A, 1B and 2A, 2B, where M is a positive integer). The second processor can manage the PCIe devices deployed on the computing device and access the configuration space of the PCIe devices.
[0074] The following section uses a PCIe card loss detection system, which includes a BMC and the computing devices it manages, and the computing devices include a first processor and a second processor, as an example to introduce the overall process of PCIe card loss detection.
[0075] 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 the 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 the card loss detection process for the PCIe devices.
[0076] Subsequently, after the first processor completes self-test and hardware initialization of computing devices (such as PCIe devices) through the running BIOS, it loads the bootloader through the running BIOS, and then loads and runs the operating system (OS) through the bootloader. The first processor then runs the OS to provide data processing and computing services.
[0077] In some possible examples, during the enumeration of PCIe devices by the running BIOS, the first processor can also obtain the identifiers of each PCIe device (including the pre-stored identifier of the first PCIe device) from the configuration space of the enumerated PCIe devices through the running BIOS. Then, the running BIOS can send the address information and identifiers of the enumerated PCIe devices to the BMC so that the BMC can perform the card loss detection process for the PCIe devices.
[0078] The second processor can receive the PCIe device address information sent by the BMC during the PCIe device card loss detection through the management engine ME, and manage and access the configuration space of the corresponding PCIe device based on the received PCIe device address information.
[0079] The Baseboard Controller (BMC) can run a specified software program to implement the card loss detection process for PCIe devices provided in this embodiment. For example, this specified software program can be a functional program within the Intelligent Baseboard Management Controller (iBMC). The iBMC is an embedded management system for the entire lifecycle of computing devices (e.g., servers). It provides a series of management tools for hardware status monitoring, deployment, energy saving, and security, and standardized interfaces to build a more comprehensive ecosystem for managing computing devices (e.g., servers). Based on the Hi1710 management chip, the iBMC employs multiple innovative technologies to comprehensively achieve refined management of computing devices (e.g., servers).
[0080] In some possible examples, the computing device can be a server or terminal, such as, but not limited to, rack servers, AI servers, blade servers, high-density servers, and tower servers.
[0081] The following describes the method for detecting card loss in PCIe devices according to embodiments of this application.
[0082] For example, Figure 3 shows a flowchart of a method for detecting lost cards in a PCIe device according to an embodiment of this application. As shown in Figure 3, the method may include steps S310-S340:
[0083] In step S310, the address information of the first PCIe device is determined. This address information is obtained through the BIOS during the startup phase of the computing device. The first PCIe device is deployed on the computing device.
[0084] In some possible examples, this PCIe device card loss detection method can be applied to computing devices or to the BMC (Browser Management Center) for managing and monitoring computing devices. The following explanation uses the application of this PCIe device card loss detection method to a BMC as an example to illustrate the specific implementation of the card loss detection process. For the specific implementation of the card loss detection process when this PCIe device card loss detection method is applied to a computing device, please refer to the section on the specific implementation of the card loss detection process when this PCIe device card loss detection method is applied to a BMC. The computing device deploys one or more PCIe devices.
[0085] For example, during its startup phase, a computing device can enumerate one or more PCIe devices deployed on it via the BIOS. If a PCIe device is enumerated, its address information is determined. The computing device then sends the address information of the one or more enumerated PCIe devices to the BMC. In some possible examples, where the computing device has a first processor and a second processor, the computing device can run the BIOS via its first processor to determine the address information of each enumerated PCIe device and send the address information of the one or more enumerated PCIe devices to the BMC.
[0086] Correspondingly, the BMC can obtain the address information of one or more PCIe devices sent by the computing device. Then, it stores the obtained address information of one or more PCIe devices in a designated storage space. So that when the OS of the computing device performs card drop detection on the PCIe deployed on the computing device during operation, it can 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 read address information of each PCIe device.
[0087] In some possible implementations, during the operation of the OS on the computing device, the BMC can periodically perform card drop detection on the PCIe devices of the computing device, so as to proactively identify whether the PCIe devices of the computing device have been lost. In some specific examples, when the BMC detects that the time corresponding to the preset card drop detection period has arrived, the BMC can read the address information of each PCIe device from a specified storage space, and perform card drop detection on each PCIe device based on the address information of each PCIe device. For example, the BMC can read the address information of each PCIe device sequentially from the storage location of the address information of one or more PCIe devices in a forward-to-back order.
[0088] In some specific examples, the SIM card drop detection cycle can be set to xx hours. Correspondingly, when time T1 arrives at the first SIM card drop detection cycle, the BMC can read the address information of each PCIe device from the designated storage space and perform SIM card drop detection for each PCIe device. When time T2 (i.e., T1 + xx hours) arrives at the second SIM card drop detection cycle, the BMC can again read the address information of each PCIe device from the designated storage space and perform SIM card drop detection for each PCIe device, and so on. The length of this SIM card drop detection cycle can be set according to business needs. The SIM card drop detection cycle can also be set to xx minutes, one day, or one week, etc. This application embodiment does not limit the length of the SIM card drop detection cycle.
[0089] Understandably, BMC's process for detecting card loss on each PCIe device is similar. The following describes the card loss detection process for PCIe devices using any first PCIe device among one or more PCIe devices as an example. For the card loss detection process of other PCIe devices, please refer to the card loss detection process for the first PCIe device.
[0090] During this card loss 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 on the computing device, and its address information is obtained by the BIOS and sent to the BMC during the computing device's boot phase.
[0091] In some possible examples, this address information can be BDF (Bus Number, Device Number, and Function Number) information, including the bus number, device number, and function number.
[0092] In step S320, based on the aforementioned address information, the device identifier under the address information is obtained. For example, the device identifier may include the vendor ID and / or device ID of the first PCIe device.
[0093] In some examples, the BMC cannot directly access the PCIe device based on its address information. However, if the PCIe device is not lost, the computing device can access its configuration space based on its address information, i.e., its BDF information. The PCIe device's configuration space stores its identifier, meaning the identifier can be obtained by accessing the PCIe device's configuration space. Conversely, if the PCIe device is lost (i.e., disconnected), the computing device cannot access its configuration space based on its address information, i.e., its BDF information, and consequently, it cannot obtain the PCIe device's identifier.
[0094] Given the above, after the BMC determines the address information (BDF information) of the first PCIe device, it can send this address information to the computing device to obtain the device identifier under the address information of the first PCIe device. In some specific examples, after sending the address information to the computing device, the computing device can obtain the device identifier under the received address information through the management engine ME. For example, 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 occupation of the first processor of the computing device, so that the computing device can run services through the first processor and provide users with better services.
[0095] Specifically, the BMC can send the address information of the determined first PCIe device to the second processor of the computing device, so that the second processor can obtain the device identifier under the received address information through the management engine ME.
[0096] In some possible examples, if the first PCIe device is not lost, the second processor can access the configuration space of the first PCIe device through the management engine ME based on the address information of the first PCIe device. Accordingly, the device identifier may be the identifier of the first PCIe device itself. However, if the first PCIe device is lost, the second processor cannot access the configuration space of the first PCIe device through the management engine ME based on the address information of the first PCIe device. Consequently, the second processor cannot obtain the identifier of the first PCIe device itself through the management engine ME. If the second processor cannot obtain the identifier of the first PCIe device through the management engine ME, the following possibilities may occur: First, the second processor cannot obtain the device identifier based on the address information it receives through the management engine ME, i.e., obtaining the device identifier fails; Second, the second processor may obtain the identifier of a device other than the 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 through a switch chip (e.g., the PCIe device is connected to the slot of the computing device by connecting to the switch chip), the second processor may obtain the identifier of the switch chip through the management engine ME based on the address information it receives, i.e., obtaining the device identifier is successful, but the device identifier is the identifier of another device (e.g., the identifier of the aforementioned switch chip).
[0097] In view of the above, in one scenario, when a computing device (e.g., its second processor) fails to acquire a device identifier based on the address information it receives through the management engine (ME), it can send feedback to the BMC indicating the failure to acquire the device identifier (e.g., directly sending back an empty device identifier, or sending back pre-set information indicating the failure to acquire the device identifier). Accordingly, upon receiving this information, the BMC determines that the acquisition has failed. Consequently, in step S330, if the acquisition fails, it is determined that the first PCIe device has been lost. This achieves the detection of a lost first PCIe device.
[0098] In another scenario, the computing device (e.g., its second processor), through the management engine ME, obtains the device identifier under the received address information and then feeds it back to the BMC. The BMC obtains the device identifier and confirms successful acquisition. At this point, to accurately determine the current status of the first iPCIe device (i.e., whether it has lost its card), the BMC, after obtaining the device identifier under the address information of the first PCIe device, also needs to verify the device identifier, i.e., verify whether the device identifier is the identifier of the first PCIe device itself. Accordingly, in step S340, if the acquisition is successful, the device identifier is compared with a pre-stored identifier to determine whether the first PCIe device has lost its card; the pre-stored identifier has a preset correspondence with the aforementioned address information.
[0099] In some possible examples, the pre-stored identifier of the first PCIe device may be acquired and stored by the computing device during its boot phase when it enumerates the PCIe devices deployed by the computing device through the BIOS.
[0100] Understandably, during the process of a computing device enumerating deployed PCIe devices through the BIOS, it can scan the PCIe bus of the computing device, traversing all possible combinations of bus, device, and function (comprising various address information, i.e., BDF information), to discover PCIe devices connected to the PCIe bus. For example, taking arbitrary address information X as an example, when the computing device, through the BIOS, can read the corresponding configuration space based on the corresponding address information X, it determines that the location indicated by address information X (i.e., BDF information X) is connected to PCIe device X, that is, it enumerates PCIe device X. Accordingly, it can determine the address information X and obtain the identifier of PCIe device X from the configuration space of the corresponding PCIe device X, recording the correspondence between the address information and the identifier of PCIe device X. In this way, the computing device, through the BIOS, can obtain the address information and identifier of each enumerated PCIe device in the aforementioned manner.
[0101] Next, the computing device sends the address information and identifier of one or more enumerated PCIe devices to the BMC via the BIOS. The BMC obtains the address information and identifier of one or more PCIe devices and stores them accordingly. The stored address information and identifier of one or more PCIe devices includes the address information and pre-stored identifier of the first PCIe device.
[0102] For example, the process of the computing device enumerating the deployed PCIe devices through the BIOS and sending the address information and identifier of one or more enumerated PCIe devices to the BMC can both be executed by the computing device through its first processor.
[0103] In some other possible examples, the pre-stored identifier of the first PCIe device may also be configured and stored after the computing device has configured all PCIe devices. Before updating or replacing other PCIe devices, the identifiers and address information of each PCIe device can be considered unchanged after the computing device has fully configured all PCIe devices. Correspondingly, the address information and identifier of each PCIe device can be configured after the computing device has fully configured all PCIe devices. Furthermore, the BMC can correspondingly store the address information and identifier of each PCIe device obtained from this configuration. This correspondingly stored address information and identifier of each PCIe device includes the address information and pre-stored identifier of the first PCIe device.
[0104] Once the BMC confirms that the device identifier has been successfully obtained, it compares the device identifier with a pre-stored identifier (i.e., a pre-stored identifier that has a preset correspondence with the address information of the first PCIe device) to obtain the comparison result. Then, based on the comparison result, it determines whether the first PCIe device has lost its card.
[0105] 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 has been disconnected, i.e., the connection has been lost, meaning that neither the computing device nor the BMC can access the configuration space of the first PCIe device. In another specific example, if the comparison result indicates that the device identifier and the pre-stored identifier are consistent, it is determined that the first PCIe device has not been disconnected.
[0106] In some possible examples, where the PCIe device is an extension of the computing device via a switch chip, the vendor ID of the PCIe device may be the same as the vendor ID of the switch chip. Furthermore, when such a PCIe device loses its card, the vendor ID obtained based on the address information of the PCIe device (e.g., referred to as PCIe device W) may be the vendor ID of the switch chip. Given these combined circumstances, when comparing the device identifier obtained in real-time based on the address information of PCIe device W (e.g., the vendor ID obtained from the address information sent by the computing device via the BMC) with a pre-stored identifier (e.g., the vendor ID obtained through the BIOS during the computing device's boot phase or a pre-configured and stored vendor ID), the comparison result may indicate that the device identifier obtained in real-time based on the address information of PCIe device W matches the pre-stored identifier, thus determining that PCIe device W has not lost its card, while in reality, PCIe device W has lost its card, leading to a misjudgment.
[0107] To address the aforementioned issues, it is possible to configure the system to require the acquisition of the PCIe device's vendor ID and device ID (i.e., the acquired device identifier includes the vendor ID and device ID), and to pre-store the identifiers including the PCIe device's vendor ID and device ID (i.e., the PCIe device identifiers acquired during the enumeration process include the vendor ID and device ID). This would improve the accuracy of card loss detection results and prevent the aforementioned misjudgments.
[0108] In some possible examples, the PCIe devices deployed on the computing device may include PCIe devices belonging to the module, as well as PCIe devices not belonging to the module (which may be referred to as stand-alone PCIe devices). For example, PCIe devices within a module may include, but are not limited to, devices such as GPUs (Graphics Processing Units) and NPUs (Neural Processing Units).
[0109] For PCIe devices belonging to a module (i.e., PCIe devices within a module), during the startup phase of the computing device, when the BIOS enumerates the PCIe devices deployed on the computing device, some modules, after being inserted into the computing device's slot, cannot generate corresponding physical presence signals. Consequently, it is impossible to determine whether a PCIe device within the module has been lost based on its physical presence signal and whether the address information of the PCIe device within it is obtained during enumeration. In other words, it is impossible to detect lost PCIe devices within the module. To overcome this deficiency, in one embodiment of this application, when the PCIe devices configured in the computing device include PCIe devices belonging to a module, a mapping relationship between the module identifier of the module deployed on the computing device and the identifiers of the PCIe devices contained in the module can be configured in any storage space readable by the BMC. This mapping relationship can be used to identify whether the address information of one or more PCIe devices enumerated by the BIOS during the startup phase of the computing device includes the address information of the PCIe device within the module, thus determining whether the PCIe device within the module has been enumerated.
[0110] In some possible examples, the computing device deploys a first module, which includes a specified number of PCIe devices. It is understood that the computing device may deploy one or more modules, and the first module can be any module deployed by the computing device.
[0111] Before step S310, steps 21-23 are included: In step 21, the address information of several PCIe devices enumerated by the BIOS and their corresponding identifiers are determined. These PCIe devices are deployed on the computing device. In this step, during the power-on and startup phase of the computing device, the computing device (e.g., through the first processor of the computing device) loads and runs the BIOS, and enumerates PCIe devices through the BIOS to obtain the address information of one or more enumerated PCIe devices. The identifier of the PCIe device can be obtained from the configuration space of each 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. Accordingly, the BMC obtains the address information and identifier of one or more PCIe devices. Afterwards, the BMC can store it in a designated storage space for PCIe device card loss detection, and can also execute step 22.
[0112] In step 22, the identifiers of each PCIe device in the first module are obtained. In this step, the identifiers of each PCIe device in the first module and the corresponding module identifier of the first module can be stored in any storage space readable by the BMC. Accordingly, the BMC can obtain the identifiers of each PCIe device in the first module from the storage space storing the identifiers of each PCIe device in the first module.
[0113] Next, the BMC can 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, then it can be determined that each PCIe device in the first module has been enumerated.
[0114] Subsequently, when other modules are deployed on the computing device, the system can continue to determine whether all PCIe devices in other modules have been enumerated based on the identifiers of one or more PCIe devices obtained from the computing device. After confirming that all PCIe devices in all modules have been enumerated, the subsequent card loss detection process can be executed based on the address information of one or more PCIe devices obtained from the computing device.
[0115] If the identifiers of one or more PCIe devices obtained from the computing device do not include the identifiers of one or more PCIe devices in the first module (taking PCIe device Y as an example), then it can be determined that the computing device did not send the identifier of PCIe device Y in the first module to the BMC via the BIOS. This may include two scenarios: first, the computing device did not enumerate PCIe device Y in the first module via the BIOS; second, an error occurred when the computing device sent the identifiers and address information of one or more enumerated PCIe devices via the BIOS, and it failed to successfully send the identifier of PCIe device Y in the first module (or the identifier and address information of PCIe device Y, in which case PCIe device Y was enumerated) to the BMC.
[0116] 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 PCIe devices enumerated by the BIOS, it is determined that the address information of the PCIe devices does not include the address information of the second PCIe device in the first module, a third alarm message is sent, which indicates that the second PCIe device has lost its card.
[0117] In the above example, it is possible to identify PCIe devices that are not enumerated in the module and to send address information of PCIe devices in the module 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 resolve the issue, thereby providing the user with better service.
[0118] The third alarm information can be in any form, including but not limited to: audible alarm information, text alarm information, visual alarm information, or any combination of audible, text, and visual alarm information. For example, the third alarm information may include the address information of the second PCIe device and / or an identifier sent by the computing device through the BIOS to help the user locate the corresponding second PCIe device.
[0119] For example, a full configuration constraint is considered to exist for the PCIe devices deployed within the module. For instance, if the first module is designed to deploy N PCIe devices, the full configuration constraint means that during the PCIe device SIM card loss detection process, the first module is considered to actually deploy N PCIe devices, i.e., the aforementioned specified number is N. Accordingly, the BMC can pre-configure and store the identifiers of the N PCIe devices in the first module.
[0120] In some possible examples, at least two PCIe devices within the first module may share the same vendor ID. For instance, if the first module is an Ascend module, the vendor IDs of all PCIe devices within it could be 0x19e5; similarly, if the first module is an H800, A800, or A100 module, the vendor IDs of all PCIe devices within it could be 0x10de. In this case, to more accurately determine the card loss status of each PCIe device in the first module, the identifiers of one or more PCIe devices obtained during enumeration can include both the vendor ID and the device ID. Furthermore, the stored identifiers of each PCIe device in the first module can also include both the vendor ID and the device ID. This allows for better differentiation of different PCIe devices within the first module, thereby enabling a clear determination of the card loss status of each PCIe device in the first module.
[0121] Continuing with the above example, if the first PCIe device is a PCIe device belonging to a module, such as an Ascend module, and the device identifier includes the manufacturer ID, then the aforementioned comparison of the device identifier with the pre-stored identifier can be specifically as follows: determine whether the device identifier is 0x19e5; if it is not 0x19e5, then determine that the comparison result indicates that the device identifier is inconsistent with the pre-stored identifier of the first PCIe device, and then determine that the first PCIe device has lost its card.
[0122] In some possible scenarios, the computing device might send only the address information of certain PCIe devices (hereinafter, we'll use PCIe device Z as an example) through the BIOS, without sending their identifiers. Therefore, the BMC can, based on the obtained address information of PCIe device Z, retrieve the device identifier under that address information from the computing device, and then compare the device identifier under PCIe device Z's address information with the identifiers of each PCIe device in the pre-stored modules to obtain the corresponding comparison result Z.
[0123] Subsequently, if the device identifier under the address information of PCIe device Z indicated by the comparison result Z matches one of the identifiers of each PCIe device corresponding to the pre-stored module, it can also be determined that the PCIe device Y has not lost its card.
[0124] If the device identifier under the address information of PCIe device Z, as indicated by the comparison result Z, is inconsistent with all identifiers in the pre-stored identifiers of each PCIe device corresponding to the module, then it can be determined that PCIe device Z has been lost. Subsequently, if it is determined that PCIe device Z has been lost, an alarm message can be sent to indicate that PCIe device Z has been lost. For example, this alarm message may include the address information of PCIe device Z to help the user locate PCIe device Z.
[0125] The above process provides a solution for detecting card loss of deployed PCIe devices after successful startup and during the operation of the computing device. This solution enables the detection of card loss of deployed PCIe devices during the operation of the computing device, providing better assistance to computing device maintenance personnel. Furthermore, it can identify and issue alarms for PCIe devices not enumerated in the module and for not sending address information of PCIe devices in the module to the BMC.
[0126] For example, Figure 4 shows a flowchart of another method for detecting lost PCIe cards provided in an embodiment of this application. As shown in Figure 4, the method may include steps S410-S490:
[0127] In step S410, the address information of the first PCIe device is determined. This address information is obtained through the BIOS during the startup phase of the computing device. The first PCIe device is deployed on the computing device.
[0128] In step S420, based on the aforementioned address information, the device identifier under the address information is obtained.
[0129] If the acquisition fails in step S430, it is determined that the first PCIe device has been lost. Step S460 can then be executed.
[0130] In step S440, if the acquisition is successful, the device identifier is compared with the pre-stored identifier.
[0131] The implementation principle of steps S410-S440 is similar to that of steps S310-S330 shown in Figure 3. The implementation process of steps S410-S430 can be found in the implementation process of steps S310-S330 shown in Figure 3.
[0132] In step S450, if the aforementioned comparison result indicates that the device identifier and the pre-stored identifier are inconsistent, then it is determined that the first PCIe device has lost its card.
[0133] In step S460, a first alarm message is sent, indicating that the first PCIe device has lost its card.
[0134] If the BMC determines that the device identifier and the pre-stored identifier are inconsistent in the comparison results, it indicates that the first PCIe device has been lost. To provide better service to users, upon confirming the loss of the first PCIe device, a first alarm message indicating the loss of the first PCIe device is sent. In some possible examples, this first alarm message can be in any form, including but not limited to: audible alarm messages, text alarm messages, light alarm messages, or any combination of audible, text, and light alarm messages. This first alarm message helps users intervene and resolve the first PCIe device loss issue in a timely manner, ensuring the normal operation of the computing device and the normal execution of services. In some possible examples, the first alarm message may include the address information and / or pre-stored identifier of the first PCIe device to help users accurately locate the first PCIe device.
[0135] In step S470, if the aforementioned comparison result indicates that the device identifier is consistent with the pre-stored identifier, it is determined that the first PCIe device has not lost its card.
[0136] In step S480, if it is determined that the first PCIe device has not lost its card, it is determined whether the first PCIe device was detected as having lost its card in the previous card loss detection cycle.
[0137] In step S490, if the determination is yes, a second alarm message is sent, which instructs the first PCIe device to recover from card loss.
[0138] If the BMC determines that the device identifier and the pre-stored identifier match in the comparison result, it confirms that the first PCIe device has not lost its SIM card. In this case, it is possible that the first PCIe device did not lose its SIM card in the previous SIM card loss detection cycle, or it is possible that the first PCIe device lost its SIM card in the previous SIM card loss detection cycle, but the connection was restored after user intervention, thus it was determined to be not lost in the current SIM card loss detection cycle.
[0139] In the above situation, to ensure users are aware of whether the PCIe device identified as having experienced a card loss in the previous detection cycle has regained its connection (i.e., whether the card loss has been resolved) after intervention, the BMC, upon determining that the first PCIe device did not experience a card loss, can further determine whether the first PCIe device was detected as having a card loss in the previous detection cycle. If it is determined that the first PCIe device was detected as having a card loss in the previous detection cycle, a second alarm message instructing the first PCIe device to recover from the card loss is sent. This second alarm message serves as a notification to the user that the first PCIe device has recovered from the card loss. 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.
[0140] If it is determined that the first PCIe device was detected as not having lost a card in the previous card loss detection cycle, then the second alarm information will not be sent, and card loss detection will continue to be performed on other PCIe devices that were not detected in the current card loss detection cycle, that is, the card loss detection process provided in the embodiments of this application will be executed.
[0141] In some possible examples, the second alarm message can also be any form of information, such as including but not limited to: alarm messages in the form of sound, alarm messages in the form of text, alarm messages in the form of light, or alarm messages in any combination of sound, text and light.
[0142] It is understood that the embodiments of this application do not limit the specific form 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 embodiments of this application.
[0143] Based on the methods in the above embodiments, as shown in FIG5, this application provides a schematic diagram of the structure of a PCIe device card loss detection system. As shown in FIG5, the system includes: a first processor 510, a second processor 520, and a baseboard management controller BMC 530.
[0144] The first processor 510 is configured to enumerate the PCIe devices deployed on the computing device during the startup phase of the computing device, obtain the 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.
[0145] The BMC530 is configured to determine the address information of a 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 has lost its card; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device has lost its card; the pre-stored identifier and the address information have a preset correspondence.
[0146] In some possible examples, as shown in Figure 5, the BMC530, in the process of obtaining the device identifier 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.
[0147] The second processor 520 is configured to obtain the device identifier based on the address information of the first PCIe device through the management engine ME, and send the device identifier to the BMC 530;
[0148] The BMC530 is also configured to acquire the device identifier sent by the second processor.
[0149] Based on the methods in the above embodiments, this application provides another PCIe device card loss detection system, as shown in FIG6. The system includes: a processor 610 and a baseboard management controller BMC 620.
[0150] The processor 610 is configured to enumerate the PCIe devices deployed on the computing device during the startup phase of the computing device, obtain the 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.
[0151] The BMC620 is configured to determine the address information of a 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 has lost its card; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device has lost its card; the pre-stored identifier and the address information have a preset correspondence.
[0152] In some possible examples, as shown in Figure 6, the BMC620, in the process of obtaining the device identifier 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.
[0153] The processor 610 is configured to obtain the device identifier based on the address information of the first PCIe device through the management engine ME, and send the device identifier to the BMC 620;
[0154] The BMC620 is also configured to acquire the device identifier sent by the processor 610.
[0155] Based on the methods in the above embodiments, this application provides a device for detecting card loss in PCIe devices. Please refer to Figure 7, which is a schematic diagram of the structure of a device for detecting card loss in PCIe devices provided in this application.
[0156] As shown in Figure 7, the PCIe device card loss detection device 700 may include: a first determining module 710, configured to determine the address information of a first PCIe device, wherein 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 obtaining module 720, configured to obtain a device identifier under the address information based on the address information; a second determining module 730, configured to determine that the first PCIe device has lost its card if the obtaining fails; and a comparison determining module 740, configured to compare the device identifier with a pre-stored identifier if the obtaining is successful, to determine whether the first PCIe device has lost its card; wherein the pre-stored identifier and the address information have a preset correspondence.
[0157] It should be understood that the above-described system and apparatus are used to execute the methods in the above embodiments. The implementation principles and technical effects of the corresponding devices and apparatus in the system are similar to those described in the above methods. The working process of the system and apparatus can be referred to the corresponding process in the above methods, and will not be repeated here.
[0158] Based on the methods in the above embodiments, this application provides a computing device. The computing device includes a Baseboard Management Controller (BMC); the BMC is configured to: determine the address information of a first PCIe device, the address information being obtained through the BIOS during the startup phase of the computing device, the first PCIe device being deployed on the computing device; obtain a device identifier based on the address information; if the acquisition fails, determine that the first PCIe device has been disconnected; if the acquisition is successful, compare the device identifier with a pre-stored identifier to determine whether the first PCIe device has been disconnected; the pre-stored identifier and the address information have a preset correspondence.
[0159] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0160] Based on the methods in the above embodiments, this application provides a computer program product, characterized in that, when the computer program product is run on a processor, the processor executes the methods in the above embodiments.
[0161] Based on the methods in the above embodiments, this application also provides a BMC. Figure 8 shows a schematic diagram of a hardware structure of a BMC, wherein the BMC 800 may include a processor 810, a memory 820, and a communication interface 830. Information can 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, etc. However, for clarity, all buses are labeled as bus 840 in the figure.
[0162] For example, processor 810 may include one or more processors. For instance, processor 710 may include one or more of an application processor (AP), a central processing unit, and / or a controller. The different processors may be independent devices or integrated into one or more processors.
[0163] For example, memory 820 is used to store instructions and data. In some examples, memory 820 may include cache memory. This memory can hold instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this type of memory to avoid repeated access, reduce processor wait time, and improve system efficiency.
[0164] In some examples, memory 820 can also be used to store executable program code, and processor 810 executes various functional applications of BMC 800 (e.g., implementing the functional applications of the method steps described in the above method embodiments of this application) and data processing by running the executable program code stored in memory.
[0165] For example, the communication interface 830 may include one or more interfaces responsible for the transmission of data / instructions between the BMC800 and various components. For instance, 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), General Purpose I / O Ports (GPIO), and / or a Universal Serial Bus (USB) interface, etc.
[0166] It is understood that the interface connection relationships between the components of the BMC800 illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation of the BMC800. In other embodiments of this application, the BMC800 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments. Furthermore, the structure illustrated in the embodiments of this application does not constitute a specific limitation of the BMC800. In other embodiments of this application, the BMC800 may include more or fewer components than illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0167] It should be understood that each step of the above method embodiments can be completed by hardware logic circuits or software instructions in a processor.
[0168] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. 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 embodiments of this application. In addition, in some possible implementations, each step in the above embodiments may be selectively executed according to the actual situation, and may be partially or fully executed, which is not limited here.
[0169] It is understood that the processor in the embodiments of this application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.
[0170] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which 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, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from 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 reside in an ASIC.
[0171] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0172] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
Claims
1. A method for detecting card drop of a PCIe device, the method comprising: The method comprises: determining address information of a first PCIe device, the address information being acquired by a BIOS in a startup phase of a computing device, the first PCIe device being deployed in the computing device; based on the address information, acquiring a device identifier under the address information; if the acquisition fails, determining that the first PCIe device is card dropped; if the acquisition succeeds, comparing the device identifier with a pre-stored identifier to determine whether the first PCIe device is card dropped, the pre-stored identifier having a preset correspondence with the address information.
2. The method of claim 1, wherein, The device identifier comprises a vendor ID and / or a device ID of the first PCIe device.
3. The method of claim 1, wherein, The pre-stored identifier is acquired and stored in an enumeration process of PCIe devices deployed in the computing device by the BIOS in the startup phase of the computing device, or is configured and stored after the computing device configures all PCIe devices.
4. The method of claim 1, wherein, The determination of whether the first PCIe device is card dropped comprises: if the comparison result of the device identifier and the pre-stored identifier indicates that the device identifier is inconsistent with the pre-stored identifier, it is determined that the first PCIe device is card dropped.
5. The method of claim 4, wherein, Further comprising: sending first alarm information, the first alarm information indicating that the first PCIe device is card dropped.
6. The method of claim 4, wherein, Further comprising: 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 card dropped.
7. The method of claim 6, wherein, Further comprising: in the case of determining that the first PCIe device is not card dropped, judging whether the first PCIe device is detected as card dropped in a previous card drop detection period; if it is judged as yes, sending second alarm information, the second alarm information indicating that the first PCIe device is card dropped and recovered.
8. The method according to any one of claims 1 to 7, wherein, The computing device deploys a first module, wherein the first module comprises a specified number of PCIe devices; Before the determination of the address information of the first PCIe device, further comprising: determining address information of a plurality of PCIe devices enumerated by the BIOS and respective corresponding identifiers of the plurality of PCIe devices, the plurality of PCIe devices being deployed in the computing device; acquiring identifiers of PCIe devices in the first module; if it is determined based on the identifiers of the PCIe devices in the first module and the respective corresponding identifiers of the address information of the plurality of PCIe devices enumerated by the BIOS that the address information of the plurality of PCIe devices does not comprise address information of a second PCIe device in the first module, sending third alarm information, the third alarm information indicating that the second PCIe device is card dropped.
9. The method according to any one of claims 1 to 7, wherein, The acquisition of the device identifier under the address information based on the address information comprises: acquiring the device identifier based on the address information by a management engine (ME).
10. A baseboard management controller (BMC) comprising: The BMC is configured to perform the method of any one of claims 1-9.
Citation Information
Patent Citations
Server PCIE device monitoring method, system and device and readable storage medium
CN110399267A
Fault detection method and device
CN110502399A
Adaptive configuration method and device of AI server, equipment and storage medium
CN115878533A
PCIE equipment information acquisition method and device, equipment and storage medium
CN116775540A
GPU (Graphics Processing Unit) card dropping detection method and device
CN117349127A