A baseboard management controller fault handling method, system, device and medium

By using the BMC chip with a heterogeneous dual-core processor architecture, the second processing core monitors the operating status of the first processing core, accurately identifies the stuck stage and records fault information, solving the problem of difficult fault location after BMC stuck and improving fault detection and recovery efficiency.

CN123178160APending Publication Date: 2026-11-27INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611372810.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, when the Baseboard Management Controller (BMC) gets stuck, it cannot accurately identify the fault stage, making it difficult for maintenance personnel to quickly locate the root cause of the fault, resulting in a long fault handling cycle and low maintenance efficiency.

Method used

The BMC chip, which adopts a heterogeneous dual-core processor architecture, starts up synchronously with the first processing core. It monitors the boot progress marker of the first processing core and the timeout flag of the hardware watchdog timer through the on-chip shared memory unit and interrupt signal channel, accurately identifies the stuck stage, records the fault information to non-volatile memory, and performs differentiated recovery operations.

Benefits of technology

It enables accurate fault identification and rapid fault recovery throughout the entire BMC operation phase, improving fault detection accuracy and recovery efficiency, and reducing ineffective recovery behavior caused by indiscriminate restarts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178160A_ABST
    Figure CN123178160A_ABST
Patent Text Reader

Abstract

The application discloses a substrate management controller fault processing method, system, device and medium, relates to the server maintenance technical field, is applied to the second processing core, is powered on in response to the substrate management controller, and is started synchronously with the first processing core of the substrate management controller chip; in the system boot stage, the boot progress mark sent through the on-chip shared storage unit and the interrupt signal channel after the first processing core completes the boot node is received; according to the update state of the boot progress mark, whether the first processing core is stuck in the system boot stage is detected; in the system running stage, the timeout flag bit of the hardware watchdog timer is read; according to the state of the timeout flag bit, whether the first processing core is stuck in the system running stage is detected; when it is detected that the first processing core is stuck, the stuck stage identifier and the start failure number are recorded to the nonvolatile memory, and corresponding recovery operations are performed on the first processing core according to the start failure number. The fault detection accuracy and recovery efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server maintenance technology, and more specifically, to a method, system, device, and medium for handling faults in a baseboard management controller. Background Technology

[0002] The Baseboard Management Controller (BMC) is an embedded management subsystem deployed on the server motherboard, used for remote monitoring, management, and maintenance of the entire server.

[0003] Currently, the BMC's operation typically consists of three phases: the system bootloader phase (uboot phase), the operating system kernel phase (kernel phase), and the application layer phase. To address BMC freezing issues, server motherboard solutions usually include an onboard hardware watchdog timer. During normal operation, the BMC periodically performs a watchdog timer reset. Additionally, maintenance personnel can trigger a hardware reset via a physical reset button on the server's front panel or by managing interrupt signals through the baseboard management controller when the BMC becomes completely unresponsive.

[0004] However, in the above solution, the hardware watchdog timer generates a timeout signal when the monitored object completely stops feeding the watchdog, making it impossible to know the specific stage at which the freeze occurred, thus making it difficult for maintenance personnel to locate the root cause of the fault. When the BMC freezes, it is impossible to log in through the remote management channel. Maintenance personnel can only go to the data center to connect to the BMC's debugging serial port via a serial cable, power on or manually reset it, and then observe the serial port output logs to locate the problem. This results in a long fault handling cycle and low maintenance efficiency.

[0005] In summary, improving the fault detection accuracy and fault recovery efficiency of the baseboard management controller in a stuck fault scenario is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] The purpose of this application is to provide a fault handling method for a baseboard management controller, which can, to a certain extent, solve the technical problem of how to improve the fault detection accuracy and fault recovery efficiency of the baseboard management controller in a stuck fault scenario. This application also provides a baseboard management controller fault handling system, an electronic device, and a computer-readable storage medium.

[0007] To achieve the above objectives, this application provides the following technical solution: A fault handling method for a baseboard management controller, applied to the second processing core of a baseboard management controller chip, includes: In response to the power-on of the baseboard management controller, it starts up synchronously with the first processing core of the baseboard management controller chip; During the system boot phase, the system receives the boot progress marker sent by the first processing core through the on-chip shared memory unit and the interrupt signal channel after the first processing core completes the boot node; Based on the update status of the boot progress marker, detect whether the first processing core is stuck during the system boot phase; During system operation, read the timeout flag of the hardware watchdog timer; Based on the state of the timeout flag, detect whether the first processing core is stuck during the system operation phase; When the first processing core is detected to be stuck, the stuck stage identifier and the number of startup failures are recorded in non-volatile memory, and the corresponding recovery operation is performed on the first processing core according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller, and resets the hardware watchdog timer by performing a watchdog feeding operation on time during the system operation phase; the second processing core runs independently of the first processing core.

[0008] Preferably, during the system boot phase, receiving the boot progress marker sent by the first processing core through the on-chip shared memory unit and interrupt signal channel after completing the boot node includes: In response to receiving a hardware interrupt signal sent by the first processing core through the interrupt signal channel, the boot progress flag currently written by the first processing core is read from the on-chip shared memory unit; The hardware interrupt signal includes an interrupt signal sent by the first processing core to the second processing core through the interrupt signal channel after the first processing core completes a boot node and writes the boot progress mark to the on-chip shared memory unit; the boot node includes a main memory initialization completion node, a boot image loading completion node, and an operating system kernel jump execution node.

