PCIe device fault processing method, BMC and PCIe device

Through software communication between BMC and PCIe devices, error information is read and fault location and repair are performed, which solves the problem of computing server downtime caused by PCIe device failure and improves the reliability and maintainability of the server.

CN118626299APending Publication Date: 2024-09-10NEW H3C TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410822485.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

After computing servers are equipped with PCIe devices, abnormal downtime occurs due to software and hardware failures, affecting normal business operations. It is difficult for existing technologies to effectively handle failures during the startup process of PCIe devices.

Method used

Through software communication between the BMC and the PCIe device, the error information in the error register is regularly read, the fault location and type are determined, and recovery instructions are sent according to the fault type, triggering restarts and preset repair methods for fault repair, including driver replacement and restarting. training link.

Benefits of technology

It achieves precise processing of PCIe device faults, avoids hardware resource constraints and fault type restrictions, and ensures the reliability and maintainability of computing servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626299A
    Figure CN118626299A
Patent Text Reader

Abstract

The embodiment of the invention provides a PCIe device fault processing method, a BMC and a PCIe device, relates to the technical field of hardware, is applied to the BMC, and is in communication connection with the PCIe device, and the method comprises the following steps: reading error information stored in an error register in the PCIe device according to a preset period in a PCIe device starting stage, the error information is written into an error register when the PCIe device fails, and the error register comprises at least one of the following registers: a configuration space register, a PCIe capability register and an AER register; and determining the fault position and the fault type of the PCIe device according to the error information so as to realize fault processing. By applying the scheme provided by the embodiment of the invention, the fault in the PCIe device starting process can be processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of hardware technology, and in particular to a PCIe device fault processing method, a BMC, and a PCIe device. Background Art

[0002] With the development of AI (Artificial Intelligence) technology, the demand for high-performance computing servers is growing rapidly. Computing servers need to be equipped with GPU (Graphics Processing Unit), NVME (Non Volatile Memory express) or network cards and other PCIe devices that contain PCIe (Peripheral Component Interconnect express) interfaces.

[0003] In this context, the requirements for the reliability and maintainability of computing servers are increasing. After computing servers are equipped with PCIe devices, problems such as abnormal downtime of computing servers due to software and hardware failures of PCIe devices may occur, which ultimately affects the normal operation of services. Therefore, it is necessary to propose a fault handling method to handle faults during the startup process of PCIe devices. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a PCIe device fault handling method, BMC, and PCIe device to handle the fault during the PCIe device startup process. The specific technical solution is as follows: In a first aspect, an embodiment of the present application provides a PCIe device fault processing method, which is applied to a baseboard management controller BMC, wherein the BMC is communicatively connected with a peripheral component interconnection fast bus PCIe device, and the method includes: In the startup phase of the PCIe device, error information stored in an error register in the PCIe device is read according to a preset period, wherein the error information is written into the error register by the PCIe device in the event of a failure, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an advanced error reporting AER register; The location where the PCIe device fails and the type of the failure are determined according to the error information to implement failure processing.

[0005] In one embodiment of the present application, after determining the location and type of the fault of the PCIe device according to the read information, the method further includes: Recording type information indicating the type of failure of the PCIe device; A fault recovery instruction containing the type information is sent to a basic input / output system BIOS running on the PCIe device, so that the BIOS triggers the restart of the PCIe device after receiving the fault recovery instruction, and performs fault repair based on a preset target repair method after restarting, wherein the target repair method is: a repair method corresponding to the type of fault represented by the type information.

[0006] In one embodiment of the present application, when the type of fault represented by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the target repair method is: the PCIe device stops reporting an error message describing the fault to the processor.

[0007] In one embodiment of the present application, when the type of fault represented by the type information is a fatal uncorrectable error UCE FATAL type, the target repair method is: disabling the current firmware driver loading of the PCIe device, and replacing the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0008] In one embodiment of the present application, the target repair method further includes: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0009] In one embodiment of the present application, the method further includes: Monitoring a value of a preset register flag bit in the PCIe device, wherein the preset register flag bit indicates a state of the link; Whether the retraining of the link is successful is determined according to the value of the preset flag bit.

[0010] In a second aspect, an embodiment of the present application provides a PCIe device fault processing method, which is applied to a peripheral component interconnection fast bus PCIe device, wherein the PCIe device is communicatively connected to a baseboard management controller BMC, and the method includes: When the PCIe device fails, error information is stored in an error register in the PCIe device, so that the BMC reads the error information according to a preset period to determine the location and type of the failure of the PCIe device.

[0011] In one embodiment of the present application, the method further includes: The basic input and output system BIOS running on the PCIe device receives a fault recovery instruction including type information sent by the BMC; The PCIe device restarts after the BIOS receives the fault recovery instruction; The PCIe device performs fault repair based on a preset target repair method after restarting; The type information indicates the type of failure of the PCIe device, and the target repair method is: a repair method corresponding to the type of failure indicated by the type information.

[0012] In one embodiment of the present application, when the type of the fault indicated by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device stops reporting an error message describing the fault to the processor.

[0013] In one embodiment of the present application, when the type of the fault indicated by the type information is a fatal uncorrectable error UCE FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device disables the loading of the current firmware driver of the PCIe device, and replaces the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0014] In one embodiment of the present application, the method further includes: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0015] In a third aspect, an embodiment of the present application provides a BMC, wherein the BMC is communicatively connected to a peripheral component interconnection express bus PCIe device, and the BMC is used to perform the following steps: In the startup phase of the PCIe device, error information stored in an error register in the PCIe device is read according to a preset period, wherein the error information is written into the error register by the PCIe device in the event of a failure, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an advanced error reporting AER register; The location where the PCIe device fails and the type of the failure are determined according to the error information to implement failure processing.

[0016] In one embodiment of the present application, after determining the location and the type of the fault of the PCIe device according to the read information, the method is further used to: Recording type information indicating the type of failure of the PCIe device; A fault recovery instruction containing the type information is sent to a basic input / output system BIOS running on the PCIe device, so that the BIOS triggers the restart of the PCIe device after receiving the fault recovery instruction, and performs fault repair based on a preset target repair method after restarting, wherein the target repair method is: a repair method corresponding to the type of fault represented by the type information.

[0017] In one embodiment of the present application, when the type of fault represented by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the target repair method is: the PCIe device stops reporting an error message describing the fault to the processor.

[0018] In one embodiment of the present application, when the type of fault represented by the type information is a fatal uncorrectable error UCE FATAL type, the target repair method is: disabling the current firmware driver loading of the PCIe device, and replacing the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0019] In one embodiment of the present application, the target repair method further includes: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0020] In one embodiment of the present application, the BMC is also used for: Monitoring a value of a preset register flag bit in the PCIe device, wherein the preset register flag bit indicates a state of the link; Whether the retraining of the link is successful is determined according to the value of the preset flag bit.

