Firmware upgrading method and device, equipment, storage medium and program product

By copying the first firmware to the target storage space during the CPLD firmware upgrade process and executing the effective process of the second firmware when the conditions are met, the problem that CPLD cannot provide stable power control services during the firmware upgrade process is solved, and the reliability of the server is improved.

CN120215971APending Publication Date: 2025-06-27DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311830411.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

During the CPLD firmware upgrade process, CPLD cannot provide stable power management and control services to the server, resulting in the server shutdown and unable to operate normally.

Method used

The first firmware before the upgrade is copied to the target storage space by controlling the CPLD, and after the first firmware is copied, the second firmware used for the firmware upgrade is written to the firmware storage space of the CPLD. If the firmware effective conditions are not met, the control CPLD operates based on the first firmware in the target storage space; if the firmware effective conditions are met, the firmware effective process is performed for the second firmware so that the CPLD operates based on the second firmware.

Benefits of technology

During the firmware upgrade and effective process of CPLD, CPLD can simultaneously run the first firmware copied to the target storage space in advance and only execute the firmware implementation process for the second firmware when the firmware implementation conditions are met, thereby avoiding the problem that the server cannot operate normally and improving the service reliability of CPLD.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215971A_ABST
    Figure CN120215971A_ABST
Patent Text Reader

Abstract

The invention relates to a firmware upgrading method and device, equipment, a storage medium and a program product. The method comprises the following steps of: controlling a complex programmable logic device (CPLD) to copy a first firmware before upgrading to a target storage space, writing a second firmware for firmware upgrading into a firmware storage space of the CPLD after the first firmware is copied, and if a firmware effective condition is not met, writing the second firmware into the firmware storage space of the CPLD; if yes, the CPLD is controlled to work based on the first firmware in the target storage space, and if the firmware effective condition is met, a firmware effective process is executed for the second firmware, so that the CPLD works based on the second firmware. By adopting the method, the service reliability of the CPLD can be improved in the firmware upgrading process of the CPLD.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies, and particularly to a firmware upgrade method, apparatus, device, storage medium, and program product. Background Art

[0002] With the rapid development of computer technologies, the software and firmware of electronic products also need to be continuously upgraded. For example, the CPLD (Complex Programmable Logic Device) firmware of the CPLD chip deployed in a server is upgraded.

[0003] In the prior art, the BMC (Baseboard Management Controller) deployed in a server can be used to perform an online upgrade of the CPLD firmware. However, since the CPLD firmware controls and manages the power supply of the entire server, when the CPLD firmware is upgraded, the CPLD cannot normally provide stable power management services for the server, resulting in the shutdown of the server and making the server unable to operate normally.

[0004] Therefore, the above firmware upgrade method has the problem of poor service reliability of the CPLD. Summary of the Invention

[0005] Based on this, it is necessary to provide a firmware upgrade method, apparatus, device, storage medium, and program product that can improve the service reliability of the CPLD during the firmware upgrade process of the CPLD for the above technical problems.

[0006] In a first aspect, this application provides a firmware upgrade method for a Baseboard Management Controller (BMC), and the method includes:

[0007] Controlling a Complex Programmable Logic Device (CPLD) to copy a first firmware before upgrade to a target storage space, and after the copying of the first firmware is completed, writing a second firmware for firmware upgrade into the firmware storage space of the CPLD;

[0008] If the firmware activation condition is not satisfied, controlling the CPLD to operate based on the first firmware in the target storage space;

[0009] If the firmware activation condition is satisfied, performing a firmware activation process on the second firmware to enable the CPLD to operate based on the second firmware.

[0010] In the above embodiments, during the process of firmware upgrade and activation of the CPLD, the CPLD can simultaneously run the first firmware before upgrade that has been previously copied to the target storage space, and will only execute the firmware activation process for the second firmware when the firmware activation condition is met, so as to avoid the problem that the server cannot operate normally due to the inability to provide stable power management services to the server during the upgrade and activation process of the CPLD firmware, and improve the service reliability of the CPLD.

[0011] In one of the embodiments, controlling the CPLD to copy the first firmware before upgrade to the target storage space includes:

[0012] Determine whether the current upgrade condition configured in the BMC is met;

[0013] If the upgrade condition is met, execute the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

[0014] In the above embodiments, the BMC needs to determine whether the current upgrade condition is met before upgrading the first firmware stored in the firmware storage space of the CPLD. Only when the upgrade condition is met can the subsequent firmware upgrade steps be executed, improving the security of the firmware upgrade.

[0015] In one of the embodiments, determining whether the current upgrade condition configured in the baseboard management controller (BMC) is met includes:

[0016] Determine whether the uploaded second firmware is received and whether a firmware upgrade instruction is received;

[0017] If the second firmware and the firmware upgrade instruction are received, it is determined that the upgrade condition is met.

[0018] In the above embodiments, using whether the second firmware and the firmware upgrade instruction are received as the basis for whether the upgrade condition is met ensures that the BMC must obtain the second firmware before upgrading the first firmware, improving the security of the firmware upgrade.

[0019] In one of the embodiments, the method includes:

[0020] Obtain the power status of the server;

[0021] Determine whether the firmware activation condition is met according to the power status.

[0022] In the above embodiments, the BMC determines whether the current power status of the server meets the firmware activation condition before executing the firmware activation process for the second firmware, and will only execute the firmware activation process when the firmware activation condition is met, improving the reliability of the firmware activation process.

[0023] In one embodiment, determining whether the firmware activation condition is satisfied according to the power state includes:

[0024] If the power state is the shutdown state, it is determined that the firmware activation condition is satisfied.

[0025] In the above embodiment, the BMC determines that the firmware activation condition is satisfied only when the power state is shutdown, and then executes the subsequent firmware activation process, avoiding the server from shutting down or restarting suddenly due to the execution of the firmware activation process, thus interrupting the business that may be in progress, and improving the service reliability of the server.

[0026] In one embodiment, the method further includes:

[0027] If the firmware activation condition is not satisfied, a waiting-for-activation flag is set;

[0028] In the presence of the flag, it is periodically detected whether the firmware activation condition is satisfied.

[0029] In the above embodiment, the BMC sets a waiting-for-activation flag when the firmware activation condition is not satisfied, enabling the BMC to determine whether the second firmware for firmware upgrade is effective based on the waiting-for-activation flag, improving the reliability of firmware activation.

[0030] In a second aspect, the present application provides a firmware upgrade method using a CPLD, and the method includes:

[0031] According to the control of the BMC, the first firmware before upgrade is copied to the target storage space, and after the copying of the first firmware is completed, the second firmware for firmware upgrade is written into the firmware storage space;

[0032] If the firmware activation condition is not satisfied, work is performed based on the first firmware in the target storage space according to the control of the BMC;

[0033] If the firmware activation condition is satisfied, after the BMC executes the firmware activation process for the second firmware, work is performed based on the second firmware.

[0034] In a third aspect, the present application further provides a firmware upgrade device for a baseboard management controller BMC, and the device includes:

[0035] A control module for controlling the CPLD to copy the original first firmware to the target storage space, and after the copying of the first firmware is completed, writing the second firmware for firmware upgrade into the firmware storage space of the CPLD;

[0036] A waiting-for-activation module for controlling the CPLD to work based on the first firmware in the target storage space if the firmware activation condition is not satisfied;

[0037] An activation module, configured to perform a firmware activation process on a second firmware if a firmware activation condition is satisfied, so that the CPLD operates based on the second firmware.

[0038] In a fourth aspect, the present application further provides a firmware upgrade device for a CPLD. The device includes:

[0039] A copy and write module, configured to copy a first firmware before upgrade to a target storage space according to the control of the BMC, and after the copying of the first firmware is completed, write a second firmware for firmware upgrade into the firmware storage space;

[0040] A first firmware operation module, configured to operate based on the first firmware in the target storage space according to the control of the BMC if the firmware activation condition is not satisfied;

[0041] A second firmware operation module, configured to operate based on the second firmware after the BMC performs a firmware activation process on the second firmware if the firmware activation condition is satisfied.

[0042] In a fifth aspect, an embodiment of the present application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the methods in the first aspect and the second aspect as described above are implemented.

[0043] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods in the first aspect and the second aspect as described above are implemented.

[0044] In a seventh aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the methods in the first aspect and the second aspect as described above are implemented.

[0045] The above firmware upgrade method, device, equipment, storage medium, and program product control a Complex Programmable Logic Device (CPLD) to copy the first firmware before upgrade to a target storage space. After the copying of the first firmware is completed, the second firmware for firmware upgrade is written into the firmware storage space of the CPLD. Then, if the firmware activation condition is not met, the CPLD is controlled to work based on the first firmware in the target storage space. If the firmware activation condition is met, a firmware activation process is executed for the second firmware so that the CPLD works based on the second firmware. In this way, during the firmware upgrade and activation process of the CPLD, the CPLD can simultaneously run the first firmware before upgrade that was previously copied to the target storage space, and the firmware activation process for the second firmware is only executed when the firmware activation condition is met, to avoid the problem that the server cannot operate normally due to the inability to provide stable power management services to the server during the firmware upgrade and activation process of the CPLD, and improve the service reliability of the CPLD. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 It is an application environment diagram of the firmware upgrade method in an embodiment;