[0009] Preferably, detecting whether the first processing core is stuck during the system boot phase based on the update status of the boot progress marker includes: The on-chip shared memory unit is polled according to a preset polling cycle to detect whether the boot progress flag has been updated within a first preset timeout period; If the boot progress marker is not updated within the first preset timeout period, it is determined that the first processing core is stuck during the system boot phase.

[0010] Preferably, reading the timeout flag of the hardware watchdog timer during system operation includes: The timeout flag of the hardware watchdog timer is read according to the preset detection cycle; The timeout flag of the hardware watchdog timer is reset to a non-timeout state when the first processing core performs the watchdog feeding operation normally, and is set to a timeout state after the first processing core malfunctions.

[0011] Preferably, when the first processing core is detected to be stuck, recording the stuck stage identifier and the number of startup failures in non-volatile memory includes: In response to detecting that the first processing core is stuck during the system boot phase, the stuck phase flag is set to a first flag value; In response to detecting that the first processing core is stuck during the system operation phase, the stuck phase identifier is set to a second identifier value; Increment the startup failure count by one, and write the updated startup failure count and the stuck stage identifier into the non-volatile memory.

[0012] Preferably, the step of performing a corresponding recovery operation on the first processing core based on the number of startup failures includes: In response to the number of startup failures being less than a first threshold, a reset signal is sent to the first processing core to force a restart of the first processing core; In response to the number of boot failures reaching a second threshold, a strobe signal for switching the boot storage medium is used to enable the first processing core to load a backup firmware image from the backup boot storage medium for booting.

[0013] A fault handling method for a baseboard management controller, applied to the first processing core of a baseboard management controller chip, includes: In response to the power-on of the baseboard management controller, the second processing core of the baseboard management controller chip is started synchronously. During the system boot phase, after the boot node is completed, a boot progress flag is sent to the second processing core through the on-chip shared memory unit and the interrupt signal channel, so that the second processing core can detect whether the first processing core is stuck according to the update status of the boot progress flag. During system operation, a watchdog timer is reset on schedule so that the second processing core can detect whether the first processing core is stuck by reading the timeout flag of the hardware watchdog timer. Recovery is performed according to the recovery operation information generated by the second processing core, which is generated by the second processing core after detecting a freeze based on the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller; the second processing core runs independently of the first processing core, and when the first processing core is detected to be stuck, the stuck stage identifier and the number of startup failures are recorded in non-volatile memory.

[0014] A baseboard management controller fault handling system, applied to the second processing core of a baseboard management controller chip, includes: The synchronous startup module is used to start synchronously with the first processing core of the baseboard management controller chip in response to the power-on of the baseboard management controller. The boot progress receiving module is used to receive the boot progress flag sent by the first processing core through the on-chip shared memory unit and the interrupt signal channel after the first processing core completes the boot node during the system boot phase. The boot phase dead detection module is used to detect whether the first processing core is stuck during the system boot phase based on the update status of the boot progress marker. The watchdog flag reading module is used to read the timeout flag of the hardware watchdog timer during system operation. The runtime freeze detection module is used to detect whether the first processing core freezes during the system runtime phase based on the state of the timeout flag. The fault handling module is used to record the stuck stage identifier and the number of startup failures in non-volatile memory when the first processing core is detected to be stuck, and to perform a corresponding recovery operation on the first processing core according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller, and resets the hardware watchdog timer by performing a watchdog feeding operation on time during the system operation phase; the second processing core runs independently of the first processing core.

[0015] An electronic device, comprising: Memory, used to store computer programs; A processor, used to implement the steps of the baseboard management controller fault handling method as described above when executing the computer program.

[0016] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the board management controller fault handling method as described in any of the preceding claims.

[0017] This application provides a fault handling method for a baseboard management controller (BMD) chip, applied to the second processing core of the BMD chip. In response to the power-on of the BMD, the second processing core starts synchronously with the first processing core of the BMD chip. During the system boot phase, the method receives a boot progress flag sent by the first processing core after completing the boot node via an on-chip shared memory unit and an interrupt signal channel. Based on the update status of the boot progress flag, the method detects whether the first processing core is stuck during the system boot phase. During the system operation phase, the method reads the timeout flag of the hardware watchdog timer. Based on the status of the timeout flag, the method detects whether the first processing core is stuck during the system operation phase. When a stuck first processing core is detected, the stuck phase identifier and the number of boot failures are recorded in non-volatile memory, and a corresponding recovery operation is performed on the first processing core based on the number of boot failures. The first processing core is used to run the boot process and business logic of the BMD, and during the system operation phase, it resets the hardware watchdog timer by performing a watchdog feeding operation on time. The second processing core operates independently of the first processing core. In this application, the second processing core starts synchronously with the first processing core. During the system boot phase, by receiving the boot progress marker sent by the first processing core through the on-chip shared memory unit and interrupt signal channel and detecting its update status, it can accurately identify whether the first processing core has frozen during the system boot phase without relying on the main memory. During the system operation phase, by reading the timeout flag of the hardware watchdog timer, it can accurately identify whether the first processing core has frozen during the system operation phase. This achieves accurate identification of the frozen state of the board management controller throughout the entire operation phase, overcoming the problem of not being able to distinguish the fault phase. On this basis, after detecting a frozen state, the second processing core records the frozen phase identifier and the number of startup failures in non-volatile memory, completely preserving the fault phase information and startup count information, providing data support for fault root cause tracing. Furthermore, the second processing core performs corresponding recovery operations according to the number of startup failures, which can realize a hierarchical self-healing mechanism, avoiding indiscriminate repeated restarts that lead to ineffective recovery behavior, thereby improving the fault detection accuracy and fault recovery efficiency of the board management controller in frozen fault scenarios. The application provides a baseboard management controller fault handling system, electronic device, and computer-readable storage medium, which also solves the corresponding technical problems. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0019] Figure 1A flowchart illustrating a fault handling method for a baseboard management controller provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of a baseboard management controller fault handling system provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 4 This is another structural schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] Please see Figure 1 , Figure 1 A flowchart of a fault handling method for a baseboard management controller provided in an embodiment of this application.