[0021] In a fourth aspect, an embodiment of the present application provides a PCIe device, wherein the peripheral component interconnection fast bus PCIe device is communicatively connected with a baseboard management controller BMC, and the PCIe device performs the following steps: When the PCIe device fails, error information is stored in an error register in the PCIe device, so that the BMC reads the error information according to a preset period to determine the location and type of the failure of the PCIe device.

[0022] In one embodiment of the present application, the PCIe device is also used for: The basic input and output system BIOS running on the PCIe device receives a fault recovery instruction including type information sent by the BMC; The PCIe device restarts after the BIOS receives the fault recovery instruction; The PCIe device performs fault repair based on a preset target repair method after restarting; The type information indicates the type of failure of the PCIe device, and the target repair method is: a repair method corresponding to the type of failure indicated by the type information.

[0023] In one embodiment of the present application, when the type of the fault indicated by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device stops reporting an error message describing the fault to the processor.

[0024] In one embodiment of the present application, when the type of the fault indicated by the type information is a fatal uncorrectable error UCE FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device disables the loading of the current firmware driver of the PCIe device, and replaces the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0025] In one embodiment of the present application, the PCIe device is also used for: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0026] In a fifth aspect, an embodiment of the present application provides a PCIe device fault processing device, which is applied to a baseboard management controller BMC, wherein the BMC is communicatively connected with a peripheral component interconnection fast bus PCIe device, and the device comprises: an error information reading module, configured to read error information stored in an error register in the PCIe device according to a preset period during the startup phase of the PCIe device, wherein the error information is written into the error register by the PCIe device in the event of a failure, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an advanced error reporting AER register; The fault location module is used to determine the location where the PCIe device fails and the type of the failure according to the error information to implement fault processing.

[0027] In one embodiment of the present application, the device further includes: An information recording module, used for recording type information indicating the type of failure of the PCIe device; An instruction sending module is used to send a fault recovery instruction containing the type information to a basic input / output system BIOS running on the PCIe device, so that the BIOS triggers the restart of the PCIe device after receiving the fault recovery instruction, and performs fault repair based on a preset target repair method after restarting, wherein the target repair method is: a repair method corresponding to the type of fault represented by the type information.

[0028] In one embodiment of the present application, when the type of fault represented by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the target repair method is: the PCIe device stops reporting an error message describing the fault to the processor.

[0029] In one embodiment of the present application, when the type of fault represented by the type information is a fatal uncorrectable error UCE FATAL type, the target repair method is: disabling the current firmware driver loading of the PCIe device, and replacing the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0030] In one embodiment of the present application, the target repair method further includes: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0031] In one embodiment of the present application, the device further includes: A link monitoring module, used to monitor the value of a preset register flag bit in the PCIe device, wherein the preset register flag bit indicates the state of the link; The retraining judgment module is used to judge whether the retraining of the link is successful according to the value of the preset flag bit.

[0032] In a sixth aspect, an embodiment of the present application provides a PCIe device fault processing device, which is applied to a peripheral component interconnection fast bus PCIe device, wherein the PCIe device is communicatively connected to a baseboard management controller BMC, and the device comprises: The information storage module is used to store error information in an error register in the PCIe device when the PCIe device fails, so that the BMC reads the error information according to a preset period to determine the location and type of the PCIe device failure.

[0033] In one embodiment of the present application, the device further includes: An instruction receiving module, used for a basic input and output system BIOS running on the PCIe device to receive a fault recovery instruction containing type information sent by the BMC; A restart module, used for restarting the PCIe device after the BIOS receives the fault recovery instruction; A repair module, used for the PCIe device to perform fault repair based on a preset target repair method after restart; The type information indicates the type of failure of the PCIe device, and the target repair method is: a repair method corresponding to the type of failure indicated by the type information.

[0034] In one embodiment of the present application, when the type of the fault indicated by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the repair module is specifically configured to: The PCIe device stops reporting an error message describing the fault to the processor.

[0035] In one embodiment of the present application, when the type of the fault indicated by the type information is a fatal uncorrectable error UCE FATAL type, the repair module is specifically configured to: The PCIe device disables the loading of the current firmware driver of the PCIe device, and replaces the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0036] In one embodiment of the present application, the device further includes: The link resetting module is used to reset and retrain the link between the PCIe device and the processor if the fault is not repaired after the driver of the PCIe device is replaced.

[0037] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements any method step in the first aspect or the second aspect.

[0038] In an eighth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described in any of the first or second aspects above.

[0039] Beneficial effects of the embodiments of the present application: The BMC in the embodiment of the present application realizes a communication connection with the PCIe device in software, so the BMC can read the error information stored in the error register in the PCIe device by software, thereby determining the location where the PCIe device fails and the type of failure, and then realizing fault handling. Since the present application realizes fault handling of the PCIe device by an out-of-band BMC outside the PCIe device, even if the PCIe failure causes the in-band BIOS running on the PCIe to fail to run, the scheme provided by the embodiment of the present application can still realize out-of-band fault handling. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0041] Figure 1 A schematic diagram of the hierarchy of a PCIe bus in the related art; Figure 2 A schematic diagram of error classification in the related art; Figure 3 A schematic diagram of a first PCIe device fault handling method provided in an embodiment of the present application; Figure 4 A schematic diagram of a configuration space register provided in an embodiment of the present application; Figure 5 A schematic diagram of a Status field provided in an embodiment of the present application; Figure 6 A schematic diagram of a PCIe capability register provided in an embodiment of the present application; Figure 7 A schematic diagram of a Device Status field provided in an embodiment of the present application; Figure 8 A schematic diagram of an AER register provided in an embodiment of the present application; Fig. 9 A schematic diagram of an Uncorrectable Error Status Register field provided in an embodiment of the present application; Fig.10A schematic diagram of a second PCIe device fault handling method provided in an embodiment of the present application; Fig.11 A flowchart of a third PCIe device fault handling method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0043] In order to facilitate the description of the application scenarios of the embodiments of the present application, the PCIe bus is first introduced.

[0044] See also Figure 1 , which is a hierarchical diagram of the PCIe bus in the related art.

[0045] The PCIe bus contains multiple layers, divided into Transaction layer, Data Link layer, and Physical layer.

[0046] The layers of the PCIe bus are divided into two parts: TX (Transport) and RX (Receive). The physical layer contains Logical Sub-block and Electrical Sub-block.

[0047] Data transmission at every level of the PCIe bus is subject to failure.