[0048] Figure 2 It is a flowchart of the firmware upgrade method for BMC in an embodiment;

[0049] Figure 3 It is a flowchart of step 201 in another embodiment;

[0050] Figure 4 It is a flowchart of determining whether the firmware activation condition is met in another embodiment;

[0051] Figure 5 It is a flowchart of the firmware upgrade method for CPLD in an embodiment;

[0052] Figure 6 It is a flowchart of an exemplary firmware upgrade method in an embodiment;

[0053] Figure 7 It is a structural block diagram of the firmware upgrade device for BMC in an embodiment;

[0054] Figure 8It is a structural block diagram of a firmware upgrade device for a CPLD in an embodiment;

[0055] Figure 9 It is an internal structure diagram of a computer device in an embodiment. Specific implementation manners

[0056] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] With the rapid development of computer technology, the software and firmware of electronic products also need to be continuously upgraded. For example, the CPLD firmware of the CPLD chip (Complex Programmable Logic Device) deployed in the server needs to be upgraded.

[0058] In the prior art, the BMC (Baseboard Management Controller) deployed in the server can be used to perform online upgrade of the CPLD firmware. However, since the CPLD firmware controls and manages the power supply of the entire server, when the CPLD firmware is upgraded, the CPLD cannot normally provide stable power management services for the server, and the power supply system will be initialized, resulting in the shutdown of the server and the server cannot run normally.

[0059] Therefore, the above firmware upgrade method has the problem of poor service reliability of the CPLD.

[0060] In view of this, the embodiments of the present application provide a firmware upgrade method, device, equipment, storage medium and program product. By controlling the complex programmable logic device CPLD to copy the first firmware before upgrade to the target storage space, and after the first firmware is copied, writing the second firmware for firmware upgrade into the firmware storage space of the CPLD. Then, if the firmware activation condition is not met, control the CPLD to work based on the first firmware in the target storage space. If the firmware activation condition is met, perform the firmware activation process for the second firmware, so that the CPLD works based on the second firmware. In this way, during the firmware upgrade and activation process of the CPLD, the CPLD can simultaneously run the first firmware before upgrade that is copied to the target storage space in advance, and will only execute the firmware activation process for the second firmware when the firmware activation condition is met, so as to avoid the problem that the server cannot run normally due to the inability to provide stable power management services to the server during the upgrade and activation process of the CPLD firmware, and improve the service reliability of the CPLD.

[0061] The firmware upgrade method provided by the embodiments of this application can be applied to, for example, Figure 1 the application environment shown. Among them, CPLD102 is connected to BMC104 through a hardware interface.

[0062] In an exemplary embodiment, as Figure 2 shown, a firmware upgrade method is provided. Taking the BMC104 in Figure 1 as an example, the method includes the following steps:

[0063] Step 201, control the Complex Programmable Logic Device (CPLD) to copy the first firmware before upgrade to the target storage space, and after the first firmware is copied, write the second firmware for firmware upgrade into the firmware storage space of the CPLD.

[0064] When the BMC upgrades the firmware of the CPLD, the first firmware before the CPLD upgrade will be upgraded to the second firmware. Therefore, before the BMC upgrades the firmware of the CPLD, the second firmware for firmware upgrade will be obtained. Regarding the method for obtaining the second firmware, optionally, the BMC obtains the second firmware uploaded by the user through other devices; optionally, the BMC sends a request to the remote server to receive the second firmware sent by the remote service. The method for the BMC to obtain the second firmware is not specifically limited herein.

[0065] The firmware of the CPLD (i.e., the first firmware) is usually stored in the firmware storage space, and this firmware storage space usually exists in a non-volatile memory. When upgrading the first firmware of the CPLD, usually the second firmware for firmware upgrade is written into this firmware storage space to replace the first firmware, but this will affect the operation of the first firmware before upgrade in the original storage space. Therefore, in the embodiments of this application, before the BMC upgrades the first firmware of the CPLD, it will control the CPLD to copy the first firmware before upgrade to the target storage space. The target storage space is a storage space that does not belong to the non-volatile memory, and when the content in the target storage space is running, the content in the target storage space cannot be modified. For example, the target storage space belongs to the memory of the CPLD.

[0066] Regarding the method for the BMC to obtain the first firmware and control the CPLD to copy the first firmware to the target storage space, optionally, the BMC controls the CPLD to copy the first firmware originally stored in the firmware storage space to the target storage space; optionally, the BMC obtains the first firmware from other devices, and then controls the CPLD to copy the first firmware to the target storage space.

