Backup method and system for CPLD firmware of server
By dividing the main and backup firmware storage areas in the server, and automatically switching and dynamically repairing between the two, the operation problem when the CPLD firmware is damaged is solved, the reliability and stability of the server are improved, and the risk of failure and downtime is reduced. .
Patent Information
- Application Number
- CN202410844001.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-29
AI Technical Summary
The storage and processing methods of CPLD firmware in the existing technology are insufficient, causing the normal operation of the server to be easily affected when the firmware is damaged, and the existing solution cannot effectively deal with the problem of firmware damage when the CPLD is running without refreshing, and the design cost and complexity are high. .
The server's flash memory is divided into a main firmware storage area and a backup firmware storage area. Both store CPLD firmware. After power-on, it is first loaded from the main firmware storage area. If the loading fails, it automatically switches to the backup firmware storage area and provides dynamic The repair mechanism intelligently repairs the damaged parts by comparing differences.
It significantly improves the reliability and stability of the server, reduces the risk of system startup failure or operation interruption due to firmware problems, improves fault tolerance and continuous operation stability, and reduces dependence on backup firmware.
Smart Images

Figure CN118860740A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a method and system for backing up CPLD firmware of a server. Background Art
[0002] With the rapid development of server technology and the emergence of new applications, CPLD (complex programmable logic device) plays an increasingly important role in the timing control, management and customized function implementation of server motherboards. In order to adapt to the ever-increasing functional requirements, the version update of CPLD firmware has become increasingly frequent. Therefore, the reliability and stability of CPLD firmware is crucial to ensure the stability of the overall performance of the server.
[0003] However, in the prior art, the storage and processing methods of CPLD firmware have obvious deficiencies. On the one hand, some servers directly burn the CPLD firmware into the flash memory without any backup. This practice can easily lead to CPLD failure when the firmware is damaged, thereby affecting the normal operation of the server. On the other hand, although some solutions use a third party such as BMC to verify the correctness of the firmware when refreshing, and roll back to the previous version in case of abnormality, this method is highly dependent on the third party and cannot deal with the problem of firmware corruption when the CPLD is not refreshed during operation. In addition, although the alternating operation of the main and standby CPLDs can provide a certain degree of redundancy, it significantly increases the design cost and complexity. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a server CPLD firmware backup method and system to solve the above-mentioned problems.
[0005] The server CPLD firmware backup method proposed in the present invention is applied to the CPLD, and the method comprises:
[0006] Dividing a main firmware storage area and a backup firmware storage area in a flash memory in a server, wherein both the main firmware storage area and the backup firmware storage area store CPLD firmware;
[0007] After power-on, the CPLD firmware is loaded from the main firmware storage area;
[0008] If the CPLD firmware in the main firmware storage area fails to load, the backup CPLD firmware is automatically loaded from the backup firmware storage area.
[0009] Furthermore, in the method:
[0010] The CPLD firmware stored in the backup firmware storage area is the same as the CPLD firmware content in the main firmware storage area, or the backup firmware storage area stores factory preset firmware.
[0011] Furthermore, the step of loading the CPLD firmware from the main firmware storage area includes:
[0012] Moving the contents of the main firmware storage area in the flash memory to the RAM;
[0013] Determine whether the CPLD firmware in the RAM is intact;
[0014] If the CPLD firmware in the RAM is intact, the CPLD firmware is loaded from the main firmware storage area and the server is started.
[0015] Furthermore, if the CPLD firmware in the main firmware storage area fails to load, the step of automatically loading the backup CPLD firmware from the backup firmware storage area includes:
[0016] If the CPLD firmware in the RAM is not intact, the backup CPLD firmware is loaded from the backup firmware storage area and the server is started.
[0017] Furthermore, after the power-on, the step of loading the CPLD firmware from the main firmware storage area also includes:
[0018] If the CPLD firmware in the main firmware storage area fails to load, detecting whether the CPLD firmware in the main firmware storage area is damaged;
[0019] If the CPLD firmware in the main firmware storage area is damaged, the damaged firmware is dynamically repaired.
[0020] Furthermore, the step of dynamically repairing the damaged firmware includes:
[0021] The firmware differences between the main firmware storage area and the backup firmware storage area are compared, and the damaged parts are intelligently repaired or rebuilt according to the firmware differences to reduce the dependence on the backup firmware.
[0022] Furthermore, the step of detecting whether the CPLD firmware in the main firmware storage area is damaged comprises:
[0023] Verifying the integrity of the CPLD firmware in the main firmware storage area;
[0024] If the integrity verification of the CPLD firmware in the main firmware storage area fails, it indicates that the CPLD firmware in the main firmware storage area is damaged.
[0025] Furthermore, the step of comparing the firmware differences between the main firmware storage area and the backup firmware storage area and intelligently repairing or rebuilding the damaged part according to the firmware differences includes:
[0026] Divide the CPLD firmware in the main firmware storage area and the CPLD firmware in the backup firmware storage area into blocks of the same size, and compare them block by block;
[0027] Mark the mismatched blocks as corrupted blocks;
[0028] For the damaged block, obtain the corresponding intact block from the backup firmware storage area for replacement;
[0029] After the repair is complete, the integrity of the CPLD firmware in the main firmware storage area is verified again to ensure that all damaged parts have been successfully repaired.
[0030] The present invention also provides a server CPLD firmware backup system, which is applied to CPLD and includes:
[0031] Backup partition module: used for dividing the main firmware storage area and the backup firmware storage area in the flash memory of the server, wherein the main firmware storage area and the backup firmware storage area both store CPLD firmware;
[0032] A first loading module: used for loading the CPLD firmware from the main firmware storage area after power-on;
[0033] The second loading module is used for automatically loading the backup CPLD firmware from the backup firmware storage area when the CPLD firmware in the main firmware storage area fails to load.
[0034] In summary, the present invention proposes a method for backing up the server CPLD firmware, which significantly improves the reliability and stability of the system by clearly dividing the main firmware storage area and the backup firmware storage area in the flash memory, and storing the CPLD firmware in both areas. After the server is powered on, the CPLD first attempts to load the CPLD firmware from the main firmware storage area. If this process fails, the CPLD will automatically jump to the backup firmware storage area to load the backup CPLD firmware. This dual protection mechanism ensures that even if the firmware in the main firmware storage area is damaged, the system can quickly recover from the backup area, thereby greatly reducing the risk of system startup failure or operation interruption due to firmware problems, and effectively improving the fault tolerance and continuous operation stability of the server.
[0035] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description or will be learned through embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0037] Figure 1 A flow chart of a method for backing up server CPLD firmware of the present invention;
[0038] Figure 2 A specific implementation flow chart of a method for backing up server CPLD firmware of the present invention;
[0039] Figure 3 A firmware partition for flash storage of the present invention;
[0040] Figure 4 The present invention is a system block diagram of a server CPLD firmware backup system. DETAILED DESCRIPTION
[0041] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0042] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0044] refer to Figures 1 to 3 The present invention provides a server CPLD firmware backup method, which is applied to CPLD. Figure 1 1 is a flowchart of a method for backing up server CPLD firmware according to one embodiment of the present invention, the process includes the following steps S101 to S103:
[0045] S101, dividing a main firmware storage area and a backup firmware storage area in a flash memory in a server, wherein both the main firmware storage area and the backup firmware storage area store CPLD firmware.
[0046] The CPLD firmware stored in the backup firmware storage area (i.e., Golden area) is identical to the CPLD firmware in the main firmware storage area (i.e., Primary area) to achieve redundant backup, or the factory preset firmware is stored in the backup firmware storage area, and when the firmware in the main firmware storage area is damaged, the factory preset firmware can be switched back to the factory preset firmware.
[0047] Dividing the main firmware storage area and the backup firmware storage area in the flash memory of the server is a key step, which ensures the double insurance mechanism of the CPLD firmware. Through this division, the server can store the CPLD firmware in both the main firmware storage area and the backup firmware storage area, thus forming an effective backup system. This design not only improves the reliability of the system, but also ensures that the firmware can be quickly restored from the backup area when the main firmware is damaged, reducing system failures and downtime. This dual storage strategy significantly enhances the fault tolerance and stability of the server, providing solid support for various applications.
[0048] S102, after power-on, loading the CPLD firmware from the main firmware storage area.
[0049] After the device is powered on, the system startup process includes an initialization phase. For electronic devices equipped with CPLD, this phase involves loading the CPLD firmware from the main firmware storage area. This is a standard process when the device is started, which is designed to ensure that the CPLD can work normally according to the predetermined configuration and functions.
[0050] In the flash memory, the main firmware storage area and the backup firmware storage area both store CPLD firmware. After power-on, the CPLD will first select the main firmware storage area for firmware loading. The main firmware storage area usually stores the latest version of the CPLD firmware to provide the latest functions and performance optimizations. If the loading is successful, the CPLD will be initialized according to the loaded firmware version and is ready to perform its predetermined logical functions.
[0051] Although the main firmware storage area is the preferred loading source, this embodiment also designs a backup mechanism to deal with possible loading failures. If the CPLD firmware in the main firmware storage area cannot be successfully loaded due to some reason (such as damage or version incompatibility), the system will trigger the error handling process and try to load the firmware from the backup firmware storage area. This double protection ensures the reliability and stability of the device.
[0052] S103: If the CPLD firmware in the main firmware storage area fails to be loaded, the backup CPLD firmware is automatically loaded from the backup firmware storage area.
[0053] After trying to load the CPLD firmware from the main firmware storage area, the system will perform an error check. Once the loading fails, which may be due to firmware corruption, version incompatibility, or other technical problems, the system will immediately trigger the switching mechanism and switch to the backup firmware storage area. The backup firmware storage area stores CPLD firmware or factory preset firmware of the same or similar version as the main firmware storage area. It is to provide a reliable alternative in case the main firmware fails to load. In this way, even if there is a problem with the main firmware, the device can resume normal operation by loading the backup firmware.
[0054] Once switched to the backup firmware storage area, the system will automatically start loading the backup CPLD firmware. This process is similar to loading from the main firmware storage area, but is usually faster because the system has detected that the main firmware failed to load, so it will complete the loading of the backup firmware as soon as possible to reduce the downtime of the device.
[0055] Through this design of automatic switching and loading of backup firmware, the stability and reliability of the device are significantly improved. Even if there is a problem with the main firmware, the device can quickly return to normal working state, reducing device failure or downtime caused by firmware problems.
[0056] The following is a further introduction to the server CPLD firmware backup method described in the above embodiment.
[0057] Further optionally, in step 102, the step of loading the CPLD firmware from the main firmware storage area includes:
[0058] Moving the contents of the main firmware storage area in the flash memory to the RAM;
[0059] Determine whether the CPLD firmware in the RAM is intact;
[0060] If the CPLD firmware in the RAM is intact, the CPLD firmware is loaded from the main firmware storage area and the server is started.
[0061] Based on the steps of loading CPLD firmware from the main firmware storage area, such as Figure 2As shown in the figure, first, the system moves the contents of the main firmware storage area in the flash memory to the RAM (random access memory), which can speed up the reading speed of the firmware, because the read and write speed of the RAM is much higher than that of the flash memory, thereby ensuring the efficiency of firmware loading. Secondly, the system will make an integrity judgment on the CPLD firmware in the RAM to ensure that the firmware loaded into the CPLD is intact and has not been tampered with, thereby avoiding equipment failure or security issues caused by firmware damage. Finally, if the CPLD firmware in the RAM is confirmed to be intact, the system will officially load the firmware from the main firmware storage area and then start the server. The successful completion of this step indicates that the server is ready to enter the normal working state and can start to provide stable and reliable services.
[0062] Further optionally, in step 103, if the CPLD firmware in the main firmware storage area fails to be loaded, the step of automatically loading the backup CPLD firmware from the backup firmware storage area includes:
[0063] If the CPLD firmware in the RAM is not intact, the backup CPLD firmware is loaded from the backup firmware storage area and the server is started.
[0064] If the system detects that the CPLD firmware in the RAM is not intact, it will immediately trigger the process of loading the backup CPLD firmware from the backup firmware storage area. After the firmware is moved to the RAM, the system will perform an integrity check, such as comparing the checksum or other verification mechanisms to confirm whether the firmware is intact. If the CPLD firmware in the RAM is detected to have errors or damage, the system will respond immediately. Once the main firmware is confirmed to be damaged, the system will turn to the backup firmware storage area. This storage area is preset when the device is designed to store backup firmware or factory preset firmware of the same or compatible version as the main firmware in case of emergency. The system automatically loads the CPLD firmware from the backup firmware storage area without manual intervention. This process ensures the rapidity of fault recovery and the continuity of device operation. After loading the backup firmware, the system will continue the startup process to restore the server to normal working state.
[0065] Based on step 101 to step 103, by clearly dividing the main firmware storage area and the backup firmware storage area in the flash memory, and storing the CPLD firmware in both areas, the reliability and stability of the system are significantly improved. After the server is powered on, the CPLD first attempts to load the CPLD firmware from the main firmware storage area. If this process fails, the CPLD will automatically jump to the backup firmware storage area to load the backup CPLD firmware. This dual protection mechanism ensures that even if the firmware in the main firmware storage area is damaged, the system can quickly recover from the backup area, thereby greatly reducing the risk of system startup failure or operation interruption caused by firmware problems, and effectively improving the server's fault tolerance and continuous operation stability.
[0066] Firmware backup is a key measure to prevent firmware damage. During the operation of the device, the firmware may be damaged or lost due to various reasons (such as hardware failure, power failure, external interference, etc.). If there is no backup, the normal operation of the device may be seriously affected, and may even cause the device to stop working completely. Therefore, by backing up the firmware, you can restore it in time when there is a problem with the firmware to ensure the normal operation of the device.
[0067] Secondly, firmware backup is the basis for device upgrade and maintenance. With the advancement of technology, the firmware of the device needs to be continuously upgraded to meet new application requirements. During the upgrade process, if any problems occur, the backup firmware can be used as a basis for rollback to avoid irreparable problems with the device.
[0068] Therefore, whether from the perspective of preventing data loss, equipment upgrades and maintenance, or ensuring information security, firmware backup needs to be implemented to ensure the normal operation of the equipment and meet various application requirements.
[0069] Further optionally, after step 102, after the power-on, the step of loading the CPLD firmware from the main firmware storage area further includes:
[0070] If the CPLD firmware in the main firmware storage area fails to load, detecting whether the CPLD firmware in the main firmware storage area is damaged;
[0071] If the CPLD firmware in the main firmware storage area is damaged, the damaged firmware is dynamically repaired.
[0072] Based on this step, if the CPLD firmware in the main firmware storage area fails to load, the system will first detect whether the firmware in this area is damaged. This step is usually completed through checksums, hash value comparisons, or other error detection mechanisms to accurately identify whether the firmware is intact. Once the CPLD firmware in the main firmware storage area is detected to be damaged, the system will attempt to dynamically repair the damaged firmware. Dynamic repair can involve replacing the damaged part with a backup data block, rewriting the firmware code, or using the device's self-repair mechanism to restore the normal function of the firmware. Further enhancing the reliability of the system, it also reduces excessive reliance on backup firmware, and can reduce the risk of backup firmware damage or aging due to frequent use of backups.
[0073] Further optionally, the step of dynamically repairing the damaged firmware includes:
[0074] The firmware differences between the main firmware storage area and the backup firmware storage area are compared, and the damaged parts are intelligently repaired or rebuilt according to the firmware differences to reduce the dependence on the backup firmware.
[0075] Based on the steps of dynamically repairing damaged firmware, first, compare the firmware differences between the main firmware storage area and the backup firmware storage area. By comparing the firmware contents in the two storage areas in detail, the damaged or missing parts in the main firmware can be identified. Secondly, based on the comparison results, the damaged firmware parts can be intelligently patched or rebuilt. This process may involve using the corresponding data blocks in the backup firmware to replace or repair the damaged content in the main firmware, thereby ensuring the integrity and functionality of the firmware. Importantly, this dynamic repair method aims to reduce the overall reliance on backup firmware and improve repair efficiency and accuracy by accurately patching the damaged parts rather than completely replacing the entire firmware. This method not only helps to quickly restore the normal operation of the equipment, but also optimizes resource utilization and reduces maintenance costs and time.
[0076] Further optionally, the step of detecting whether the CPLD firmware in the main firmware storage area is damaged includes:
[0077] Verifying the integrity of the CPLD firmware in the main firmware storage area;
[0078] If the integrity verification of the CPLD firmware in the main firmware storage area fails, it indicates that the CPLD firmware in the main firmware storage area is damaged.
[0079] Based on the steps of detecting whether the CPLD firmware in the main firmware storage area is damaged, first, the integrity of the CPLD firmware in the main firmware storage area is verified to determine whether the firmware is available. This process can ensure that the firmware data is not tampered with or damaged during storage and transmission through specific algorithms, such as checksum calculation or hash value comparison. If the integrity verification of the CPLD firmware in the main firmware storage area fails, that is, the result obtained by the algorithm does not meet expectations, it is determined that the CPLD firmware in this area is damaged. This damage may be caused by physical reasons (such as aging of the storage medium, electromagnetic interference, etc.) or logical errors (such as unexpected interruptions during the firmware update process). Once damage is detected, corresponding repair measures will be taken.
[0080] Further optionally, the step of comparing the firmware difference between the main firmware storage area and the backup firmware storage area, and intelligently repairing or rebuilding the damaged part according to the firmware difference includes:
[0081] Divide the CPLD firmware in the main firmware storage area and the CPLD firmware in the backup firmware storage area into blocks of the same size, and compare them block by block;
[0082] Mark the mismatched blocks as corrupted blocks;
[0083] For the damaged block, obtain the corresponding intact block from the backup firmware storage area for replacement;
[0084] After the repair is complete, the integrity of the CPLD firmware in the main firmware storage area is verified again to ensure that all damaged parts have been successfully repaired.
[0085] Based on the steps of comparing the firmware differences between the main firmware storage area and the backup firmware storage area, and intelligently repairing or rebuilding the damaged parts according to these differences, first, the CPLD firmware in the main firmware storage area and the backup firmware storage area are divided into blocks of the same size, and then these blocks are compared block by block. This block comparison method can accurately locate the damaged parts in the firmware. Secondly, during the comparison process, those unmatched blocks are marked as damaged blocks, and these damaged blocks are targets that need to be repaired. Then, for each block marked as damaged, the corresponding intact block is obtained from the backup firmware storage area for replacement. Specifically, the intact block can be copied to the corresponding position of the main firmware storage area to cover the damaged part. By replacing the damaged block, the normal function of the firmware can be restored. Finally, after the repair is completed, the integrity of the CPLD firmware in the main firmware storage area is verified again to ensure that all damaged parts have been successfully repaired and the firmware has been restored to a state where it can work normally.
[0086] The following is a specific implementation step of a method for backing up the server CPLD firmware of this embodiment. The specific implementation steps are as follows:
[0087] A backup partition is provided in the flash storing the CPLD firmware, and two sets of FPGA bit streams are stored in the SPI FLASH. After power-on, the CPLD first loads the Primary bit stream. If the Primary bit stream fails to load due to an error, the Golden bit stream will be loaded according to the GoldenAddress (i.e., the jump address).
[0088] In SPI FLASH, two sets of FPGA bit streams are stored, which are called Primary bit stream and Golden bit stream. When the system is powered on, CPLD will first try to load Primary bit stream. This is the preferred operation in the normal startup process because it usually contains the latest configuration information. If the Primary bit stream fails to load due to an error for some reason, CPLD will start the error handling mechanism. At this time, the backup Golden bit stream will be loaded according to the preset Golden Address (jump address). Golden bit stream is usually a verified stable version, which is used to provide a reliable backup boot option when the system has problems. With this design, even if the Primary bit stream is damaged, the system can restore the boot capability by loading the Golden bit stream. This significantly improves the reliability of the system and ensures that the device can still start and run normally when critical firmware fails.
[0089] Glossary of terms in this embodiment:
[0090] CPLD (Complex Programmable Logic Device): A complex programmable logic device, which is a digital integrated circuit that can be programmed by users to implement specific logic functions according to their needs.
[0091] Flash: A non-volatile storage medium used to store data and programs. Data stored in flash remains unchanged even after power is removed.
[0092] Primary area: In this embodiment, it refers to the main firmware storage area, which is the area for storing the primary bitstream. When the system is started or reset, it will first try to load the bitstream from this area. The Primary area usually contains the latest or preferred firmware version for normal startup and operation of the device.
[0093] Golden area: In this embodiment, it refers to the backup firmware storage area, which is the area for storing the backup bitstream (Golden bitstream). When the bitstream in the Primary area fails to load, the system will turn to the Golden area to load the bitstream. The Golden area provides a recovery mechanism to ensure that when the Primary bitstream fails, the device can still start and run in a known stable state.
[0094] For further reference, Figure 4 The present invention also provides a server CPLD firmware backup system, which is used to implement the server CPLD firmware backup method, and is applied to CPLD, comprising:
[0095] Backup partition module: used for dividing the main firmware storage area and the backup firmware storage area in the flash memory of the server, wherein the main firmware storage area and the backup firmware storage area both store CPLD firmware;
[0096] A first loading module: used for loading the CPLD firmware from the main firmware storage area after power-on;
[0097] The second loading module is used for automatically loading the backup CPLD firmware from the backup firmware storage area if the CPLD firmware loading in the main firmware storage area fails.
[0098] Further optionally, the CPLD firmware stored in the backup firmware storage area is identical to the CPLD firmware in the main firmware storage area, or the backup firmware storage area stores factory preset firmware.
[0099] Further optionally, the first loading module is further used for:
[0100] Moving the contents of the main firmware storage area in the flash memory to the RAM;
[0101] Determine whether the CPLD firmware in the RAM is intact;
[0102] If the CPLD firmware in the RAM is intact, the CPLD firmware is loaded from the main firmware storage area and the server is started.
[0103] Further optionally, the second loading module is also used for:
[0104] If the CPLD firmware in the RAM is not intact, the backup CPLD firmware is loaded from the backup firmware storage area and the server is started.
[0105] Further optionally, the first loading module is further used for:
[0106] If the CPLD firmware in the main firmware storage area fails to load, detecting whether the CPLD firmware in the main firmware storage area is damaged;
[0107] If the CPLD firmware in the main firmware storage area is damaged, the damaged firmware is dynamically repaired.
[0108] Further optionally, the first loading module is further used for:
[0109] The firmware differences between the main firmware storage area and the backup firmware storage area are compared, and the damaged parts are intelligently repaired or rebuilt according to the firmware differences to reduce the dependence on the backup firmware.
[0110] Further optionally, the first loading module is further used for:
[0111] Verifying the integrity of the CPLD firmware in the main firmware storage area;
[0112] If the integrity verification of the CPLD firmware in the main firmware storage area fails, it indicates that the CPLD firmware in the main firmware storage area is damaged.
[0113] Further optionally, the first loading module is further used for:
[0114] Divide the CPLD firmware in the main firmware storage area and the CPLD firmware in the backup firmware storage area into blocks of the same size, and compare them block by block;
[0115] Mark the mismatched blocks as corrupted blocks;
[0116] For the damaged block, obtain the corresponding intact block from the backup firmware storage area for replacement;
[0117] After the repair is complete, the integrity of the CPLD firmware in the main firmware storage area is verified again to ensure that all damaged parts have been successfully repaired.
[0118] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for backing up server CPLD firmware, applied to CPLD, characterized in that: The method comprises: Dividing a main firmware storage area and a backup firmware storage area in a flash memory in a server, wherein both the main firmware storage area and the backup firmware storage area store CPLD firmware; After power-on, the CPLD firmware is loaded from the main firmware storage area; If the CPLD firmware in the main firmware storage area fails to load, the backup CPLD firmware is automatically loaded from the backup firmware storage area.
2. The method for backing up server CPLD firmware according to claim 1, wherein: In the method: The CPLD firmware stored in the backup firmware storage area is the same as the CPLD firmware content in the main firmware storage area, or the backup firmware storage area stores factory preset firmware.
3. The backup method of server CPLD firmware according to claim 1, wherein: The step of loading CPLD firmware from the main firmware storage area comprises: Moving the contents of the main firmware storage area in the flash memory to the RAM; Determine whether the CPLD firmware in the RAM is intact; If the CPLD firmware in the RAM is intact, the CPLD firmware is loaded from the main firmware storage area and the server is started.
4. The method for backing up server CPLD firmware according to claim 3, wherein: If the CPLD firmware in the main firmware storage area fails to load, the step of automatically loading the backup CPLD firmware from the backup firmware storage area comprises: If the CPLD firmware in the RAM is not intact, the backup CPLD firmware is loaded from the backup firmware storage area and the server is started.
5. The method for backing up server CPLD firmware according to claim 1, wherein: After the power-on, the step of loading the CPLD firmware from the main firmware storage area also includes: If the CPLD firmware in the main firmware storage area fails to load, detecting whether the CPLD firmware in the main firmware storage area is damaged; If the CPLD firmware in the main firmware storage area is damaged, the damaged firmware is dynamically repaired.
6. The method for backing up server CPLD firmware according to claim 5, wherein: The steps of dynamically repairing the damaged firmware include: The firmware differences between the main firmware storage area and the backup firmware storage area are compared, and the damaged parts are intelligently repaired or rebuilt according to the firmware differences to reduce the dependence on the backup firmware.
7. The method for backing up server CPLD firmware according to claim 5, wherein: The step of detecting whether the CPLD firmware in the main firmware storage area is damaged comprises: Verifying the integrity of the CPLD firmware in the main firmware storage area; If the integrity verification of the CPLD firmware in the main firmware storage area fails, it indicates that the CPLD firmware in the main firmware storage area is damaged.
8. The method for backing up the server CPLD firmware according to claim 6 or 7, wherein: The step of comparing the firmware difference between the main firmware storage area and the backup firmware storage area and intelligently repairing or rebuilding the damaged part according to the firmware difference comprises: Divide the CPLD firmware in the main firmware storage area and the CPLD firmware in the backup firmware storage area into blocks of the same size, and compare them block by block; Mark the mismatched blocks as corrupted blocks; For the damaged block, obtain the corresponding intact block from the backup firmware storage area for replacement; After the repair is complete, the integrity of the CPLD firmware in the main firmware storage area is verified again to ensure that all damaged parts have been successfully repaired.
9. A server CPLD firmware backup system, applied to CPLD, characterized in that: include: Backup partition module: used for dividing the main firmware storage area and the backup firmware storage area in the flash memory of the server, wherein the main firmware storage area and the backup firmware storage area both store CPLD firmware; A first loading module: used for loading the CPLD firmware from the main firmware storage area after power-on; The second loading module is used for automatically loading the backup CPLD firmware from the backup firmware storage area when the CPLD firmware in the main firmware storage area fails to load.
Citation Information
Cited By
Storage and firmware backup method
CN119621437A
