Equipment firmware repairing method and device, equipment and storage medium

By detecting and fixing the downtime problem caused by abnormal configuration item value after BIOS upgrade in the BIOS, the problem of self-checking of POST card after BIOS upgrade was solved, and the operation and maintenance efficiency and system stability were improved.

CN119739433AActive Publication Date: 2025-04-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The BIOS configuration item value is applicable to the old version but not to the new version, resulting in the POST card self-checking and downtime after the BIOS is upgraded, and the operation and maintenance efficiency is low.

Method used

The system self-test is triggered through the Basic Input and Output System (BIOS) to detect whether there are numerical settings abnormalities in the memory-mapped input and output high-bit address configuration items in the firmware after the upgrade. If it is abnormal, the first configuration item value is fixed as the default value of the firmware before the upgrade so that the device can start normally.

Benefits of technology

Rapidly deal with downtime caused by BIOS firmware upgrades, reducing the operation and maintenance personnel's operation difficulty and the possibility of human operation errors, and improving the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739433A_ABST
    Figure CN119739433A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment firmware repairing method and device, equipment and a storage medium, and relates to the technical field of equipment operation and maintaining.The method comprises the steps that when target equipment is powered on, system self-checking operation is triggered through a basic input and output system to obtain a self-checking result; basically, the current firmware of the input and output system is the upgraded firmware; if the self-checking result represents that the target device is crashed at the target position point in the starting process, detecting a target configuration item in the upgraded firmware to determine a crashing reason; wherein the target configuration item is a high-order base address input and output by memory mapping; if the numerical value setting of the target configuration item is abnormal, repairing the first configuration item value of the upgraded firmware into a target default value so as to start the target equipment; the target default value is a second configuration item value of a target configuration item of the upgraded firmware. Therefore, the configuration items of the upgraded firmware are repaired by utilizing the default values of the related configuration items of the firmware before upgrading, and downtime faults can be quickly processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Iterative updates of BIOS (Basic Input Output System) usually introduce new features and fixes. However, due to the improvement of features, some BIOS setup (configuration item) values ​​may be applicable in the old BIOS version but not in the new version, resulting in the POST (Power-On Self-Test) card self-test crash after upgrading to the new BIOS version. In this case, it is necessary to rely on the operation and maintenance personnel to restore the value of MMIO High Base (Memory-mapped input / output High Base) out of band or use the method of powering off the target device, opening the chassis cover, clearing CMOS (Complementary Metal Oxide Semiconductor, a piece of memory) to restore the option default value. After completing a series of operations, power on the target device again and complete the POST self-test, and finally enter the OS (Operating System) normally before use. The inconvenience of this method is: 1. If the operation and maintenance personnel set the value of MMIO High Base a long time ago and keep the configuration upgrade a long time later, downtime will occur. The operation and maintenance cannot determine the root cause of the downtime in the first time, and it takes a lot of time to locate the fault. 2. After the machine self-checks, a simple restart or power failure cannot restore to normal. It is necessary to modify the MMIO High Base option out of band or open the chassis to clear CMOS to restore the default value. The out-of-band manual modification or opening the cover to clear CMOS is a single operation, which greatly reduces the operation and maintenance efficiency.

[0003] It can be seen that how to efficiently handle downtime caused by version iteration is a problem that technical personnel in this field need to solve. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a device firmware repair method, apparatus, device and storage medium, which can solve the problem of low operation and maintenance efficiency when the BIOS configuration item value card self-checks and crashes.

[0005] In order to solve the above technical problems, in a first aspect, an embodiment of the present invention provides a device firmware repair method, comprising:

[0006] When the target device is powered on, a system self-check operation is triggered through the basic input and output system to obtain a corresponding self-check result; the current firmware of the basic input and output system is the upgraded firmware;

[0007] If the self-test result indicates that the target device crashes at the target location during the startup process, the target configuration item in the upgraded firmware is tested to determine the corresponding crash cause; wherein the target configuration item is the high base address of the memory mapped input and output;

[0008] If the cause of the downtime is that there is 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 and output system to repair 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 of the pre-upgrade firmware corresponding to the upgraded firmware.

[0009] Optionally, before triggering the system self-check operation through the basic input and output system, the method further includes:

[0010] Obtaining and executing a firmware upgrade command for a basic input / output system of a target device to perform a firmware upgrade operation on the basic input / output system of the target device;