[0067] After the BMC controls the CPLD to copy the first firmware to the target storage space, when writing the second firmware to the firmware storage space, it can simultaneously control the CPLD to run the first firmware in the target storage space, so that the power management service provided to the server is not affected.

[0068] The method for the BMC to write the second firmware to the firmware storage space is as follows: First, the BMC generates an erase instruction, which is used to instruct the CPLD to erase the first firmware stored in the firmware storage space; then, the BMC generates a write instruction, which is used to instruct the CPLD to write the second firmware to the firmware storage space; then, the BMC generates a verification instruction to verify the content stored in the firmware storage space of the CPLD to determine whether the second firmware is correctly written to the firmware storage space of the CPLD.

[0069] The following describes the process of the BMC verifying the content stored in the firmware storage space of the CPLD.

[0070] Optionally, the BMC compares the content read from the firmware storage space of the CPLD with the second firmware line by line, and the comparison result can be used to indicate whether the second firmware is correctly written to the firmware storage space; optionally, the BMC generates a first verification code corresponding to the second firmware according to a preset verification condition, and then generates a second verification code corresponding to the content read from the firmware storage space of the CPLD according to the same preset verification condition, and compares the first verification code with the second verification code, and the comparison result can be used to indicate whether the second firmware is correctly written to the firmware storage space.

[0071] Step 202, if the firmware activation condition is not met, control the CPLD to work based on the first firmware in the target storage space.

[0072] After the BMC controls the CPLD to successfully write the second firmware to the firmware storage space of the CPLD, it is also necessary to perform an activation process on the second firmware in the firmware storage space of the CPLD before the CPLD can work based on the second firmware.

[0073] In a possible implementation, the BMC needs to determine whether the current environment meets the firmware activation condition, so as to determine whether the activation process can be performed on the second firmware.

[0074] Regarding the method for the BMC to obtain the firmware activation condition, optionally, the firmware activation condition is stored in the BMC, and the BMC can directly obtain the firmware activation condition; optionally, the firmware activation condition is stored in the CPLD, and the BMC sends a request to the CPLD to obtain the firmware activation condition feedback by the CPLD. The method for the BMC to obtain the firmware activation condition is not specifically limited here.

[0075] After the BMC controls the CPLD to correctly write the second firmware into the firmware storage space, it will determine whether the current operating environment meets the firmware activation conditions. In the embodiment of the present application, if the BMC determines that the current operating environment does not meet the firmware activation conditions, it will continue to control the CPLD to run the first firmware in the target storage space to avoid the CPLD incorrectly running the unactivated second firmware that has been written into the firmware storage space, so that the stable power management service provided to the server is not affected.

[0076] When the BMC determines that the current operating environment does not meet the firmware activation conditions, while continuing to control the CPLD to run the first firmware in the target storage space, it will also monitor the status of the operating environment in real time until the BMC detects that the current operating environment meets the firmware activation conditions, and then it will execute the activation process for the second firmware.

[0077] In a possible implementation manner, the BMC determines the current operating environment. If it does not meet the firmware activation conditions, it will set a waiting activation flag. In the presence of the flag, it will periodically detect whether the firmware activation conditions are met. When the BMC detects that the current operating environment meets the firmware activation conditions, after executing the firmware activation process for the second firmware, it will eliminate the waiting activation flag. In this way, when the BMC executes the firmware activation process for the second firmware and still detects the waiting activation flag, it can be determined that the firmware activation process fails. The BMC monitors in real time whether the current conditions for firmware activation are met, and then, when the conditions for firmware activation are met, it will execute the firmware activation process for the second firmware again.

[0078] Step 203, if the firmware activation conditions are met, then execute the firmware activation process for the second firmware so that the CPLD works based on the second firmware.

[0079] In a possible implementation manner, after the BMC controls the CPLD to correctly write the second firmware into the firmware storage space, if it determines that the current operating environment meets the firmware activation conditions, it will directly execute the firmware activation process for the second firmware so that the CPLD works based on the second firmware; in another possible implementation manner, after the BMC controls the CPLD to correctly write the second firmware into the firmware storage space, if it determines that the current operating environment does not meet the firmware activation conditions, it will monitor the status of the operating environment in real time until the BMC detects that the current operating environment meets the firmware activation conditions, and then it will execute the activation process for the second firmware.

[0080] The above firmware upgrade method copies the first firmware before upgrade to the target storage space by controlling a complex programmable logic device (CPLD). After the copying of the first firmware is completed, the second firmware for firmware upgrade is written into the firmware storage space of the CPLD. Then, if the firmware activation condition is not met, the CPLD is controlled to work based on the first firmware in the target storage space. If the firmware activation condition is met, the firmware activation process is executed for the second firmware so that the CPLD works based on the second firmware. In this way, during the firmware upgrade and activation process of the CPLD, the CPLD can simultaneously run the first firmware before upgrade that has been copied to the target storage space in advance, and the firmware activation process for the second firmware will only be executed when the firmware activation condition is met, so as to avoid the problem that the server cannot run normally due to the inability to provide stable power management services to the server during the firmware upgrade and activation process of the CPLD, and improve the service reliability of the CPLD.