[0048] See also Figure 2 , which is a schematic diagram of error classification in the related art.

[0049] The faults in the figure are divided into CE (Correctable Error) and UCE (Uncorrectable Error).

[0050] Among them, UCE can be divided into NON-FATAL (non-fatal) type and FATAL (fatal) type. The white part of UCE in the figure is the FATAL type error, and the gray part is the NON-FATAL type error.

[0051] CE is an error that can be automatically recognized by hardware and automatically corrected or recovered.

[0052] UCE FATAL will cause link and hardware abnormalities and can only be restored by resetting the system software.

[0053] UCE NON-FATAL may cause certain transmissions to become unreliable, but other functions of the link and hardware are not affected.

[0054] As can be seen from the figure, CE and UCE both involve the transaction layer, data link layer, physical layer and internal layer.

[0055] In addition, in order to reflect the difference between the embodiments of the present application and the related art, the method of handling PCIe device failures in the related art is described here.

[0056] In the related art, when a PCIe device fails, causing downtime or card loss, which affects the normal operation of the business, the device has already crashed, and detailed error information cannot be collected through the BIOS (Basic Input Output System) in-band fault handling strategy. In this case, the PCIe device is monitored through the BMC, the fault alarm reported by the PCIe device through the hardware pin is obtained, and the BMC is requested to collect error information.

[0057] However, in this way, since the PCIe device needs to report fault alarms to the PCIe device through additional hardware pins, the hardware resources of the PCIe device will be tight. In addition, only fault alarms of a small number of fault types can be reported through hardware pins, resulting in the BMC being able to collect error information of only some fault types, affecting fault handling.

[0058] In addition, the method of fault recovery in the related art is to control the PERST pin of the PCIe device to reset the PCIe device, control the PCIe device to restart, clear the abnormal state of the PCIe device, and try to restore its normal operation. However, the method of fault recovery in the related art is relatively simple. Even if the PCIe device is restarted, some faults cannot be repaired, and the PCIe device downtime may still exist.

[0059] In order to solve the above problems, the embodiments of the present application provide a PCIe device fault handling method, a BMC, and a PCIe device.

[0060] See also Figure 3 , which is a flow chart of a first PCIe device fault handling method provided in an embodiment of the present application, and is applied to a BMC, wherein the BMC is communicatively connected with a PCIe device, and the method includes the following steps S301-S302.

[0061] S301: During the startup phase of the PCIe device, error information stored in an error register in the PCIe device is read according to a preset cycle.

[0062] The error information is written into the error register when the PCIe device fails, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an AER (Advanced Error Reporting) register.

[0063] Specifically, the above error information is automatically stored in the error register by the PCIe device, including the type of fault, the location of the fault, the time when the fault occurred, etc.

[0064] Among them, AER is a standardized error reporting mechanism defined in the PCIe standard, which allows hardware devices to report error events to software. AER provides detailed error information, including the type of fault, the location of the fault, etc.

[0065] In one embodiment of the present application, the BMC can count time by a preset timer to count time, so as to read error information every preset period. For example, the preset timer can be an FRB-2timer, which is a watchdog clock. In addition, the preset timer can also be a hard watchdog counter, a soft watchdog timer, an independent watchdog timer or a window watchdog counter, etc., which is not limited in the embodiment of the present application.

[0066] The detailed description of each error register can be found below and will not be described in detail here.

[0067] S302: Determine the location where the PCIe device fails and the type of the failure according to the error information to implement failure handling.

[0068] Since the above error information can indicate the type of fault and the location where the fault occurs, the BMC can determine the type of fault and the location where the fault occurs after reading the above error information.

[0069] The types of the above faults include the aforementioned CE, UCE FATAL and UCE NON-FATAL.

[0070] The locations of the above faults may include the serial number not being consistent with expectations, unexpected PCIe downtime, poisoned transaction layer data packets received, timeout of peer response, etc.

[0071] As can be seen from the above, the BMC in the embodiment of the present application realizes a communication connection with the PCIe device in software, so the BMC can read the error information stored in the error register in the PCIe device by software, thereby determining the location where the PCIe device fails and the type of failure, and then realizing fault handling. Since the present application realizes fault handling of the PCIe device through an out-of-band BMC outside the PCIe device, even if the PCIe failure causes the in-band BIOS running on the PCIe to fail to run, the solution provided by the embodiment of the present application can still realize out-of-band fault handling.

[0072] In addition, since the BMC in the embodiment of the present application automatically reads the error information contained in the error register of the PCIe device according to a preset cycle, there is no need for the PCIe device to send a fault alarm through a hardware pin to trigger the BMC to read the error information. Therefore, the embodiment of the present application does not need to occupy additional hardware pins, which can save hardware resources, and the fault type collected by the BMC will not be limited by the fault type corresponding to the error information reported by the hardware pin, and can accurately implement fault processing of all fault types.

[0073] The following (i) to (iii) describe the configuration space register, PCIe capability register, and AER register respectively.

[0074] 1. Configuration Space Registers See also Figure 4 , is a schematic diagram of a configuration space register provided in an embodiment of the present application.

[0075] In the figure, 0-31 represent 32 bits respectively, and +000h to +03Ch are the hexadecimal representations of the Byte Offset numbers.

[0076] The configuration space registers contain the Device ID (Device Identity), Vendor ID (Vendor Identity), Status, Command, Class Code, Revision ID (Revision Identity), BIST (Built in Self Test), Header Type, Latency Timer, Cache Line Size, Type Specific, Capabilities Pointer, Interrupt Pin, and Interrupt Line fields.

[0077] The error information is stored in the Status field. Figure 5 , is a schematic diagram of a Status field provided in an embodiment of the present application.

[0078] Among them, 0-15 are bits respectively.

[0079] As can be seen from the figure, bit 0 is the Immediate Readiness field.

[0080] The 1st to 2nd bits are the RsvdZ (ReservedZ) field.

[0081] The 3rd bit is the Interrupt Status field.

[0082] The 4th bit is the Capabilities List field.

[0083] The 5th bit is the 66 MHz Capable field.

[0084] The 6th bit is the RsvdZ field.

[0085] The 7th bit is the Fast Back-to-Back Transactions Capable field.

[0086] The 8th bit is the Master Data Parity Error field. If this field is pulled high, it means that a Data Parity Error has occurred on the Bus Master Device.

[0087] Bits 9-10 are the DEVSEL Timing (device selection timing) field.

[0088] The 11th bit is the Signaled Target Abort field.

[0089] The 12th bit is the Received Target Abort field.

[0090] The 13th bit is the Received Master Abort field.

[0091] The 14th bit is Signaled System Error, which is pulled high when a system-level error occurs.