[0022] This application provides a fault handling method for a baseboard management controller, applied to the second processing core of a baseboard management controller chip, and may include the following steps: Step S101: In response to the power-on of the substrate management controller, the first processing core of the substrate management controller chip is started synchronously.

[0023] In practical applications, the BMC chip of this application adopts a heterogeneous dual-core processor architecture, including a first processing core and a second processing core. The first processing core is the main processing core, used to run the BMC's startup process and business logic, including the system boot program (such as U-Boot), the operating system kernel (such as the Linux kernel), and the BMC application layer business programs. The second processing core is an auxiliary processing core, used for detecting freezes and recovering from faults in the first processing core. The BMC chip also includes a hardware watchdog timer (WDT), which is connected to the first processing core. The first processing core resets the timeout flag of the hardware watchdog timer when performing a watchdog feeding operation. The second processing core is connected to the hardware watchdog timer and is used to read the timeout flag bit of the hardware watchdog timer. The BMC chip also includes non-volatile memory, which is connected to the second processing core and used to write fault information to. The BMC chip also includes boot storage media, which can specifically be SPI Flash (Serial Peripheral Interface Flash), including a first boot storage medium (primary boot storage medium, storing the primary firmware image) and a second boot storage medium (backup boot storage medium, storing the backup firmware image).

[0024] The first processing core runs the complete boot process and business logic of the BMC. The second processing core runs a real-time operating system (RTOS), with an independent power domain, clock domain, and hardware timer, and can operate independently without relying on the main memory (DDR) and flash memory of the first processing core. The second processing core communicates with the first processing core through an on-chip shared memory unit and an interrupt signal channel. The on-chip shared memory unit can be specifically a shared SRAM (Static Random Access Memory) register. This shared SRAM register does not depend on DDR and can still be used normally during the system boot stage (uboot stage) before DDR is initialized. The interrupt signal channel can be specifically a bidirectional GPIO (General Purpose Input / Output) interrupt signal line. Both the first and second processing cores can send hardware interrupt signals to each other through this interrupt signal channel.

[0025] In an exemplary embodiment, when the BMC chip is powered on, the first processing core and the second processing core start synchronously. The first processing core loads the system boot loader (uboot) from its boot storage medium and begins executing the BMC boot process. The second processing core starts its real-time operating system, initializes its independent hardware timer, and begins performing monitoring tasks on the first processing core. The synchronous startup of the second and first processing cores ensures that the second processing core can monitor the operating status of the first processing core from the earliest stage of the first processing core's startup, avoiding monitoring blind spots.

[0026] In specific application scenarios, after the BMC chip powers on, the first processing core starts executing the uboot code from address 0x0 of the SPI Flash, while the second processing core simultaneously starts executing the RTOS image in the on-chip SRAM. After the RTOS initialization is complete, the second processing core immediately initializes its internal hardware timer, which serves as a time reference for subsequent detection of whether the first processing core is stuck during the system boot phase.

[0027] Step S102: During the system boot phase, receive the boot progress marker sent by the first processing core through the on-chip shared memory unit and interrupt signal channel after completing the boot node.

[0028] In practical applications, the system boot phase refers to the u-boot execution phase of the BMC. During this phase, the first processing core sequentially executes multiple boot nodes, also known as critical phases or boot sub-phases. After completing each boot node, the first processing core writes a boot progress flag to the on-chip shared memory and sends a hardware interrupt signal to the second processing core via the interrupt signal channel to notify the second processing core to read the updated boot progress flag. The on-chip shared memory is independent of DDR, so it can still be used normally even before DDR is initialized during the u-boot phase.

[0029] In an exemplary embodiment, during the system boot phase, when the second processing core receives a boot progress marker sent by the first processing core through an on-chip shared memory unit and an interrupt signal channel after completing a boot node, in response to receiving a hardware interrupt signal sent by the first processing core through the interrupt signal channel, the second processing core reads the boot progress marker currently written by the first processing core from the on-chip shared memory unit. The hardware interrupt signal includes an interrupt signal sent by the first processing core to the second processing core through the interrupt signal channel after completing a boot node and writing the boot progress marker to the on-chip shared memory unit. The boot node includes a main memory initialization completion node, a boot image loading completion node, and an operating system kernel jump execution node.

[0030] Specifically, during the u-boot phase, the first processing core sequentially completes the following boot nodes: DRAM (Dynamic Random Access Memory) initialization, Flash image loading, and bootm kernel jump. Specifically, after the first processing core completes DRAM initialization, it writes a first boot progress flag (e.g., value 1) to the on-chip shared SRAM register and sends a hardware interrupt signal to the second processing core via the GPIO interrupt signal line. Upon receiving this interrupt signal, the second processing core reads the currently written boot progress flag from the on-chip shared SRAM register, thus knowing that the first processing core has completed DRAM initialization. After the first processing core completes Flash image loading, it writes a second boot progress flag (e.g., value 2) to the on-chip shared SRAM register and again sends a hardware interrupt signal via the GPIO interrupt signal line. Upon receiving the interrupt signal, the second processing core reads the second boot progress flag from the on-chip shared SRAM register, knowing that the first processing core has completed Flash image loading. After the first processing core completes the bootm kernel jump operation, it writes a third boot progress flag (e.g., value 3) to the on-chip shared SRAM register and sends a hardware interrupt signal. After receiving the interrupt signal, the second processing core reads the third boot progress marker and learns that the first processing core has completed all boot nodes of the uboot stage and is about to jump to the kernel.