[0011] During the firmware upgrade process of the basic input and 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 basic input and output system upgrade;

[0012] Accordingly, repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system to repair 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, including:

[0013] Query the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items through the basic input and output system;

[0014] A repair operation of a first configuration item value of a target configuration item in an upgraded firmware is triggered through a basic input / output system and by using a target default value, so as to repair the first configuration item value of the upgraded firmware to the target default value and obtain the corresponding repaired firmware, so as to start the target device based on the repaired firmware.

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

[0016] Triggering a preset configuration item value saving operation to save the default values ​​of the relevant configuration items of the firmware before the basic input and output system upgrade 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 and output system, including:

[0018] Creating a query instruction carrying relevant information of a target configuration item through a basic input and output system, and sending the query instruction to a preset storage space;

[0019] The target default value corresponding to the target configuration item is returned after the preset storage space responds to the query instruction through the basic input and output system.

[0020] Optionally, the target configuration items in the upgraded firmware are tested to determine the corresponding reasons for the downtime, including:

[0021] Initiate a fault detection mechanism to analyze a target configuration item in the upgraded firmware to determine whether a first configuration item value of the target configuration item is within a preset threshold range;

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

[0023] Optionally, the method of the present application further includes:

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

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

[0026] After the first configuration item value of the upgraded firmware is repaired to the target default value, a restart operation is triggered by a preset watchdog to restart 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 and output system to repair the first configuration item value of the upgraded firmware to the target default value further includes:

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

[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 starting the target device based on the repaired firmware further includes:

[0031] If the target device is in a downtime state again, the basic input and output system will repair the several configuration item values ​​corresponding to the repaired firmware that meet the preset downtime conditions to the default configuration item values ​​corresponding to the relevant firmware before the upgrade, so as to start the target device based on the repaired firmware.

[0032] In a second aspect, the present application provides a device firmware repair apparatus, comprising:

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

[0034] A judgment module, used for detecting the target configuration item in the upgraded firmware to determine the corresponding cause of the downtime when the self-test result indicates that the target device has downtime at the target position point during the startup process; wherein the target configuration item is the high base address of the memory mapped input and output;

[0035] A repair module is used to repair the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system when the cause of the downtime is that there is an abnormal value setting of the target configuration item, so as to repair 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 of the pre-upgrade firmware corresponding to the upgraded firmware.

[0036] In a third aspect, the present application provides an electronic device, including:

[0037] Memory for storing computer programs;

[0038] A processor is used to execute a computer program to implement the steps of the device firmware repair method as described above.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned device firmware repair method are implemented.

[0040] It can be seen from the above technical scheme that in the present application, when the target device is powered on, the system self-test operation is first triggered through the basic input-output system to obtain the corresponding self-test result; the current firmware of the basic input-output system is the upgraded firmware; if the self-test result indicates that the target device crashes at the target position point during the startup process, the target configuration item in the upgraded firmware is detected to determine the corresponding cause of the crash; wherein the target configuration item is the high-order base address of the memory-mapped input and output; if the cause of the crash is that there is 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 repair 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 of the pre-upgrade firmware corresponding to the upgraded firmware. In this way, this application can locate the configuration options that cause the downtime in a timely manner through the basic input and output system when a downtime occurs after the firmware is upgraded; and use the default values ​​of the relevant configuration items of the firmware before the upgrade that are reserved in advance to repair the upgraded firmware, so as to quickly handle the downtime 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 errors, and can improve the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A flow chart of a device firmware repair method disclosed in this application;

[0043] Figure 2 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 DESCRIPTION

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

[0047] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0048] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0049] like Figure 1 As shown, the embodiment of the present application discloses a device firmware repair method, including:

[0050] Step S11, when the target device is powered on, a system self-check operation is triggered through the basic input and output system to obtain a corresponding self-check result; the current firmware of the basic input and output system is the upgraded firmware.

[0051] In an embodiment of the present application, the configuration item 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 the BIOS configuration item values ​​may cause the device to malfunction, such as a startup crash; therefore, when the device is powered on after the BIOS firmware is upgraded, a system self-test operation can be triggered to obtain corresponding self-test results; the system self-test mainly detects whether the upgraded firmware of the BIOS is compatible with the device.

