A method, apparatus, device, and storage medium for repairing device firmware.

By performing a self-test upon power-on and automatically repairing configuration values ​​after a BIOS upgrade, the system resolves the crash issue caused by BIOS version iterations, thereby improving system stability and operational efficiency.

CN119739433BActive Publication Date: 2025-10-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202412000407.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-10-28
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

System crashes caused by BIOS configuration values ​​after version iterations lead to low operational efficiency, and existing solutions rely on manual intervention and are complex to operate.

Method used

By triggering a system self-test when the device is powered on, the system checks the configuration items in the firmware after the BIOS upgrade. If a crash occurs, the system uses the BIOS to fix the abnormal configuration items to their default values, automatically repairs the issue, and restarts the device.

Benefits of technology

It can quickly locate and repair BIOS configuration item values ​​without human intervention, improving system stability and operational efficiency, and reducing the possibility of operational errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739433B_ABST
    Figure CN119739433B_ABST
Patent Text Reader

Abstract

This invention discloses a device firmware repair method, apparatus, device, and storage medium, relating to the field of device operation and maintenance technology. The method includes: when the target device is powered on, triggering a system self-test operation through the Basic Input / Output System (PIS) to obtain the self-test result; the current firmware of the PIS is the upgraded firmware; if the self-test result indicates that the target device crashes at a target location during startup, then the target configuration item in the upgraded firmware is checked to determine the cause of the crash; wherein, the target configuration item is the high-order base address of the memory-mapped input / output; if the target configuration item has an abnormal value setting, then the first configuration item value of the upgraded firmware is repaired to the target default value to enable startup of the target device; the target default value is the second configuration item value of the target configuration item in the upgraded firmware. Therefore, by using the default values ​​of the relevant configuration items in the pre-upgrade firmware to repair the configuration items in the upgraded firmware, crash faults can be quickly resolved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of equipment operation and maintenance technology, and in particular to a method, apparatus, device and storage medium for repairing equipment firmware. Background Technology

[0002] BIOS (Basic Input Output System) updates typically introduce new features and fixes. However, due to feature enhancements, some BIOS setup values ​​that were compatible in older BIOS versions may become incompatible with newer versions. This can lead to situations where the POST (Power-On Self-Test) card crashes after upgrading to a new BIOS version. In such cases, it is necessary for maintenance personnel to restore the MMIO High Base (Memory-mapped input / output High Base) values ​​out-of-band, or to clear the CMOS (Complementary Metal Oxide Semiconductor) by powering off the target device, opening the case, and restoring the default settings. After completing these steps, the target device must be powered on again and allowed to complete the POST self-test before it can boot into the OS (Operating System) normally. The inconveniences of this method are as follows: 1. If maintenance personnel set the MMIO High Base value a long time ago and then upgrade the configuration, a system crash will occur. Maintenance personnel cannot determine the root cause of the crash immediately and need to spend a lot of time locating the fault. 2. After the machine card self-tests, simply restarting or powering off cannot restore normal operation. It is necessary to modify the MMIO High Base option outside the band or open the case to clear the CMOS before the default value can be restored. Manually modifying it outside the band or opening the case to clear the CMOS is a single-machine operation, which greatly reduces the efficiency of maintenance.

[0003] It is evident that how to efficiently handle downtime caused by version iterations is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide a device firmware repair method, apparatus, device, and storage medium that can solve the problem of low maintenance efficiency when the BIOS configuration value card self-test fails.

[0005] To address the aforementioned technical problems, in a first aspect, embodiments of the present invention provide a device firmware repair method, comprising:

[0006] When the target device is powered on, the system self-test is triggered through the basic input / output system to obtain the corresponding self-test results; basically, the current firmware of the input / output system is the upgraded firmware.

[0007] If the self-test result indicates that the target device crashed at the target location point during the startup process, the target configuration item in the upgraded firmware will be tested to determine the corresponding cause of the crash; among which, the target configuration item is the high-order base address of the memory-mapped input / output.