[0031] In an exemplary embodiment, considering that there are multiple possible implementations of the on-chip shared memory unit, as an alternative implementation, an on-chip shared memory region combined with hardware semaphores can be used for inter-core synchronous access. After the first processing core writes the boot progress flag to the on-chip shared memory region, it releases the flag via a hardware semaphore to notify the second processing core. Alternatively, a dedicated Mailbox hardware module can be used for inter-core message passing. The first processing core sends the boot progress flag as a message to the second processing core's receive queue via the Mailbox. As yet another alternative implementation, in scenarios where the GPIO interrupt signal line is unavailable or the interrupt controller has not yet been initialized, the second processing core can also use a pure polling method, polling the on-chip shared memory unit at a high-frequency period (e.g., 100 milliseconds), without relying on the interrupt signal channel.

[0032] Step S103: Based on the update status of the boot progress marker, detect whether the first processing core is stuck during the system boot phase.

[0033] In practical applications, the second processing core detects whether the first processing core is stuck during the system boot phase based on the update status of the boot progress marker. For example, it polls the on-chip shared memory unit according to a preset polling cycle to check whether the boot progress marker has been updated within a first preset timeout period. If the boot progress marker is not updated within the first preset timeout period, the first processing core is determined to be stuck during the system boot phase; if the boot progress marker is updated within the first preset timeout period, the first processing core is determined to be running normally during the system boot phase. The first preset timeout period is the timeout threshold of the independent hardware timer of the second processing core. If the boot progress marker in the on-chip shared memory unit is updated before the timer expires, i.e., a new marker value is written by the first processing core, the second processing core determines that the first processing core is running normally during the uboot phase and resets the timer to start the next round of detection. If the boot progress marker is still not updated after the timer expires, the second processing core determines that the first processing core is stuck during the system boot phase.

[0034] In an exemplary embodiment, the timeout threshold of the independent hardware timer of the second processing core is set to 30 seconds. The RTOS of the second processing core polls the on-chip shared SRAM registers at a 1-second interval to detect whether the boot progress flag has changed. When the second processing core detects an update to the boot progress flag, it resets the hardware timer to 0 and restarts the countdown. If no update to the boot progress flag is detected after 30 seconds of hardware timer counting, the first processing core is determined to be stuck in the uboot stage. At this time, the second processing core records the bootstage identifier (bootstage) of this failure as 1, indicating that the failure occurred during the system boot stage. Simultaneously, the second processing core increments the boot count (bootcount) by one.

[0035] In an exemplary embodiment, the second processing core employs two different strategies to detect the first processing core. To ensure strategy accuracy, after power-on, the second processing core can autonomously identify the current startup stage of the first processing core based on the boot progress flag and / or the initialization state of the hardware watchdog timer, and switch to the corresponding dead detection strategy. When the second processing core detects that the boot progress flag has reached the final value of boot completion, it switches from monitoring the boot progress flag based on on-chip shared memory units and interrupt signal channels to a dead detection strategy based on reading the timeout flag of the hardware watchdog timer. During the strategy switching process, the second processing core simultaneously maintains monitoring of both the boot progress flag and the timeout flag of the hardware watchdog timer until the hardware watchdog timer is confirmed to be initialized and the timeout flag begins to change periodically, at which point it exits boot progress flag monitoring. This strategy switching mechanism ensures that there is no gap in dead detection of the second processing core during the transition from the system boot stage to the system running stage, achieving seamless coverage.

[0036] Step S104: During system operation, read the timeout flag of the hardware watchdog timer.

[0037] In practical applications, the system operation phase includes the kernel phase and the application layer phase of the BMC. The BMC chip is equipped with a hardware watchdog timer. During normal operation of the kernel and application layer phases, the first processing core performs a watchdog feeding operation according to a first preset cycle, that is, calls the watchdog feeding function, such as the `feed_wdt()` function, to set the timeout flag of the hardware watchdog timer to a non-timeout state, for example, to 0. If the first processing core fails to perform the watchdog feeding operation on time due to an operational abnormality, the hardware watchdog timer sets its timeout flag to a timeout state, for example, to 1, after several consecutive failures to receive a watchdog feeding operation. The second processing core reads the timeout flag of the hardware watchdog timer according to a preset detection cycle, for example, according to the second preset cycle, to obtain the operating status of the first processing core during the system operation phase. The timeout flag of the hardware watchdog timer is reset to a non-timeout state when the first processing core performs the watchdog feeding operation normally, and is set to a timeout state after the first processing core malfunctions.

[0038] In an exemplary embodiment, when the first processing core is running normally in the kernel and application layer, it can execute the `feed_wdt()` function every 20 seconds to set the timeout flag register of the hardware watchdog timer (WDT1) to 0. If the first processing core malfunctions and fails to perform the watchdog feed operation three times consecutively, i.e., for 60 consecutive seconds, the WDT1 timeout flag register is automatically set to 1 by the hardware. The RTOS of the second processing core reads the WDT1 timeout flag register cyclically with a 10-second detection cycle. It should be noted that the 10-second detection cycle of the second processing core is shorter than the combined time of the first processing core's 20-second watchdog feed cycle and the three consecutive timeout determinations (60 seconds), to ensure that the second processing core can capture changes in the timeout flag in a timely manner.