[0081] In one embodiment, based on the above Figure 2 illustrated embodiment, refer to Figure 3 , this embodiment relates to the process of controlling the CPLD to copy the first firmware before upgrade to the target storage space. As Figure 3 shown, step 201 includes:

[0082] Step 301, determine whether the current upgrade condition configured in the BMC is met.

[0083] The upgrade condition is used for the BMC to determine whether the current operating environment can upgrade the first firmware stored in the firmware storage space of the CPLD according to the upgrade condition.

[0084] In a possible implementation, the BMC needs to determine whether the current operating environment meets the upgrade condition configured in the BMC. After the operating environment meets the upgrade condition configured in the BMC, the BMC can execute the subsequent firmware upgrade steps.

[0085] Regarding the method for the BMC to determine whether the current upgrade condition configured in the BMC is met, in a possible implementation, the BMC needs to determine whether the uploaded second firmware is received and whether the firmware upgrade instruction is received. If the second firmware and the firmware upgrade instruction are received, it is determined that the upgrade condition is met.

[0086] Among them, the firmware upgrade instruction is an instruction for the BMC to upgrade the first firmware in the firmware storage space of the CPLD according to the second firmware. Optionally, the BMC obtains the firmware upgrade instruction uploaded by the user through other devices; optionally, the BMC obtains the firmware upgrade instruction sent regularly in the system. The method for the BMC to obtain the CPLD firmware upgrade instruction is not specifically limited here.

[0087] Step 302, if the upgrade condition is met, execute the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

[0088] When the BMC detects that the current upgrade condition is met, it can start to execute the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

[0089] Thus, in the above embodiment, the BMC needs to determine whether the current upgrade condition is met before upgrading the first firmware stored in the firmware storage space of the CPLD. Only when the upgrade condition is met can the subsequent firmware upgrade steps be executed, improving the security of firmware upgrade.

[0090] In one embodiment, based on the above Figure 2 illustrated embodiment, refer to Figure 4 , this embodiment relates to the process of determining whether the current firmware activation condition is met. As Figure 4 illustrated, this process includes:

[0091] Step 401, obtain the power state of the server.

[0092] In a possible implementation manner, the firmware activation condition is that the server is in the shutdown state. Therefore, the BMC needs to obtain the power state of the server, and then determine whether the firmware activation condition is met according to the power state.

[0093] Step 402, determine whether the firmware activation condition is met according to the power state.

[0094] Optionally, if the power state is the shutdown state, it is determined that the firmware activation condition is met. At this time, the BMC executes the firmware activation process for the second firmware, enabling the CPLD to be initialized. After the power state of the server is turned on again, the second firmware becomes effective and the CPLD can work based on the second firmware. Optionally, if the power state is the normal running state, the BMC determines that the current firmware activation condition is not met. At this time, the BMC monitors the power state of the server in real time until the power state meets the firmware activation condition, and then executes the firmware activation process.

[0095] Thus, in the above embodiment, the BMC determines whether the current power state of the server meets the firmware activation condition before executing the firmware activation process for the second firmware. Only when the firmware activation condition is met will the firmware activation process be executed, avoiding the server being suddenly shut down due to the execution of the firmware activation process, thereby interrupting the possibly ongoing business and improving the service reliability of the server.

[0096] In one embodiment, as Figure 5 illustrated, a firmware upgrade method is provided. This method is applied to Figure 1Taking CPLD102 in [the relevant context] as an example for illustration, it includes the following steps:

[0097] Step 501, according to the control of the BMC, copy the first firmware before upgrade to the target storage space, and after the copying of the first firmware is completed, write the second firmware for firmware upgrade into the firmware storage space.

[0098] In a possible implementation manner, when the CPLD performs firmware upgrade, it will copy the first firmware to the target storage space according to the control of the BMC. For the method by which the BMC obtains the first firmware and controls the CPLD to copy the first firmware to the target storage space, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.

[0099] After the CPLD copies the first firmware to the target storage space, it will write the second firmware into the firmware storage space of the CPLD according to the control of the BMC. The firmware storage space usually exists in the non-volatile memory. For the method by which the CPLD writes the second firmware into the firmware storage space based on the control of the BMC, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.

[0100] Step 502, if the firmware activation condition is not met, work based on the first firmware in the target storage space according to the control of the BMC.