[0008] If the downtime is due to an abnormal value setting in the target configuration item, the first configuration item value of the target configuration item in the upgraded firmware is repaired through the basic input / output system to restore the first configuration item value of the upgraded firmware to the target default value, so that the target device can be started based on the repaired firmware; the target default value is the second configuration item value of the target configuration item in the original firmware corresponding to the upgraded firmware.

[0009] Optionally, before triggering the system self-test operation via the basic input / output system, the following may also be included:

[0010] Obtain and execute firmware upgrade commands for the basic input / output system of the target device to perform firmware upgrade operations on the basic input / output system of the target device;

[0011] During the firmware upgrade operation of the basic input / output system, a preset configuration item value saving operation is triggered to retain the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input / output system;

[0012] Accordingly, the first configuration item value of the target configuration item in the upgraded firmware is repaired through the Basic Input / Output System (PIS) to restore the first configuration item value of the upgraded firmware to the target default value, so that the target device can be booted based on the repaired firmware, including:

[0013] The system uses the basic input / output system to retrieve the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items.

[0014] By using the basic input / output system and the target default value, a repair operation is triggered on the first configuration item value of the target configuration item in the upgraded firmware to restore the first configuration item value of the upgraded firmware to the target default value, thereby obtaining the corresponding repaired firmware, so that the target device can be booted based on the repaired firmware.

[0015] Optionally, trigger a preset configuration item value saving operation to retain the default values ​​of relevant configuration items in the firmware prior to the basic input / output system upgrade, including:

[0016] Trigger a preset configuration item value saving operation to save the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input / output system to the preset storage space;

[0017] Accordingly, the target default value corresponding to the target configuration item is queried from the default values ​​of the relevant configuration items through the basic input / output system, including:

[0018] Create a query command carrying relevant information about the target configuration item through the basic input / output system, and send the query command to the preset storage space;

[0019] The default value corresponding to the target configuration item is returned after responding to the query command by obtaining the preset storage space through the basic input / output system.

[0020] Optionally, the target configuration items in the upgraded firmware can be checked to determine the corresponding cause of the outage, including:

[0021] The fault detection mechanism is activated to analyze the target configuration items in the upgraded firmware to determine whether the value of the first configuration item of the target configuration item is within the preset threshold range.

[0022] If the value of the first configuration item is not within the preset threshold range, the cause of the downtime is determined to be an abnormal value setting of the target configuration item.

[0023] Optionally, the method of this application also includes:

[0024] Configure a watchdog timer on the target device to monitor system status;

[0025] Accordingly, before booting the target device based on the repaired firmware, the following steps are also included:

[0026] After restoring the first configuration item value of the upgraded firmware to the target default value, a restart operation is triggered by a pre-set watchdog timer to reboot the target device based on the repaired firmware.

[0027] Optionally, the process of repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system to restore the first configuration item value of the upgraded firmware to the target default value also includes:

[0028] Record the modification operation information corresponding to the first configuration item value of the target configuration item when the basic input / output system repairs it;

[0029] The modification operation information is sent to a preset terminal so that the modification operation information can be viewed through the preset terminal.

[0030] Optionally, the process of booting the target device based on the repaired firmware also includes:

[0031] If the target device crashes again, the Basic Input / Output System will restore the values ​​of several configuration items that meet the preset crash conditions in the repaired firmware to the default configuration item values ​​of the corresponding firmware before the upgrade, so that the target device can be started based on the repaired firmware.

[0032] Secondly, this application provides a device firmware repair apparatus, comprising:

[0033] The self-test module is used to trigger a system self-test operation through the basic input / output system when the target device is powered on, and obtain the corresponding self-test results; the current firmware of the basic input / output system is the upgraded firmware.

[0034] The judgment module is used to detect the target configuration item in the upgraded firmware to determine the corresponding cause of the crash when the self-test result indicates that the target device has crashed at the target location point during the startup process; wherein, the target configuration item is the high-order base address of the memory-mapped input / output.