[0039] In the exemplary embodiment, considering that there are multiple configuration options for the watchdog timer, as an alternative implementation, the BMC chip can also be configured with multiple watchdog timers, each corresponding to a different sub-stage of the kernel phase, to more precisely pinpoint the specific sub-stage where the fault occurred. As another alternative implementation, an external independent watchdog chip can be used instead of the chip's built-in watchdog timer. The second processing core reads the timeout output pin level of the external watchdog chip via GPIO pins, and when this pin level changes, it determines that the first processing core has stalled during system operation. As yet another alternative implementation, the second processing core can also use its own independent hardware timer in conjunction with the software watchdog signal issued by the first processing core. The second processing core directly detects whether the watchdog signal arrives on time, without relying on the chip's built-in WDT timeout flag register.

[0040] Step S105: Based on the status of the timeout flag, detect whether the first processing core is stuck during system operation.

[0041] In practical applications, the second processing core checks the status of the timeout flag after each read of the hardware watchdog timer. If the read timeout flag is not in a timeout state, the second processing core determines that the first processing core is operating normally during system operation and continues to perform the next round of reading according to the detection cycle. If the read timeout flag is in a timeout state, the second processing core determines that the first processing core has frozen during system operation. In this case, the second processing core records the bootstage identifier of this failure as 2, indicating that the failure occurred during system operation, including the kernel stage or the application layer stage. At the same time, the second processing core increments the bootcount by one.

[0042] In an exemplary embodiment, the RTOS of the second processing core can read the timeout flag register of WDT1 every 10 seconds. When the value of the timeout flag register is read as 1, the second processing core determines that the first processing core is stuck in the kernel or application layer stage, sets bootstage to 2, and increments bootcount by one.

[0043] Step S106: When the first processing core is detected to be stuck, the stuck stage identifier and the number of startup failures are recorded in the non-volatile memory, and the corresponding recovery operation is performed on the first processing core according to the number of startup failures.

[0044] In practical applications, when the second processing core detects that the first processing core is stuck, the second processing core writes the stuck stage identifier (bootstage) and the boot count (bootcount) into non-volatile memory. For example, in response to detecting that the first processing core is stuck during the system boot stage, the stuck stage identifier is set to the first identifier value; in response to detecting that the first processing core is stuck during the system runtime stage, the stuck stage identifier is set to the second identifier value, the boot count is incremented by one, and the updated boot count and stuck stage identifier are written into non-volatile memory. Simultaneously, the second processing core performs corresponding recovery operations based on the boot count. The recovery operation employs a differentiated strategy: in response to the boot count being less than a first threshold, for example, less than 3, a reset signal is sent to the first processing core to force a restart; in response to the boot count reaching a second threshold (which can be the same as or different from the first threshold, for example, reaching 3), the boot storage medium selection signal is switched, causing the first processing core to load a backup firmware image from the backup boot storage medium for booting. That is, the second processing core switches the boot storage medium to the backup boot storage medium, causing the first processing core to restart from the backup firmware image.

[0045] In an exemplary embodiment, the non-volatile memory can be an EEPROM (Electrically Erasable Programmable Read-Only Memory). After detecting a freeze in the first processing core, the second processing core writes the bootstage value and bootcount value to the EEPROM. Simultaneously, the second processing core also reads key register values ​​from the BMC chip, including but not limited to the program counter (PC) value, stack pointer (SP) value, exception status register value, and interrupt controller status value, and writes these register values ​​to the EEPROM as well, thus preserving the chip's operational state at the moment of the freeze.

[0046] In terms of recovery operations, if bootcount equals 1, the second processing core sends a reset signal to the first processing core, performing a forced reboot, causing the first processing core to reload the firmware image from the primary boot storage medium. If bootcount equals 3, it indicates that the first processing core has stalled in three consecutive boot attempts, and the firmware image in the primary boot storage medium may be corrupted. The second processing core performs an SPI Flash switching operation, switching the chip select signal of the boot storage medium from the first boot storage medium to the second boot storage medium, causing the first processing core to load the backup firmware image from the backup boot storage medium. If the BMC successfully completes the boot process, meaning the first processing core has successfully completed the entire boot process of uboot, kernel, and application layer, the second processing core sets bootcount to 0, indicating successful boot.

[0047] In the exemplary embodiment, considering that there are multiple possible implementations of the non-volatile storage medium, as an alternative implementation, a spare Flash partition can be used to store fault information, and the second processing core writes the bootstage value, bootcount value, and register value to a predetermined address in the spare Flash partition. Alternatively, onboard non-volatile FRAM can be used to store fault information. Yet another alternative implementation, if the second processing core integrates embedded Flash, the fault information can also be stored in the internal embedded Flash of the second processing core.

[0048] In an exemplary embodiment, considering that there are multiple options for the specific implementation of the backup boot storage medium, eMMC, NAND Flash or SD card can also be used as the backup boot storage medium as an alternative implementation. The second processing core enables the first processing core to load the backup firmware image from the backup boot storage medium by switching the corresponding strobe signal or power enable signal.

[0049] In the exemplary embodiment, considering that the differentiated strategy for recovery operations can be implemented in multiple ways, as an alternative implementation, more failure thresholds and more granular recovery actions can also be set: for example, when bootcount equals 1, a main core hot reset is performed, resetting only the first processing core and not the entire chip's power domain; when bootcount equals 2, a main core cold reset is performed, resetting the entire chip's power domain; when bootcount equals 3, a backup boot image is switched. As another alternative implementation, the trigger threshold for switching the backup image can also be set to other values, such as 2, 4, or 5 times.