[0052] In a specific embodiment, before triggering the system self-check operation through the basic input and output system, the method may further include: obtaining and executing a firmware upgrade command for the basic input and output system of the target device to perform a firmware upgrade operation on the basic input and output system of the target device; during the firmware upgrade operation of the basic input and output system, triggering a preset configuration item value saving operation to retain the default values ​​of the relevant configuration items of the firmware before the upgrade of the basic input and output system; correspondingly, repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system to repair 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, including: querying the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items through the basic input and output system; triggering a repair operation on the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system and using the target default value to repair the first configuration item value of the upgraded firmware to the target default value, and obtaining the corresponding repaired firmware, so as to start the target device based on the repaired firmware. Specifically, the process of upgrading the firmware of the basic input-output system of the device should be completed in advance, and the corresponding firmware upgrade operation should be performed based on the firmware upgrade command for the basic input-output system firmware of the target device; and, during the firmware upgrade process, the default values ​​of several configuration items corresponding to the firmware before the upgrade need to be retained. Furthermore, when the firmware is repaired later, the basic input-output system can be used to query the target default value corresponding to the target configuration item from the pre-saved default values ​​of the relevant configuration items of the firmware before the upgrade; then the target default value can be used to trigger the repair operation of the first configuration item value of the target configuration item in the upgraded firmware; specifically, the first configuration item value is modified to the target default value of the firmware before the upgrade corresponding to the target configuration item, and the upgraded firmware is obtained after the configuration item value is modified; the repaired firmware can be used to restart the target device later.

[0053] In a specific embodiment, triggering a preset configuration item value saving operation to retain the default values ​​of the configuration items of the firmware before the basic input and output system upgrade may include: triggering the preset configuration item value saving operation to save the default values ​​of the configuration items of the firmware before the basic input and output system upgrade to a preset storage space; correspondingly, querying the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items through the basic input and output system, may include: creating a query instruction carrying the relevant information of the target configuration item through the basic input and output system, 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 the basic input and output system responds to the query instruction. Specifically, the process of saving the default values ​​of several configuration items of the firmware before the basic input and output system upgrade is firstly to trigger the preset configuration item value saving operation, and based on the operation, save the default values ​​of the configuration items of the firmware before the basic input and output system upgrade to the pre-prepared storage space. It can be understood that in the subsequent query process of the target default value corresponding to the target configuration item, a query instruction carrying relevant information of the target configuration item can be created through the basic input and output system, and based on the query instruction, the target default value corresponding to the target configuration item can be queried from the default values ​​of each configuration item of the firmware before the upgrade saved 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 crashes at the target location during the startup process, the target configuration item in the upgraded firmware is tested to determine the corresponding crash cause; wherein the target configuration item is the high base address of the memory mapped input and output.

[0055] Furthermore, the above steps can be used to perform a system self-test on the device to obtain the corresponding self-test results; it is understandable that if there is no problem with the self-test, the device can directly enter the operating system normally and complete the startup. When the self-test result indicates that the target device crashes at the target position point during the startup process, where the target position point refers to the position 0x31, it is necessary to detect the target configuration items in the upgraded firmware to determine the cause of the crash based on the test results; it is understandable that when the system crashes at the position 0x31, it is necessary to detect the high base address (MMIO High Base) of the memory mapped input and output to determine whether the crash is caused by an unreasonable setting of the value of MMIO High Base.

[0056] In a specific embodiment, detecting the target configuration item in the upgraded firmware to determine the corresponding cause of downtime may include: starting 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, then determining that the cause of downtime is that the target configuration item has a numerical setting abnormality. Specifically, in the process of detecting the target configuration item to determine the cause of downtime, the fault detection mechanism may be started 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, which is a threshold range of configuration item values ​​for the target configuration item that is pre-set so that the device can normally boot 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, then it means that the first configuration item value is abnormal, and it can be determined that the cause of the current device downtime is that the target configuration item has a numerical setting abnormality.

[0057] Step S13: If the cause of the downtime is that there is 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 and output system to repair 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 of the pre-upgrade firmware corresponding to the upgraded firmware.

[0058] In the embodiment of the present application, the above steps can be used to determine the reason why the target device crashes during the startup process; if the target device crashes because the target configuration item of the upgraded firmware has an abnormal value setting, it is necessary to repair the first configuration item value of the target configuration item with the abnormality. Further, the first configuration item value of the target configuration item is repaired, specifically replacing the first configuration item value with a target default value that meets the startup requirements; the target default value can be queried from the configuration item information corresponding to the firmware before the upgrade, and the second configuration item value corresponding to the target configuration item can be queried from the several configuration item values ​​corresponding to the firmware before the upgrade; then the second configuration item value is used as the target default value to repair the first configuration item value of the upgraded firmware.