[0035] The repair module is used to repair the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system when the downtime is caused by an abnormal value setting of the target configuration item. The repair module restores the first configuration item value of the upgraded firmware to the target default value so that the target device can be started based on the repaired firmware. The target default value is the second configuration item value of the target configuration item in the original firmware corresponding to the upgraded firmware.

[0036] Thirdly, this application provides an electronic device, comprising:

[0037] Memory, used to store computer programs;

[0038] A processor for executing computer programs to implement the steps of the device firmware repair method described above.

[0039] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the device firmware repair method described above.

[0040] As can be seen from the above technical solution, in this application, when the target device is powered on, a system self-test operation is first triggered through the Basic Input / Output System (PIOS) to obtain the corresponding self-test results; the current firmware of the PIOS is the upgraded firmware; if the self-test results indicate that the target device crashes at the target location point during the startup process, the target configuration item in the upgraded firmware is checked to determine the corresponding crash cause; wherein, the target configuration item is the high-order base address of the memory-mapped input / output; if the crash cause is that the target configuration item has an abnormal value setting, the first configuration item value of the target configuration item in the upgraded firmware is repaired through the PIOS to restore the first configuration item value of the upgraded firmware to the target default value, so as to start the target device based on the repaired firmware; the target default value is the second configuration item value of the target configuration item in the pre-upgrade firmware corresponding to the upgraded firmware. In this way, this application can promptly locate the configuration option that caused the crash when a crash occurs after a firmware upgrade through the basic input / output system; and repair the upgraded firmware by using the default values ​​of the relevant configuration items of the firmware before the upgrade, which can quickly handle the crash failure caused by the firmware upgrade. The whole process does not require human intervention, which reduces the difficulty of operation, reduces the possibility of human operation error, and improves the stability and reliability of the system. Attached Figure Description

[0041] 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.

[0042] Figure 1 This is a flowchart of a device firmware repair method disclosed in this application;

[0043] Figure 2 This is a flowchart of a specific device firmware repair method disclosed in this application;

[0044] Figure 3 This is a schematic diagram of the structure of a device firmware repair device disclosed in this application;

[0045] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0046] 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.

[0047] 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.

[0048] 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.

[0049] like Figure 1 As shown in the figure, this application discloses a device firmware repair method, including:

[0050] Step S11: When the target device is powered on, the system self-test operation is triggered through the basic input / output system to obtain the corresponding self-test results; the current firmware of the basic input / output system is the upgraded firmware.

[0051] In this embodiment of the application, the configuration values ​​of the firmware of the basic input / output system (BIOS) of the target device may change before and after the upgrade; the change of BIOS configuration values ​​may cause device failure, such as startup failure; therefore, when the device is powered on after the BIOS firmware upgrade, a system self-test operation can be triggered to obtain the corresponding self-test results; the system self-test mainly detects whether the upgraded firmware of the BIOS is compatible with the device.

[0052] In one specific embodiment, before triggering the system self-test operation via the Basic Input / Output System (PIOS), the process may further include: acquiring and executing a firmware upgrade command for the PIOS of the target device to perform a firmware upgrade operation on the PIOS of the target device; during the firmware upgrade operation of the PIOS, triggering a preset configuration item value saving operation to retain the default values ​​of the relevant configuration items in the firmware before the upgrade of the PIOS; correspondingly, repairing the first configuration item value of the target configuration item in the upgraded firmware via the PIOS to restore the first configuration item value of the upgraded firmware to the target default value, so as to boot the target device based on the repaired firmware, including: querying the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items via the PIOS; triggering a repair operation on the first configuration item value of the target configuration item in the upgraded firmware via the PIOS and using the target default value, so as to restore the first configuration item value of the upgraded firmware to the target default value, obtaining the corresponding repaired firmware, so as to boot the target device based on the repaired firmware. Specifically, the firmware upgrade process for the device's Basic Input / Output System (BIOS) should be completed in advance. Based on the firmware upgrade command for the target device's BIOS firmware, the corresponding firmware upgrade operation is executed. Furthermore, during the firmware upgrade process, the default values ​​of several configuration items corresponding to the pre-upgrade firmware need to be retained. Further, during subsequent firmware repair, the BIOS can query the target default value corresponding to the target configuration item from the pre-saved default values ​​of the relevant configuration items in the pre-upgrade firmware. Then, this target default value can be used to trigger a repair operation on the first configuration item value of the target configuration item in the upgraded firmware. Specifically, this first configuration item value is modified to the target default value corresponding to the target configuration item in the pre-upgrade firmware. After the configuration item value is modified, the upgraded firmware becomes the repaired firmware. Subsequently, the target device can be restarted using this repaired firmware.