[0050] In addition, when the first processing core successfully starts up after the second processing core performs the recovery operation, the first processing core reads the bootstage value and chip register value from the non-volatile memory (EEPROM) after booting from its operating system, and records this information in the system event log (SEL) as the data basis for tracing the root cause of the fault.

[0051] This application provides a fault handling method for a baseboard management controller (BMD) chip, applied to the second processing core of the BMD chip. In response to the power-on of the BMD, the second processing core starts synchronously with the first processing core of the BMD chip. During the system boot phase, the method receives a boot progress flag sent by the first processing core after completing the boot node via an on-chip shared memory unit and an interrupt signal channel. Based on the update status of the boot progress flag, the method detects whether the first processing core is stuck during the system boot phase. During the system operation phase, the method reads the timeout flag of the hardware watchdog timer. Based on the status of the timeout flag, the method detects whether the first processing core is stuck during the system operation phase. When a stuck first processing core is detected, the stuck phase identifier and the number of boot failures are recorded in non-volatile memory, and a corresponding recovery operation is performed on the first processing core based on the number of boot failures. The first processing core is used to run the boot process and business logic of the BMD, and during the system operation phase, it resets the hardware watchdog timer by performing a watchdog feeding operation on time. The second processing core operates independently of the first processing core. In this application, the second processing core starts synchronously with the first processing core. During the system boot phase, by receiving the boot progress marker sent by the first processing core through the on-chip shared memory unit and interrupt signal channel and detecting its update status, it can accurately identify whether the first processing core has frozen during the system boot phase without relying on the main memory. During the system operation phase, by reading the timeout flag of the hardware watchdog timer, it can accurately identify whether the first processing core has frozen during the system operation phase. This achieves accurate identification of the frozen state of the board management controller throughout the entire operation phase, overcoming the problem of not being able to distinguish the fault phase. On this basis, after detecting a frozen state, the second processing core records the frozen phase identifier and the number of startup failures in non-volatile memory, completely preserving the fault phase information and startup count information, providing data support for fault root cause tracing. Furthermore, the second processing core performs corresponding recovery operations according to the number of startup failures, which can realize a hierarchical self-healing mechanism, avoiding indiscriminate repeated restarts that lead to ineffective recovery behavior, thereby improving the fault detection accuracy and fault recovery efficiency of the board management controller in frozen fault scenarios.

[0052] Based on the above embodiments, this application provides a baseboard management controller fault handling method, applied to the first processing core of a baseboard management controller chip, which may include the following steps: In response to the power-on of the baseboard management controller, the second processing core of the baseboard management controller chip is started synchronously. During the system boot phase, after the boot node is completed, a boot progress flag is sent to the second processing core through the on-chip shared memory unit and interrupt signal channel, so that the second processing core can detect whether the first processing core is stuck based on the update status of the boot progress flag. During system operation, the watchdog timer is reset by performing the watchdog timer operation on time, so that the second processing core can detect whether the first processing core is stuck by reading the timeout flag of the hardware watchdog timer. Recovery is performed according to the recovery operation information generated by the second processing core. The recovery operation information is generated by the second processing core after detecting a freeze and according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller; the second processing core runs independently of the first processing core, and when the first processing core is detected to be stuck, it records the stuck stage identifier and the number of startup failures in non-volatile memory.

[0053] The description of the corresponding steps in this embodiment can be found in the above embodiments, and will not be repeated here.

[0054] Please see Figure 2 , Figure 2 This is a schematic diagram of a baseboard management controller fault handling system provided in an embodiment of this application.

[0055] This application provides a baseboard management controller fault handling system, applied to the second processing core of a baseboard management controller chip, which may include: Synchronous startup module 101 is used to synchronously start up with the first processing core of the baseboard management controller chip in response to the power-on of the baseboard management controller; The boot progress receiving module 102 is used to receive the boot progress flag sent by the first processing core through the on-chip shared memory unit and the interrupt signal channel after the first processing core completes the boot node during the system boot phase. The boot phase dead detection module 103 is used to detect whether the first processing core is stuck during the system boot phase based on the update status of the boot progress marker. The watchdog flag reading module 104 is used to read the timeout flag of the hardware watchdog timer during system operation. The runtime freeze detection module 105 is used to detect whether the first processing core freezes during the system runtime based on the status of the timeout flag. The fault handling module 106 is used to record the stuck stage identifier and the number of startup failures in non-volatile memory when the first processing core is detected to be stuck, and to perform corresponding recovery operations on the first processing core according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller, and resets the hardware watchdog timer by performing the watchdog feeding operation on time during the system operation phase; the second processing core runs independently of the first processing core.

[0056] This application provides a baseboard management controller fault handling system, applied to the first processing core of a baseboard management controller chip, which may include: The second synchronous startup module is used to start synchronously with the second processing core of the baseboard management controller chip in response to the power-on of the baseboard management controller. The tag sending module is used to send a boot progress tag to the second processing core through the on-chip shared memory unit and interrupt signal channel after the boot node is completed during the system boot phase, so that the second processing core can detect whether the first processing core is stuck according to the update status of the boot progress tag. The watchdog operation module is used to perform a watchdog feeding operation at regular intervals during system operation to reset the hardware watchdog timer, so that the second processing core can detect whether the first processing core is stuck by reading the timeout flag of the hardware watchdog timer. The recovery module is used to perform recovery according to the recovery operation information generated by the second processing core. The recovery operation information is generated by the second processing core after detecting a freeze and according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller; the second processing core runs independently of the first processing core, and when the first processing core is detected to be stuck, it records the stuck stage identifier and the number of startup failures in non-volatile memory.