[0101] In the embodiments of the present application, it is necessary for the BMC to judge whether the current environment meets the firmware activation condition. For the method by which the BMC specifically obtains the firmware activation condition and the method of judging whether the firmware activation condition is met, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.

[0102] When the BMC judges that the current environment does not meet the firmware activation condition, the CPLD will work based on the first firmware in the target storage space according to the control of the BMC, that is, at this time, the CPLD runs the first firmware in the target storage space according to the control of the BMC to provide stable power management services to the server.

[0103] Step 503, if the firmware activation condition is met, after the BMC executes the firmware activation process for the second firmware, work based on the second firmware.

[0104] When the BMC judges that the current environment meets the firmware activation condition, the BMC will execute the firmware activation process for the second firmware. For the process by which the BMC executes the activation process for the second firmware, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.

[0105] After the second firmware is activated, the CPLD can run the second firmware in the firmware storage space to perform work, and the firmware activation is completed.

[0106] In the above embodiments, the CPLD copies the first firmware before the upgrade to the target storage space in advance based on the control of the BMC, so that the CPLD can work based on the first firmware in the target storage space according to the control of the BMC during the subsequent firmware upgrade and activation process, and will only work based on the second firmware after the second firmware is activated, so as to avoid the problem that the server cannot operate normally caused by the inability to provide stable power management services to the server due to the need to write the second firmware to the firmware storage space during the firmware upgrade and activation process, and improve the service reliability of the CPLD.

[0107] In one embodiment, please refer to Figure 6 , which shows a flowchart of an exemplary firmware upgrade method provided by an embodiment of the present application. The method includes:

[0108] Step 601, the BMC determines whether the uploaded second firmware is received and whether a firmware upgrade instruction is received.

[0109] Step 602, if the BMC receives the second firmware and the firmware upgrade instruction, it determines that the upgrade condition is met.

[0110] Step 603, if the upgrade condition is met, the BMC executes the step of controlling the CPLD to copy the first firmware before the upgrade to the target storage space.

[0111] Step 604, the CPLD copies the first firmware before the upgrade to the target storage space according to the control of the BMC.

[0112] Step 605, after the first firmware is copied, the second firmware for firmware upgrade is written into the firmware storage space of the CPLD.

[0113] Step 606, after the first firmware is copied, the CPLD writes the second firmware for firmware upgrade into the firmware storage space.

[0114] Step 607, obtain the power status of the server.

[0115] Step 608, determine whether the firmware activation condition is met according to the power status.

[0116] Step 609, if the power status is the shutdown state, it is determined that the firmware activation condition is met.

[0117] Step 610, if the firmware activation condition is not met, control the CPLD to work based on the first firmware in the target storage space.

[0118] Step 611, if the firmware activation condition is not met, the CPLD works based on the first firmware in the target storage space according to the control of the BMC.

[0119] Step 612, if the firmware activation condition is not met, set a waiting-for-activation flag.

[0120] Step 613, when there is a flag, periodically detect whether the firmware activation condition is met.

[0121] Step 614, if the firmware activation condition is met, execute the firmware activation process for the second firmware so that the CPLD operates based on the second firmware.

[0122] Step 615, if the firmware activation condition is met, after the BMC executes the firmware activation process for the second firmware, the CPLD operates based on the second firmware.

[0123] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0124] Based on the same inventive concept, the embodiments of the present application also provide a firmware upgrade device for implementing the above-mentioned firmware upgrade method for the baseboard management controller BMC. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more of the following firmware upgrade device embodiments can refer to the limitations on the firmware upgrade method in the above text, and will not be repeated here.

[0125] In an exemplary embodiment, as Figure 8 shown, a firmware upgrade device 800 for the baseboard management controller BMC is provided, including: a control module 801, a waiting-for-activation module 802, and an activation module 803, where:

[0126] The control module 801 is configured to control the CPLD to copy the original first firmware to the target storage space, and after the first firmware is copied, write the second firmware for firmware upgrade into the firmware storage space of the CPLD;

[0127] The waiting-for-activation module 802 is configured to, if the firmware activation condition is not met, control the CPLD to operate based on the first firmware in the target storage space;

[0128] An activation module 803, configured to perform a firmware activation process on a second firmware if a firmware activation condition is met, so that the CPLD operates based on the second firmware.

[0129] In one embodiment, the control module 801 includes:

[0130] A determination unit, configured to determine whether the current upgrade condition configured in the baseboard management controller (BMC) is met;

[0131] A copying unit, configured to perform a step of controlling the CPLD to copy a first firmware before upgrade to a target storage space if the upgrade condition is met.