[0092] The 15th bit is Detected Parity Error. If this field is pulled high, it means that a parity error has occurred in the device.

[0093] 2. PCIe Capability Register See also Figure 6 , is a schematic diagram of a PCIe capability register provided in an embodiment of the present application.

[0094] In the figure, 0, 7, 15, 23, and 31 represent the individual bits, and 00h-38h is the hexadecimal representation of the offset byte number.

[0095] The PCIe capability register includes PCI Express Cap ID (Peripheral Component Interconnect Express Capability Identity), NextCap Pointer, PCI Express Capabilities Register, Device Capabilities, Device Status, Device Control, Link Capabilities, Link Status, Link Control, Slot Capabilities, Slot Status, Slot Control, Root Capabilities, Root Status, Root Control, Device Capabilities 2, Device Status 2, Device Control 2, LinkCapabilities 2, Link Status 2, Link Control 2, Slot Capabilities 2, Slot Status2, and Slot Control 2.

[0096] The fields corresponding to 04h-08h and 24h-28h have the same meaning, the fields corresponding to 0Ch-10h and 2Ch-30h have the same meaning, and the fields corresponding to 14h-18h and 34h-38h have the same meaning, which will not be explained repeatedly in this embodiment.

[0097] In addition, 00h-08h and 24h-28h correspond to All Devices, 00h-08h and 1Ch-20h correspond to Root Compex Event Collectors, 00h-10h and 24h-30h correspond to Devices with Links, 00h-18h and 24h-38h correspond to Ports with Slots, and 00h-20h corresponds to Root Ports.

[0098] The error information is stored in the Device Status field. Figure 7 , is a schematic diagram of a Device Status field provided in an embodiment of the present application.

[0099] As can be seen from the figure, bit 0 is the Correctable Error Detected field. When this bit is pulled high, it means that a correctable type of error has been detected.

[0100] The first bit is the Non-Fatal Error Detected field. If this bit is pulled high, it means that a non-fatal error is detected.

[0101] The second bit is the Fatal Error Detected field. If this bit is pulled high, it means that a fatal type of error has been detected.

[0102] The third bit is the Unsupported Request Detected field. When this bit is pulled high, it indicates that an unsupported request has been detected.

[0103] The 4th bit is the AUX Power Detected (auxiliary power detected) field.

[0104] The 5th bit is the Transactions Pending field.

[0105] The 6th bit is the Emergency Power Reduction Detected field.

[0106] Bits 7-15 are the RsvdZ field.

[0107] (III) AER Register See also Figure 8 , is a schematic diagram of an AER register provided in an embodiment of the present application.

[0108] In the figure, 0-31 represent 32 bits respectively, and +000h to +044h are the hexadecimal representation of the offset byte number.

[0109] The AER register contains PCI Express Extended Capability Header (Peripheral Component Interconnect Express bus extended capability header), Uncorrectable Error Status Register (uncorrectable error status register), Uncorrectable Error Mask Register (uncorrectable error mask register), UncorrectableError Severity Register (uncorrectable error severity register), Correctable Error Status Register (correctable error status register), Correctable Error Mask Register (correctable error mask register), Advanced Error Capabilities and Control Register (advanced error capabilities and control register), Header Log Register (header log register), Root Error Command Register (root error command register), Root Error Status Register (root error status register), Error Source Identification Register (error source identification register), TLP Prefix Log Register (Transaction Layer Packet Prefix Log Register, transaction layer packet prefix log register).

[0110] The error information of uncorrectable errors is stored in the Uncorrectable Error Status Register. Fig. 9 , is a schematic diagram of an Uncorrectable Error Status Register field provided in an embodiment of the present application.

[0111] As can be seen from the figure, bit 0 is the Undefined field.

[0112] Bits 1-3 are the RsvdZ field.

[0113] The fourth field is the Data Link Protocol Error Status field. If this field is high, it means that the Sequence Number is not as expected.

[0114] The 5th bit is the Surprise Down Error Status field. If this field is pulled high, it means an unexpected down error has occurred.

[0115] Bits 6-11 are the RsvdZ field.

[0116] The 12th bit is the Poisoned TLP Received (Poisoned Transaction Layer Packet Received) field. When this bit is pulled high, it indicates that the received transaction layer packet has the poison bit set.

[0117] The 13th bit is the Flow Control Protocol Error Status field. If this bit is pulled high, it means that the receiving end has not received a Credit update message for a period of time or the Credit update exceeds the limit.

[0118] The 14th bit is the Completion Timeout Status field. If this bit is pulled high, it means that the request sent by the other end did not respond in time, resulting in a timeout.

[0119] The 15th bit is the Completer Abort Status. If this bit is pulled high, it means that the responder has received the request but cannot respond to it correctly for some reason.

[0120] The 16th bit is the Unexpected Completion Status field. If this bit is pulled high, it means that the requester has received an unexpected completion message.

[0121] The 17th bit is the Receiver Overflow Status field. If this bit is pulled high, it means that the receiver has received more TLPs (Transaction Layer Packets) than the available receive buffer space.

[0122] The 18th bit is the Malformed TLP Status (Malformed Transaction Layer Packet Status) field. If this bit is pulled high, it means that an abnormal TLP has been received.

[0123] The 19th bit is the ECRC Error Status (End-to-end Cyclic Redundancy Check Error Status) field. If this bit is pulled high, it indicates that an ECRC error has occurred.

[0124] The 20th bit is the Unsupported Request Error Status field. If this bit is pulled high, it means that the received message does not belong to any DLLP (Data Link Layer Packet) or TLP type specified by the protocol, or the domain segment of the message is illegal or out of bounds.

[0125] The 21st bit is the ACS Violation Status (Access Violation Status) field. If this bit is pulled high, it means that there is an access control error in the received posted or non-posted request.

[0126] The 22nd bit is the Uncorrectable Internal Error Status field. When this bit is pulled high, it indicates that an internal bridge error has occurred.

[0127] The 23rd bit is the MC Blocked TLP Status (MC Blocked Transaction Layer Packet Status) field. If this bit is pulled high, it means that the TLP is blocked by the MC_Block_All (MC all blocked) or MC_Block_Untranslated (MC untranslated blocked) mechanism.

[0128] The 24th bit is the AtomicOp Egress Blocked Status field. If this bit is pulled high, it means that Port 0 has AmicOp Egress Blocking enabled.

[0129] The 25th bit is the TLP Prefix Blocked Error Status (Transaction Layer Packet Prefix Blocked Error Status) field. If this bit is pulled high, it indicates that a TLP prefix blocking error has occurred.