[0057] To facilitate understanding of the baseboard management controller fault handling solution provided in this application, the workflow of the technical solution in this application is described using a large-scale server cluster in a data center as a specific application scenario.

[0058] In a data center containing thousands of servers, each server's motherboard is equipped with a BMC chip, which is a heterogeneous dual-core chip. Suppose that during operation of a server's BMC chip, a third-party monitoring script at the application layer enters an infinite loop, causing the BMC's application layer business process to become CPU-bound and unresponsive. The first processing core cannot continue executing normal business operations, nor can it perform watchdog timer operations.

[0059] In this scenario, the dog-feeding daemon thread of the first processing core executes the `feed_wdt()` function every 20 seconds, setting the WDT1's timeout flag register to 0. When the third-party monitoring script enters an infinite loop, the dog-feeding daemon thread cannot be scheduled due to CPU resource saturation and stops executing the dog-feeding operation. After WDT1 fails to receive a dog-feeding operation for three consecutive times (i.e., 60 seconds), its timeout flag register is automatically set from 0 to 1 by the hardware.

[0060] The RTOS of the second processing core reads the WDT1 timeout flag register in a 10-second cycle. On the first read, the timeout flag register is still 0, indicating the watchdog timer has not yet timed out. On the second read after 20 seconds, the timeout flag register is still 0. On the third read after 30 seconds, the timeout flag register is still 0. On the fourth read after 40 seconds, more than 40 seconds have passed since the last watchdog timer, but WDT1 requires three consecutive unset bits before setting the flag, so it remains 0. On the fifth read after 50 seconds, it is still 0. On the sixth read after 60 seconds, the WDT1 timeout flag register has been set to 1 by hardware. Upon reading that the timeout flag register is 1, the second processing core determines that the first processing core has frozen during system operation.

[0061] The second processing core then performs the following operations: sets bootstage to 2 (indicating that it is stuck in the system running phase), increments bootcount by one (assuming that bootcount was 0 before, it becomes 1 after incrementing), reads the key register values ​​of the BMC chip, writes the bootstage value, bootcount value, and register values ​​to the EEPROM, and since bootcount is equal to 1, the second processing core sends a reset signal to the reset terminal of the first processing core through the GPIO pin, triggering the first processing core to force restart.

[0062] Upon receiving a reset signal, the first processing core restarts and loads the uboot, kernel, and application layer programs from the main SPI Flash. During the boot process, at each boot node completed in the uboot phase, such as DRAM initialization, Flash image loading, and bootm jump to the kernel, the first processing core writes the corresponding boot progress flag to the on-chip shared SRAM register and notifies the second processing core via GPIO interrupt. The second processing core receives heartbeat updates within a 30-second timer, thus determining that the first processing core is running normally in the uboot phase. After entering the kernel and application layer, the first processing core resumes the watchdog timer operation. When the first processing core successfully completes the entire boot process, the second processing core sets the bootcount value to 0, indicating that the boot was successful. After booting, the first processing core reads the bootstage value and register values ​​from the EEPROM and records this information in the SEL system event log. Maintenance personnel can check the SEL log to see if the previous freeze occurred in the application layer phase and locate the specific address of the dead loop in the third-party monitoring script based on the register values.

[0063] In another scenario, the firmware image in the primary SPI Flash is corrupted due to a power outage during an upgrade. The first processing core freezes during the u-boot stage three times consecutively when booting from the primary SPI Flash. During the first boot failure, the second processing core detects the u-boot stage failure, sets bootstage to 1, increments bootcount to 1, and triggers a reboot. During the second boot failure, it detects the u-boot stage failure again, increases bootcount to 2, and triggers another reboot. During the third boot failure, bootcount becomes 3. The second processing core detects this, performs an SPI Flash switching action, switching the chip select signal from the primary SPI Flash to the backup SPI Flash, and then sends a reset signal to the first processing core. The first processing core loads the backup firmware image from the backup SPI Flash and successfully boots. After detecting the successful boot of the first processing core, the second processing core sets bootcount to 0. After successful boot, the first processing core reads the bootstage value (which is 1 for all three boot attempts) and register values ​​from the EEPROM and records them in the SEL log. Maintenance personnel can use this information to confirm the primary SPI Flash image is corrupted and perform timely firmware recovery.

[0064] In this way, the embodiments of this application realize accurate deadlock detection, complete retention of fault scene, and graded self-healing recovery based on the number of failures through the heterogeneous dual-core architecture of BMC, which effectively reduces the workload of manual on-site troubleshooting by data center operation and maintenance personnel and shortens the fault repair time.

[0065] It should be noted that the solution in this application is also applicable to other embedded systems that contain heterogeneous dual-core processors and require high reliability monitoring, such as server platform management controllers, smart network card management processors, and storage array controllers.

[0066] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the board management controller fault handling method provided in the embodiments of this application. Please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0067] An electronic device provided in this application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, it implements the steps of the board management controller fault handling method described in any of the above embodiments.

[0068] Please see Figure 4Another electronic device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanner, or the like; the communication method used by the communication module 205 includes, but is not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connectivity: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.

[0069] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the board management controller fault handling method described in any of the above embodiments.

[0070] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.

[0071] This application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the board management controller fault handling method described in any of the above embodiments.