[0132] In one embodiment, the determination unit is further configured to perform the following steps:

[0133] Determine whether the uploaded second firmware is received and whether a firmware upgrade instruction is received;

[0134] If the second firmware and the firmware upgrade instruction are received, determine that the upgrade condition is met.

[0135] In one embodiment, the firmware upgrade device 800 further includes:

[0136] A power state acquisition module, configured to acquire the power state of the server;

[0137] An activation judgment module, configured to determine whether the firmware activation condition is met according to the power state.

[0138] In one embodiment, the activation judgment module 800 includes:

[0139] A shutdown activation unit, configured to determine that the firmware activation condition is met if the power state is a shutdown state.

[0140] In one embodiment, the firmware upgrade device further includes:

[0141] A mark generation module, configured to set a waiting activation mark if the firmware activation condition is not met;

[0142] A periodic detection module, configured to periodically detect whether the firmware activation condition is met when there is a mark.

[0143] Each module in the above firmware upgrade device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in a computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.

[0144] Based on the same inventive concept, an embodiment of the present application further provides a firmware upgrade device for implementing the above-mentioned firmware upgrade method for CPLD. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following firmware upgrade devices can refer to the limitations on the firmware upgrade method in the above text, and will not be repeated here.

[0145] In an exemplary embodiment, as Figure 8 shown, a firmware upgrade device 800 for CPLD is provided, including: a copy and write module 801, a first firmware working module 802, and a second firmware working module 803, where:

[0146] The copy and write module 801 is configured to copy the first firmware before upgrade to the target storage space according to the control of the BMC, and after the copying of the first firmware is completed, write the second firmware for firmware upgrade into the firmware storage space;

[0147] The first firmware working module 802 is configured to work based on the first firmware in the target storage space according to the control of the BMC if the firmware activation condition is not met;

[0148] The second firmware working module 803 is configured to work based on the second firmware after the BMC executes the firmware activation process for the second firmware if the firmware activation condition is met.

[0149] In an exemplary embodiment, a computer device is provided. The computer device can be a BMC or a CPLD, and its internal structure diagram can be as Figure 9 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store firmware upgrade data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a firmware upgrade method.

[0150] Those skilled in the art can understand, Figure 9The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0151] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0152] Control the complex programmable logic device CPLD to copy the first firmware before upgrade to the target storage space, and after the first firmware is copied, write the second firmware for firmware upgrade into the firmware storage space of the CPLD;

[0153] If the firmware activation condition is not satisfied, control the CPLD to work based on the first firmware in the target storage space;

[0154] If the firmware activation condition is satisfied, execute the firmware activation process for the second firmware to enable the CPLD to work based on the second firmware.

[0155] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0156] Determine whether the upgrade condition configured in the baseboard management controller BMC is currently satisfied;

[0157] If the upgrade condition is satisfied, execute the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

[0158] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0159] Determine whether the uploaded second firmware is received and whether a firmware upgrade instruction is received;

[0160] If the second firmware and the firmware upgrade instruction are received, it is determined that the upgrade condition is satisfied.

[0161] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0162] Obtain the power state of the server;

[0163] Determine whether the firmware activation condition is satisfied according to the power state.

[0164] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0165] If the power state is the shutdown state, it is determined that the firmware activation condition is satisfied.

[0166] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0167] If the firmware activation condition is not met, set a waiting-for-activation flag.

[0168] In the presence of the flag, periodically detect whether the firmware activation condition is met.

[0169] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0170] Control the complex programmable logic device (CPLD) to copy the first firmware before upgrade to the target storage space, and after the first firmware is copied, write the second firmware for firmware upgrade into the firmware storage space of the CPLD;

[0171] If the firmware activation condition is not met, control the CPLD to work based on the first firmware in the target storage space;

[0172] If the firmware activation condition is met, execute the firmware activation process for the second firmware so that the CPLD works based on the second firmware.

[0173] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0174] Determine whether the upgrade condition configured in the baseboard management controller (BMC) is currently met;

[0175] If the upgrade condition is met, execute the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

[0176] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0177] Determine whether the uploaded second firmware is received and whether a firmware upgrade instruction is received;

[0178] If the second firmware and the firmware upgrade instruction are received, determine that the upgrade condition is met.

[0179] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0180] Obtain the power status of the server;

[0181] Determine whether the firmware activation condition is met according to the power status.

[0182] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0183] If the power state is the shutdown state, it is determined that the firmware activation condition is satisfied.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0185] If the firmware activation condition is not satisfied, a waiting-for-activation flag is set;

[0186] In the presence of the flag, it is periodically detected whether the firmware activation condition is satisfied.