[0059] In a specific embodiment, it may also include: configuring a watchdog for monitoring the system status in the target device; accordingly, before starting the target device based on the repaired firmware, it also includes: after repairing the first configuration item value of the upgraded firmware to the target default value, triggering a restart operation through a preset watchdog to restart the target device based on the repaired firmware. Specifically, a watchdog for monitoring the system status may be configured in advance in the target device, and the watchdog may be triggered based on a freely set fault recovery time. Furthermore, after replacing and repairing the first configuration item value of the upgraded firmware with the second configuration item value of the pre-upgraded firmware, a restart operation may be triggered through a preset watchdog, the basic input and output system may be restarted, and the system self-check operation may be restarted to start 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 through the basic input and output system to repair the first configuration item value of the upgraded firmware to the target default value can also include: recording the modification operation information corresponding to the repair of the first configuration item value of the target configuration item by the basic input and output system; sending the modification operation information to the preset terminal so that the modification operation information can be viewed through the preset terminal. Specifically, in the process of starting the target device and repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system, the relevant modification operation information can be recorded, and the recorded modification operation information can be sent to the 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 starting the target device based on the repaired firmware may also include: if the target device is in a downtime state again, the basic input and output system is used to repair the values ​​of several configuration items corresponding to the repaired firmware that meet the preset downtime conditions to the default configuration item values ​​corresponding to the relevant pre-upgrade firmware, so as to start the target device based on the repaired firmware. Specifically, if the target device is in a downtime state again during the subsequent startup process after the target device repairs the values ​​of the target configuration items through the above steps, it means that there are still configuration items with abnormal values ​​in the repaired firmware. At this time, the basic input and output system can be used to repair the values ​​of several configuration items in the repaired firmware that meet the preset downtime conditions (cause of the downtime failure) to the default configuration item values ​​of the relevant configuration items of the pre-upgrade firmware, and then the repaired firmware is used to restart the target device to successfully complete the system self-check and enter the corresponding operating system. It is understandable that after repairing the first configuration item value of the target configuration item of the upgraded firmware of the target device, if the shutdown failure still occurs when restarting, the relevant configuration items in the upgraded firmware can be modified in sequence through the pre-set mapping relationship between the shutdown failure and the configuration item, and the device can be restarted after each modification to try to boot into the operating system. In this way, the modification of each configuration item in the upgraded firmware can be minimized while satisfying the normal startup, and the user experience of the device can be avoided as much as possible due to the modification of the configuration item.

[0062] It can be seen that the present application can, through the basic input and output system, promptly locate the configuration options that cause the downtime when a downtime occurs after a firmware upgrade; and use the pre-reserved default values ​​of the relevant configuration items of the pre-upgrade firmware to repair the upgraded firmware, so as to quickly handle the downtime caused by the firmware upgrade; when the device faces such downtime problems, it can automatically restore the default values ​​without fault location or manual restoration of the default values, and restart and power on normally; the entire process does not require human intervention, which reduces the difficulty of operation, reduces the possibility of human operational errors, and can improve the stability and reliability of the system.

[0063] like Figure 2 As shown, the embodiment of the present application discloses a device firmware repair method, which specifically includes:

[0064] In the embodiment of the present application, after the BIOS firmware is upgraded, the device will retain the configuration item related information of the original BIOS firmware before the upgrade; after that, the device is powered on and starts, and runs POST. There may be two situations in which the machine is powered on and started normally, or it crashes during the boot process. Further, if the power is on normally and the boot is completed, the operating system is entered normally; if the boot process crashes, check whether the device crashes at position 0x31; if the device card self-check crashes at position 0x31, it is judged that the device failed to boot due to the MMIO value being too large, and the BIOS can send a command to set the MMIO option to restore the default value (the default value can be 4T). After restoring the default value, the BIOS can automatically restart after the watchdog of the corresponding time is triggered through the pre-set watchdog (corresponding to FRB time, i.e. Fault Recovery Boot time, which refers to the time required for the system to recover from a fault when a fault occurs.). During the restart process, the BIOS restarts the POST process. At this time, since the MMIO value has been restored to the default value, the post can be completed smoothly, and the machine enters the OS (operating system) normally. It should be noted that while executing the above steps, the relevant modification operation information can be recorded and presented on the web management interface for the administrator to view. It is understandable that the operation and maintenance personnel need to retain the relevant information of each configuration item before the BIOS firmware upgrade in advance. Due to the uncertainty in the upgrade process or the compatibility problem between the new version of BIOS and the hardware, the device may crash at a specific location (such as 0x31). After the crash, the BIOS immediately starts the fault detection mechanism and determines the specific cause of the crash by analyzing the log information, error code, etc. during the POST process. According to the fault detection results, the BIOS locates the specific configuration option MMIO High Base that causes the problem. For example, the crash fault is caused by the value of MMIO High Base being set to the maximum value of 56T. At this time, the BIOS can restore the value of MMIO High Base of the upgraded firmware of the device to the factory default value of 4T or other values ​​through the relevant configuration item information of the firmware before the upgrade saved in advance, and send the setting action to the BMC to record it on the WEB side to prompt the user that the value of MMIO High Base has changed. After MMIO High Base is restored to the default value, the machine automatically restarts as the watchdog triggers. The machine can pass the self-test normally and enter setup or OS normally after POST is completed for user use.

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

[0066] like Figure 3 As shown, the embodiment of the present application discloses a device firmware repairing apparatus, comprising:

[0067] The self-check module 11 is used to trigger a system self-check operation through a basic input and output system when the target device is powered on, and obtain a corresponding self-check result; the current firmware of the basic input and 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 downtime when the self-test result indicates that the target device has crashed at the target position point during the startup process; wherein the target configuration item is the high base address of the memory mapped input and output;

[0069] The 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 and output system when the cause of the downtime is that there is an abnormal value setting of the target configuration item, so as to repair 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 of the pre-upgrade firmware corresponding to the upgraded firmware.

[0070] It can be seen that the present application can, through the basic input and output system, promptly locate the configuration options that cause the downtime when a downtime occurs after a firmware upgrade; and use the pre-reserved default values ​​of the relevant configuration items of the pre-upgrade firmware to repair the upgraded firmware, so as to quickly handle the downtime caused by the firmware upgrade. The entire process does not require human intervention, which reduces the difficulty of operation, reduces the possibility of human operational errors, and can improve the stability and reliability of the system.

[0071] In a specific embodiment, the device of the present application may further include:

[0072] A firmware upgrade module, used to obtain and execute a firmware upgrade command for a basic input / output system of a target device, so as to perform a firmware upgrade operation on the basic input / output system of the target device;

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

[0074] Accordingly, 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 and output system;

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

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

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

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

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

[0081] The default value acquisition unit is used to acquire, through the basic input and output system, a target default value corresponding to the target configuration item and returned after the preset storage space responds to the query instruction.

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

[0083] A judgment unit, configured to start a fault detection mechanism to analyze a target configuration item in the upgraded firmware to determine whether a first configuration item value of the target configuration item is within a preset threshold range;

[0084] The determination unit is configured to determine that the cause of the downtime is that a value setting abnormality exists in the target configuration item when the value of the first configuration item is not within a preset threshold range.

[0085] In a specific embodiment, the device of the present application may further include:

[0086] A watchdog configuration unit, used for configuring a watchdog for monitoring system status in a target device;

[0087] Accordingly, the device of the present application may further include:

[0088] The watchdog trigger module is used to trigger a restart operation through a preset watchdog after the first configuration item value of the upgraded firmware is repaired to the target default value, so as to restart the target device based on the repaired firmware.

[0089] In a specific embodiment, the device of the present application may further include:

[0090] An operation information recording module, used to record modification operation information corresponding to when the basic input and output system repairs the first configuration item value of the target configuration item;

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

[0092] In a specific embodiment, the device of the present application may further include:

[0093] The second configuration item value repair module is used to repair several configuration item values ​​corresponding to the repaired firmware that meet the preset downtime conditions to the default configuration item values ​​corresponding to the relevant pre-upgrade firmware through the basic input and output system when the target device is in a downtime state again, so as to start the target device based on the repaired firmware.

[0094] Furthermore, the present application also discloses an electronic device. Figure 4 It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input and output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the device firmware repair method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.

[0095] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain 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 storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a 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 various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the device firmware repair method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0098] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed device firmware repair method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0099] Furthermore, the present application also discloses a computer program product, including a computer program / instruction, which implements the steps of the aforementioned device firmware repair method when executed by a processor.