[0072] For descriptions of relevant parts in the baseboard management controller fault handling system, electronic device, and computer-readable storage medium provided in this application's embodiments, please refer to the detailed description of the corresponding parts in the baseboard management controller fault handling method provided in this application's embodiments, which will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0073] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0074] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for handling faults in a baseboard management controller, characterized in that, The second processing core applied to the substrate management controller chip includes: In response to the power-on of the baseboard management controller, it starts up synchronously with the first processing core of the baseboard management controller chip; During the system boot phase, the system receives the boot progress marker sent by the first processing core through the on-chip shared memory unit and the interrupt signal channel after the first processing core completes the boot node; Based on the update status of the boot progress marker, detect whether the first processing core is stuck during the system boot phase; During system operation, read the timeout flag of the hardware watchdog timer; Based on the state of the timeout flag, detect whether the first processing core is stuck during the system operation phase; When the first processing core is detected to be stuck, the stuck stage identifier and the number of startup failures are recorded in non-volatile memory, and the corresponding recovery operation is performed on the first processing core according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller, and resets the hardware watchdog timer by performing a watchdog feeding operation on time during the system operation phase; the second processing core runs independently of the first processing core.

2. The method according to claim 1, characterized in that, During the system boot phase, receiving the boot progress marker sent by the first processing core through the on-chip shared memory unit and interrupt signal channel after completing the boot node includes: In response to receiving a hardware interrupt signal sent by the first processing core through the interrupt signal channel, the boot progress flag currently written by the first processing core is read from the on-chip shared memory unit; The hardware interrupt signal includes an interrupt signal sent by the first processing core to the second processing core through the interrupt signal channel after the first processing core completes a boot node and writes the boot progress mark to the on-chip shared memory unit; the boot node includes a main memory initialization completion node, a boot image loading completion node, and an operating system kernel jump execution node.

3. The method according to claim 1, characterized in that, The step of detecting whether the first processing core is stuck during the system boot phase based on the update status of the boot progress marker includes: The on-chip shared memory unit is polled according to a preset polling cycle to detect whether the boot progress flag has been updated within a first preset timeout period; If the boot progress marker is not updated within the first preset timeout period, it is determined that the first processing core is stuck during the system boot phase.

4. The method according to claim 1, characterized in that, The step of reading the timeout flag of the hardware watchdog timer during system operation includes: The timeout flag of the hardware watchdog timer is read according to the preset detection cycle; The timeout flag of the hardware watchdog timer is reset to a non-timeout state when the first processing core performs the watchdog feeding operation normally, and is set to a timeout state after the first processing core malfunctions.

5. The method according to claim 1, characterized in that, When the first processing core is detected to be stuck, the stuck stage identifier and the number of startup failures are recorded in non-volatile memory, including: In response to detecting that the first processing core is stuck during the system boot phase, the stuck phase flag is set to a first flag value; In response to detecting that the first processing core is stuck during the system operation phase, the stuck phase identifier is set to a second identifier value; Increment the startup failure count by one, and write the updated startup failure count and the stuck stage identifier into the non-volatile memory.

6. The method according to claim 1, characterized in that, The step of performing a corresponding recovery operation on the first processing core based on the number of startup failures includes: In response to the number of startup failures being less than a first threshold, a reset signal is sent to the first processing core to force a restart of the first processing core; In response to the number of boot failures reaching a second threshold, a strobe signal for switching the boot storage medium is used to enable the first processing core to load a backup firmware image from the backup boot storage medium for booting.

7. A method for handling faults in a baseboard management controller, characterized in that, The first processing core applied to the baseboard management controller chip includes: In response to the power-on of the baseboard management controller, the second processing core of the baseboard management controller chip is started synchronously. During the system boot phase, after the boot node is completed, a boot progress flag is sent to the second processing core through the on-chip shared memory unit and the interrupt signal channel, so that the second processing core can detect whether the first processing core is stuck according to the update status of the boot progress flag. During system operation, a watchdog timer is reset on schedule so that the second processing core can detect whether the first processing core is stuck by reading the timeout flag of the hardware watchdog timer. Recovery is performed according to the recovery operation information generated by the second processing core, which is generated by the second processing core after detecting a freeze based on the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller; the second processing core runs independently of the first processing core, and when the first processing core is detected to be stuck, the stuck stage identifier and the number of startup failures are recorded in non-volatile memory.

8. A fault handling system for a baseboard management controller, characterized in that, The second processing core applied to the substrate management controller chip includes: The synchronous startup module is used to start synchronously with the first processing core of the baseboard management controller chip in response to the power-on of the baseboard management controller. The boot progress receiving module is used to receive the boot progress flag sent by the first processing core through the on-chip shared memory unit and the interrupt signal channel after the first processing core completes the boot node during the system boot phase. The boot phase dead detection module is used to detect whether the first processing core is stuck during the system boot phase based on the update status of the boot progress marker. The watchdog flag reading module is used to read the timeout flag of the hardware watchdog timer during system operation. The runtime freeze detection module is used to detect whether the first processing core freezes during the system runtime phase based on the state of the timeout flag. The fault handling module is used to record the stuck stage identifier and the number of startup failures in non-volatile memory when the first processing core is detected to be stuck, and to perform a corresponding recovery operation on the first processing core according to the number of startup failures. The first processing core is used to run the startup process and business logic of the baseboard management controller, and resets the hardware watchdog timer by performing a watchdog feeding operation on time during the system operation phase; the second processing core runs independently of the first processing core.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the baseboard management controller fault handling method as described in any one of claims 1 to 7 when executing the computer program.

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 steps of the baseboard management controller fault handling method as described in any one of claims 1 to 7.