[0187] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0188] Control the complex programmable logic device CPLD to copy the first firmware before upgrade to the target storage space, and after the first firmware is copied, write the second firmware for firmware upgrade to the firmware storage space of the CPLD;

[0189] If the firmware activation condition is not satisfied, control the CPLD to work based on the first firmware in the target storage space;

[0190] If the firmware activation condition is satisfied, execute the firmware activation process for the second firmware so that the CPLD works based on the second firmware.

[0191] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0192] Determine whether the upgrade condition configured in the baseboard management controller BMC is currently satisfied;

[0193] If the upgrade condition is satisfied, execute the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

[0194] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0195] Determine whether the uploaded second firmware is received and whether a firmware upgrade instruction is received;

[0196] If the second firmware and the firmware upgrade instruction are received, it is determined that the upgrade condition is satisfied.

[0197] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0198] Obtain the power state of the server;

[0199] Determine whether the firmware activation condition is satisfied according to the power state.

[0200] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0201] If the power state is the shutdown state, it is determined that the firmware activation condition is satisfied.

[0202] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0203] If the firmware activation condition is not satisfied, a waiting-for-activation flag is set;

[0204] In the presence of the flag, it is periodically detected whether the firmware activation condition is satisfied.

[0205] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0206] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0207] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0208] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A firmware upgrade method, characterized in that, For a baseboard management controller (BMC), the method includes: Controlling a complex programmable logic device (CPLD) to copy a first firmware before upgrade to a target storage space, and after the copying of the first firmware is completed, writing a second firmware for firmware upgrade into the firmware storage space of the CPLD; If the firmware activation condition is not met, controlling the CPLD to operate based on the first firmware in the target storage space; If the firmware activation condition is met, performing a firmware activation process for the second firmware so that the CPLD operates based on the second firmware.

2. The method according to claim 1, wherein The controlling the CPLD to copy the first firmware before upgrade to the target storage space includes: Determining whether the upgrade condition configured in the BMC is currently met; If the upgrade condition is met, performing the step of controlling the CPLD to copy the first firmware before upgrade to the target storage space.

3. The method according to claim 2, characterized in that, The determining whether the upgrade condition configured in the baseboard management controller (BMC) is currently met includes: Determining whether the uploaded second firmware is received and whether a firmware upgrade instruction is received; If the second firmware and the firmware upgrade instruction are received, determining that the upgrade condition is met.

4. The method according to claim 1, wherein The method includes: Obtaining the power state of the server; Determining whether the firmware activation condition is met according to the power state.

5. The method according to claim 4, wherein The determining whether the firmware activation condition is met according to the power state includes: If the power state is the shutdown state, determining that the firmware activation condition is met.

6. The method according to claim 1, wherein The method further includes: If the firmware activation condition is not met, setting a waiting-for-activation flag; Periodically detecting whether the firmware activation condition is met when the flag exists.

7. A firmware upgrade method, characterized in that, For a CPLD, the method includes: According to the control of the BMC, copying a first firmware before upgrade to a target storage space, and after the copying of the first firmware is completed, writing a second firmware for firmware upgrade into the firmware storage space; If the firmware activation condition is not met, operating based on the first firmware in the target storage space according to the control of the BMC; If the firmware activation condition is met, operating based on the second firmware after the BMC performs a firmware activation process for the second firmware.

8. A firmware upgrade device, characterized in that, For a baseboard management controller (BMC), the apparatus includes: A control module, configured to control the CPLD to copy an original first firmware to a target storage space, and after the copying of the first firmware is completed, write a second firmware for firmware upgrade into the firmware storage space of the CPLD; A waiting-for-activation module, configured to, if the firmware activation condition is not met, control the CPLD to operate based on the first firmware in the target storage space; An activation module, configured to, if the firmware activation condition is met, perform a firmware activation process for the second firmware so that the CPLD operates based on the second firmware.

9. A firmware upgrade device, characterized in that, For a CPLD, the apparatus includes: A copy writing module, configured to copy a first firmware before upgrade to a target storage space according to the control of the BMC, and after the copying of the first firmware is completed, write a second firmware for firmware upgrade into the firmware storage space; A first firmware working module, configured to work based on the first firmware in the target storage space according to the control of the BMC if the firmware activation condition is not satisfied; A second firmware working module, configured to work based on the second firmware after the BMC executes a firmware activation process for the second firmware if the firmware activation condition is satisfied.

10. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for conducting dynamic upgrading on chip, and substrate management controller

    CN102308281A

  • Firmware upgrading method and device and computer storage medium

    CN114020526A

  • Server firmware non-inductive upgrading method and device, terminal and storage medium

    CN115421750A

  • Firmware refreshing method and device, equipment and storage medium

    CN116860282A