[0130] The 26th bit is the Poisoned TLP Egress Blocked Status (Poisoned Transaction Layer Packet Egress Blocked Status) field. If this bit is pulled high, it means that a poisoned TLP has been received.

[0131] The 27th bit is DMWr Request Egress Blocked Status (Deferrable Memory WriteRequest Egress Blocked Status). If this bit is pulled high, it indicates a deferrable memory write request egress error.

[0132] The 28th bit is IDE Check Failed Status (Integrated Development Environment Check Failed Status). If this bit is pulled high, it means that the IDE check fails.

[0133] The 29th bit is the Misrouted IDE TLP Status (Misrouted Integrated Development Environment Transaction Layer Packet Status) field. If this bit is pulled high, it indicates that an IDE TLP misfortune occurs.

[0134] The 30th bit is the PCRC Check Failed Status (Cyclic Redundancy Check Failed Status) field. If this bit is pulled high, it means that the PCRC check fails.

[0135] The 31st bit is the TLP Translation Egress Blocked Status (Transaction Layer Packet Translation Egress Blocked Status) field. If this bit is pulled high, it indicates a TLP conversion egress failure.

[0136] As can be seen from the above, there is a field in the above error register for recording error information. By reading the error information contained in the above field, it is possible to determine whether the PCIe device has a fault. If a fault occurs, the type of fault and the location of the fault can be determined.

[0137] See also Fig.10 , is a flow chart of a second PCIe device fault handling method provided in an embodiment of the present application, which is similar to the above Figure 3 Compared with the embodiment shown, the above step S302 further includes the following steps S303-S304.

[0138] S303: Record type information indicating the type of failure of the PCIe device.

[0139] In one embodiment of the present application, a fault type flag Flag may be recorded, and the Flag may be used as type information.

[0140] S304: Sending a fault recovery instruction containing the above-mentioned type of information to the BIOS running on the above-mentioned PCIe device, so that the above-mentioned BIOS triggers the above-mentioned PCIe device to restart after receiving the above-mentioned fault recovery instruction, and performs fault repair based on a preset target repair method after restarting.

[0141] The above-mentioned target repair method is: a repair method corresponding to the type of fault represented by the above-mentioned type information.

[0142] In one embodiment of the present application, the BMC sends an IPMI (Intelligent Platform Management Interface) instruction containing type information to the BIOS.

[0143] In addition, the PCIe device may record the type information contained in the fault recovery instruction, and the BIOS triggers the PCIe device to restart and perform fault recovery after receiving the fault recovery instruction.

[0144] Furthermore, since in some cases the fault cannot be recovered after the PCIe device is restarted, in order to avoid such problems, a repair method is preset in the PCIe device in the embodiment of the present application. Specifically, it is a repair program for implementing the repair method. After the PCIe device is restarted, the type of fault can be determined according to the type information stored before the restart, and then the fault can be repaired based on the preset target repair method corresponding to the type of fault represented by the type information.

[0145] Specifically, the specific description of the target repair method corresponding to different types of faults is shown below and will not be described in detail here.

[0146] As can be seen from the above, in the solution provided by the embodiment of the present application, after determining that a PCIe device has failed, the BMC not only controls the PCIe device to restart to repair the fault, but also uses a preset target repair method to further repair the fault after restarting, so as to prevent the fault that cannot be repaired by restarting the PCIe device from continuing to affect the normal operation of the PCIe device after restarting.

[0147] In one embodiment of the present application, when the type of fault indicated by the type information is a CE type or a UCE NON-FATAL type, the target repair method is: the PCIe device stops reporting error information describing the fault to the processor. For example, the processor may be a CPU (Central Processing Unit) or other processors.

[0148] A serious failure scenario that may occur during the startup of a PCIe device is that after an abnormal interaction occurs in the PCIe device, the PCIe device continuously reports error messages indicating the error type to the processor, causing the system to crash. In this case, even if the PCIe device is restarted, it will continue to report error messages to the processor, and the failure will still exist.

[0149] In this case, when the fault type indicated by the type information is CE type or UCE NON-FATAL type, the above target repair method is: the above PCIe device stops reporting error information used to describe the above fault to the processor. That is, when the fault type is CE type and UCE NON-FATAL type, the PCIe device is automatically shielded from reporting error messages used to describe the fault to the processor, thereby avoiding the occurrence of system crashes caused by frequent reporting of error messages.

[0150] In one embodiment of the present application, repeated reporting of error messages can be shielded by controlling the value of a shield bit in a shield register.

[0151] As can be seen from the above, in the embodiment of the present application, when the fault type is CE type or UCE NON-FATAL type, the PCIe device stops reporting error information used to describe the fault to the processor after restarting, thereby preventing the PCIe device from frequently reporting error messages to the processor and preventing the fault from continuing to occur.

[0152] In another embodiment of the present application, when the type of fault represented by the above type information is UCE FATAL type, it indicates that the fault is relatively serious and the fault cannot be repaired by simply restarting the PCIe device in most cases. In this case, the PCIe device is further repaired using the target repair method corresponding to the UCE FATAL type.

[0153] If the type of fault indicated by the type information is UCE FATAL, the target repair method is to disable the loading of the current firmware driver of the PCIe device and replace the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device. The current firmware driver of the PCIe device may be a firmware driver originally provided by the PCIe device or a firmware driver provided by a third party.

[0154] Since the UCE FATAL type of failure may be caused by the error of the firmware (Firmware, FW) driver of the PCIe device, the firmware driver of the PCIe device is used to implement the initialization of the PCIe device. Therefore, if the firmware driver runs incorrectly and causes the PCIe device to have a UCE FATAL type of failure during the startup process, restarting the PCIe device will still use the firmware driver to initialize the PCIe device, which will still cause the PCIe device to fail.

[0155] Therefore, in order to avoid this situation, a preset firmware driver is pre-configured in the PCIe device. The preset firmware driver may be a firmware driver originally provided by the PCIe device or a firmware driver provided by a third party.

[0156] In this case, the target repair method is to disable the loading of the current PCIe device firmware driver and replace the PCIe device driver with a preset firmware driver corresponding to the type of PCIe device. That is, the PCIe device driver is replaced and the PCIe device is initialized through the new driver, thereby repairing the fault caused by the firmware driver loading error.

[0157] In addition, the BMC may also record the identifier of the PCIe device in which the UCE FATAL type fault occurs, and mark the PCIe device.

[0158] As can be seen from the above, if there is a serious UCE FATAL type fault in the embodiment of the present application, you can try to replace the firmware driver of the PCIe device to eliminate the fault of the firmware driver that cannot be recovered even after restarting, and realize the fault repair of the PCIe device.