[0053] In one specific embodiment, triggering a preset configuration item value saving operation to retain the default values ​​of relevant configuration items in the pre-upgrade firmware of the Basic Input / Output System (BIOS) can include: triggering the preset configuration item value saving operation to save the default values ​​of relevant configuration items in the pre-upgrade firmware of the BIOS to a preset storage space; correspondingly, querying the target default value corresponding to the target configuration item from the default values ​​of relevant configuration items through the BIOS can include: creating a query instruction carrying relevant information of the target configuration item through the BIOS and sending the query instruction to the preset storage space; obtaining the target default value corresponding to the target configuration item returned by the preset storage space after responding to the query instruction through the BIOS. Specifically, the process of saving the default values ​​of several configuration items of the pre-upgrade firmware of the BIOS first involves triggering a pre-set configuration item value saving operation, based on which the default values ​​of relevant configuration items of the pre-upgrade firmware of the BIOS are saved to a pre-prepared storage space. Understandably, during the subsequent query for the target default value corresponding to the target configuration item, a query command carrying relevant information about the target configuration item can be created through the basic input / output system. Based on this query command, the target default value corresponding to the target configuration item can be obtained from the default values ​​of each configuration item in the firmware before the upgrade, which are stored in the preset storage space. The target default value is the configuration item value corresponding to the target configuration item in the firmware before the upgrade.

[0054] Step S12: If the self-test result indicates that the target device crashed at the target location point during the startup process, then the target configuration item in the upgraded firmware is tested to determine the corresponding crash cause; wherein, the target configuration item is the high-order base address of the memory-mapped input / output.

[0055] Furthermore, the above steps allow for a system self-test of the device, yielding corresponding results. Understandably, if the self-test is successful, the device can directly and normally boot into the operating system. However, if the self-test results indicate a crash at a target location during the boot process (location 0x31), then the target configuration item in the upgraded firmware needs to be checked to determine the cause of the crash. Understandably, when the system crashes at location 0x31, the high base address of the memory-mapped input / output (MMIO) needs to be checked to determine if the crash is caused by an improperly set MMIO High Base value.

[0056] In a specific embodiment, detecting the target configuration item in the upgraded firmware to determine the corresponding cause of the downtime may include: activating a fault detection mechanism to analyze the target configuration item in the upgraded firmware to determine whether the first configuration item value of the target configuration item is within a preset threshold range; if the first configuration item value is not within the preset threshold range, the downtime is determined to be due to an abnormal value setting of the target configuration item. Specifically, during the process of detecting the target configuration item to determine the cause of the downtime, a fault detection mechanism may be activated to analyze the first configuration item value of the target configuration item in the upgraded firmware to determine whether the first configuration item value is within a preset threshold range. This threshold range is a pre-set threshold range for the configuration item value of the target configuration item that allows the device to boot normally into the operating system; if the first configuration item value of the target configuration item in the upgraded firmware is not within the preset threshold range, it indicates that the first configuration item value is abnormal, and the downtime of the current device can be determined to be due to an abnormal value setting of the target configuration item.

[0057] Step S13: If the reason for the crash is that the target configuration item has an abnormal value setting, the first configuration item value of the target configuration item in the upgraded firmware is repaired through the basic input / output system to restore the first configuration item value of the upgraded firmware to the target default value so that the target device can be started based on the repaired firmware; the target default value is the second configuration item value of the target configuration item of the pre-upgrade firmware corresponding to the upgraded firmware.