[0100] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0101] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0102] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

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

[0104] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A device firmware repair method, characterized in that: include: When the target device is powered on, a system self-test operation is triggered through the basic input and output system to obtain the corresponding self-test results; The current firmware of the basic input and output system is the upgraded firmware; If the self-test result indicates that the target device crashes at a target location during the startup process, the target configuration item in the upgraded firmware is tested to determine the corresponding crash cause; wherein the target configuration item is a high-order base address of a memory-mapped input and output; If the cause of the downtime is that there is an abnormality in the numerical 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 and output system to repair 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 of the firmware before the upgrade corresponding to the upgraded firmware.

2. The device firmware repair method according to claim 1, characterized in that: Before triggering the system self-check operation through the basic input and output system, the method further includes: Acquire and execute a firmware upgrade command for a 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, triggering a preset configuration item value saving operation to retain the default values ​​of the relevant configuration items of the firmware of the basic input / output system before the upgrade; Correspondingly, repairing the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system to repair the first configuration item value of the upgraded firmware to a target default value, so as to start the target device based on the repaired firmware, includes: querying, through the basic input and output system, from the default values ​​of the relevant configuration items, a target default value corresponding to the target configuration item; A repair operation of a first configuration item value of the target configuration item in the upgraded firmware is triggered 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, and obtain 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 the relevant configuration items of the firmware before the upgrade of the basic input and output system includes: Triggering a preset configuration item value saving operation to save the default values ​​of the relevant configuration items of the firmware before the basic input and output system upgrade to a preset storage space; Correspondingly, querying the target default value corresponding to the target configuration item from the default values ​​of the relevant configuration items through the basic input and output system includes: Creating a query instruction carrying relevant information of the target configuration item through the basic input and output system, and sending the query instruction to the preset storage space; The target default value corresponding to the target configuration item is obtained through the basic input and output system and is returned after the preset storage space responds to the query instruction.

4. The device firmware repair method according to claim 1, characterized in that: The detecting the target configuration item in the upgraded firmware to determine the corresponding downtime cause includes: Initiate a fault detection mechanism to analyze a target configuration item in the upgraded firmware to determine whether a 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, it is determined that the cause of the downtime is that there is an abnormal value setting of the target configuration item.

5. The device firmware repair method according to claim 1, characterized in that: Also includes: configuring a watchdog for monitoring system status in the target device; Accordingly, before starting the target device based on the repaired firmware, the method further includes: After the first configuration item value of the upgraded firmware is repaired to the target default value, a restart operation is triggered by the preset watchdog to restart the target device based on the repaired 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 by the basic input and output system to repair the first configuration item value of the upgraded firmware to a target default value further includes: Recording modification operation information corresponding to when the basic input / output system repairs the first configuration item value of the target configuration item; 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 starting the target device based on the repaired firmware also includes: If the target device is in a downtime state again, the basic input and output system repairs the several configuration item values ​​corresponding to the upgraded firmware that meet the preset downtime conditions to the default configuration item values ​​corresponding to the relevant pre-upgrade firmware, so as to start the target device based on the repaired firmware.

8. A device firmware repairing apparatus, characterized in that: include: A self-check module is used to trigger a system self-check operation through a basic input and output system when the target device is powered on, and obtain a corresponding self-check result; The current firmware of the basic input and output system is the upgraded firmware; A judgment module, configured to detect a target configuration item in the upgraded firmware to determine a corresponding cause of the downtime when the self-test result indicates that the target device has downtime at a target location during the startup process; wherein the target configuration item is a high-order base address of a memory-mapped input and output; A repair module is used to repair the first configuration item value of the target configuration item in the upgraded firmware through the basic input and output system when the cause of the downtime is that there is an abnormal value setting of the target configuration item, so as to repair the first configuration item value of the upgraded firmware to a 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 of the pre-upgrade firmware corresponding to the upgraded firmware.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the device firmware repair method according to 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, and when the computer program is executed by a processor, the steps of the device firmware repair method according to any one of claims 1 to 7 are implemented.

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

  • Server fault diagnosis method and device based on CPLD and storage medium

    CN117215881A

  • Server restarting method and device, storage medium and electronic equipment

    CN117573435A

  • Basic input and output system firmware programming method and device and medium

    CN118295678A