[0159] In another embodiment of the present application, when the type of fault indicated by the type information is a UCE FATAL type, the target repair method further includes: After replacing the driver of the PCIe device, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0160] Since a serious UCE FATAL type fault of a PCIe device may not be caused by an abnormal firmware driver, in this case, even if the driver of the PCIe device is replaced in the above manner, the PCIe device fault may still occur. Therefore, after replacing the driver of the above PCIe device, if the fault is not fixed, it means that the PCIe device fault is not caused by an abnormal firmware driver, and in this case, it may be caused by a link fault between the PCIe device and the processor.

[0161] Therefore, after replacing the driver of the PCIe device, if the fault is not repaired, the link between the PCIe device and the processor may be reset and retrained to try to repair the fault by resetting the link.

[0162] In one embodiment of the present application, the BMC may send an IPMI instruction to the PCIe device to control a control bit of a LinkControl register of the PCIe device to be a first preset value, and after the value of the configuration control bit is set to the first preset value, the PCIe device will reset and retrain the link between the PCIe device and the processor. For example, the first preset value may be 1.

[0163] In another embodiment of the present application, when the PCIe device resets and retrains the link between the PCIe device and the processor, the BMC may further perform the following steps A-B.

[0164] Step A: monitor the value of the preset register flag bit in the above PCIe device.

[0165] The above-mentioned preset register flag bit indicates the status of the above-mentioned link.

[0166] Step B: judging whether the retraining of the link is successful according to the value of the preset flag bit.

[0167] Specifically, the preset register flag bit may be a preset flag bit in a Link Status Register. For example, if the value of the preset flag bit is 1, it indicates that the link retraining is successful, so that the BMC can monitor the link status of the PCIe device.

[0168] From the above, it can be seen that in the solution provided in the embodiment of the present application, when the fault cannot be repaired after replacing the driver of the PCIe device, the link between the PCIe device and the processor can be reset and retrained to further repair the fault by retraining the link, thereby increasing the probability of successful fault repair.

[0169] See also Fig.11 , which is a flow chart of a third PCIe device fault handling method provided in an embodiment of the present application, including the following steps S1101-S1110.

[0170] After powering on, execute step S1101.

[0171] S1101: Send an IPMI configuration check instruction to determine whether there is a fault.

[0172] If so, execute step S1102; otherwise, execute step S1108.

[0173] S1102: Collect error information in error registers in all IPCe devices.

[0174] After executing step S1102, the judgments of step S1103 and step S1104 are respectively executed.

[0175] S1103: Determine whether a UCE FATAL type fault occurs.

[0176] If yes, then execute step S1105. Otherwise, the judgment result of step S1104 shall prevail.

[0177] S1104: Determine whether a UCE NON-FATAL type or CE type fault occurs.

[0178] If yes, then execute step S1106. Otherwise, the judgment result of step S1103 shall prevail.

[0179] Since in the event of a fault, the fault may only be of the UCE FATAL type, the UCE NON-FATAL type, or the CE type, under normal circumstances, one of the judgment results in step S1103 and step S1104 should be yes.

[0180] S1105: Retrain the PCIe link or add a driver for a conventional PCIe device.

[0181] S1106: Mask repeated sending of error messages in the mask register.

[0182] S1107: Start FRB2-Timer.

[0183] S1108: Continue sending data.

[0184] S1109: The system enters the suspended state and determines whether FRB2-Timer is abnormal.

[0185] If there is no abnormality, the OS (Operating System) is started.

[0186] If abnormal, execute step S1110.

[0187] S1110: The BMC starts to collect error information in the error register of the PCIe device and organizes the faults into CE type, UCE FATAL type, and UCE NON-FATAL type.

[0188] Then restart the PCIe device and return to the power-on state.

[0189] Corresponding to the above-mentioned PCIe device fault processing method applied to BMC, the embodiment of the present application further provides a PCIe device fault processing method applied to PCIe device. The above-mentioned PCIe device is in communication connection with BMC.

[0190] The above method includes the following step C.

[0191] Step C: When the PCIe device fails, error information is stored in an error register in the PCIe device, so that the BMC reads the error information according to a preset period to determine the location and type of the PCIe device failure.

[0192] As can be seen from the above, the BMC in the embodiment of the present application realizes a communication connection with the PCIe device in software, so the BMC can read the error information stored in the error register in the PCIe device by software, thereby determining the location where the PCIe device fails and the type of failure, and then realizing fault handling. Since the present application realizes fault handling of the PCIe device through an out-of-band BMC outside the PCIe device, even if the PCIe failure causes the in-band BIOS running on the PCIe to fail to run, the solution provided by the embodiment of the present application can still realize out-of-band fault handling.

[0193] In addition, since the BMC in the embodiment of the present application automatically reads the error information contained in the error register of the PCIe device according to a preset cycle, there is no need for the PCIe device to send a fault alarm through a hardware pin to trigger the BMC to read the error information. Therefore, the embodiment of the present application does not need to occupy additional hardware pins, which can save hardware resources, and the fault type collected by the BMC will not be limited by the fault type corresponding to the error information reported by the hardware pin, and can accurately implement fault processing of all fault types.

[0194] In one embodiment of the present application, the above method also includes the following steps D-F.

[0195] Step D: The BIOS running on the PCIe device receives the fault recovery instruction including the type information sent by the BMC.

[0196] Step E: The PCIe device restarts after the BIOS receives the fault recovery instruction.

[0197] Step F: After restarting, the PCIe device performs fault repair based on a preset target repair method.

[0198] The above-mentioned type information indicates the type of failure of the above-mentioned PCIe device, and the above-mentioned target repair method is: a repair method corresponding to the type of failure indicated by the above-mentioned type information.

[0199] As can be seen from the above, in the solution provided by the embodiment of the present application, after determining that a PCIe device has failed, the BMC not only controls the PCIe device to restart to repair the fault, but also uses a preset target repair method to further repair the fault after restarting, so as to prevent the fault that cannot be repaired by restarting the PCIe device from continuing to affect the normal operation of the PCIe device after restarting.

[0200] In one embodiment of the present application, when the type of fault indicated by the above type information is CE type or UCE NON-FATAL type, the above step F is implemented by the following step F1.

[0201] Step F1: the PCIe device stops reporting an error message describing the fault to the processor.

[0202] As can be seen from the above, in the embodiment of the present application, when the fault type is CE type or UCE NON-FATAL type, the PCIe device stops reporting error information used to describe the fault to the processor after restarting, thereby preventing the PCIe device from frequently reporting error messages to the processor and preventing the fault from continuing to occur.

[0203] In one embodiment of the present application, when the type of fault indicated by the above type information is UCE FATAL type, the above step F is implemented by the following step F2.