[0058] In this embodiment, the reasons for the target device crashing during startup can be determined through the above steps. If the crash is caused by an abnormal value setting in the target configuration item of the upgraded firmware, the first configuration item value of the abnormal target configuration item needs to be repaired. Further, repairing the first configuration item value specifically involves replacing it with a target default value that meets startup requirements. This target default value can be queried from the configuration item information saved in the firmware before the upgrade, and a second configuration item value corresponding to the target configuration item can be obtained from several configuration item values ​​in the firmware before the upgrade. Then, this second configuration item value is used as the target default value to repair the first configuration item value in the upgraded firmware.

[0059] In one specific embodiment, the method may further include: configuring a watchdog timer in the target device to monitor system status; correspondingly, before booting the target device based on the repaired firmware, the method further includes: after restoring the first configuration item value of the upgraded firmware to the target default value, triggering a restart operation through a pre-set watchdog timer to reboot the target device based on the repaired firmware. Specifically, a watchdog timer for monitoring system status can be pre-configured in the target device, and the watchdog timer can be triggered based on a freely configurable fault recovery time. Further, after replacing and repairing the first configuration item value of the upgraded firmware using the second configuration item value of the pre-upgrade firmware, a restart operation can be triggered through a pre-set watchdog timer, the basic input / output system restarts, and the system self-test is restarted to boot the target device into the corresponding operating system.

[0060] In another specific embodiment, the process of repairing the first configuration item value of the target configuration item in the upgraded firmware using the Basic Input / Output System (BIOS) to restore the first configuration item value of the upgraded firmware to the target default value may further include: recording the modification operation information corresponding to the BIOS repairing the first configuration item value of the target configuration item; and sending the modification operation information to a preset terminal so that the modification operation information can be viewed through the preset terminal. Specifically, during the startup of the target device and the repair of the first configuration item value of the target configuration item in the upgraded firmware using the BIOS, relevant modification operation information can be recorded, and the recorded modification operation information can be sent to a preset terminal so that relevant personnel can understand the device startup and configuration item value repair process through the preset terminal.

[0061] In another specific embodiment, the process of booting the target device based on the repaired firmware may further include: if the target device crashes again, the Basic Input / Output System (PIS) is used to restore the values ​​of several configuration items in the repaired firmware that meet the preset crash conditions to the default configuration item values ​​of the relevant pre-upgrade firmware, so as to boot the target device based on the repaired firmware. Specifically, if the target device crashes again during the subsequent boot process after the above steps have been used to restore the values ​​of the target configuration items, it indicates that there are still configuration items with abnormal values ​​in the repaired firmware. In this case, the PIS can be used to restore the values ​​of several configuration items in the repaired firmware that meet the preset crash conditions (cause of crash) to the default configuration item values ​​of the relevant configuration items in the pre-upgrade firmware. Then, the repaired firmware is used to restart the target device to successfully complete the system self-test and enter the corresponding operating system. Understandably, if a crash still occurs after fixing the first configuration item value of the target configuration item in the upgraded firmware and restarting, a pre-set mapping relationship between crash failures and configuration items can be used to modify the relevant configuration items in the upgraded firmware sequentially. After each modification, the device should be restarted to attempt booting into the operating system. This minimizes the need to modify configuration items in the upgraded firmware while ensuring normal startup, thus avoiding any impact on the user experience caused by configuration changes.

[0062] Therefore, this application, through its basic input / output system, can promptly locate the configuration option causing the crash when a firmware upgrade fails; and repair the upgraded firmware using the default values ​​of relevant configuration items from the pre-upgrade firmware, thus quickly handling crashes caused by firmware upgrades. When faced with such crashes, the device can automatically restore default values ​​and restart normally without fault location or manual restoration of default values. The entire process requires no human intervention, reducing operational difficulty, minimizing the possibility of human error, and improving system stability and reliability.

[0063] like Figure 2 As shown in the figure, this application discloses a device firmware repair method, which specifically includes:

[0064] In this embodiment, after upgrading the BIOS firmware, the device retains the configuration information of the original BIOS firmware. Afterwards, the device powers on and boots, running the POST (Power-On Self-Test). This may result in either a normal power-on or a system crash during the boot process. Further, if the device powers on normally and boots successfully, it enters the operating system normally. If the boot process crashes, the system checks if the crash occurs at address 0x31. If the device crashes at address 0x31 during self-test, it is determined that the boot failure is due to an excessively high MMIO value. The BIOS can then send a command to restore the MMIO option to its default value (which can be 4T). After restoring the default value, the BIOS automatically restarts after triggering the watchdog timer (corresponding to FRB time, or Fault Recovery Boot time, which refers to the time required for the system to recover from a fault). During the restart process, the BIOS restarts the POST process. Since the MMIO value has been restored to its default value, the POST process completes successfully, and the machine enters the OS (operating system) normally. It should be noted that while performing the above steps, relevant modification information can be recorded and displayed on the web-based management interface for administrator viewing. Understandably, maintenance personnel need to retain information on all configuration items before the BIOS firmware upgrade. Due to uncertainties during the upgrade process or compatibility issues between the new BIOS version and hardware, the device may crash at a specific location (e.g., 0x31). After a crash, the BIOS immediately initiates a fault detection mechanism, analyzing log information and error codes during the POST process to determine the specific cause of the crash. Based on the fault detection results, the BIOS locates the specific configuration option causing the problem: MMIO High Base. For example, if the crash is caused by the MMIO High Base value being set to the maximum value of 56T, the BIOS can use the previously saved configuration information from the pre-upgrade firmware to restore the MMIO High Base value of the upgraded firmware to the factory default value of 4T or another value, and send this setting action to the BMC for recording on the web interface to notify the user that the MMIO High Base value has changed. After MMIO High Base is restored to its default value, the machine will automatically restart as the watchdog timer is set up. The machine can then pass the self-test normally and enter the setup or OS normally after POST is completed, so that it can be used by the user.

[0065] Therefore, it can be seen that if the device crashes at a specific location (such as location 0x31) during the POST process, the BIOS can automatically detect and repair the fault, restore the relevant configuration options to the default values ​​before the upgrade, and quickly handle the crash caused by firmware upgrade. The whole process does not require human intervention, which reduces the difficulty of operation, reduces the possibility of human error, and improves the stability and reliability of the system.

[0066] like Figure 3 As shown in the figure, this application discloses a device firmware repair apparatus, including:

[0067] The self-test module 11 is used to trigger a system self-test operation through the basic input / output system when the target device is powered on, and obtain the corresponding self-test results; the current firmware of the basic input / output system is the upgraded firmware.

[0068] The judgment module 12 is used to detect the target configuration item in the upgraded firmware to determine the corresponding cause of the crash when the self-test result indicates that the target device has crashed at the target location point during the startup process; wherein, the target configuration item is the high-order base address of the memory-mapped input / output.

[0069] Repair module 13 is used to repair the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system when the downtime is caused by an abnormal value setting of the target configuration item. The repair module repairs the first configuration item value of the upgraded firmware to the target default value so that the target device can be started based on the repaired firmware. The target default value is the second configuration item value of the target configuration item in the firmware before the upgrade, which is the same as the upgraded firmware.

[0070] Therefore, this application, through its basic input / output system, can promptly locate the configuration options causing the crash when a crash occurs after a firmware upgrade; and repair the upgraded firmware using the default values ​​of the relevant configuration items in the pre-upgrade firmware. This allows for rapid handling of crashes caused by firmware upgrades, and the entire process requires no human intervention, reducing operational difficulty, minimizing the possibility of human error, and improving the stability and reliability of the system.

[0071] In one specific embodiment, the apparatus of this application may further include:

[0072] The firmware upgrade module is used to obtain and execute firmware upgrade commands for the basic input / output system of the target device, so as to perform firmware upgrade operations on the basic input / output system of the target device.

[0073] The configuration item saving module is used to trigger a preset configuration item value saving operation during the firmware upgrade operation of the basic input / output system, so as to retain the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input / output system;

