A baseboard management controller fault processing method, device, equipment and medium
By establishing a communication channel between the host device and the BMC, initializing and configuring the peripheral controller, obtaining fault information and performing diagnosis, the problem of additional overhead when the BMC fails is solved, and simple and efficient fault recovery is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies require the addition of a secondary system when the BMC fails, resulting in additional overhead and performance impact, and lack a simple and efficient fault diagnosis method.
By establishing a communication connection between the host device and the BMC, initializing the target communication channel, configuring the registers of the peripheral controller, obtaining fault information and performing diagnosis, and restarting or restoring the BMC.
BMC fault diagnosis and recovery can be completed without adding subsystems, simplifying the process and avoiding performance impact.
Smart Images

Figure CN122132209A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and in particular to a method, apparatus, device, and medium for troubleshooting a baseboard management controller. Background Technology
[0002] BMC (Server Controller) is used to monitor and manage servers and is also a part of the server system. Fault diagnosis in server systems generally refers to diagnosing server faults through the BMC when a server malfunctions; conversely, when the BMC malfunctions, it needs to be diagnosed.
[0003] In related technologies, a heterogeneous dual-system approach is provided for monitoring and fault recovery of the main BMC system in case of anomalies. When the main system fails, the secondary system can replace critical processes of the main system, restart the main system, or perform upgrades. However, this requires adding an extra secondary system, increasing overhead and potentially impacting the performance of the main system.
[0004] Therefore, how to provide a simple method for BMC fault diagnosis that reduces additional costs is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this embodiment is to provide a method, apparatus, device, and medium for handling faults in a baseboard management controller, which can reduce additional costs and is simple in approach.
[0006] In a first aspect, a fault handling method for a baseboard management controller is provided, comprising: when it is confirmed that the baseboard management controller has failed and is stuck, initializing a target communication channel, wherein the target communication channel is a channel for establishing a communication connection between a first communication controller of a host device and a second communication controller of the baseboard management controller; configuring the registers of the peripheral controller of the baseboard management controller based on the target communication channel to facilitate the initialization of the peripheral controller; and obtaining fault information in the external device corresponding to the peripheral controller of the baseboard management controller based on the target communication channel, wherein the fault information is used for fault diagnosis.
[0007] In a preferred embodiment, this embodiment can be further configured as follows: Based on the target communication channel, the registers of the peripheral controller of the baseboard management controller are configured so that before the initialization of the peripheral controller is completed, the embodiment further includes: sending a key corresponding to the target communication channel to the baseboard management controller based on the target communication channel; the baseboard management controller is used to verify based on the key; after successful verification, it enters a communication mode; and obtaining confirmation information sent by the baseboard management controller based on the target communication channel to establish a communication connection with the baseboard management controller based on the target communication channel.
[0008] In a preferred embodiment, this embodiment can be further configured as follows: after sending the key corresponding to the target communication channel to the baseboard management controller based on the target communication channel, it further includes: if no confirmation information is received from the baseboard management controller, then confirming a new target communication channel; and initializing the new target communication channel; and sending the key corresponding to the new target communication channel to the baseboard management controller based on the new target communication channel, until a communication connection with the baseboard management controller is established, or, if no communication connection is established with the baseboard management controller based on any communication channel.
[0009] In a preferred embodiment, this embodiment can be further configured as follows: when the baseboard management controller fails and hangs, after initializing the target communication channel, it further includes: configuring the register of the watchdog timer controller of the baseboard management controller to control the baseboard management controller to restart.
[0010] In a preferred embodiment, this embodiment can be further configured as follows: after configuring the watchdog timer controller register of the baseboard management controller to control the baseboard management controller to restart, it further includes: if the baseboard management controller cannot return to normal after restarting, initializing the queue serial peripheral interface controller based on the target communication channel; burning the new image to the flash memory by configuring the queue serial peripheral interface controller based on the target communication channel; configuring the watchdog timer controller register of the baseboard management controller to control the baseboard management controller to restart based on the new image.
[0011] In a preferred embodiment, this embodiment can be further configured as follows: based on the target communication channel, by configuring the queue serial peripheral interface controller, the new image is burned into the flash memory, including: parsing the new image to obtain the image volume; sending the new image and image volume to the register of the queue serial peripheral interface controller based on the target communication channel, thereby realizing the burning of the new image into the flash memory.
[0012] In a preferred embodiment, this embodiment can be further configured to: confirm that the baseboard management controller has failed and is stuck, including: periodically communicating with the firmware of the baseboard management controller; if normal communication is not possible, then confirm that the baseboard management controller has failed and is stuck.
[0013] Secondly, a baseboard management controller fault handling device is provided, comprising: a target communication channel initialization module, used to initialize a target communication channel when a baseboard management controller is confirmed to have failed, wherein the target communication channel is a channel for establishing a communication connection between a first communication controller of a host device and a second communication controller of the baseboard management controller; a peripheral controller initialization module, used to configure the registers of the peripheral controller of the baseboard management controller based on the target communication channel, so as to complete the initialization of the peripheral controller; and a fault information acquisition module, used to acquire fault information in the external device corresponding to the peripheral controller of the baseboard management controller based on the target communication channel, wherein the fault information is used for fault diagnosis.
[0014] Thirdly, a host device is provided, including a memory for storing a computer program and a processor for executing the computer program to implement the baseboard management controller fault handling method as described in any of the first aspects.
[0015] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the baseboard management controller fault handling method as described in any of the first aspects.
[0016] Fifthly, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the baseboard management controller fault handling method as described in any of the first aspects.
[0017] In summary, the baseboard management controller (BMC) fault handling method provided in this embodiment has the following beneficial technical effects: When a BMC is confirmed to be stuck due to a fault, a target communication channel is initialized, wherein the target communication channel is a channel for establishing a communication connection between the first communication controller of the host device and the second communication controller of the baseboard management controller; based on the target communication channel, the registers of the peripheral controller of the baseboard management controller are configured to facilitate the initialization of the peripheral controller; based on the target communication channel, fault information in the external device corresponding to the peripheral controller of the baseboard management controller is obtained, wherein the fault information is used for fault diagnosis. In this embodiment, when the BMC is stuck due to a fault, a communication connection channel is established between the first communication controller of the host device and the second communication controller of the baseboard management controller; then the registers of the peripheral controller of the baseboard management controller are configured; so as to complete the collection of fault information without relying on the BMC firmware; the collection of BMC faults can be completed without adding additional subsystems and hardware, which is simple to implement and does not affect the performance of the BMC and the host.
[0018] In addition, this embodiment also provides a baseboard management controller fault handling device, equipment, and medium, all of which have the above-mentioned beneficial technical effects. Attached Figure Description
[0019] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic diagram of a hardware architecture provided for an embodiment of the present invention;
[0021] Figure 2 A schematic flowchart illustrating a fault handling method for a baseboard management controller provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram illustrating the process of fault diagnosis using fault diagnosis software, as provided in an embodiment of the present invention.
[0023] Figure 4 This is a schematic diagram illustrating the process of restarting the BMC using fault diagnosis software, provided in an embodiment of the present invention.
[0024] Figure 5 This is a schematic diagram illustrating the process of burning fault diagnosis software into the Flash memory of a BMC, as provided in an embodiment of the present invention.
[0025] Figure 6This is a schematic diagram of the structure of a baseboard management controller fault handling device provided in an embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of the structure of a host device provided in an embodiment of the present invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0028] It should be noted that in the optional embodiments of this example, the data related to object information, when applied to specific products or technologies, requires the permission or consent of the object. Furthermore, the collection, use, and processing of this data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this invention involve data related to an object, it must be obtained with the permission and consent of the object, the permission and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If the embodiments involve personal information, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required. The embodiments also require the permission and consent of the object to be implemented.
[0029] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.
[0030] To make it easier to understand, some technical terms will now be explained.
[0031] The BMC (Baseboard Management Controller) is a core component in server hardware management, used for remote monitoring and management of servers.
[0032] PCIe is a high-speed serial computer expansion bus standard.
[0033] eSPI (Enhanced Serial Peripheral Interface) is a serial peripheral interface protocol introduced by Intel, designed to replace the traditional LPC (Low Pin Count) bus and provide better performance and reliability.
[0034] The LPC (Low Pin Count Bus) is used in IBM PC compatibles to connect low-bandwidth devices and "legacy" components to the CPU. Common low-speed devices include: BIOS, serial ports, parallel ports, PS / 2 keyboards and mice, floppy disk controllers, and newer devices such as the Trusted Platform Module.
[0035] UART (Universal Asynchronous Receiver / Transmitter) is a widely used serial communication interface, primarily used to connect devices such as microcontrollers and computers.
[0036] QSPI (Quad Serial Peripheral Interface) is a high-speed extension interface based on the SPI protocol, which increases the transmission rate by increasing the number of data lines.
[0037] The I2C bus is a simple, bidirectional, two-wire synchronous serial bus developed by Philips.
[0038] EEPROM (Electrically Erasable Programmable Read Only Memory) refers to electrically erasable programmable read-only memory.
[0039] DDR stands for Double Data Rate, and DDR SDRAM stands for Double Data Rate Synchronous Dynamic Random Access Memory, which is commonly referred to as DDR.
[0040] A watchdog timer (WDT) is essentially a counter. It's typically given a value and starts counting after the program begins running. If the program runs normally, the CPU should issue an instruction to reset the watchdog timer to zero after a certain period, restarting the count. If the watchdog timer increments to the set value, the program is considered malfunctioning, and the entire system is forced to reset.
[0041] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] A server BMC (Browser Control Center) is a microcontroller integrated on the server motherboard used to monitor and manage the operation and status of server hardware. The BMC provides robust support for stable server operation and efficient management. It allows administrators to remotely monitor and manage the server without physical access. Therefore, when the server malfunctions, fails to start, or becomes inaccessible remotely, the BMC provides crucial troubleshooting and remote management functions. In summary, the BMC is a vital subsystem within a server, and its stable operation is extremely important. When a server malfunctions, the BMC can be used to diagnose the problem, quickly locate and repair it. Similarly, when the BMC malfunctions, a method is needed to diagnose the BMC's faults, quickly locate and repair the problem, and restore the BMC to normal operation. Therefore, this invention proposes a method for BMC fault diagnosis and recovery.
[0043] The present invention proposes a method for BMC fault diagnosis and recovery, which aims to solve the problem that when the BMC is abnormally suspended, the server can detect the faults that have occurred in the BMC, collect information, diagnose the faults, and restore the BMC device, and these operations do not depend on the BMC firmware.
[0044] See Figure 1 , Figure 1 This is a schematic diagram of a hardware architecture provided by an embodiment of the present invention, including: a server host and a BMC. The host and BMC communicate with each other via four methods: PCIe, eSPI, LPC, and UART. On the host side, the configuration space of the BMC, i.e., peripheral controllers, such as the BMC's DDR controller, QSPI controller, I2C controller, etc., can be accessed through these four methods without the need for BMC firmware intervention. Then, data in the DDR memory, Flash memory, and EEPROM stored on the BMC can be accessed through these controllers. Since the host side can access the peripheral controllers on the BMC without the need for BMC firmware intervention, the host side can access the peripheral controllers on the BMC even when the BMC is suspended.
[0045] Next, we will describe in detail the fault handling method, apparatus, device and medium of the baseboard management controller provided by the embodiments of the present invention.
[0046] This invention provides a method for handling faults in a baseboard management controller, such as... Figure 2 As shown, the method provided in this embodiment of the invention can be executed by a host device, and the method includes:
[0047] S101. When it is confirmed that the baseboard management controller has failed and is stuck, initialize the target communication channel.
[0048] The target communication channel is a channel for establishing a communication connection based on the first communication controller of the host device and the second communication controller of the baseboard management controller.
[0049] When the BMC malfunctions and hangs, the BMC firmware cannot locate the fault. In this embodiment of the invention, fault diagnosis software is run to implement a fault handling method for the baseboard management controller. The fault diagnosis software runs in the OS of the host device (HOST).
[0050] The host device side includes multiple communication controllers, and the corresponding BMC side also has a corresponding communication controller. For example, see [link to example]. Figure 1 The host device side includes a PCIe controller (High-Speed Serial Computer Extended Bus Standard Controller), an eSPI controller (Enhanced Serial Peripheral Interface Controller), an LPC controller (Low Pin Count Bus Controller), and a UART controller (Universal Asynchronous Receiver / Transmitter Controller). Correspondingly, the BMC side is equipped with a PCIe controller, an eSPI controller, an LPC controller, and a UART controller. Of course, other communication controllers may also be included, but this embodiment of the invention is not limited thereto.
[0051] One feasible approach is to check if the BMC is faulty or frozen, such as if its external interfaces are unresponsive. Then, on the host side, fault diagnosis software is run to locate the BMC fault.
[0052] In another possible approach, the host continuously runs fault diagnosis software, which periodically communicates with the BMC firmware to confirm whether the BMC is functioning correctly.
[0053] In this embodiment of the invention, when the BMC malfunctions and hangs, the fault diagnosis software first initializes the communication channel. Initializing the communication channel ensures that the fault diagnosis software and the BMC can establish a stable and reliable data transmission connection. This invention supports four communication channels: PCIe, eSPI, LPC, and UART. Users can select at least one of these channels as the target communication channel each time, based on actual needs. The selection can be based on communication speed, in the order of PCIe, eSPI, LPC, and UART. For example, if the user has high requirements for communication speed and wants to complete fault diagnosis as quickly as possible, they can choose the PCIe communication channel; if the PCIe channel is unavailable or conflicting in the current environment, the user can choose the eSPI channel; if speed requirements are not high and the device supports the LPC interface, then the LPC channel can be selected.
[0054] Specifically, according to the preset priority rules, the PCIe channel is set to the highest priority, followed by the eSPI channel, then the LPC channel, and the UART channel has the lowest priority. Each communication channel is initialized in order of priority. During the initialization process, the availability of the channel is checked. If a communication channel is initialized successfully, it is selected as the communication channel for this fault diagnosis. If all channels fail to initialize, the user is prompted to check the hardware connection or system configuration and try to initialize again.
[0055] By initializing the target communication channel, the BMC configuration space can be accessed on the HOST side via one of these four methods without the need for BMC firmware involvement.
[0056] It is understandable that, for both the communication controller and the peripheral controller, during normal operation of the BMC, if a faulty software on the host side can perform the baseboard management controller fault handling method during normal operation, that is, it can access the peripheral controller normally, thus affecting the normal business functions of the BMC. Therefore, in this embodiment, the communication channel and the peripheral controller can only be initialized when the BMC is in a faulty state.
[0057] S102. Based on the target communication channel, configure the registers of the peripheral controller of the baseboard management controller to facilitate the initialization of the peripheral controller.
[0058] The peripheral controllers include, but are not limited to: DDR controllers (Double Data Rate Synchronous Dynamic Random Access Memory controllers), QSPI controllers (Queued Serial Peripheral Interface controllers), and I2C controllers (Two-Wire Serial Bus controllers). The peripheral controllers connect to external devices.
[0059] Once the BMC enters communication mode, a target communication channel between the BMC and the HOST is successfully established. The fault diagnosis software can initialize the BMC peripheral controller by configuring its registers. Different peripheral controllers may have different configuration parameters, generally including clock speed and communication bandwidth. Only after configuring these parameters can the peripheral controller function properly.
[0060] S103. Based on the target communication channel, obtain fault information from the external device corresponding to the peripheral controller of the baseboard management controller, wherein the fault information is used for fault diagnosis.
[0061] After the peripheral controller is initialized, the fault diagnosis software enters the fault information collection phase. When a BMC malfunctions, the fault information is generally stored in the external devices connected to the BMC. For example, stack information is stored in DDR memory, and some parameters are stored in Flash memory or EEPROM. The fault diagnosis software collects this information. Furthermore, the fault information may also be stored in the peripheral controller's registers, and fault information in the registers of the board management controller can also be obtained based on the target communication channel.
[0062] Information generated after a BMC (Browser Control Center) failure is generally stored in external devices connected to the BMC. Specifically, the fault diagnosis software first determines the range of external devices from which fault information needs to be collected, including DDR memory, Flash memory, EEPROM, and registers of peripheral controllers. For DDR memory, the software sends a collection request to the DDR controller via the target communication channel. The DDR controller reads the stack information stored therein, which records the program's execution trajectory at the time of the fault. For Flash memory and EEPROM, the software sends a collection request to the QSPI / I2C controller via the target communication channel. The QSPI / I2C controller reads the stored parameters based on the pre-known location information of the stored parameters. Simultaneously, the software also reads fault information from the baseboard management controller registers via the target communication channel. The baseboard management controller registers store hardware status information, error flags, etc.
[0063] Fault information is used by fault diagnosis software for fault diagnosis. Specifically, after collecting fault information, the fault diagnosis software parses the fault information according to its structure, performs fault diagnosis, and finally outputs the fault diagnosis results. The diagnosis results indicate what kind of fault occurred in the BMC, such as the BMC failing due to a null pointer exception or memory out-of-bounds error in the code. The diagnosis results help operations and development personnel pinpoint the cause of the BMC fault.
[0064] The fault diagnosis software first performs structural analysis on the collected fault information to obtain analyzable fault information.
[0065] In one feasible approach, fault information is categorized. For example, hardware-related fault information, such as abnormal sensor data and hardware device communication failures, is grouped into one category; software-related fault information, such as code error logs and program crash records, is grouped into another. Fault information is matched one-to-one with rules in a rule base to determine the matching results; based on the matching results, the cause of the fault is determined, and a diagnostic report is output. Specifically, if the fault information contains specific code error codes and stack trace information, a matching software fault rule is searched in the rule base to determine if it is a null pointer exception or memory overflow issue. For hardware faults, hardware fault rules are matched based on sensor data and device status information to identify the faulty hardware component. Both software and hardware fault rules are pre-defined. The diagnostic report includes the fault type, possible causes, and suggested solutions.
[0066] In another feasible approach, a large amount of historical fault data is pre-collected, including fault information and corresponding causes. This data is then preprocessed and feature extracted to construct a training dataset. Machine learning models, such as decision trees or neural networks, are trained using this training dataset, enabling the model to learn the mapping relationship between fault information and fault causes. The aforementioned fault information is then input into the trained model, which classifies and predicts fault information based on its learned knowledge, outputting fault diagnosis results.
[0067] As can be seen, in this embodiment of the invention, when the BMC hangs due to a fault, a communication connection channel is established between the first communication controller of the host device and the second communication controller of the baseboard management controller; then the registers of the peripheral controller of the baseboard management controller are configured; so as to complete the collection of fault information without relying on the BMC firmware; the collection of BMC faults can be completed without adding additional subsystems and hardware, which is simple to implement and will not affect the performance of the BMC and the host.
[0068] In one possible implementation method provided in this embodiment, the fault diagnosis software diagnoses the fault as shown in the appendix. Figure 3As shown, when the BMC malfunctions and hangs, the BMC firmware cannot locate the fault on its own. In this case, the fault diagnosis software of this invention is run, which resides in the host's OS. This software first initializes the communication channels. This invention supports four communication channels: PCIe, eSPI, LPC, and UART. Users can select one channel at a time based on their needs. For security, before accessing the BMC's configuration space using any of the above communication channels, the host needs to send the correct key to the BMC. Upon receiving the correct key, the BMC chip enters communication mode with the host. Sending an incorrect key prevents the host from communicating with the BMC through the communication channel. After the BMC enters communication mode, the fault diagnosis software can initialize the BMC peripheral controller by configuring its registers. After initialization, the fault diagnosis software enters the fault information collection phase. When a fault occurs in the BMC, the fault information is generally stored in some registers of the BMC, the stack information is stored in DDR memory, and some parameters are stored in Flash memory or EEPROM. The fault diagnosis software collects this information, parses the fault information according to structure, performs fault diagnosis, and finally outputs the fault diagnosis results.
[0069] One possible implementation of this invention includes configuring the registers of the peripheral controller of the baseboard management controller based on the target communication channel to facilitate the initialization of the peripheral controller. The further steps include: sending a key corresponding to the target communication channel to the baseboard management controller based on the target communication channel; the baseboard management controller performs verification based on the key; and entering a communication mode after successful verification. Additionally, the invention includes obtaining confirmation information sent by the baseboard management controller based on the target communication channel to establish a communication connection with the baseboard management controller based on the target communication channel.
[0070] To ensure security, before the host accesses the BMC's configuration space using the target communication channel, it needs to send the correct key to the BMC. Once the BMC chip receives the correct key, it will enter the communication mode with the host. If an incorrect key is sent, the host will be unable to communicate with the BMC through the communication channel.
[0071] As can be seen, in this embodiment of the invention, the security of transmission is ensured by adding a key verification mechanism.
[0072] One possible implementation of this invention, after sending the key corresponding to the target communication channel to the substrate management controller based on the target communication channel, further includes: if no confirmation information is received from the substrate management controller, confirming a new target communication channel; and initializing the new target communication channel; and sending the key corresponding to the new target communication channel to the substrate management controller based on the new target communication channel, until a communication connection with the substrate management controller is established, or, if no communication connection is established with the substrate management controller based on any communication channel.
[0073] If no confirmation message is received from the BMC within the preset waiting time, it indicates that the sent key is incorrect or that the communication channel is abnormal. A new target communication channel can be determined based on speed priority, and initialized to a working state, including setting communication parameters such as baud rate, data bits, stop bits, and allocating resources. After initialization, the system sends the key corresponding to the new target communication channel to the BMC. It then waits for a response from the BMC again. If a confirmation message is received, it indicates that the communication connection with the BMC has been successfully established; if no confirmation message is received, it will continue to try other communication channels until all communication channels have been explored. If no communication connection is established with the BMC through any communication channel, it indicates a serious communication problem, and a prompt message is generated to alert maintenance personnel to troubleshoot the communication issue.
[0074] As can be seen, in this embodiment of the invention, after not receiving confirmation information, the possibility of establishing communication with the BMC is increased by confirming and initializing a new target communication channel, thereby improving the system's fault tolerance and reliability.
[0075] In one possible implementation of this invention, when the baseboard management controller malfunctions and hangs up, after initializing the target communication channel, the method further includes: configuring the register of the watchdog timer controller of the baseboard management controller and controlling the baseboard management controller to restart.
[0076] When the BMC hangs due to a fault, it can be restarted using fault diagnosis software. The process for restarting the BMC using fault diagnosis software is shown in the attached figure. Figure 4 As shown, when the BMC malfunctions and hangs, the fault diagnosis software runs, the communication channel is initialized, and a key is sent. After the BMC hardware receives a valid key, it enters the communication mode with the HOST. The fault diagnosis software controls the BMC to restart by configuring the BMC's watchdog timer controller (WDT controller).
[0077] For example, configure registers using PCIE commands. Construct the corresponding PCIE command data packet, specifying the watchdog timer controller register to be configured and the configuration value to be written. Send the PCIE command data packet to the BMC via the PCIE communication channel; start the watchdog timer controller via the PCIE command, and wait for it to time out to trigger a BMC restart.
[0078] One hardware module in the WDT chip can restart the device by configuring the WDT module's registers. In this embodiment of the invention, the DDR controller, QSPI controller, I2C controller, and WDT controller are all hardware modules in the chip, and each module is independent and parallel. The software sets the registers in these modules of the chip to realize the functions that the controller can perform. For example, the DDR controller can access the DDR memory devices connected to the chip.
[0079] As can be seen, in this embodiment of the invention, by properly configuring the watchdog timer register and triggering its timeout mechanism, it can be ensured that the BMC can automatically restart and restore its normal function when a serious fault occurs.
[0080] One possible implementation of this invention involves configuring the register of the watchdog timer controller of the baseboard management controller and controlling the baseboard management controller to restart. The implementation further includes: if the baseboard management controller cannot return to normal after restarting, initializing the queue serial peripheral interface controller based on the target communication channel; burning a new image into the flash memory by configuring the queue serial peripheral interface controller based on the target communication channel; and configuring the register of the watchdog timer controller of the baseboard management controller to control the baseboard management controller to restart based on the new image.
[0081] When the BMC hangs due to a fault, and restarting the BMC does not restore normal operation, you can use diagnostic software to burn a new image into the BMC's Flash memory, thus restoring the BMC to normal operation. A new image refers to a new BMC image. The current BMC failure may be due to a corrupted image; burning a new, healthy BMC image using diagnostic software will restore normal operation.
[0082] The process of burning the fault diagnosis software into the BMC's Flash memory is shown in the attached figure. Figure 5As shown, when the BMC malfunctions and hangs, the fault diagnosis software runs, the communication channel is initialized, and a key is sent. Upon receiving a valid key, the BMC hardware enters communication mode with the host. The fault diagnosis software configures the BMC's QSPI controller registers through the communication channel to complete the QSPI controller initialization. Based on the action of the "Load Image" button triggered on the fault diagnosis software, the image to be programmed is loaded, the image is parsed, and its size is obtained. Then, the QSPI controller is configured to program the image to be programmed into the Flash memory.
[0083] Specifically, based on the target communication channel, the new image is burned into the flash memory by configuring the queue serial peripheral interface controller, including: parsing the new image to obtain the image size; and sending the new image and image size to the register of the queue serial peripheral interface controller based on the target communication channel to realize the burning of the new image into the flash memory.
[0084] The programming process involves writing the programming image data into the QSPI transmit data register, and then setting the transmit data in the register to be sent to the Flash memory. For example, this process can complete the programming of 256 bytes of data in one go. This process is repeated until the accumulated transmit data equals the size of the image, at which point programming is complete. After programming is complete, the BMC can be restarted from a new image by configuring the WDT registers.
[0085] One possible implementation of this invention is to confirm that the baseboard management controller has malfunctioned and is stuck, which includes: periodically communicating with the firmware of the baseboard management controller; if normal communication is not possible, then confirming that the baseboard management controller has malfunctioned and is stuck.
[0086] Communication requests are sent sequentially to the BMC of each server at set time intervals. If no response is received from the BMC firmware within the preset timeout period, or if the received response data is in the wrong format, has abnormal content, or cannot be parsed normally, then it can be assumed that communication with the BMC firmware is not working properly. Furthermore, the communication request can be retried multiple times to rule out communication failures caused by temporary network failures or brief periods of BMC busy. If communication still fails after multiple retries, it is confirmed that the baseboard management controller has malfunctioned and is stuck. Regular communication allows for real-time monitoring of the BMC's operating status, improving system reliability and stability.
[0087] Based on any of the above embodiments, this invention proposes a method for BMC fault diagnosis and recovery. When the BMC hangs due to a fault, the fault diagnosis software of this invention can collect, parse, and diagnose fault information without relying on the BMC firmware, and finally output the fault diagnosis results. Simultaneously, the fault diagnosis software of this invention can also restart the BMC without relying on the BMC firmware when it hangs due to a fault. If the BMC still cannot return to normal after restarting, a new image can be burned into the BMC's Flash memory using the fault diagnosis software of this invention, and then the registers can be configured to enable the BMC to boot from the newly burned image, restoring the BMC to a normal state.
[0088] The method in this invention can complete the diagnosis and recovery of BMC faults with only one fault diagnosis software without adding additional subsystems and hardware. It is simple to implement and does not affect the performance of BMC and HOST.
[0089] The following describes a fault handling device for a baseboard management controller provided by an embodiment of the present invention. The device described below can be referred to in correspondence with the method described above. The device in this embodiment is installed in a host device. Figure 6 , Figure 6 This is a structural block diagram of a baseboard management controller fault handling device according to one embodiment of this invention. It includes: a target communication channel initialization module 210, used to initialize a target communication channel when a fault hang is confirmed in the baseboard management controller, wherein the target communication channel is a channel establishing a communication connection between a first communication controller of the host device and a second communication controller of the baseboard management controller; a peripheral controller initialization module 220, used to configure the registers of the peripheral controller of the baseboard management controller based on the target communication channel to facilitate the initialization of the peripheral controller; and a fault information acquisition module 230, used to acquire fault information from the external device corresponding to the peripheral controller of the baseboard management controller based on the target communication channel, wherein the fault information is used for fault diagnosis.
[0090] In one possible implementation, the target communication channel initialization module 210 is further configured to send the key corresponding to the target communication channel to the baseboard management controller based on the target communication channel. The baseboard management controller is used to verify based on the key. After successful verification, it enters the communication mode. The module also obtains the confirmation information sent by the baseboard management controller based on the target communication channel to establish a communication connection with the baseboard management controller based on the target communication channel.
[0091] In one possible implementation, the target communication channel initialization module 210 is further configured to: confirm a new target communication channel if no confirmation information is received from the baseboard management controller; initialize the new target communication channel; and send the key corresponding to the new target communication channel to the baseboard management controller based on the new target communication channel until a communication connection with the baseboard management controller is established, or, if no communication connection is established with the baseboard management controller based on any communication channel.
[0092] In one possible implementation, it also includes a restart module for configuring the registers of the watchdog timer controller of the baseboard management controller and controlling the baseboard management controller to restart.
[0093] In one possible implementation, the module further includes: a programming module, configured to: initialize a queue serial peripheral interface controller based on a target communication channel if the baseboard management controller fails to return to normal after restarting; program a new image into a flash memory by configuring the queue serial peripheral interface controller based on the target communication channel; and configure the register of the watchdog timer controller of the baseboard management controller to control the baseboard management controller to restart based on the new image.
[0094] In one feasible approach, the programming module is used to: parse the new image to obtain the image volume; and send the new image and image volume to the register of the queue serial peripheral interface controller based on the target communication channel, thereby programming the new image into the flash memory.
[0095] In one possible implementation, the system further includes a fault confirmation module for periodically communicating with the firmware of the baseboard management controller; if normal communication fails, the system confirms that the baseboard management controller has malfunctioned and is stuck.
[0096] Figure 7 A structural diagram of a host device provided in an embodiment of the present invention, such as... Figure 7 As shown, the host device includes: a memory 60 for storing computer programs; and a processor 61 for executing the computer programs to implement the steps of the methods described in the above embodiments.
[0097] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0098] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps of the method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc.
[0099] In some embodiments, the host device may further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.
[0100] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on the host device and may include more or fewer components than illustrated.
[0101] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical disks, and other media capable of storing program code.
[0102] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.
[0103] Based on this, embodiments of the present invention also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method.
[0104] The foregoing has provided a detailed description of a baseboard management controller fault handling method, apparatus, device, and medium provided by embodiments of the present invention. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0105] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0106] The foregoing has provided a detailed description of a baseboard management controller fault handling method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for handling faults in a baseboard management controller, characterized in that, include: When it is confirmed that the baseboard management controller has failed and is stuck, the target communication channel is initialized. The target communication channel is a channel that establishes a communication connection between the first communication controller of the host device and the second communication controller of the baseboard management controller. Based on the target communication channel, configure the registers of the peripheral controller of the baseboard management controller to facilitate the initialization of the peripheral controller; Based on the target communication channel, fault information in the external device corresponding to the peripheral controller of the baseboard management controller is obtained, wherein the fault information is used for fault diagnosis.
2. The baseboard management controller fault handling method according to claim 1, characterized in that, Based on the target communication channel, the registers of the peripheral controller of the baseboard management controller are configured so that, before the initialization of the peripheral controller is completed, the following steps are also included: Based on the target communication channel, the key corresponding to the target communication channel is sent to the baseboard management controller. The baseboard management controller is used to verify based on the key. After successful verification, it enters the communication mode. The confirmation information sent by the baseboard management controller is obtained based on the target communication channel, so as to establish a communication connection with the baseboard management controller based on the target communication channel.
3. The baseboard management controller fault handling method according to claim 2, characterized in that, After sending the key corresponding to the target communication channel to the baseboard management controller based on the target communication channel, the method further includes: If no confirmation message is received from the baseboard management controller, a new target communication channel is confirmed, and the new target communication channel is initialized. Based on the new target communication channel, the key corresponding to the new target communication channel is sent to the baseboard management controller until a communication connection with the baseboard management controller is established, or, if no communication connection is established with the baseboard management controller based on any communication channel.
4. The baseboard management controller fault handling method according to claim 2, characterized in that, When the baseboard management controller malfunctions and hangs, after initializing the target communication channel, the following steps are also included: Configure the registers of the watchdog timer controller of the baseboard management controller to control the baseboard management controller to restart.
5. The baseboard management controller fault handling method according to claim 4, characterized in that, The configuration of the watchdog timer controller register of the baseboard management controller, after controlling the baseboard management controller to restart, also includes: If the baseboard management controller fails to return to normal after restarting, the queue serial peripheral interface controller is initialized based on the target communication channel. Based on the target communication channel, the new image is burned into the flash memory by configuring the queue serial peripheral interface controller; Configure the register of the watchdog timer controller of the baseboard management controller to control the baseboard management controller to restart based on the new image.
6. The baseboard management controller fault handling method according to claim 5, characterized in that, Based on the target communication channel, the new image is burned into the flash memory by configuring the queue serial peripheral interface controller, including: Analyze the new image to obtain its size; Based on the target communication channel, the new image and its size are sent to the register of the queue serial peripheral interface controller to realize the burning of the new image into the flash memory.
7. The baseboard management controller fault handling method according to claim 1, characterized in that, Confirm that the board management controller has malfunctioned and is stuck, including: The system periodically communicates with the firmware of the baseboard management controller; if normal communication fails, it is confirmed that the baseboard management controller has malfunctioned and is stuck.
8. A fault handling device for a baseboard management controller, characterized in that, include: The target communication channel initialization module is used to initialize the target communication channel when it is confirmed that the baseboard management controller has failed and is stuck. The target communication channel is a channel that establishes a communication connection between the first communication controller of the host device and the second communication controller of the baseboard management controller. The peripheral controller initialization module is used to configure the registers of the peripheral controller of the baseboard management controller based on the target communication channel, so as to complete the initialization of the peripheral controller; The fault information acquisition module is used to acquire fault information in the external device corresponding to the peripheral controller of the baseboard management controller based on the target communication channel, wherein the fault information is used for fault diagnosis.
9. A host device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.