[0204] Step F2: the PCIe device disables the loading of the current firmware driver of the PCIe device, and replaces the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0205] As can be seen from the above, if there is a serious UCE FATAL type fault in the embodiment of the present application, you can try to replace the firmware driver of the PCIe device to eliminate the fault of the firmware driver that cannot be recovered even after restarting, and realize the fault repair of the PCIe device.

[0206] In one embodiment of the present application, the above method also includes the following step G.

[0207] Step G: After replacing the driver of the PCIe device, if the fault is not repaired, reset and retrain the link between the PCIe device and the processor.

[0208] From the above, it can be seen that in the solution provided in the embodiment of the present application, when the fault cannot be repaired after replacing the driver of the PCIe device, the link between the PCIe device and the processor can be reset and retrained to further repair the fault by retraining the link, thereby increasing the probability of successful fault repair.

[0209] Corresponding to the PCIe device fault handling method applied to the BMC, the embodiment of the present application further provides a BMC. The BMC is communicatively connected with a peripheral component interconnection fast bus PCIe device, and the BMC is used to perform the following steps: In the startup phase of the PCIe device, error information stored in an error register in the PCIe device is read according to a preset period, wherein the error information is written into the error register by the PCIe device in the event of a failure, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an advanced error reporting AER register; The location where the PCIe device fails and the type of the failure are determined according to the error information to implement failure processing.

[0210] As can be seen from the above, the BMC in the embodiment of the present application realizes a communication connection with the PCIe device in software, so the BMC can read the error information stored in the error register in the PCIe device by software, thereby determining the location where the PCIe device fails and the type of failure, and then realizing fault handling. Since the present application realizes fault handling of the PCIe device through an out-of-band BMC outside the PCIe device, even if the PCIe failure causes the in-band BIOS running on the PCIe to fail to run, the solution provided by the embodiment of the present application can still realize out-of-band fault handling.

[0211] In addition, since the BMC in the embodiment of the present application automatically reads the error information contained in the error register of the PCIe device according to a preset cycle, there is no need for the PCIe device to send a fault alarm through a hardware pin to trigger the BMC to read the error information. Therefore, the embodiment of the present application does not need to occupy additional hardware pins, which can save hardware resources, and the fault type collected by the BMC will not be limited by the fault type corresponding to the error information reported by the hardware pin, and can accurately implement fault processing of all fault types.

[0212] In one embodiment of the present application, after determining the location and the type of the fault of the PCIe device according to the read information, the method is further used to: Recording type information indicating the type of failure of the PCIe device; A fault recovery instruction containing the type information is sent to a basic input / output system BIOS running on the PCIe device, so that the BIOS triggers the restart of the PCIe device after receiving the fault recovery instruction, and performs fault repair based on a preset target repair method after restarting, wherein the target repair method is: a repair method corresponding to the type of fault represented by the type information.

[0213] As can be seen from the above, in the solution provided by the embodiment of the present application, after determining that a PCIe device has failed, the BMC not only controls the PCIe device to restart to repair the fault, but also uses a preset target repair method to further repair the fault after restarting, so as to prevent the fault that cannot be repaired by restarting the PCIe device from continuing to affect the normal operation of the PCIe device after restarting.

[0214] In one embodiment of the present application, when the type of fault represented by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the target repair method is: the PCIe device stops reporting an error message describing the fault to the processor.

[0215] As can be seen from the above, in the embodiment of the present application, when the fault type is CE type or UCE NON-FATAL type, the PCIe device stops reporting error information used to describe the fault to the processor after restarting, thereby preventing the PCIe device from frequently reporting error messages to the processor and preventing the fault from continuing to occur.

[0216] In one embodiment of the present application, when the type of fault represented by the type information is a fatal uncorrectable error UCE FATAL type, the target repair method is: disabling the current firmware driver loading of the PCIe device, and replacing the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0217] As can be seen from the above, if there is a serious UCE FATAL type fault in the embodiment of the present application, you can try to replace the firmware driver of the PCIe device to eliminate the fault of the firmware driver that cannot be recovered even after restarting, and realize the fault repair of the PCIe device.

[0218] In one embodiment of the present application, the target repair method further includes: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0219] From the above, it can be seen that in the solution provided in the embodiment of the present application, when the fault cannot be repaired after replacing the driver of the PCIe device, the link between the PCIe device and the processor can be reset and retrained to further repair the fault by retraining the link, thereby increasing the probability of successful fault repair.

[0220] In one embodiment of the present application, the BMC is also used for: Monitoring a value of a preset register flag bit in the PCIe device, wherein the preset register flag bit indicates a state of the link; Whether the retraining of the link is successful is determined according to the value of the preset flag bit.

[0221] Corresponding to the PCIe device fault handling method applied to the PCIe device, a PCIe device, wherein the peripheral component interconnection fast bus PCIe device is communicatively connected with a baseboard management controller BMC, and the PCIe device performs the following steps: When the PCIe device fails, error information is stored in an error register in the PCIe device, so that the BMC reads the error information according to a preset period to determine the location and type of the failure of the PCIe device.

[0222] As can be seen from the above, the BMC in the embodiment of the present application realizes a communication connection with the PCIe device in software, so the BMC can read the error information stored in the error register in the PCIe device by software, thereby determining the location where the PCIe device fails and the type of failure, and then realizing fault handling. Since the present application realizes fault handling of the PCIe device through an out-of-band BMC outside the PCIe device, even if the PCIe failure causes the in-band BIOS running on the PCIe to fail to run, the solution provided by the embodiment of the present application can still realize out-of-band fault handling.

[0223] In addition, since the BMC in the embodiment of the present application automatically reads the error information contained in the error register of the PCIe device according to a preset cycle, there is no need for the PCIe device to send a fault alarm through a hardware pin to trigger the BMC to read the error information. Therefore, the embodiment of the present application does not need to occupy additional hardware pins, which can save hardware resources, and the fault type collected by the BMC will not be limited by the fault type corresponding to the error information reported by the hardware pin, and can accurately implement fault processing of all fault types.

[0224] In one embodiment of the present application, the PCIe device is also used for: The basic input and output system BIOS running on the PCIe device receives a fault recovery instruction including type information sent by the BMC; The PCIe device restarts after the BIOS receives the fault recovery instruction; The PCIe device performs fault repair based on a preset target repair method after restarting; The type information indicates the type of failure of the PCIe device, and the target repair method is: a repair method corresponding to the type of failure indicated by the type information.

[0225] As can be seen from the above, in the solution provided by the embodiment of the present application, after determining that a PCIe device has failed, the BMC not only controls the PCIe device to restart to repair the fault, but also uses a preset target repair method to further repair the fault after restarting, so as to prevent the fault that cannot be repaired by restarting the PCIe device from continuing to affect the normal operation of the PCIe device after restarting.