[0074] Correspondingly, the repair module 13 may include:

[0075] The default value query submodule is used to query the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items through the basic input / output system;

[0076] The first configuration item repair unit is used to trigger a repair operation on the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system and by using the target default value, so as to repair the first configuration item value of the upgraded firmware to the target default value, thereby obtaining the corresponding repaired firmware, so as to start the target device based on the repaired firmware.

[0077] In another specific embodiment, the configuration item storage module may include:

[0078] An operation triggering unit is used to trigger a preset configuration item value saving operation to save the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input / output system to a preset storage space;

[0079] Correspondingly, the default value query submodule may include:

[0080] The query instruction sending unit is used to create a query instruction carrying relevant information of the target configuration item through the basic input / output system, and send the query instruction to the preset storage space;

[0081] The default value acquisition unit is used to obtain the target default value corresponding to the target configuration item after responding to the query command by obtaining the preset storage space through the basic input / output system.

[0082] In one specific embodiment, the determination module 12 may include:

[0083] The judgment unit is used to initiate the fault detection mechanism to analyze the target configuration item in the upgraded firmware in order to determine whether the first configuration item value of the target configuration item is within the preset threshold range.

[0084] The determination unit is used to determine that the reason for the downtime is that the target configuration item has an abnormal value setting when the value of the first configuration item is not within the preset threshold range.

[0085] In one specific embodiment, the apparatus of this application may further include:

[0086] The watchdog configuration unit is used to configure a watchdog in the target device to monitor the system status.

[0087] Accordingly, the apparatus of this application may further include:

[0088] The watchdog trigger module is used to trigger a reboot operation through a pre-set watchdog after the first configuration item value of the upgraded firmware is restored to the target default value, so as to re-boot the target device based on the repaired firmware.

[0089] In one specific embodiment, the apparatus of this application may further include:

[0090] The operation information recording module is used to record the modification operation information corresponding to the first configuration item value of the target configuration item when the basic input / output system repairs it;

[0091] The operation information sending module is used to send modified operation information to a preset terminal so that the modified operation information can be viewed through the preset terminal.

[0092] In one specific embodiment, the apparatus of this application may further include:

[0093] The second configuration item value repair module is used to repair several configuration item values ​​that meet the preset crash conditions in the repaired firmware to the default configuration item values ​​corresponding to the firmware before the upgrade when the target device is in a crash state again, so as to start the target device based on the repaired firmware.

[0094] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the device firmware repair method disclosed in any of the foregoing embodiments. Furthermore, the electronic device in this embodiment may specifically be an electronic computer.

[0095] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0096] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0097] The operating system 221 is used to manage and control the various hardware devices on the electronic device and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the device firmware repair method executed by the electronic device as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0098] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed device firmware repair method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0099] Furthermore, this application also discloses a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the aforementioned disclosed device firmware repair method.

[0100] The various embodiments in this specification 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.

[0101] 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 implementation should not be considered beyond the scope of this application.

[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0103] Finally, it should 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.

[0104] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for repairing device firmware, characterized in that, include: When the target device is powered on, the system self-test operation is triggered through the basic input / output system to obtain the corresponding self-test results; The current firmware of the basic input / output system is the upgraded firmware; If the self-test result indicates that the target device crashed at the target location point during the startup process, then the target configuration item in the upgraded firmware is tested to determine the corresponding crash cause; wherein, the target location point is position 0x31, and the target configuration item is the high-order base address of the memory-mapped input / output; If the downtime is due to an abnormal value setting of the target configuration item, the first configuration item value of the target configuration item in the upgraded firmware is repaired through the basic input / output system to restore the first configuration item value of the upgraded firmware to the target default value, so that the target device can be started based on the repaired firmware; the target default value is the second configuration item value of the target configuration item in the pre-upgrade firmware corresponding to the upgraded firmware, and the abnormal value setting indicates that the value is not within the corresponding threshold range.

2. The device firmware repair method according to claim 1, characterized in that, Before triggering the system self-test operation via the basic input / output system, the following steps are also included: Obtain and execute a firmware upgrade command for the basic input / output system of the target device to perform a firmware upgrade operation on the basic input / output system of the target device; During the firmware upgrade operation of the basic input / output system, a preset configuration item value saving operation is triggered to retain the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input / output system; Accordingly, the step of repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system to restore the first configuration item value of the upgraded firmware to the target default value, so as to boot the target device based on the repaired firmware, includes: The basic input / output system queries the default values ​​of the relevant configuration items to find the target default value corresponding to the target configuration item. By using the basic input / output system and the target default value, a repair operation is triggered on the first configuration item value of the target configuration item in the upgraded firmware, so as to repair the first configuration item value of the upgraded firmware to the target default value, thereby obtaining the corresponding repaired firmware, so as to start the target device based on the repaired firmware.

3. The device firmware repair method according to claim 2, characterized in that, The triggering of the preset configuration item value saving operation, to retain the default values ​​of relevant configuration items in the firmware before the upgrade of the basic input / output system, includes: Trigger a preset configuration item value saving operation to save the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input / output system to the preset storage space; Accordingly, the step of querying the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items through the basic input / output system includes: The basic input / output system creates a query instruction carrying relevant information about the target configuration item, and sends the query instruction to the preset storage space. The target default value corresponding to the target configuration item is returned by the preset storage space obtained through the basic input / output system in response to the query command.

4. The device firmware repair method according to claim 1, characterized in that, The step of detecting the target configuration items in the upgraded firmware to determine the corresponding cause of the downtime includes: A fault detection mechanism is activated to analyze the target configuration items in the upgraded firmware to determine whether the first configuration item value of the target configuration item is within a preset threshold range. If the value of the first configuration item is not within the preset threshold range, the cause of the downtime is determined to be an abnormal value setting of the target configuration item.

5. The device firmware repair method according to claim 1, characterized in that, Also includes: Configure a watchdog timer in the target device to monitor system status; Accordingly, before booting the target device based on the repaired firmware, the process further includes: After the first configuration item value of the upgraded firmware is restored to the target default value, a restart operation is triggered by the pre-set watchdog timer to re-boot the target device based on the restored firmware.

6. The device firmware repair method according to any one of claims 1 to 5, characterized in that, The process of repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system to restore the first configuration item value of the upgraded firmware to the target default value also includes: Record the modification operation information corresponding to the first configuration item value of the target configuration item when the basic input / output system repairs it; The modification operation information is sent to a preset terminal so that the modification operation information can be viewed through the preset terminal.

7. The device firmware repair method according to any one of claims 1 to 5, characterized in that, The process of booting the target device based on the repaired firmware also includes: If the target device is down again, the basic input / output system will restore the values ​​of several configuration items that meet the preset downtime conditions in the upgraded firmware to the default configuration item values ​​in the original firmware, so that the target device can be started based on the restored firmware.

8. A device firmware repair apparatus, characterized in that, include: The self-test module is used to trigger a system self-test operation through the basic input / output system when the target device is powered on, and obtain the corresponding self-test results. The current firmware of the basic input / output system is the upgraded firmware; The judgment module is used to detect the target configuration item in the upgraded firmware to determine the corresponding cause of the crash when the self-test result indicates that the target device has crashed at the target location point during the startup process; wherein, the target location point is position 0x31, and the target configuration item is the high-order base address of the memory-mapped input / output; The repair module is used to repair the first configuration item value of the target configuration item in the upgraded firmware through the basic input / output system when the downtime is caused by an abnormal value setting of the target configuration item. The repair module restores the first configuration item value of the upgraded firmware to the target default value so that the target device can be started based on the repaired firmware. The target default value is the second configuration item value of the target configuration item in the pre-upgrade firmware corresponding to the upgraded firmware. The abnormal value setting indicates that the value is not within the corresponding threshold range.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the device firmware repair method as described 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 steps of the device firmware repair method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electronic equipment data processing method and device, electronic equipment and storage medium

    CN115617411A

  • Mirror image loading method and device, equipment and medium

    CN116737185A