[0226] In one embodiment of the present application, when the type of the fault indicated by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device stops reporting an error message describing the fault to the processor.

[0227] As can be seen from the above, in the embodiment of the present application, when the fault type is CE type or UCE NON-FATAL type, the PCIe device stops reporting error information used to describe the fault to the processor after restarting, thereby preventing the PCIe device from frequently reporting error messages to the processor and preventing the fault from continuing to occur.

[0228] In one embodiment of the present application, when the type of the fault indicated by the type information is a fatal uncorrectable error UCE FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device disables the loading of the current firmware driver of the PCIe device, and replaces the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

[0229] As can be seen from the above, if there is a serious UCE FATAL type fault in the embodiment of the present application, you can try to replace the firmware driver of the PCIe device to eliminate the fault of the firmware driver that cannot be recovered even after restarting, and realize the fault repair of the PCIe device.

[0230] In one embodiment of the present application, the PCIe device is also used for: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

[0231] From the above, it can be seen that in the solution provided in the embodiment of the present application, when the fault cannot be repaired after replacing the driver of the PCIe device, the link between the PCIe device and the processor can be reset and retrained to further repair the fault by retraining the link, thereby increasing the probability of successful fault repair.

[0232] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned PCIe device fault handling methods are implemented.

[0233] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the PCIe device fault handling methods in the above embodiments.

[0234] 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 from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a 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.) mode to another website site, computer, server or data center. 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 Solid State Disk (SSD)), etc.

[0235] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0236] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the PCIe device fault handling method, BMC, PCIe device, apparatus, computer-readable storage medium, and computer program embodiments applied to PCIe devices, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0237] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A PCIe device fault processing method, characterized in that: Applied to a baseboard management controller BMC, the BMC is in communication connection with a peripheral component interconnection fast bus PCIe device, the method comprises: In the startup phase of the PCIe device, error information stored in an error register in the PCIe device is read according to a preset period, wherein the error information is written into the error register by the PCIe device in the event of a failure, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an advanced error reporting AER register; The location where the PCIe device fails and the type of the failure are determined according to the error information to implement failure processing.

2. The method according to claim 1, characterized in that: After determining the location where the PCIe device fails and the type of the failure according to the read information, the method further includes: Recording type information indicating the type of failure of the PCIe device; A fault recovery instruction containing the type information is sent to a basic input / output system BIOS running on the PCIe device, so that the BIOS triggers the restart of the PCIe device after receiving the fault recovery instruction, and performs fault repair based on a preset target repair method after restarting, wherein the target repair method is: a repair method corresponding to the type of fault represented by the type information.

3. The method according to claim 2, characterized in that In the case that the type of fault represented by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the target repair method is: the PCIe device stops reporting an error message describing the fault to the processor.

4. The method according to claim 2, characterized in that: In the case where the type of fault represented by the type information is a fatal uncorrectable error UCE FATAL type, the target repair method is: disabling the current firmware driver loading of the PCIe device, and replacing the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

5. The method according to claim 4, characterized in that The target repair method also includes: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

6. The method according to claim 5, characterized in that The method further comprises: Monitoring a value of a preset register flag bit in the PCIe device, wherein the preset register flag bit indicates a state of the link; Whether the retraining of the link is successful is determined according to the value of the preset flag bit.

7. A PCIe device fault processing method, characterized in that: Applied to a peripheral component interconnection fast bus PCIe device, the PCIe device is communicatively connected with a baseboard management controller BMC, the method comprising: When the PCIe device fails, error information is stored in an error register in the PCIe device, so that the BMC reads the error information according to a preset period to determine the location and type of the failure of the PCIe device.

8. The method according to claim 7, characterized in that The method further comprises: The basic input and output system BIOS running on the PCIe device receives a fault recovery instruction including type information sent by the BMC; The PCIe device restarts after the BIOS receives the fault recovery instruction; The PCIe device performs fault repair based on a preset target repair method after restarting; The type information indicates the type of failure of the PCIe device, and the target repair method is: a repair method corresponding to the type of failure indicated by the type information.

9. The method according to claim 8, characterized in that In the case where the type of the fault indicated by the type information is a correctable error CE type or a non-fatal uncorrectable error UCE NON-FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device stops reporting an error message describing the fault to the processor.

10. The method according to claim 8, characterized in that In the case where the type of the fault indicated by the type information is a fatal uncorrectable error UCE FATAL type, the PCIe device performs fault repair based on a preset target repair method after restarting, including: The PCIe device disables the loading of the current firmware driver of the PCIe device, and replaces the driver of the PCIe device with a preset firmware driver corresponding to the type of the PCIe device.

11. The method according to claim 10, characterized in that The method further comprises: After the driver of the PCIe device is replaced, if the fault is not repaired, the link between the PCIe device and the processor is reset and retrained.

12. A BMC, characterized in that: The BMC is in communication connection with a peripheral component interconnect express bus PCIe device, and the BMC is used to execute the method steps described in any one of claims 1-6.

13. A PCIe device, characterized in that: The peripheral component interconnect express bus PCIe device is communicatively connected to a baseboard management controller BMC, and the PCIe device executes the method steps described in any one of claims 7-11.

14. A PCIe device fault processing device, characterized in that: Applied to a baseboard management controller BMC, the BMC is communicatively connected with a peripheral component interconnection fast bus PCIe device, the device comprises: an error information reading module, configured to read error information stored in an error register in the PCIe device according to a preset period during the startup phase of the PCIe device, wherein the error information is written into the error register by the PCIe device in the event of a failure, and the error register includes at least one of the following registers: a configuration space register, a PCIe capability register, and an advanced error reporting AER register; The fault location module is used to determine the location where the PCIe device fails and the type of the failure according to the error information to implement fault processing.

15. A PCIe device fault processing device, characterized in that: Applicable to a peripheral component interconnection fast bus PCIe device, the PCIe device is communicatively connected with a baseboard management controller BMC, and the device comprises: The information storage module is used to store error information in an error register in the PCIe device when the PCIe device fails, so that the BMC reads the error information according to a preset period to determine the location and type of the PCIe device failure.

Citation Information

Patent Citations

  • A system and a method for recording the fault of a server PCIe device

    CN109542752A

  • PCIE (Peripheral Component Interface Express) equipment state detection method and system, electronic equipment and medium

    CN117093427A

  • Fault-recoverable firmware detection system and method, storage medium and server

    CN117389790A

  • PCIE (Peripheral Component Interface Express) equipment fault processing method and server

    CN118093265A