Firmware activation method, apparatus, related device, and computer readable storage medium

By determining the activation method based on firmware information through peripheral devices, the firmware upgrade process of server peripheral devices is optimized, solving the problem of insufficient flexibility in firmware activation methods and achieving a more efficient activation process with less business impact.

CN117369841BActive Publication Date: 2025-12-16HENAN KUNLUN TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210751459.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2025-12-16
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

The activation method is not flexible enough during the firmware upgrade process of existing server peripheral devices. It cannot be adjusted flexibly according to the specific changes, resulting in unnecessary processing and impact on business.

Method used

By obtaining information about the first and second firmware through peripheral devices, the activation method is determined, including the differences in deleting, adding, and modifying modules. The appropriate activation method is adopted to activate the firmware, avoiding direct host reset or power-off and power-on. The activation process is optimized in conjunction with the upgrade strategy.

Benefits of technology

This improves the flexibility and rationality of firmware activation, reduces unnecessary processing steps, minimizes the impact on business operations, and ensures that all modules can be effectively activated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117369841B_ABST
    Figure CN117369841B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a firmware activation method and device, related equipment and a computer readable storage medium. The method is applied to a firmware activation system, the firmware activation system comprises a firmware activation module and a peripheral device, and the method comprises the following steps: the peripheral device determines an activation mode of a first firmware according to information of the first firmware to be upgraded and information of a second firmware being used, and then the peripheral device notifies the firmware activation module of the determined activation mode of the first firmware. Then, the firmware activation module activates the first firmware according to the activation mode. According to the embodiments of the present application, the peripheral device can determine the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, instead of using a fixed activation mode, so that the flexibility of firmware activation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a firmware activation method and device, related equipment and a computer readable storage medium. BACKGROUND

[0002] Firmware refers to code or programs running on chips of electronic devices (such as peripheral devices of servers) to realize the functions of the electronic devices. For example, the firmware of a network card is used to realize the functions of network connection, message transmission and reception of the network card.

[0003] With the continuous improvement and perfection of the functions and performance of servers, the firmware of the peripheral devices of the servers also needs to be upgraded and activated (i.e. updated firmware code) continuously. At present, after the peripheral devices of the servers write the firmware to be upgraded into a storage medium (i.e. after the firmware upgrade is completed), the server directly activates the firmware to be upgraded of the peripheral device by using the host reset or the host power-off and power-on mode, which has low flexibility. SUMMARY

[0004] Embodiments of the present application disclose a firmware activation method and device, related equipment and a computer readable storage medium, which are used to improve the flexibility of firmware activation.

[0005] The first aspect discloses a firmware activation method, which can be applied to a firmware activation system (such as a server), and the firmware activation system can include a firmware activation module and a peripheral device. The firmware activation method can include: the peripheral device acquires information of a first firmware, and determines an activation mode of the first firmware according to the information of the first firmware and information of a second firmware, the first firmware being firmware to be upgraded of the peripheral device, and the second firmware being firmware being used by the peripheral device; the peripheral device sends first indication information to the firmware activation module, the first indication information indicating the activation mode of the first firmware; and the firmware activation module activates the first firmware according to the activation mode.

[0006] In embodiments of the present application, the first firmware and / or the second firmware are different, the content changed by the first firmware compared with the second firmware is different, and the activation mode of the first firmware determined by the peripheral device according to the information of the first firmware and the information of the second firmware can be different. Therefore, the peripheral device can determine a suitable activation mode according to the information of the firmware being used currently and the information of the firmware to be upgraded, and then can send the first indication information to the firmware activation module to notify the activation mode of the first firmware. Then, the firmware activation module can activate the firmware to be upgraded according to the activation mode, instead of directly activating the first firmware by using the host reset or the host power-off and power-on mode, which can improve the flexibility of firmware activation.

[0007] As a possible implementation, the first firmware comprises N modules, the information of the first firmware comprises the identification, version number and activation mode of the N modules, N is a positive integer greater than or equal to 1.

[0008] As a possible implementation, the information of the first firmware further comprises the feature description of the N modules.

[0009] As a possible implementation, the second firmware comprises M modules, M is a positive integer greater than or equal to 1; the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, comprising: the peripheral device determines K modules according to the information of the N modules and the information of the M modules, the K modules comprising the deletion module, the addition module and the modification module of the N modules relative to the M modules, K is a positive integer greater than or equal to 1; the peripheral device determines the activation mode of the first firmware according to the K modules.

[0010] In the embodiments of the present application, in the case that there are changed modules in the first firmware compared with the second firmware, the changed modules need to be activated, therefore, the changed modules can be determined according to the information of the N modules included in the first firmware and the information of the M modules included in the second firmware, and then the activation mode corresponding to the changed modules is determined, so that the final activation mode can be determined according to the activation mode corresponding to the changed modules, without the need to determine the activation mode corresponding to all modules, and unnecessary processing process can be reduced.

[0011] As a possible implementation, the peripheral device determines the K modules according to the information of the N modules and the information of the M modules, comprising: the peripheral device determines the deletion module and the addition module of the N modules relative to the M modules according to the identification of the N modules and the identification of the M modules; the peripheral device determines the modification module of the N modules relative to the M modules according to the identification and version number of the N modules and the identification and version number of the M modules; the peripheral device determines the K modules according to the deletion module and the addition module of the N modules relative to the M modules, and the modification module of the N modules relative to the M modules.

[0012] In the embodiments of the present application, the peripheral device can accurately determine the K modules which have been changed according to the identification and version number of the modules, so that the appropriate activation mode can be determined according to the activation mode corresponding to the K modules, and the rationality of the activation mode can be improved.

[0013] As a possible implementation, the peripheral device determines the activation manner of the first firmware according to the K modules includes: the peripheral device determines the activation manner corresponding to each of the K modules, obtaining L activation manners, L is an integer less than or equal to K and greater than 0, and different activation manners correspond to different priorities; the peripheral device determines the activation manner with the highest priority in the L activation manners as the activation manner of the first firmware.

[0014] In the embodiments of the present application, the activation manners corresponding to different modules in the change module can be different or the same, and different activation manners correspond to different priorities. The activation manner with the highest priority in the activation manners corresponding to the change module is determined as the activation manner of the firmware to be upgraded, which can ensure that all modules in the change module can be activated, and further ensure that the peripheral device can use the upgraded firmware to perform corresponding processing. In addition, since the activation manner corresponding to each module is the activation manner with the lowest priority that can activate the module, the determined activation manner of the first firmware is the activation manner with the lowest priority in the activation manners that can activate the first firmware, and the lower the priority of the activation manner, the lower the impact on the service, thereby minimizing the impact of the activation of the first firmware on the service.

[0015] As a possible implementation, the peripheral device determines the activation manner corresponding to each of the K modules, obtaining L activation manners includes: the peripheral device obtains the activation manners of the added modules and the deleted modules in the K modules, obtaining L1 activation manners, L1 is an integer greater than or equal to 0; the peripheral device determines the activation manner of the modified module according to the feature description of the modified module in the K modules, obtaining L2 activation manners, L2 is an integer greater than or equal to 0; the peripheral device determines the L activation manners according to the L1 activation manners and the L2 activation manners, L is an integer less than or equal to L1+L2.

[0016] In the embodiments of the present application, the activation manners of the added modules and the deleted modules in the change module are fixed, so the activation manners of the added modules and the deleted modules can be directly obtained from the information of the modules. The modification content of the modified module is different, and the corresponding activation manner can be different. Since the feature description includes the characteristic details of the module (such as supported functions, configuration parameters, etc.), the activation manner can be accurately determined according to the feature description of the modified module. It can be seen that the peripheral device can determine the activation manner in different ways according to the type of module change, which can improve the flexibility and rationality of the determination of the activation manner. In addition, the priority of the activation manner determined by the feature description of the modified module is lower than or equal to the priority of the activation manner directly obtained from the information of the modified module, so that the priority of the activation manner of the first firmware finally determined according to the L activation manners can be prevented from being too high, and the impact on the service can be reduced.

[0017] As a possible implementation, the method can further include: the peripheral device verifying the first firmware; and the peripheral device determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, including: in a case where the first firmware is verified successfully, the peripheral device determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware.

[0018] In the embodiments of the present application, the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware only in a case where the first firmware is verified successfully, which can avoid determining the activation mode of the first firmware in a case where the first firmware is verified unsuccessfully, can avoid unnecessary processing, and thus can save computing resources.

[0019] As a possible implementation, the method can further include: the peripheral device upgrading the firmware of the peripheral device from the second firmware to the first firmware; and the firmware activation module activating the first firmware according to the activation mode, including: in a case where the firmware of the peripheral device is upgraded successfully, the firmware activation module activating the first firmware according to the activation mode.

[0020] As a possible implementation, the method can further include: the peripheral device receiving third indication information from the firmware activation module, the third indication information being used to instruct the peripheral device to perform firmware upgrading; and the peripheral device upgrading the firmware of the peripheral device from the second firmware to the first firmware, including: the peripheral device upgrading the firmware of the peripheral device from the second firmware to the first firmware according to the third indication information.

[0021] As a possible implementation, the method can further include: in a case where the firmware of the peripheral device is upgraded successfully, the peripheral device sending fourth indication information to the firmware activation module, the fourth indication information being used to instruct that the firmware of the peripheral device is upgraded successfully.

[0022] As a possible implementation, the method can further include: the firmware activation module determining an upgrading strategy of the server, different upgrading strategies corresponding to different activation times; and the firmware activation module activating the first firmware according to the activation mode, including: the firmware activation module activating the first firmware according to the upgrading strategy and the activation mode.

[0023] In the embodiments of the present application, the time for activating the first firmware can be determined according to the upgrading strategy of the server, and flexibly adopting different upgrading strategies can reduce the impact of activating the first firmware on the services on the server, and can improve the flexibility of firmware activation.

[0024] As a possible implementation, the upgrade strategy is silent upgrade or immediate upgrade; and the firmware activation module activates the first firmware according to the upgrade strategy and the activation mode, including: when the upgrade strategy is silent upgrade, the firmware activation module activates the first firmware through the activation mode in the next operation and maintenance window; when the upgrade strategy is immediate upgrade, the firmware activation module activates the first firmware through the activation mode immediately.

[0025] As a possible implementation, the peripheral device is located in a server, and the server is provided with a host; and the activation mode is one of host power-off, host reset, soft reset and immediate effect.

[0026] As a possible implementation, the firmware activation module is a processor, or the firmware activation module is a device management module, or the firmware activation module is a management tool.

[0027] As a possible implementation, when the firmware activation module is a device management module, the peripheral device sends an apply complete message to the firmware activation module when the firmware upgrade of the peripheral device succeeds, and the apply complete message is used to indicate that the firmware upgrade of the peripheral device succeeds.

[0028] In the embodiment of the application, after the firmware upgrade of the peripheral device succeeds, an apply complete message can be sent to the firmware activation module to inform the firmware activation module that the firmware upgrade of the peripheral device succeeds.

[0029] As a possible implementation, the management tool is located in the first device or the server.

[0030] The second aspect discloses a firmware activation method, which can be applied to a peripheral device of a server, a module (for example, a chip) in the peripheral device, a logic module or software capable of realizing all or part of the functions of the peripheral device, and the following is described by taking the peripheral device of the server as an example. The firmware activation method can include: receiving information of a first firmware, the first firmware being a to-be-upgraded firmware of the peripheral device; determining an activation mode of the first firmware according to the information of the first firmware and information of a second firmware, the second firmware being a firmware currently used by the peripheral device; and sending first indication information, the first indication information indicating the activation mode of the first firmware.

[0031] In the embodiments of the present application, the first firmware and / or the second firmware are different, the first firmware changes different content compared with the second firmware, and the activation mode of the first firmware determined by the peripheral device according to the information of the first firmware and the information of the second firmware can be different. Therefore, the peripheral device can determine a suitable activation mode according to the information of the firmware currently used by the peripheral device and the information of the firmware to be upgraded, and then send the first indication information to provide the activation mode to the firmware activation module, so that the firmware activation module can activate the first firmware according to the activation mode, instead of directly using the host reset or the host power-off and power-on mode to activate the first firmware, and the flexibility of firmware activation can be improved.

[0032] As a possible implementation, the first firmware includes N modules, the second firmware includes M modules, N and M are positive integers greater than or equal to 1; and the determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware includes: determining K modules according to the information of the N modules and the information of the M modules, the K modules include deletion modules, addition modules and modification modules of the N modules relative to the M modules, K is a positive integer greater than or equal to 1; and determining the activation mode of the first firmware according to the K modules.

[0033] As a possible implementation, the information of the module includes an identifier and a version number of the module, and the determining the K modules according to the information of the N modules and the information of the M modules includes: determining the deletion modules and the addition modules of the N modules relative to the M modules according to the identifiers of the N modules and the identifiers of the M modules; determining the modification modules of the N modules relative to the M modules according to the identifiers and the version numbers of the N modules and the identifiers and the version numbers of the M modules; and determining the K modules according to the deletion modules and the addition modules of the N modules relative to the M modules and the modification modules of the N modules relative to the M modules.

[0034] As a possible implementation, the determining the activation mode of the first firmware according to the K modules includes: determining the activation mode corresponding to each module in the K modules to obtain L activation modes, L is an integer less than or equal to K and greater than 0, and different activation modes correspond to different priorities; and determining the activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

[0035] As a possible implementation, the information of the module further includes a feature description and an activation mode of the module, the determining the activation mode of each of the K modules includes: obtaining the activation mode of the added module and the deleted module in the K modules, to obtain L1 activation modes, L1 being an integer greater than or equal to 0; determining the activation mode of the modified module according to the feature description of the modified module in the K modules, to obtain L2 activation modes, L2 being an integer greater than or equal to 0; determining the L activation modes according to the L1 activation modes and the L2 activation modes, L being an integer less than or equal to L1+L2.

[0036] As a possible implementation, the method can further include: receiving third indication information, the third indication information being used to instruct the peripheral device to perform the firmware upgrade; and upgrading the firmware of the peripheral device from the second firmware to the first firmware according to the third indication information.

[0037] In the embodiments of the present application, the peripheral device can receive third indication information, so that the peripheral device can upgrade its own firmware from the second firmware to the first firmware according to the third indication information.

[0038] As a possible implementation, the method can further include: in the case that the firmware upgrade of the peripheral device is successful, sending fourth indication information, the fourth indication information being used to indicate that the firmware upgrade of the peripheral device is successful.

[0039] In the embodiments of the present application, after the firmware upgrade of the peripheral device is successful, fourth indication information can be sent, so as to indicate that the firmware upgrade of itself is successful (i.e., the first firmware is successfully written into the storage medium of itself).

[0040] As a possible implementation, the method can further include: the peripheral device verifying the first firmware; and the determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware includes: in the case that the first firmware is verified successfully, determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware.

[0041] As a possible implementation, the server is provided with a host, and the activation mode is one of host power-on, host reset, soft reset and immediate effect.

[0042] The third aspect discloses a firmware activation method, which can be applied to a firmware activation module. The firmware activation module can be a host or a device management module of a management tool or a server. The management tool can be set or installed in the server or the first device. The server is provided with a peripheral device. The firmware activation method is described below by taking the host applied to the server as an example. The firmware activation method can include the following steps. First, information of a first firmware is sent to a peripheral device of a server. The first firmware is a firmware to be upgraded. Second, first indication information is received from the peripheral device. The first indication information indicates an activation mode of the first firmware. Third, the first firmware is activated according to the activation mode.

[0043] In the embodiments of the present application, the host can first send information of a firmware to be upgraded to a peripheral device. Then, first indication information can be received from the peripheral device. Finally, the first firmware can be activated according to the activation mode indicated by the first indication information, instead of directly activating the first firmware by resetting the host or powering off and powering on the host. Therefore, the flexibility of firmware activation can be improved.

[0044] As a possible implementation, the method can further include determining an upgrade strategy of the server, different upgrade strategies corresponding to different activation times. The activating the first firmware according to the activation mode includes activating the first firmware according to the upgrade strategy and the activation mode.

[0045] As a possible implementation, the upgrade strategy is silent upgrade or immediate upgrade. The activating the first firmware according to the upgrade strategy and the activation mode includes activating the first firmware by the activation mode at the next operation and maintenance window in the case that the upgrade strategy is silent upgrade, and activating the first firmware by the activation mode immediately in the case that the upgrade strategy is immediate upgrade.

[0046] As a possible implementation, the method can further include sending third indication information to the peripheral device. The third indication information is used to instruct the peripheral device to perform firmware upgrade.

[0047] In the embodiments of the present application, in the case that the host needs to upgrade the firmware of the peripheral device, the host can send third indication information to the peripheral device. The peripheral device can upgrade its firmware from the second firmware to the first firmware according to the third indication information.

[0048] As a possible implementation, the method can further include receiving fourth indication information from the peripheral device. The fourth indication information is used to indicate that the firmware upgrade of the peripheral device is successful. The activating the first firmware according to the activation mode includes activating the first firmware according to the activation mode in the case that the fourth indication information is received.

[0049] In the embodiments of the present application, the peripheral device can fail in the first firmware upgrade, and the host cannot activate the first firmware in the case of the first firmware upgrade failure. Therefore, the host can activate the first firmware according to the activation mode only in the case of receiving the fourth indication information from the peripheral device, which can ensure that the first firmware can be successfully activated, and can also avoid invalid activation.

[0050] A fourth aspect discloses a firmware activation system, comprising a firmware activation module and a peripheral device, wherein:

[0051] The peripheral device is configured to obtain information of a first firmware;

[0052] The peripheral device is further configured to determine an activation mode of the first firmware according to the information of the first firmware and information of a second firmware, the first firmware being a firmware to be upgraded of the peripheral device, and the second firmware being a firmware currently used by the peripheral device;

[0053] The peripheral device is further configured to send first indication information to the firmware activation module, the first indication information indicating the activation mode of the first firmware;

[0054] The firmware activation module is configured to activate the first firmware according to the activation mode.

[0055] As a possible implementation, the first firmware comprises N modules, the information of the first firmware comprises identification, version number and activation mode of the N modules, and N is a positive integer greater than or equal to 1.

[0056] As a possible implementation, the information of the first firmware further comprises feature description of the N modules.

[0057] As a possible implementation, the second firmware comprises M modules, and M is a positive integer greater than or equal to 1; the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, comprising:

[0058] The peripheral device determines K modules according to the information of the N modules and the information of the M modules, the K modules comprising deletion modules, addition modules and modification modules of the N modules relative to the M modules, and K is a positive integer greater than or equal to 1;

[0059] The peripheral device determines the activation mode of the first firmware according to the K modules.

[0060] As a possible implementation, the peripheral device determines K modules according to the information of the N modules and the information of the M modules, comprising:

[0061] The peripheral device determines the deletion module and the addition module of the N modules relative to the M modules according to the identifiers of the N modules and the identifiers of the M modules;

[0062] The peripheral device determines the modification module of the N modules relative to the M modules according to the identifiers and version numbers of the N modules and the identifiers and version numbers of the M modules.

[0063] The peripheral device determines the K modules according to the deletion module and the addition module of the N modules relative to the M modules and the modification module of the N modules relative to the M modules.

[0064] As a possible implementation, the peripheral device determines the activation mode of the first firmware according to the K modules includes:

[0065] The peripheral device determines the activation mode corresponding to each module in the K modules to obtain L activation modes, L is an integer less than or equal to K and greater than 0, and different activation modes correspond to different priorities.

[0066] The peripheral device determines the activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

[0067] As a possible implementation, the peripheral device determines the activation mode corresponding to each module in the K modules to obtain L activation modes includes:

[0068] The peripheral device obtains the activation modes of the addition module and the deletion module in the K modules to obtain L1 activation modes, L1 is an integer greater than or equal to 0.

[0069] The peripheral device determines the activation mode of the modification module according to the feature description of the modification module in the K modules to obtain L2 activation modes, L2 is an integer greater than or equal to 0.

[0070] The peripheral device determines the L activation modes according to the L1 activation modes and the L2 activation modes, L is an integer less than or equal to L1+L2.

[0071] As a possible implementation, the peripheral device is also used for verifying the first firmware.

[0072] The peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware includes:

[0073] In the case that the first firmware is verified successfully, the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware.

[0074] As a possible implementation, the peripheral device is further configured to send first indication information to the firmware activation module, the first indication information indicating an activation mode of the first firmware.

[0075] As a possible implementation, the peripheral device is further configured to upgrade the firmware of the peripheral device from the second firmware to the first firmware.

[0076] The firmware activation module activates the first firmware according to the activation mode, including:

[0077] In a case where the firmware upgrade of the peripheral device is successful, the firmware activation module activates the first firmware according to the activation mode.

[0078] As a possible implementation, the peripheral device is further configured to receive third indication information from the firmware activation module, the third indication information indicating that the peripheral device performs firmware upgrade.

[0079] The peripheral device upgrades the firmware of the peripheral device from the second firmware to the first firmware, including:

[0080] The peripheral device upgrades the firmware of the peripheral device from the second firmware to the first firmware according to the third indication information.

[0081] As a possible implementation, the peripheral device is further configured to, in a case where the firmware upgrade of the peripheral device is successful, send fourth indication information to the firmware activation module, the fourth indication information indicating that the firmware upgrade of the peripheral device is successful.

[0082] As a possible implementation, the firmware activation module is further configured to determine an upgrade strategy of the server, different upgrade strategies corresponding to different activation times.

[0083] The firmware activation module activates the first firmware according to the activation mode, including:

[0084] The firmware activation module activates the first firmware according to the upgrade strategy and the activation mode.

[0085] As a possible implementation, the upgrade strategy is silent upgrade or immediate upgrade; the firmware activation module activates the first firmware according to the upgrade strategy and the activation mode, including:

[0086] In a case where the upgrade strategy is silent upgrade, the firmware activation module activates the first firmware through the activation mode in a next operation and maintenance window;

[0087] In a case where the upgrade strategy is immediate upgrade, the firmware activation module activates the first firmware through the activation mode immediately.

[0088] As a possible implementation, the peripheral device is located at a server, the server is provided with a host, and the activation mode is one of power-off of the host, reset of the host, soft reset, and immediate effect.

[0089] As a possible implementation, the firmware activation module is a processor, or the firmware activation module is a device management module, or the firmware activation module is a management tool.

[0090] As a possible implementation, when the firmware activation module is a device management module, the peripheral device is further configured to send an application completion message to the firmware activation module in a case where the firmware upgrade of the peripheral device is successful, the application completion message being used to indicate that the firmware upgrade of the peripheral device is successful.

[0091] As a possible implementation, the management tool is located at the first device or the server.

[0092] A fifth aspect discloses a firmware activation apparatus, which can be a peripheral device of a server or a module (for example, a chip) in a peripheral device of a server. The firmware activation apparatus can include:

[0093] a receiving unit configured to receive information of a first firmware, the first firmware being a firmware to be upgraded of the peripheral device;

[0094] a determining unit configured to determine an activation mode of the first firmware according to the information of the first firmware and information of a second firmware, the second firmware being a firmware being used by the peripheral device;

[0095] a sending unit configured to send first indication information, the first indication information indicating the activation mode of the first firmware.

[0096] As a possible implementation, the first firmware includes N modules, the second firmware includes M modules, N and M are positive integers greater than or equal to 1; the determining unit determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, including:

[0097] determining K modules according to the information of the N modules and the information of the M modules, the K modules including deletion modules, addition modules, and modification modules of the N modules relative to the M modules, K being a positive integer greater than or equal to 1;

[0098] determining the activation mode of the first firmware according to the K modules.

[0099] As a possible implementation, the information of the module includes an identifier and a version number of the module, and the determining unit determines the K modules according to the information of the N modules and the information of the M modules, including:

[0100] According to the identification of the N modules and the identification of the M modules, determine the deleted modules and the added modules of the N modules relative to the M modules;

[0101] According to the identification and version number of the N modules and the identification and version number of the M modules, determine the modified modules of the N modules relative to the M modules;

[0102] According to the deleted modules and the added modules of the N modules relative to the M modules, and the modified modules of the N modules relative to the M modules, determine the K modules.

[0103] As a possible implementation, the determining unit determines the activation mode of the first firmware according to the K modules includes:

[0104] Determine the activation mode corresponding to each module in the K modules, and obtain L activation modes, L is an integer less than or equal to K and greater than 0, different activation modes correspond to different priorities;

[0105] Determine the activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

[0106] As a possible implementation, the information of the module further includes the feature description and the activation mode of the module, and the determining unit determines the activation mode corresponding to each module in the K modules, and obtains L activation modes includes:

[0107] Obtain the activation mode of the added modules and the deleted modules in the K modules, and obtain L1 activation modes, L1 is an integer greater than or equal to 0;

[0108] According to the feature description of the modified modules in the K modules, determine the activation mode of the modified modules, and obtain L2 activation modes, L2 is an integer greater than or equal to 0;

[0109] According to the L1 activation modes and the L2 activation modes, determine the L activation modes, L is an integer less than or equal to L1+L2.

[0110] As a possible implementation, the receiving unit is further configured to receive third indication information, the third indication information being used to instruct the peripheral device to perform firmware upgrade;

[0111] The apparatus can further include:

[0112] The upgrading unit is configured to upgrade the firmware of the peripheral device from the second firmware to the first firmware according to the third indication information.

[0113] As a possible implementation, the sending unit is further configured to send fourth indication information in a case where the firmware upgrade of the peripheral device succeeds, the fourth indication information being used to indicate that the firmware upgrade of the peripheral device succeeds.

[0114] As a possible implementation, the apparatus can further include:

[0115] a checking unit configured to check the first firmware;

[0116] The determining unit is configured to determine, according to the information of the first firmware and the information of the second firmware, that the activation mode of the first firmware includes:

[0117] In a case where the first firmware is checked successfully, the determining unit is configured to determine, according to the information of the first firmware and the information of the second firmware, that the activation mode of the first firmware.

[0118] As a possible implementation, the server is provided with a host, and the activation mode is one of host power-off, host reset, soft reset, and immediate effect.

[0119] A sixth aspect discloses a firmware activation apparatus, which can be applied to a firmware activation module. The firmware activation module can be a management tool or a host or device management module of a server. The management tool can be set or installed in the server or the first device. The server is provided with a peripheral device. The firmware activation apparatus can include:

[0120] a sending unit configured to send information of a first firmware to a peripheral device of a server, the first firmware being a firmware to be upgraded;

[0121] a receiving unit configured to receive first indication information from the peripheral device, the first indication information indicating an activation mode of the first firmware;

[0122] an activation unit configured to activate the first firmware according to the activation mode.

[0123] As a possible implementation, the apparatus further includes:

[0124] a determining unit configured to determine an upgrade strategy of the server, different upgrade strategies corresponding to different activation times;

[0125] The activation unit activates the first firmware according to the activation mode includes:

[0126] activating the first firmware according to the upgrade strategy and the activation mode.

[0127] As a possible implementation, the upgrade strategy is silent upgrade or immediate upgrade; and the activation unit activates the first firmware according to the upgrade strategy and the activation mode includes:

[0128] In a case where the upgrade strategy is the silent upgrade, activating the first firmware through the activation mode in the next operation and maintenance window;

[0129] In a case where the upgrade strategy is the immediate upgrade, activating the first firmware through the activation mode immediately.

[0130] As a possible implementation, the sending unit is further configured to send third indication information to the peripheral device, the third indication information being used to instruct the peripheral device to perform the firmware upgrade.

[0131] As a possible implementation, the receiving unit is further configured to receive fourth indication information from the peripheral device, the fourth indication information being used to instruct that the firmware upgrade of the peripheral device is successful.

[0132] The activating unit activates the first firmware according to the activation mode.

[0133] In a case where the fourth indication information is received, the first firmware is activated according to the activation mode.

[0134] The seventh aspect discloses a server, which can include a processor, a memory and a communication interface, the communication interface is used to receive information from other electronic devices outside the server and output information to other electronic devices outside the server, when the processor executes the computer program stored in the memory, the processor executes the firmware activation method disclosed in the first aspect or any of the implementation manners of the first aspect.

[0135] The eighth aspect discloses a peripheral device of a server, which can include a processor, a memory and a communication interface, the communication interface is used to receive information from other electronic devices outside the peripheral device and output information to other electronic devices outside the peripheral device, when the processor executes the computer program stored in the memory, the processor executes the firmware activation method disclosed in the second aspect or any of the implementation manners of the second aspect.

[0136] The ninth aspect discloses an electronic device, which can be a first device or a host or a device management module of a server. The electronic device can include a processor, a memory and a communication interface, the communication interface is used to receive information from other electronic devices outside the electronic device and output information to other electronic devices outside the electronic device, when the processor executes the computer program stored in the memory, the processor executes the firmware activation method disclosed in the third aspect or any of the implementation manners of the third aspect.

[0137] The tenth aspect discloses a server, which can include the peripheral device of the eighth aspect and the electronic device of the ninth aspect.

[0138] The eleventh aspect discloses a computer readable storage medium, which stores a computer program or computer instructions, and when the computer program or computer instructions are executed, the firmware activation method disclosed in the above aspects is implemented.

[0139] The twelfth aspect discloses a chip, which comprises a processor for executing a program stored in a memory, and when the program is executed, the chip executes the firmware activation method disclosed in the above aspects.

[0140] As a possible implementation, the memory is located outside the chip.

[0141] The thirteenth aspect discloses a computer program product, which comprises computer program codes, and when the computer program codes are executed, the firmware activation method disclosed in the above aspects is executed.

[0142] It can be understood that the firmware activation device provided by the fifth aspect, the firmware activation device provided by the sixth aspect, the server provided by the seventh aspect, the peripheral device provided by the eighth aspect, the electronic device provided by the ninth aspect, the computer readable storage medium provided by the eleventh aspect, the chip provided by the twelfth aspect, and the computer program product provided by the thirteenth aspect are all used to execute the firmware activation method provided by the first aspect and any possible implementation manner of the first aspect, or the second aspect and any possible implementation manner of the second aspect, or the third aspect and any possible implementation manner of the third aspect. Therefore, the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS

[0143] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0144] Figure 1 is a system architecture schematic diagram disclosed by an embodiment of the present application;

[0145] Figure 2 is another system architecture schematic diagram disclosed by an embodiment of the present application;

[0146] Figure 3 is a flowchart of a firmware activation method disclosed by an embodiment of the present application;

[0147] Figure 4 is another flowchart of a firmware activation method disclosed by an embodiment of the present application;

[0148] Figure 5 is a flowchart of another firmware activation method disclosed by embodiments of the present application;

[0149] Figure 6 is a data format diagram of an Apply Complete message disclosed by embodiments of the present application;

[0150] Figure 7 is a flowchart of another firmware activation method disclosed by embodiments of the present application;

[0151] Figure 8 is a structural diagram of a firmware activation apparatus disclosed by embodiments of the present application;

[0152] Figure 9 is a structural diagram of another firmware activation apparatus disclosed by embodiments of the present application;

[0153] Figure 10 is a structural diagram of an electronic device disclosed by embodiments of the present application;

[0154] Figure 11 is a structural diagram of a firmware activation system disclosed by embodiments of the present application. DETAILED DESCRIPTION

[0155] Embodiments of the present application disclose a firmware activation method, apparatus, related device and computer readable storage medium, which are used for improving flexibility of firmware activation. The technical solutions in embodiments of the present application will be clearly and completely described below with reference to the drawings in embodiments of the present application.

[0156] In order to better understand the embodiments of the present application, the system architecture used in the embodiments of the present application will be described first.

[0157] Please refer to Figure 1 , Figure 1 is a structural diagram of a system architecture disclosed by embodiments of the present application. As shown in Figure 1As shown, the system architecture can be that of a server 100, which can include a host 101, a device management module 102, and a peripheral device 103. The host 101 can include a processor system 1012 and an operating system (OS) 1011 running on the processor system 1012. The processor system 1012 can be a central processing unit (CPU) system. The operating system 1011 can include one or more of a Linux operating system, a Windows operating system, a Unix operating system, etc. The server 100 is an electronic device with data processing capability, data transceiving capability, and data storage capability, and can be a physical device such as a rack-mounted server, a blade server, etc.

[0158] The device management module 102 is a module for performing functions such as component management and asset management in a computer system. For example, the device management module 102 can be used for power-on and power-off control, fan speed adjustment, electronic tag management, etc. The device management module 102 can also be referred to as a baseboard management controller (BMC).

[0159] Peripheral devices 103 refer to various devices connected to the processor system 1012 of the host 101, which can be used to expand the functionality of the server. Peripheral devices 103 may include, but are not limited to, network interface cards (NICs), redundant array of independent disks (RAID) cards, graphics cards, solid-state disk (SSD) cards, and accelerator cards. NICs may include network interface cards (NICs), Fibre Channel (FC) host bus adapters (HBAs), converged network adapters (CNAs), and infinite broadband (IB) host channel adapters (HCAs). The storage medium of peripheral devices 103 stores firmware 1031, which can run on the chip of peripheral devices 103 to implement various functions of the peripheral devices. The storage medium of peripheral device 103 can be flash memory, non-volatile random access memory (NVRAM), or electrically erasable programmable read-only memory (EEPROM).

[0160] The server 100 may also have a management tool 104 installed. The management tool 104 can be a management client (i.e., computer program software). The management tool 104 can be installed and run on the server 100. The management tool 104 can perform component management, asset management, etc. through the device management module 102.

[0161] exist Figure 1 In the system architecture shown, the host 101 and the device management module 102 can upgrade (i.e., update the firmware code) and activate the firmware 1031 of the peripheral device 103. The management tool 104 can also upgrade and activate the firmware 1031 of the peripheral device 103 through the device management module 102.

[0162] It should be noted that the host 101 or the processor system 1012 and the peripheral device 103 can communicate with each other by using a peripheral component interconnect express (PCIE) protocol, and accordingly, the interface through which the host 101 and the peripheral device 103 communicate with each other can be referred to as a PCIE interface, and the peripheral device can also be referred to as a PCIE device. The device management module 102 and the peripheral device 103 can communicate with each other by using a management component transport (MCTP) over PCIE protocol.

[0163] It should be understood that the processor system 1012 and the device management module 102 can be independent or integrated together. For example, the processor system 1012 (such as a CPU system) and the device management module 102 can be arranged on a mainboard of a server. It should also be understood that the server 100 is not limited to including only the host 101, the device management module 102, the peripheral device 103, and the management tool 104 as shown in FIG. 1, but can further include a basic input output system (BIOS) and other hardware units. The BIOS stores programs for basic input output, including a power-on self-test program and a system self-starting program, and can provide the server 100 with the most basic and direct hardware settings and controls. Figure 1

[0164] Please refer to Figure 2 , Figure 2 FIG. 2 is another system architecture diagram disclosed by an embodiment of the present application. As shown in FIG. 2, the system architecture can include a server 300 and a first device 200. The first device 200 can be installed with a management tool 201, and the first device 200 can control the device management module 302 to perform component management and asset management by using the management tool 201. The first device 200 can be an electronic device with data processing and data transceiving capabilities, for example, the first device 200 can be a network management server. The first device 200 and the server 300 can be devices distributed in different geographical locations, and the first device 200 and the server 300 can communicate with each other. Figure 2

[0165] In Figure 2 ​​In the system architecture shown, the first device 200 can upgrade and activate the firmware 3031 of the peripheral device 303 through the management tool 201. In this case, the first device 200 can deliver the firmware file to the device management module 302 through the management tool 201, and the device management module 302 can further deliver the firmware file to the peripheral device 303 so that the peripheral device 303 can perform firmware upgrade. Correspondingly, after the device management module 302 receives information from the peripheral device 303 (such as information indicating completion of firmware upgrade, activation mode, and other indication information), the device management module 302 can send the information to the management tool 201, and the management tool 201 can perform the next operation (such as activation of the firmware to be upgraded) based on the information.

[0166] It should be noted that, Figure 2 The system architecture shown is not limited to only including the server 300 and the first device 200 shown in the figure. It should be understood that, Figure 1 and Figure 2 The system architecture shown is only illustrative and does not constitute a limitation. The firmware activation method provided by the embodiments of the present application can also be applied to data centers, notebook computers, desktop computers, smart cars, ultra-mobile personal computers (UMPC), and the like, which are not limited herein.

[0167] In order to better understand the embodiments of the present application, the related technologies of the embodiments of the present application will be described first.

[0168] With the progress of computer technology, the functions and performance of the peripherals of the server are constantly improved and perfected, and the architecture of the peripherals is becoming more and more complex. At the same time, the firmware upgrade of the peripherals based on function upgrade or problem solving is also more and more frequent.

[0169] The steps of the peripheral device performing firmware upgrade are usually as follows: the host of the server first initiates a firmware upgrade command to the peripheral device of the server, and then can send a firmware file to the peripheral device, the firmware file including the firmware to be upgraded. After receiving the firmware upgrade command and the firmware file, the peripheral device can perform firmware upgrade, i.e., write the firmware to be upgraded into its own storage medium. After the firmware upgrade of the peripheral device is completed (i.e., the firmware to be upgraded is successfully written into its own storage medium), the peripheral device can send a firmware upgrade completion message to the host. Correspondingly, the host can receive the firmware upgrade completion message from the peripheral device, and then the host can activate the firmware to be upgraded by resetting or powering off and then powering on.

[0170] It can be seen that in order to activate the firmware to be upgraded, the host generally needs to be reset or powered off and then powered on after the firmware upgrade of the peripheral device is completed. The activation mode of host reset or host power off and then power on has a greater impact on the host system, takes a longer time, and has a greater impact on business and operation and maintenance, especially for large server sites.

[0171] In order to reduce the impact on business, the host can activate the firmware to be upgraded in a "silent" upgrade manner. In the case of silent upgrade, after the firmware upgrade of the peripheral device is completed, the host does not immediately reset or power off and then power on, but continues to run the current process and business, and waits for the next operation and maintenance window to reset or power off and then power on.

[0172] Although the host does not immediately reset or power off in the silent upgrade manner to interrupt the current business and process, the host still depends on the reset or power off and then power on to activate the firmware to be upgraded of the peripheral device. In addition, if it is a firmware upgrade in an urgent situation, for example, a new function needs to be deployed urgently or a firmware problem needs to be solved urgently (such as a problem that a network card cannot normally transmit and receive), at this time, it is impossible to wait for the next operation and maintenance window, but the firmware to be upgraded must be activated immediately by reset or power off and then power on, thereby still causing a greater impact on the current business. However, in fact, for firmware upgrades in certain scenarios (such as only involving small changes in firmware configuration parameters), the activation mode of host reset or host power off and then power on can not be used, and only the activation mode of soft reset can be used to activate the firmware to be upgraded. Soft reset refers to soft reset of the peripheral device alone, and the host does not perceive the offline of the peripheral device. The soft reset mode has a smaller impact than the activation mode of host reset or host power off and then power on, takes a shorter time, and can reduce the impact on the current business.

[0173] In the case of the soft reset activation mode, after the firmware upgrade of the peripheral device is completed, the host can send a soft reset command to the peripheral device (i.e., the peripheral device driver running in the host operating system sends a soft reset command to the peripheral device). After the peripheral device receives the soft reset command, the peripheral device can perform soft reset to activate the firmware to be upgraded.

[0174] It should be noted that the soft reset of the peripheral device refers to the partial reset of the peripheral device, rather than the global reset of the entire peripheral device, and the host will not perceive that the peripheral device is offline. However, when the peripheral device is soft reset, the peripheral device interrupts the flow processing, so that the to-be-updated firmware or part of the modules in the to-be-updated firmware can be reloaded, or the firmware configuration parameters can be refreshed. The soft reset can also be referred to as a firmware reset, a partial reset, a hot reset, a hot patch, and the like. For the peripheral device, the time required for the soft reset is much shorter than the host reset and the host power-on and power-off, and accordingly, the time for interrupting the flow processing when the peripheral device performs the soft reset is also much shorter.

[0175] After the firmware upgrade of the peripheral device is successful, because the most appropriate or optimal activation manner (that is, the activation manner with the lowest priority required to activate the to-be-updated firmware) cannot be determined, in order to successfully activate the to-be-updated firmware of the peripheral device, the host reset or the host power-on and power-off is directly performed, thereby causing low flexibility of the firmware activation.

[0176] To solve the above problems, an embodiment of the present application provides a firmware activation method, which comprises the following steps: a peripheral device determines an activation manner of to-be-updated firmware according to information of the to-be-updated firmware and information of a currently used firmware, and then sends the activation manner of the to-be-updated firmware to a firmware activation module. Then, the firmware activation module activates the to-be-updated firmware according to the activation manner. Through the above firmware activation method, in the case that the first firmware is different from the second firmware in the changed content, the activation manner of the to-be-updated firmware determined by the peripheral device can be different. Therefore, in different upgrade cases, after the firmware upgrade of the peripheral device is completed, the firmware activation module can activate the to-be-updated firmware by using different activation manners, and the flexibility of the firmware activation can be improved.

[0177] Based on the above system architecture, please refer to Figure 3 , Figure 3 is a flow diagram of a firmware activation method disclosed by an embodiment of the present application. Since the host, the device management module and the management tool can all trigger the upgrade and activation of the firmware of the peripheral device, for the convenience of description, the host, the device management module and the management tool will be collectively referred to as a firmware activation module in the following description. It should be understood that when the firmware activation module is the host or the device management module, the firmware activation module can be set or installed in a server. When the firmware activation module is the management tool, the firmware activation module can be set or installed in the server or the first device. As shown in Figure 3 the firmware activation method can include but is not limited to the following steps:

[0178] 301. The firmware activation module sends third indication information to the peripheral device, and the third indication information is used to instruct the peripheral device to perform the firmware upgrade.

[0179] In the case that the peripheral device has the firmware to be upgraded that can be upgraded, the firmware activation module can send the third indication information to the peripheral device. Accordingly, the peripheral device can receive the third indication information from the firmware activation module, and then can upgrade the firmware of the peripheral device from the second firmware to the first firmware according to the third indication information.

[0180] 302. The peripheral device sends a firmware request command to the firmware activation module, the firmware request command being used to request the firmware file to be upgraded.

[0181] After receiving the third indication information from the firmware activation module, the peripheral device can determine that the firmware to be upgraded can be upgraded according to the third indication information, and then can send the firmware request command to the firmware activation module. The firmware request command is used to request the firmware file to be upgraded (i.e. the first firmware file). Accordingly, the firmware activation module can receive the firmware request command from the peripheral device.

[0182] 303. The firmware activation module sends the first firmware file to the peripheral device, the first firmware file including the first firmware and information of the first firmware, the first firmware being the firmware to be upgraded of the peripheral device.

[0183] After receiving the firmware request command from the peripheral device, the firmware activation module can send the first firmware file to the peripheral device according to the firmware request command. Accordingly, the peripheral device can receive the first firmware file from the firmware activation module.

[0184] The first firmware can include N modules. The information of the first firmware can include information of the N modules, N being a positive integer greater than or equal to 1. The information of the module can include an identifier, a version number and an activation mode of the module, and can further include a feature description of the module.

[0185] It should be noted that the module of the firmware can be understood as a functional module of the firmware, which is used to support or implement the function of the peripheral device. Different modules can have or support different functions. Taking a network card as an example, the firmware of the network card can include a remote direct memory access over converged ethernet (RoCE) module, a virtual eXtensible local area network (VxLAN) module, and a single root-input output virtualization (SR-IOV) module. The RoCE module can have the function of the network card of remote direct memory access over converged ethernet, the VxLAN module can have the function of the network card of virtual eXtensible local area network, and the SR-IOV can have the function of the network card of virtualization. It should be understood that one module can only have or support one function, or can have or support multiple functions.

[0186] The identifier of the module can be the name, index, or other information that can uniquely identify a module. The version number of the module is used to indicate the version of the module, for example, the version number of a module is 1.3, which means that the version of the module is 1.3 version.

[0187] The feature description of the module includes the description of the characteristics of the module (such as the function, specification, performance, configuration parameter, etc. of the module). For example, the feature description of the SR-IOV module of the network card can include the number of supported virtual function (VF) (such as supporting 64 VFs). The activation mode of the module is the lowest priority activation mode required to add or delete the module on the peripheral device, that is, when adding or deleting the module on the peripheral device, the activation mode required to make the addition or deletion of the module effective is the lowest priority. The activation modes of different modules can be the same or different.

[0188] The activation mode can include host power cycle, host reset, soft reset and immediate effect. The activation mode of the module can be one of the four activation modes. The host power cycle means that the host is powered off and then powered on, at this time, the host is powered off (i.e. powered down) and then powered on, the peripheral device is also powered off and then powered on for initialization and reloading of the firmware. The host reset can be understood as the reset of the CPU system and the OS, and the activation mode of the host reset does not power off (i.e. the host, the device management module and the peripheral device do not power off). When the host is reset, the peripheral device is also reset, the hardware (such as a chip) of the peripheral device is reset and the firmware of the peripheral device is reloaded. The host reset can also be referred to as system reset. The immediate effect means that the peripheral device can directly load and activate the firmware to be upgraded without any reset, and the time of interrupting the traffic of the server is shorter than that of the soft reset, and if the firmware to be upgraded and the currently used firmware are not changed much, the traffic processing of the peripheral device can not be interrupted.

[0189] In some embodiments, after the firmware activation module sends the third indication information to the peripheral device, the firmware activation module can continue to send the first firmware file to the peripheral device, i.e. the firmware activation module can directly execute step 303 after executing step 301, and the peripheral device can not execute step 302. In other embodiments, the firmware activation module can directly send the first firmware file to the peripheral device, i.e. only step 303 can be executed and steps 301 and 302 do not need to be executed. In still other embodiments, the peripheral device can directly send a firmware request command to the firmware activation module, and then receive the first firmware file from the firmware activation module, i.e. only steps 302 and 303 can be executed and step 301 does not need to be executed.

[0190] 304. The peripheral device verifies the first firmware file.

[0191] After receiving the first firmware file, the peripheral device can first verify the first firmware file. In the case that the first firmware file is verified successfully, it is indicated that the first firmware file is error-free, and the peripheral device can execute step 305. In the case that the first firmware file is verified unsuccessfully, it is indicated that the first firmware file has errors, and the peripheral device determines that the activation mode of the first firmware is meaningless, and can re-request the first firmware file from the firmware activation module.

[0192] In a possible implementation, the peripheral device can perform a cyclic redundancy check (CRC) on the first firmware or the first firmware file, and in this case, the information of the first firmware can further include a CRC code of the first firmware file. The peripheral device can perform a parity check, a longitudinal redundancy check (LRC), a Golay check, an exclusive OR check, or the like on the first firmware file, and accordingly, the information of the first firmware can include a check code corresponding to the check mode.

[0193] 305. When the first firmware file is verified successfully, the peripheral device determines K changed modules according to the information of the first firmware and the information of the second firmware, and the second firmware is a firmware that is currently used by the peripheral device of the peripheral device.

[0194] The second firmware can include M modules. The information of the second firmware can include information of the M modules, and M is a positive integer greater than or equal to 1.

[0195] Since the modules that are not changed in the first firmware compared with the second firmware do not need to be reactivated, the peripheral device can first determine the modules that are changed in the first firmware compared with the second firmware, and then determine the activation mode of the first firmware according to the changed modules (i.e., step 306).

[0196] Specifically, the peripheral device can determine K modules (i.e., K changed modules) according to the information of the N modules and the information of the M modules, and then determine the activation mode of the first firmware according to the K modules. The K modules can include a deletion module, an addition module, and a modification module of the N modules of the first firmware relative to the M modules of the second firmware. K is a positive integer greater than or equal to 1. The deletion module of the N modules relative to the M modules, i.e., the deletion module of the first firmware relative to the second firmware, refers to a module included in the second firmware but not included in the first firmware, i.e., a module belonging to the second firmware but not belonging to the first firmware. The addition module of the N modules relative to the M modules, i.e., the addition module of the first firmware relative to the second firmware, refers to a module included in the first firmware but not included in the second firmware, i.e., a module belonging to the first firmware but not belonging to the second firmware. The modification module of the N modules relative to the M modules, i.e., the modification module of the first firmware relative to the second firmware, refers to a module that is included in both the first firmware and the second firmware but has a difference in function or role (e.g., there is a difference between the function codes of the module itself) between the first firmware and the second firmware, i.e., a module that belongs to both the first firmware and the second firmware but has a difference in role or function.

[0197] In a possible implementation, the peripheral device can determine, according to the identifiers of the N modules included in the first firmware and the identifiers of the M modules included in the second firmware, deleted modules and added modules of the N modules relative to the M modules, determine, according to the identifiers and version numbers of the N modules and the identifiers and version numbers of the M modules, modified modules of the N modules relative to the M modules, and then determine the K modules according to the deleted modules and added modules of the N modules relative to the M modules and the modified modules of the N modules relative to the M modules. It should be understood that, in the case where a module in the first firmware and a module in the second firmware have the same identifier and version number, it indicates that the two modules are the same module and no modification is made. In the case where a module in the first firmware and a module in the second firmware have the same identifier but different version numbers, it indicates that the two modules are the same module but have been modified.

[0198] In some embodiments, after receiving the first firmware file sent by the firmware activation module, the peripheral device can directly determine the K changed modules according to the information of the first firmware and the information of the second firmware, that is, after receiving the first firmware file, step 305 is directly performed, and step 304 can not be performed.

[0199] 306. The peripheral device determines an activation mode of the first firmware according to the K changed modules.

[0200] After determining the K changed modules, the peripheral device can determine an activation mode corresponding to each of the K changed modules, to obtain L activation modes, and then determine, as the activation mode of the first firmware, an activation mode with the highest priority among the L activation modes. L is an integer less than or equal to K and greater than 0. Different activation modes correspond to different priorities. The activation mode corresponding to a module can be understood as the activation mode with the lowest priority required to activate the module, and accordingly, the activation mode of the first firmware determined by the peripheral device can be the activation mode with the lowest priority required to activate the first firmware. The activation mode of the first firmware can be one of the four activation modes described above.

[0201] In some embodiments, the priorities of the activation modes described above can be determined according to the degree of influence on the host, and the greater the influence, the higher the priority. The priorities of the four activation modes described above can be, in descending order, host power-on, host reset, soft reset, and immediate effect.

[0202] It can be understood that for any one change module, the activation mode with a priority higher than the priority of the activation mode corresponding to the module can activate the module, but the activation mode with a priority lower than the priority of the activation mode corresponding to the module cannot activate the module. For example, for module A, if the lowest priority activation mode required in the case of adding or deleting module A is soft reset, then when adding or deleting module A, the activation mode with a priority higher than that of soft reset (such as host reset or host power-off and power-on) can also successfully activate module A, but the activation mode with a priority lower than that of soft reset (such as immediate effect) cannot successfully activate. It should be understood that the above description of the activation mode is only exemplary and does not constitute a limitation.

[0203] The peripheral device can obtain the activation mode corresponding to the added module and the deleted module in the K modules, that is, directly obtain the activation mode from the information of the added module and the deleted module in the K modules, to obtain L1 activation modes. L1 is an integer greater than or equal to 0 and less than or equal to L. Since the activation modes of different modules can be the same, for the modules with the same activation mode, only one activation mode can be retained. For example, the added modules include module 1, module 2 and module 3; the deleted modules include module 4 and module 5; the activation modes of module 1, module 2 and module 3 in the information of the first firmware can be soft reset, host reset and soft reset respectively; the activation modes of module 4 and module 5 in the information of the second firmware are both soft reset; and the peripheral device can finally determine two activation modes, i.e., host reset and soft reset.

[0204] In a possible implementation, the peripheral device can determine the activation mode of the modified module according to the characteristic description of the modified module in the K modules, to obtain L2 activation modes. L is less than or equal to L1+L2. L2 is an integer greater than or equal to 0 and less than or equal to L.

[0205] The peripheral device can compare the characteristic descriptions of the modified module in the information of the first firmware and the information of the second firmware in the K modules, to determine the specific change content of the modified module, and then determine the activation mode of the modified module according to the change content. The change content is different, and the determined activation mode of the modified module can be different. For example, in the case that the change content of one modified module involves the change of software architecture or interface, the modified module needs to be activated by an activation mode with a higher priority (such as host reset), and in the case that the change content only involves a small change such as configuration parameters, the modified module can be activated by an activation mode with a lower priority (such as immediate effect).

[0206] It can be understood that the peripheral device determines the priority of the activation mode of the modification module through the feature description of the modification module, which is less than or equal to the priority of the activation mode of the modification module in the information of the first firmware. For example, the feature description of the 1.1 version of module B in the second firmware includes three items B1, B2 and B3, and the activation mode is system reset (i.e., the priority of the activation mode required for adding or deleting the 1.1 version of module B is the lowest), the feature description of the 1.3 version of module B in the first firmware includes five items B1, B2, B3, B4 and B5, and the activation mode is also system reset. However, if the version of module B is upgraded from 1.1 to 1.3, only two items B4 and B5 are changed, at this time, the peripheral device only needs to determine the activation mode according to the two items B4 and B5, and can determine that the required activation mode with the lowest priority is soft reset.

[0207] After the peripheral device obtains the L1 activation modes and the L2 activation modes, the peripheral device can determine the activation mode with the highest priority in the L1 activation modes and the L2 activation modes as the activation mode of the first firmware. In some embodiments, the peripheral device can first determine the L activation modes according to the L1 activation modes and the L2 activation modes, and then determine the activation mode with the highest priority in the L activation modes as the activation mode of the first firmware. In other embodiments, the peripheral device can determine the activation mode with the highest priority in the L1 activation modes as a first activation mode, and determine the activation mode with the highest priority in the L2 activation modes as a second activation mode, and then determine the activation mode with the higher priority between the first activation mode and the second activation mode as the activation mode of the first firmware.

[0208] In another possible implementation, the peripheral device can determine the activation mode of the modification module according to the activation modes of the modification module in the information of the first firmware and the information of the second firmware (i.e., directly obtain the activation mode of the modification module in the information of the first firmware or the information of the second firmware), and obtain L3 activation modes. In the case where the activation modes of one modification module in the information of the first firmware and the information of the second firmware are different, the activation mode with the higher priority between the two activation modes can be determined as the activation mode of the modification module. L3 is an integer greater than or equal to 0.

[0209] The peripheral device can determine the first firmware activation mode as the activation mode with the highest priority from the L1 activation modes and the L3 activation modes. In one possible implementation, the peripheral device can first determine L' activation modes from the L1 activation modes and the L3 activation modes, and then determine the first firmware activation mode as the activation mode with the highest priority from the L' activation modes. L' is less than or equal to L1+L3. In another possible implementation, the peripheral device can determine the first activation mode as the activation mode with the highest priority from the L1 activation modes, and determine the third activation mode as the activation mode with the highest priority from the L3 activation modes, and then determine the first firmware activation mode as the activation mode with the higher priority from the first activation mode and the third activation mode. It can be seen that, when the first firmware activation mode is determined in the foregoing manner, the peripheral device does not need to determine the activation mode of the modified module according to the feature description of the modified module, and implementation is relatively simple.

[0210] In yet another possible implementation, the peripheral device can first determine the activation mode of the modified module according to the activation modes of the modified module in the information of the first firmware and the information of the second firmware, and obtain L3 activation modes. Then the peripheral device can determine the first activation mode as the activation mode with the highest priority from the L1 activation modes, and determine the third activation mode as the activation mode with the highest priority from the L3 activation modes. In the case where the priority of the first activation mode is lower than the priority of the third activation mode, the peripheral device can determine the activation mode of the modified module according to the feature description of the modified module, and obtain L2 activation modes. Then the peripheral device can determine the first firmware activation mode as the activation mode with the highest priority from the L1 activation modes and the L2 activation modes, and details are referable to the related content above, which will not be repeated here. In the case where the priority of the first activation mode is higher than or equal to the priority of the third activation mode, the peripheral device can determine the first activation mode as the first firmware activation mode.

[0211] It can be seen that, when the first firmware activation mode is determined in the foregoing manner, the peripheral device can determine the activation mode of the modified module according to the feature description of the modified module only in the case where the priority of the first activation mode is lower than the priority of the third activation mode, which can reduce the number of times of determining the activation mode according to the feature description by the peripheral device, and thereby can save computing resources.

[0212] In some embodiments, when the priority of the first activation mode is lower than the priority of the third activation mode, the peripheral device can first determine the priorities of the activation modes of all the modified modules, i.e., the activation modes determined according to the activation modes of the modified modules in the information of the first firmware and the information of the second firmware, and obtain V modified modules whose priorities of the activation modes are higher than the priority of the first activation mode. Then, the peripheral device can determine the activation modes of the V modified modules according to the feature descriptions of the V modified modules, and obtain L4 activation modes. Then, the peripheral device can determine the activation mode with the highest priority in the L1 activation modes and the L4 activation modes as the activation mode of the first firmware. V is an integer greater than 0. L4 is an integer less than or equal to V and less than or equal to L3. It can be seen that only the activation modes of the V modified modules need to be determined in the above-mentioned manner, which can reduce the number of modified modules whose activation modes need to be determined in some cases, thereby saving computing resources.

[0213] Optionally, when the version number difference of a modified module is large (i.e., the version span is large), it generally means a large change, which is equivalent to adding the module. Therefore, before the peripheral device determines the activation mode corresponding to a modified module according to the feature description of the modified module, the peripheral device can first compare the version numbers of the modified module in the first firmware and the second firmware. If the version number difference of the modified module is greater than a version number threshold (such as 1), the peripheral device can directly determine the activation mode with the highest priority in the information of the first firmware and the information of the second firmware of the modified module as the activation mode corresponding to the modified module. If the version number difference of the modified module is less than or equal to the version number threshold, the peripheral device can determine the activation mode corresponding to the modified module according to the feature description of the modified module. For example, the version number of module C in the first firmware is 2.6, the activation mode of module C in the information of the first firmware is host reset, the version number of module C in the second firmware is 1.4, and the activation mode of module C in the information of the second firmware is soft reset. The peripheral device can determine that the version number difference 1.2 is greater than the version number threshold (such as 1), and then directly determine the activation mode with the highest priority in the information of the first firmware and the information of the second firmware of module C (i.e., host reset) as the activation mode corresponding to module C, without determining the activation mode according to the feature description of module C.

[0214] It should be noted that, since the priority of the activation mode of the modification module in the information of the first firmware is generally higher than the priority of the activation mode in the information of the second firmware, in some embodiments, the peripheral device can also directly determine the activation mode of the modification module in the information of the first firmware as the corresponding activation mode of the modification module, without the need to determine the activation mode with the highest priority in the information of the first firmware and the information of the second firmware as the corresponding activation mode of the modification module.

[0215] The following describes the steps of determining the activation mode of the first firmware by taking the peripheral device as a network card as an example.

[0216] The second firmware can include an SR-IOV module, a VxLAN module, a unified extensible firmware interface (UEFI) module, a link layer discovery protocol (LLDP) module, and a data center bridge (DCB) module. The information of the second firmware can be as shown in Table 1:

[0217]

[0218] Table 1

[0219] The information of the first firmware can be as shown in Table 2.

[0220] Identification of the module Version number Feature description Activation mode RoCE 1.0 Support v1 version RoCE protocol Host reset SR-IOV 1.6 Support 128 VF Host reset VxLAN 2.2 Support inner message hash Host reset UEFI 3.0 Support PXE vlan Host reset DCB 2.0 Support PFC and ETS Soft reset

[0221] Table 2

[0222] According to the information of the first firmware and the information of the second firmware, the peripheral device can determine that the modules that have been changed include the RoCE module, the SR-IOV module, and the LLDP module. The information of the changed modules can be as shown in Table 3:

[0223] Identification of the module Version number Feature description Change category Activation mode RoCE 1.0 Support v1 version RoCE protocol Add Host reset SR-IOV 1.6 Support 128 VF Modify Host reset LLDP 1.0 Support Tx and Rx Delete Soft reset

[0224] Table 3

[0225] Table 3 adds a change category, i.e., the change category of the changed module, compared with Table 1 and Table 2. The change category can be addition, modification, or deletion. As shown in Table 3, the change category of the RoCE module is addition, i.e., the RoCE module is an added module, the change category of the SR-IOV module is modification, i.e., the SR-IOV module is a modified module, and the change category of the LLDP module is deletion, i.e., the LLDP module is a deleted module.

[0226] The activation mode corresponding to the RoCE module and the LLDP module in Table 3 above can be obtained by the peripheral device directly from the information of the first firmware or the information of the second firmware (i.e., the corresponding activation mode in Table 1 and Table 2 above), and the activation mode corresponding to the SR-IOV module can be obtained by the peripheral device according to the feature description of the SR-IOV module in the information of the first firmware and the information of the second firmware. The peripheral device can determine, according to the feature description of the SR-IOV module in the information of the first firmware and the information of the second firmware, that the SR-IOV module in the first firmware has an increased number of supported VFs relative to the SR-IOV module in the second firmware. Since the increased VFs involve changes in data structures and resources, the peripheral device can determine that the activation mode corresponding to the SR-IOV module is host reset. Assuming that the feature description of the SR-IOV module of version 1.6 in the information of the first firmware is "supports 64 VFs, and enables 32 by default", when the SR-IOV module of the network card is upgraded from version 1.3 to version 1.6, the VF number is not changed, and only 32 is enabled by default, therefore, the peripheral device can determine, according to the feature description of the SR-IOV module, that the activation mode required to activate the SR-IOV module with the lowest priority can be soft reset.

[0227] As can be seen from Table 3, the activation modes corresponding to the RoCE module, the LLDP module, and the SR-IOV module are host reset, soft reset, and host reset, respectively, and therefore the activation mode with the highest priority (i.e., host reset) can be determined as the activation mode of the first firmware.

[0228] It should be understood that Table 1 and Table 2 above are only presented in tabular form for the convenience of understanding. The information of the firmware can be stored in any form such as binary, hexadecimal, American Standard Code for Information Interchange (ASCII), register, etc.

[0229] It should be noted that the information of the first firmware and the information of the second firmware can also include parameter configuration information. The parameter configuration information is used to configure the parameters of the peripheral device. The parameter configuration information can be understood as the information of the parameter configuration module included in the firmware, but the parameter configuration module can not have a version number.

[0230] For example, the feature description of the parameter configuration module included in the information of the second firmware of the network card described above can be PXE enabled, PFC closed, and wake-on-LAN (WOL) closed, and the activation mode can be immediate effect. The feature description of the parameter configuration module included in the information of the first firmware can be PXE enabled, PFC enabled, and WOL closed, and the activation mode can be immediate effect. Accordingly, the peripheral device can further determine, according to the information of the first firmware and the information of the second firmware, that the module that has changed includes the parameter configuration module, and the changed content is that the parameter configuration module is changed from PFC closed to PFC enabled. According to the changed content, it can be determined that the activation mode with the lowest priority required by the parameter configuration module is immediate effect.

[0231] It should be understood that the above description of the peripheral device determining the activation mode of the first firmware according to the changed module (i.e., the K modules described above) is only exemplary and does not constitute a limitation.

[0232] 307. The peripheral device sends first indication information to the firmware activation module, and the first indication information is used to indicate the activation mode of the first firmware.

[0233] After the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, the peripheral device can send first indication information to the firmware activation module. Accordingly, the firmware activation module can receive the first indication information from the peripheral device.

[0234] 308. The peripheral device performs firmware upgrade and writes the first firmware into the storage medium.

[0235] After the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, the peripheral device can perform firmware upgrade, i.e., upgrade the firmware of the peripheral device from the second firmware to the first firmware, i.e., write the first firmware into the storage medium of the peripheral device.

[0236] It should be understood that, in the case where the capacity of the storage medium (such as flash) of the peripheral device can only store one firmware file, the peripheral device can directly overwrite the second firmware file (i.e., delete the second firmware file in the storage medium) when writing the first firmware file into the storage medium of the peripheral device. In the case where the capacity of the storage medium of the peripheral device can store two or more firmware files, and the peripheral device supports dual-zone backup, the peripheral device can first write the first firmware file into the backup zone in the storage medium of the peripheral device, and after activating the first firmware, the backup zone can be switched to the main zone. Moreover, the peripheral device can also synchronize the first firmware file to the original main zone (i.e., the current backup zone) to overwrite the second firmware file.

[0237] 309. In the case that the firmware upgrade of the peripheral device succeeds, the peripheral device sends fourth indication information to the firmware activation module, where the fourth indication information is used to indicate that the firmware upgrade of the peripheral device succeeds.

[0238] In the case that the firmware upgrade of the peripheral device succeeds, the peripheral device can send fourth indication information to the firmware activation module. Accordingly, the firmware activation module can receive the fourth indication information from the peripheral device.

[0239] In some embodiments, the peripheral device can perform step 308 first, then perform step 307 in the case that the firmware upgrade of the peripheral device succeeds, or perform step 307 and step 308 simultaneously (i.e. in parallel). In other embodiments, the peripheral device can send the first indication information and the fourth indication information to the firmware activation module together in the case that the firmware upgrade of the peripheral device succeeds, i.e. perform step 308 first, then perform step 307 and step 309 simultaneously. In yet other embodiments, the peripheral device can not send the fourth indication information to the firmware activation module, i.e. can not perform step 309.

[0240] 310. The firmware activation module activates the first firmware according to the activation manner of the first firmware.

[0241] After receiving the fourth indication information from the peripheral device, the firmware activation module can determine that the firmware upgrade of the peripheral device succeeds, and then activate the first firmware according to the activation manner indicated by the first indication information. Activating the first firmware can be understood as switching the firmware running on the chip of the peripheral device from the second firmware to the first firmware.

[0242] In some embodiments, the firmware activation module can determine the upgrade strategy of the server before activating the first firmware, and then activate the first firmware according to the upgrade strategy of the server and the activation manner of the first firmware. Different upgrade strategies correspond to different activation times. The upgrade strategy of the server can be understood as the upgrade strategy of the server computer system, which refers to the upgrade strategy of the server including all peripheral devices, and can be pre-set or set by the server administrator according to the actual situation.

[0243] The above-mentioned upgrade strategy of the server can be silent upgrade or immediate upgrade. In the case that the upgrade strategy is silent upgrade, the firmware activation module can activate the first firmware through the activation manner of the first firmware in the next operation and maintenance window; in the case that the upgrade strategy is immediate upgrade, the firmware activation module can immediately activate the first firmware through the activation manner of the first firmware (i.e. can activate the first firmware immediately after receiving the first indication information).

[0244] The activation operation of the first firmware corresponding to different upgrade strategies and different activation manners of the first firmware can be as shown in Table 4.

[0245]

[0246]

[0247] Table 4

[0248] As shown in Table 4, the upgrade strategy determines whether the activation operation is executed immediately or in the next operation and maintenance window. For example, in the case where the upgrade strategy is immediate upgrade and the activation manner is host reset, the firmware activation module can immediately reset the host. In the case where the upgrade strategy is silent upgrade and the activation manner is host reset, the firmware activation module can wait for the next operation and maintenance window and reset the host in the next operation and maintenance window. It can be understood that, since the host is generally reset during each operation and maintenance window, in the case where the upgrade strategy is silent upgrade and the activation manner is soft reset, the host can be directly reset, and it is not necessary to separately perform soft reset of the peripheral device again. In the case where the activation manner is immediate effect, the first firmware can be directly activated without any reset, and the impact on the service is small, so the firmware activation module can not perform any operation in the two upgrade strategies.

[0249] In the above firmware activation method, the peripheral device can determine the optimal activation manner of the first firmware by comparing the first firmware and the second firmware, and then provide the activation manner to the firmware activation module. Subsequently, the firmware activation module can activate the first firmware through the activation manner, which can avoid using the activation manner of host reset or host power-off and power-on to activate the firmware to be upgraded after each successful firmware upgrade of the peripheral device, and can improve the flexibility of firmware activation. In addition, in some cases, the activation manner of the first firmware determined by the peripheral device can be a low-priority activation manner such as soft reset, so that the advantages of the activation manner such as soft reset can be fully utilized, and the impact on the service can be reduced.

[0250] Based on the above system architecture, please refer to Figure 4 , Figure 4 is a flowchart of another firmware activation method disclosed in the embodiments of the present application. In the firmware activation method, the host and the peripheral device are taken as the execution subjects of the interaction. The host is taken as the firmware activation module to perform firmware upgrade and activation on the peripheral device. As shown in Figure 4 , the firmware activation method can include but is not limited to the following steps:

[0251] 401. The host sends a firmware upgrade command to the peripheral device.

[0252] In the case that the host needs to upgrade the firmware of the peripheral device, the host can send a firmware upgrade command to the peripheral device. Accordingly, the peripheral device can receive the firmware upgrade command from the host, and can determine that the firmware to be upgraded can be upgraded, and can prepare to receive the firmware to be upgraded or the firmware file to be upgraded. The firmware upgrade command is the same as the third indication information in step 301, and the related description of the third indication information can be referred to.

[0253] 402. The host sends a first firmware file to the peripheral device, the first firmware file comprising information of a first firmware, the first firmware being the firmware to be upgraded.

[0254] After the host sends the firmware upgrade command to the peripheral device, the host can continue to send the first firmware file to the peripheral device. Accordingly, the peripheral device can receive the first firmware file from the host. The first firmware file can comprise the first firmware and the information of the first firmware. The information of the first firmware is described in more detail in the related description of the information of the first firmware in step 303, which will not be repeated here.

[0255] 403. The peripheral device determines an activation mode of the first firmware according to the information of the first firmware and the information of a second firmware, the second firmware being the firmware being used.

[0256] The detailed steps of the peripheral device determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware are the same as the steps of the peripheral device determining the activation mode of the first firmware in steps 305 and 306, and the related description in steps 305 and 306 can be referred to, which will not be repeated here.

[0257] 404. The peripheral device performs firmware upgrade and writes the first firmware into the storage medium.

[0258] The related description of the peripheral device performing firmware upgrade can be referred to the related description in step 308.

[0259] 405. The peripheral device sends first indication information to the host, the first indication information indicating the activation mode of the first firmware.

[0260] The related description of the peripheral device sending the first indication information to the host can be referred to the related description in step 307, which will not be repeated here.

[0261] Optionally, the peripheral device can also send a firmware upgrade completion message to the host to inform the host that the firmware upgrade of the peripheral device is completed (i.e. the first firmware is successfully written into the storage medium of the peripheral device). The firmware upgrade completion message is similar to the fourth indication information, and the related description of the fourth indication information in step 309 can be referred to.

[0262] 406. The host activates the first firmware according to the activation mode of the first firmware.

[0263] After the host receives the first indication information sent by the peripheral device, the host can activate the first firmware according to the activation mode indicated by the first indication information. The step of activating the first firmware according to the activation mode of the first firmware by the host is similar to the step of activating the first firmware according to the activation mode of the first firmware by the firmware activation module in step 310, and the related description in step 310 can be referred to.

[0264] It should be noted that the operations performed by the host in the above method embodiments can also be understood as operations performed by the processor.

[0265] Based on the above system architecture, please refer to Figure 5 , Figure 5 is a flowchart of another firmware activation method disclosed in the embodiments of the present application. In the firmware activation method, the device management module and the peripheral device are taken as the execution subjects of the interaction. The device management module, as the firmware activation module, upgrades and activates the firmware of the peripheral device. The device management module can use a protocol structure of PLDM over MCTP over PCIE when upgrading the firmware of the peripheral device. It should be understood that the PLDM over MCTP over PCIE protocol structure refers to a structure in which the PCIE protocol carries the MCTP protocol, and the MCTP protocol carries the PLDM protocol. From the message structure, the PLDM message can be taken as the payload of the MCTP message and encapsulated in the MCTP message. The MCTP message can be taken as the payload of the PCIE message and encapsulated in the PCIE message. The PLDM protocol (specification) defines the process and related commands of firmware upgrade. As shown in Figure 5 The firmware activation method can include but is not limited to the following steps:

[0266] 501. The device management module sends a firmware upgrade command to the peripheral device.

[0267] In the case where the device management module needs to upgrade the firmware of the peripheral device, the device management module can send a firmware upgrade command (Request Update) to the peripheral device. Correspondingly, the peripheral device can receive the firmware upgrade command from the device management module. The firmware upgrade command is the same as the third indication information in step 301, and the related description of the third indication information can be referred to.

[0268] 502. The peripheral device sends a firmware request command to the host.

[0269] After the peripheral device receives the firmware upgrade command from the device management module, it can determine that the firmware to be upgraded can be upgraded, and can send a firmware request command (Request Firmware Data) to the device management module. Correspondingly, the device management module can receive the firmware request command from the peripheral device.

[0270] 503. The device management module sends a first firmware file to the peripheral device, the first firmware file comprising information of a first firmware, the first firmware being the firmware to be upgraded.

[0271] After the device management module receives the firmware request command from the peripheral device, it can send the first firmware file to the peripheral device. Correspondingly, the peripheral device can receive the first firmware file from the device management module. The first firmware file can comprise information of the first firmware and the firmware to be upgraded. The information of the first firmware is described in more detail in the description of the information of the first firmware in step 303 above, and will not be described here again.

[0272] 504. The peripheral device verifies the first firmware file.

[0273] After the peripheral device receives the first firmware file sent by the device management module, it can verify the first firmware file (Verify Image). If the first firmware file is verified successfully, the peripheral device can continue to perform the following steps (i.e., step 505). If the first firmware file fails to be verified, the peripheral device can resend the firmware request command, which can be described in the corresponding embodiments. Figure 3

[0274] 505. The peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of a second firmware, the second firmware being the firmware in use.

[0275] The detailed steps of the peripheral device determining the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware are the same as those in steps 305 and 306 above, and will not be described here again.

[0276] 506. The peripheral device performs firmware upgrade and writes the first firmware into the storage medium.

[0277] After the peripheral device receives the first firmware file, it can perform firmware upgrade (Apply Image). The detailed description of the peripheral device performing firmware upgrade can be described in step 308 above.

[0278] ​507. The peripheral device sends a firmware upgrade completion message to the device management module, including first indication information, the first indication information indicating an activation mode of the first firmware.

[0279] After the firmware upgrade of the peripheral device is completed (i.e., the first firmware is successfully written into the storage medium of the peripheral device), a firmware upgrade completion message can be sent to the device management module, and the first indication information can be carried in the firmware upgrade completion message.

[0280] The firmware upgrade completion message can be an Apply Complete message. The Apply Complete message is a message defined in the PLDM protocol, which is sent to the device management module after the peripheral device upgrade is completed (i.e., the firmware upgrade is successful), so that the device management module can know that the firmware upgrade of the peripheral device is completed. The data format of the Apply Complete message can be as shown in Figure 6 The Apply Complete message can include a 12-byte PCIE Vender defined mechanism (VDM) message header, a 4-byte MCTP header, a 1-bit integrity check (IC), a 7-bit message type, a 4-byte PLDM Header, a 1-byte Apply Result, and a 2-byte Component Activation Methods Modification.

[0281] The Apply Complete message includes an extensible field, so the Apply Complete message can be extended to define firmware activation method requirements (Activation Method Requirement), so that the peripheral device can pass the activation mode of the first firmware to the device management module. In the Apply Complete message, the Reserved field in the Component Activation Methods Modification field can be extended and defined to define the firmware activation method requirement, and 8 different activation methods such as 0x0-0x7 can be defined, as shown below:

[0282] Component Activation Methods Modification

[0283] [15:11]-Reserved

[0284] [10:8] - Activation Method Requirement (to define the firmware activation method requirement)

[0285] 0x0 - Automatic

[0286] 0x1 - Self-Contained

[0287] 0x2 - Medium-specific reset

[0288] 0x3 - System reboot

[0289] 0x4 - DC power cycle

[0290] 0x5 - AC power cycle

[0291] 0x6 - Supports ActivatePendingImage

[0292] 0x7 - Supports ActivatePendingComponentImageset

[0293] [7:0] - Component Activation Capability (Specification Definition) (to indicate that the 8 bits of [7:0] are for Component Activation Capability, i.e. the activation method supported by the component, including 8 activation methods defined by PLDM Specification (corresponding to the above 0x1-0x7 activation methods). Each of the 8 bits corresponds to an activation method capability, and a bit value of "1" indicates that the component (i.e. peripheral device) supports the activation method, and a bit value of "0" indicates that the component does not support the activation method. The component can support multiple activation methods, i.e. multiple bits can be set to "1".)

[0294] The automatic activation mode means that the peripheral device can activate the firmware to be upgraded by itself. The self-contained activation mode means that the peripheral device can activate the firmware to be upgraded by itself after receiving the activation command sent by the device management module. The medium-specific reset means the reset of the interface medium. The system reboot means the reset of the host. The direct current (DC) power cycle means the power-off and power-on of the direct current power supply, i.e., the power-off and power-on of the host system, which means the power-off and power-on of the CPU system of the server, but the device management module does not power off. The alternating current (AC) power cycle means the power-off and power-on of the alternating current power supply, i.e., the power-off and power-on of the whole server, including the CPU system and the device management module. The support activate pending image means the delayed activation of a single firmware (image), which requires the firmware activation module (i.e., the device management module) to send a specific activation command to the peripheral device, and the peripheral device can perform the activation operation of the single firmware after receiving the activation command. The support activate pending component image set means the delayed activation of multiple firmwares (image set), which requires the firmware activation module to send a specific activation command to the peripheral device, and the peripheral device can perform the activation operation of the multiple firmwares after receiving the activation command. This activation mode can be used for a peripheral device including multiple functional modules (such as multiple chips), each functional module having its own independent firmware, so as to improve the activation efficiency.

[0295] 508. The device management module activates the first firmware according to the activation mode of the first firmware.

[0296] After receiving the first indication information sent by the peripheral device, the device management module can activate the first firmware according to the activation mode indicated by the first indication information. The device management module can obtain the activation mode of the first firmware from the firmware activation mode requirement field in the Apply Complete message. For example, the firmware activation mode requirement field in the Apply Complete message is 0x2, and the device management module can determine that the corresponding activation mode is the host reset. The step of activating the first firmware according to the activation mode of the first firmware by the device management module is similar to the step of activating the first firmware according to the activation mode of the first firmware by the firmware activation module in step 310, and the related description in step 310 can be referred to.

[0297] It should be understood that, on the basis of the firmware upgrade process defined in the PLDM protocol, the peripheral device can determine the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, and carry the activation mode of the first firmware in the Apply Complete message when sending the Apply Complete message by using the extension field provided by the PLDM protocol, and provide the activation mode of the first firmware to the peripheral device, so as to improve the flexibility of firmware activation, and have good specification compliance and realizability.

[0298] Based on the above system architecture, please refer to Figure 7 , Figure 7 is a flow diagram of another firmware activation method disclosed in the embodiments of the present application. In the firmware activation method, the management tool, the device management module and the peripheral device are taken as the execution subjects of the interaction diagram. The management tool is taken as the firmware activation module, and performs firmware upgrade and activation on the peripheral device. It should be understood that the management tool triggers the firmware upgrade and activation of the peripheral device mainly through the device management module. The management tool can send the to-be-upgraded firmware file to the peripheral device through the device management module, and upgrade the firmware of the peripheral device. After that, when the device management module receives the message returned by the peripheral device (such as the firmware upgrade completion message), the device management module can send the message to the management tool. Then, the management tool can activate the to-be-upgraded firmware of the peripheral device through the device management module.

[0299] As shown in Figure 7 , the firmware activation method can include but is not limited to the following steps:

[0300] 701. The management tool sends a firmware upgrade command to the device management module.

[0301] In the case where the management tool needs to upgrade the firmware of the peripheral device, the management tool can send a firmware upgrade command to the device management module, which can be used to instruct the device management module to upgrade the firmware of the peripheral device. Correspondingly, the device management module can receive the firmware upgrade command from the management tool.

[0302] 702. The management tool sends a first firmware file to the device management module, the first firmware file including information of a first firmware, and the first firmware being a to-be-upgraded firmware.

[0303] After the management tool sends the firmware upgrade command to the device management module, the management tool can continue to send the first firmware file to the device management module. Correspondingly, after the device management module receives the firmware upgrade command from the management tool, the device management module can continue to receive the first firmware file from the management tool. Then, the device management module can upgrade the firmware of the peripheral device, and can execute step 703.

[0304] 703. The device management module sends a firmware upgrade command to the peripheral device.

[0305] 704. The peripheral device sends a firmware request command to the host.

[0306] 705. The device management module sends a first firmware file to the peripheral device, the first firmware file comprising information of a first firmware, the first firmware being a firmware to be upgraded.

[0307] 706. The peripheral device checks the first firmware file.

[0308] 707. The peripheral device determines an activation mode of the first firmware according to the information of the first firmware and information of a second firmware, the second firmware being a firmware in use.

[0309] 708. The peripheral device performs firmware upgrade and writes the first firmware into a storage medium.

[0310] 709. The peripheral device sends a firmware upgrade completion message to the device management module, the firmware upgrade completion message comprising first indication information, the first indication information indicating the activation mode of the first firmware.

[0311] The steps 703-709 above are the same as the steps 501-507 in Figure 5 , and reference can be made to the related descriptions of the steps 501-507 above.

[0312] 710. The device management module sends the first indication information to the management tool, the first indication information being used to indicate the activation mode of the first firmware.

[0313] After the device management module receives the firmware upgrade completion message sent by the peripheral device, the device management module can send the first indication information comprised in the firmware upgrade completion message to the management tool. Correspondingly, the management tool can receive the first indication information from the device management module. In some embodiments, the management tool can output the activation mode indicated by the first indication information through a display module of the first device or the server, so that the activation mode of the first firmware can be provided to a server administrator.

[0314] 711. The management tool sends second indication information to the device management module, the second indication information being used to instruct the device management module to activate the first firmware through the activation mode of the first firmware.

[0315] When the management tool needs to activate the first firmware, the management tool can send the second indication information to the device management module. Correspondingly, the device management module can receive the second indication information from the management tool. In some embodiments, the management tool can receive an input of a server administrator, and in response to the input, the management tool sends the second indication information to the device management module.

[0316] 712.The device management module activates the first firmware according to the activation mode of the first firmware.

[0317] After the device management module receives the second indication information sent by the management tool, the device management module can activate the first firmware according to the activation mode of the first firmware. The detailed steps of activating the first firmware according to the activation mode of the first firmware can refer to the above step 508.

[0318] It should be noted that the related information (i.e. the same information or similar information) and the related description in the above different embodiments can be mutually referred.

[0319] It should be understood that, in addition to the above host, device management module, management tool, the firmware activation module can also be other devices that can initiate a firmware upgrade request or indication to the peripheral device, and the embodiments of the present application are not limited thereto. It should also be understood that the above Figure 3 、 Figure 4 、 Figure 5 and Figure 7 The firmware activation module, host, device management module, and peripheral device are taken as an example of the interactive execution subject to illustrate the above firmware activation method, but the present application does not limit the interactive execution subject. For example, the firmware activation module in Figure 3 may also be a chip, chip system, or processor supporting the implementation of the firmware activation module to achieve the method, and can also be a logic module or software that can achieve all or part of the functions of the firmware activation module.

[0320] Based on the above system architecture, please refer to Figure 8 , Figure 8 is a structural schematic diagram of a firmware activation device disclosed by the embodiments of the present application. The firmware activation device can be a peripheral device of a server, or a module (for example, a chip) in the peripheral device of the server. As Figure 8 indicated, the firmware activation device can include:

[0321] The receiving unit 801 is configured to receive information of a first firmware, the first firmware being a to-be-upgraded firmware of the peripheral device;

[0322] The determining unit 802 is configured to determine an activation mode of the first firmware according to the information of the first firmware and information of a second firmware, the second firmware being a firmware currently used by the peripheral device;

[0323] The sending unit 803 is configured to send first indication information, the first indication information indicating the activation mode of the first firmware.

[0324] In one embodiment, the first firmware includes N modules, and the second firmware includes M modules, N and M are positive integers greater than or equal to 1; the determining unit 802 determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, including:

[0325] determining K modules according to the information of the N modules and the information of the M modules, the K modules including deletion modules, addition modules and modification modules of the N modules relative to the M modules, K is a positive integer greater than or equal to 1;

[0326] determining the activation mode of the first firmware according to the K modules.

[0327] In one embodiment, the information of the module includes the identification and version number of the module, and the determining unit 802 determines the K modules according to the information of the N modules and the information of the M modules, including:

[0328] determining the deletion modules and the addition modules of the N modules relative to the M modules according to the identification of the N modules and the identification of the M modules;

[0329] determining the modification modules of the N modules relative to the M modules according to the identification and version number of the N modules and the identification and version number of the M modules;

[0330] determining the K modules according to the deletion modules and the addition modules of the N modules relative to the M modules, and the modification modules of the N modules relative to the M modules.

[0331] In one embodiment, the determining unit 802 determines the activation mode of the first firmware according to the K modules, including:

[0332] determining the activation mode corresponding to each module in the K modules to obtain L activation modes, L is an integer less than or equal to K and greater than 0, different activation modes correspond to different priorities;

[0333] determining the activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

[0334] In one embodiment, the information of the module further includes the feature description and the activation mode of the module, and the determining unit 802 determines the activation mode corresponding to each module in the K modules to obtain L activation modes, including:

[0335] obtaining the activation modes of the addition modules and the deletion modules in the K modules to obtain L1 activation modes, L1 is an integer greater than or equal to 0;

[0336] The activation mode of the modification module is determined according to the feature description of the modification module, and L2 activation modes are obtained, where L2 is an integer greater than or equal to 0;

[0337] The L activation modes are determined according to the L1 activation modes and the L2 activation modes, where L is an integer less than or equal to L1+L2.

[0338] In one embodiment, the receiving unit 801 is further configured to receive third indication information, where the third indication information is used to instruct the peripheral device to perform firmware upgrading.

[0339] The apparatus can further include:

[0340] The upgrading unit 804 is configured to upgrade the firmware of the peripheral device from the second firmware to the first firmware according to the third indication information.

[0341] In one embodiment, the sending unit 803 is further configured to send fourth indication information in a case where the firmware upgrading of the peripheral device is successful, where the fourth indication information is used to instruct that the firmware upgrading of the peripheral device is successful.

[0342] In one embodiment, the apparatus can further include:

[0343] The checking unit 805 is configured to check the first firmware.

[0344] The determination unit 802 determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, and the activation mode of the first firmware includes:

[0345] In a case where the first firmware is checked successfully, the activation mode of the first firmware is determined according to the information of the first firmware and the information of the second firmware.

[0346] In one embodiment, the server is provided with a host, and the activation mode is one of host power-off, host reset, soft reset and immediate effect.

[0347] The foregoing receiving unit 801, determination unit 802, sending unit 803, upgrading unit 804 and checking unit 805 can be directly referred to the related description of the peripheral device in the method embodiment shown in Figure 3 、 Figure 4 、 Figure 5 and Figure 7 , and thus will not be described here.

[0348] Based on the foregoing system architecture, please refer to Figure 9 , Figure 9is a structural schematic diagram of another firmware activation device disclosed by an embodiment of the present application. The firmware activation device can be applied to a firmware activation module. The firmware activation module can be a host or a device management module of a management tool or a server. The management tool can be set or installed in the server or the first device. The server is provided with a peripheral device. As shown in Figure 9 The firmware activation device can include the following components.

[0349] A sending unit 901 is configured to send information of a first firmware to a peripheral device of a server, the first firmware being a firmware to be upgraded.

[0350] A receiving unit 902 is configured to receive first indication information from the peripheral device, the first indication information indicating an activation mode of the first firmware.

[0351] An activation unit 903 is configured to activate the first firmware according to the activation mode.

[0352] In an embodiment, the device further includes the following components.

[0353] A determination unit 904 is configured to determine an upgrade strategy of the server, different upgrade strategies corresponding to different activation times.

[0354] The activation unit 903 activates the first firmware according to the activation mode includes the following steps.

[0355] Activating the first firmware according to the upgrade strategy and the activation mode.

[0356] In an embodiment, the upgrade strategy is silent upgrade or immediate upgrade. The activation unit 903 activates the first firmware according to the upgrade strategy and the activation mode includes the following steps.

[0357] In the case of silent upgrade, the first firmware is activated by the activation mode in the next operation and maintenance window.

[0358] In the case of immediate upgrade, the first firmware is activated immediately by the activation mode.

[0359] In an embodiment, the sending unit 901 is further configured to send third indication information to the peripheral device, the third indication information being used to instruct the peripheral device to perform firmware upgrade.

[0360] In an embodiment, the receiving unit 902 is further configured to receive fourth indication information from the peripheral device, the fourth indication information being used to indicate that the firmware upgrade of the peripheral device is successful.

[0361] The activation unit 903 activates the first firmware according to the activation mode includes the following steps.

[0362] In a case that the fourth indication information is received, the first firmware is activated according to the activation mode.

[0363] More detailed description about the sending unit 901, the receiving unit 902, the activation unit 903 and the determining unit 904 can be directly referred to the related description about the firmware activation module in the method embodiment shown in the above Figure 3 The related description about the firmware activation module in the method embodiment shown in the above

[0364] Based on the system architecture, please refer to Figure 10 , Figure 10 is a structural schematic diagram of an electronic device disclosed by the embodiment of the present application. The electronic device 1000 can include a processor 1001, a communication interface 1002 and a memory 1003. The processor 1001, the communication interface 1002 and the memory 1003 can be connected with each other or connected with each other through a bus 1004.

[0365] For example, the memory 1003 is used for storing the computer program and data of the electronic device 1000, and the memory 1003 can include but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM) or a compact disc read-only memory (CD-ROM) and the like. The communication interface 1002 is used for supporting the electronic device 1000 to communicate, for example, to receive or send data.

[0366] For example, the processor 1001 can be a CPU, a complex programmable logic device, a general processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. The processor can also be a combination for realizing computing function, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor and the like.

[0367] In an embodiment, the electronic device 1000 can be a firmware activation module, and the processor 1001 can be used for reading the program stored in the memory 1003 and executing the operations of the firmware activation module in the method embodiment shown in the above Figure 3 The operations of the firmware activation module in the method embodiment shown in the above

[0368] In an embodiment, the electronic device 1000 can be a peripheral device, and the processor 1001 can be used for reading the program stored in the memory 1003 and executing the operations of the firmware activation module in the method embodiment shown in the aboveFigure 3 , Figure 4 , Figure 5 ,as well as Figure 7 The operations performed by the peripheral devices in the method embodiments can be referred to the relevant descriptions above, and will not be repeated in detail here.

[0369] In one embodiment, the electronic device 1000 can be a first device, a server host, or a device management module. The processor 1001 can be used to read the program stored in the memory 1003 and execute it. Figure 4 , Figure 5 ,as well as Figure 7 The operations performed by the host or device management module or management tool in the method embodiments can be referred to the above-mentioned descriptions, and will not be repeated in detail here.

[0370] It should be noted that, Figure 10 The electronic device 1000 shown is merely one implementation of the embodiments of this application. In actual applications, the electronic device 1000 may include more or fewer components, which is not limited here.

[0371] Based on the above system architecture, please refer to Figure 11 , Figure 11 This is a schematic diagram of the structure of a firmware activation system disclosed in an embodiment of this application. Figure 11 As shown, the firmware activation system may include a firmware activation module 1101 and a peripheral device 1102. The firmware activation module 1101 can be a management tool, a host, a device management module, etc. When the firmware activation module is a management tool, it can be located in the first device or server. In this case, the management tool triggering firmware upgrades and activation of the peripheral device can be understood as the first device or server triggering firmware upgrades and activation of the peripheral device. Wherein:

[0372] The peripheral device 1102 is used to obtain information about the first firmware.

[0373] The peripheral device 1102 is also used to determine the activation method of the first firmware based on the information of the first firmware and the information of the second firmware. The first firmware is the firmware to be upgraded for the peripheral device 1102, and the second firmware is the firmware currently being used by the peripheral device 1102.

[0374] The peripheral device 1102 is also used to send a first indication message to the firmware activation module 1101, the first indication message indicating the activation method of the first firmware;

[0375] The firmware activation module 1101 is used to activate the first firmware according to the activation method.

[0376] In one embodiment, the first firmware comprises N modules, the information of the first firmware comprises the identification, version number and activation mode of the N modules, N is a positive integer greater than or equal to 1.

[0377] As a possible implementation, the information of the first firmware further comprises the feature description of the N modules.

[0378] As a possible implementation, the second firmware comprises M modules, M is a positive integer greater than or equal to 1; the peripheral device 1102 determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, comprising:

[0379] The peripheral device 1102 determines K modules according to the information of the N modules and the information of the M modules, the K modules comprising the deletion module, the addition module and the modification module of the N modules relative to the M modules, K is a positive integer greater than or equal to 1;

[0380] The peripheral device 1102 determines the activation mode of the first firmware according to the K modules.

[0381] As a possible implementation, the peripheral device 1102 determines K modules according to the information of the N modules and the information of the M modules, comprising:

[0382] The peripheral device 1102 determines the deletion module and the addition module of the N modules relative to the M modules according to the identification of the N modules and the identification of the M modules;

[0383] The peripheral device 1102 determines the modification module of the N modules relative to the M modules according to the identification and version number of the N modules and the identification and version number of the M modules;

[0384] The peripheral device 1102 determines the K modules according to the deletion module and the addition module of the N modules relative to the M modules, and the modification module of the N modules relative to the M modules.

[0385] As a possible implementation, the peripheral device 1102 determines the activation mode of the first firmware according to the K modules, comprising:

[0386] The peripheral device 1102 determines the activation mode corresponding to each module in the K modules, obtains L activation modes, L is an integer less than or equal to K and greater than 0, different activation modes correspond to different priorities;

[0387] The peripheral device 1102 determines the activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

[0388] As a possible implementation, the peripheral device 1102 determines the activation mode corresponding to each of the K modules, and obtains L activation modes including:

[0389] The peripheral device 1102 obtains the activation mode of the added module and the deleted module in the K modules, and obtains L1 activation modes, L1 being an integer greater than or equal to 0;

[0390] The peripheral device 1102 determines the activation mode of the modified module according to the feature description of the modified module in the K modules, and obtains L2 activation modes, L2 being an integer greater than or equal to 0;

[0391] The peripheral device 1102 determines the L activation modes according to the L1 activation modes and the L2 activation modes, L being an integer less than or equal to L1+L2.

[0392] As a possible implementation, the peripheral device 1102 is further configured to verify the first firmware.

[0393] The peripheral device 1102 determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware.

[0394] In the case that the first firmware is verified successfully, the peripheral device 1102 determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware.

[0395] As a possible implementation, the peripheral device 1102 is further configured to send first indication information to the firmware activation module 1101, the first indication information indicating the activation mode of the first firmware.

[0396] As a possible implementation, the peripheral device 1102 is further configured to upgrade the firmware of the peripheral device 1102 from the second firmware to the first firmware.

[0397] The firmware activation module 1101 activates the first firmware according to the activation mode includes:

[0398] In the case that the firmware of the peripheral device 1102 is upgraded successfully, the firmware activation module 1101 activates the first firmware according to the activation mode.

[0399] As a possible implementation, the peripheral device 1102 is further configured to receive third indication information from the firmware activation module 1101, the third indication information being used to instruct the peripheral device 1102 to upgrade the firmware.

[0400] The peripheral device 1102 upgrades the firmware of the peripheral device 1102 from the second firmware to the first firmware includes:

[0401] The peripheral device 1102 upgrades the firmware of the peripheral device 1102 from the second firmware to the first firmware according to the third indication information.

[0402] As a possible implementation, the peripheral device 1102 is further configured to send, to the firmware activation module 1101, fourth indication information in a case where the firmware of the peripheral device 1102 is successfully upgraded, the fourth indication information being used to indicate that the firmware of the peripheral device 1102 is successfully upgraded.

[0403] As a possible implementation, the firmware activation module 1101 is further configured to determine an upgrade strategy of the server, different upgrade strategies corresponding to different activation times.

[0404] The firmware activation module 1101 activates the first firmware according to the activation mode.

[0405] The firmware activation module 1101 activates the first firmware according to the upgrade strategy and the activation mode.

[0406] As a possible implementation, the upgrade strategy is silent upgrade or immediate upgrade; and the firmware activation module 1101 activates the first firmware according to the upgrade strategy and the activation mode includes:

[0407] In a case where the upgrade strategy is silent upgrade, the firmware activation module 1101 activates the first firmware through the activation mode in the next operation and maintenance window;

[0408] In a case where the upgrade strategy is immediate upgrade, the firmware activation module 1101 activates the first firmware immediately through the activation mode.

[0409] As a possible implementation, the peripheral device 1102 is located in a server, the server is provided with a host, and the activation mode is one of power-on, reset, soft reset and immediate effect of the host.

[0410] As a possible implementation, the firmware activation module 1101 is a processor, or the firmware activation module 1101 is a device management module, or the firmware activation module 1101 is a management tool.

[0411] As a possible implementation, when the firmware activation module 1101 is a device management module, the peripheral device 1102 is further configured to send, to the firmware activation module 1101, an application completion message in a case where the firmware of the peripheral device 1102 is successfully upgraded, the application completion message being used to indicate that the firmware of the peripheral device 1102 is successfully upgraded.

[0412] As a possible implementation, the management tool is located in the first device or the server.

[0413] For more detailed description of the firmware activation module 1101 and the peripheral device 1102, please refer to the above description. Figure 3 The description of the firmware activation module and the peripheral device in the method embodiment shown above is directly obtained, and thus is not described here.

[0414] The embodiment of the present application further discloses a computer readable storage medium, which stores instructions, and the instructions are executed to perform the method in the above method embodiment.

[0415] The embodiment of the present application further discloses a computer program product including instructions, and the instructions are executed to perform the method in the above method embodiment.

[0416] Obviously, the above described embodiments are only some of the embodiments of the present application, but not all the embodiments. In this document, the term "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean that the same embodiment is being referred to, nor does it mean that the same embodiment is preferred over other embodiments. It will be apparent to those skilled in the art from this disclosure that the embodiments described herein can be combined with other embodiments in various ways. All other embodiments obtained by those of ordinary skill in the art from the embodiments described herein without creative work are within the scope of the present application. The terms "first", "second", "third" and the like in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not used to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a series of steps or units are included, or optionally, other steps or units not listed are included, or optionally, other steps or units inherent to the process, method, product or equipment are included.

[0417] It can be understood that only some of the relevant parts are shown in the drawings, but not all. It should be understood that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart describes the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when the operations are completed, but can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, etc.

[0418] The terms "component," "module," "system," "unit," and the like are used in the present specification to represent a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. Also, the units can be executed from various computer-readable media having various data structures stored thereon. The units can communicate, for example, by way of local and / or remote processes, according to a signal having one or more data packets (e.g., from a second unit and to a second unit by way of a local system, distributed system, and / or across the Internet, e.g., via a signal between other systems interacting with the second unit). For example, the Internet.

[0419] The above detailed description has been made for the purpose of explaining the purpose, technical solutions, and beneficial effects of the present application. It should be understood that the above description is only a specific implementation of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the present application shall be included in the protection scope of the present application.

Claims

1. A firmware activation method, characterized by, The method is applied to a firmware activation system including a firmware activation module and a peripheral device, and the method comprises: The peripheral device acquires information of a first firmware; The peripheral device determines a change module according to the information of the first firmware and information of a second firmware, determines an activation mode corresponding to each module in the change module, and determines an activation mode with the highest priority as an activation mode of the first firmware, wherein the first firmware is a firmware to be upgraded of the peripheral device, the second firmware is a firmware currently used by the peripheral device, and the activation mode of the first firmware includes one of host power-off, host reset, soft reset, and immediate effect; The peripheral device sends first indication information to the firmware activation module, wherein the first indication information indicates the activation mode of the first firmware; The firmware activation module activates the first firmware according to the activation mode of the first firmware.

2. The method of claim 1, wherein, The first firmware includes N modules, the information of the first firmware includes identifiers, version numbers, and activation modes of the N modules, and N is a positive integer greater than or equal to 1.

3. The method of claim 2, wherein, The second firmware includes M modules, M is a positive integer greater than or equal to 1, and the peripheral device determines the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware, comprising: The peripheral device determines K modules according to the information of the N modules and the information of the M modules, wherein the K modules include deletion modules, addition modules, and modification modules of the N modules relative to the M modules, and K is a positive integer greater than or equal to 1; The peripheral device determines the activation mode of the first firmware according to the K modules.

4. The method of claim 3, wherein, The peripheral device determines the activation mode of the first firmware according to the K modules, comprising: The peripheral device determines an activation mode corresponding to each module in the K modules to obtain L activation modes, L is an integer less than or equal to K and greater than 0, and different activation modes correspond to different priorities; The peripheral device determines an activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: The peripheral device upgrades the firmware of the peripheral device from the second firmware to the first firmware; The firmware activation module activates the first firmware according to the activation mode of the first firmware, comprising: In a case where the firmware upgrade of the peripheral device is successful, the firmware activation module activates the first firmware according to the activation mode of the first firmware.

6. The method according to any one of claims 1 to 5, characterized in that, The firmware activation module is a processor, or the firmware activation module is a device management module, or the firmware activation module is a management tool.

7. The method of claim 6, wherein, The method further comprises: When the firmware activation module is the device management module, in a case where the firmware upgrade of the peripheral device is successful, the peripheral device sends an application completion message to the firmware activation module, wherein the application completion message is used to indicate that the firmware upgrade of the peripheral device is successful.

8. A firmware activation method characterized by, The method is applied to a peripheral device of a server, and the method comprises: receiving information of a first firmware, the first firmware being a firmware to be upgraded of the peripheral device; determining a change module according to the information of the first firmware and information of a second firmware, determining an activation mode corresponding to each module in the change module, different activation modes corresponding to different priorities, and determining an activation mode with the highest priority as an activation mode of the first firmware, the second firmware being a firmware currently used by the peripheral device; the activation mode of the first firmware including one of host power-off, host reset, soft reset and immediate effect; sending first indication information, the first indication information indicating the activation mode of the first firmware.

9. The method of claim 8, wherein, The first firmware includes N modules, and the second firmware includes M modules, N and M being positive integers greater than or equal to 1; the determination of the activation mode of the first firmware according to the information of the first firmware and the information of the second firmware includes: determining K modules according to the information of the N modules and the information of the M modules, the K modules including deletion modules, addition modules and modification modules of the N modules relative to the M modules, K being a positive integer greater than or equal to 1; determining the activation mode of the first firmware according to the K modules.

10. The method of claim 9, wherein, The information of the module includes an identifier and a version number of the module, and the determination of the K modules according to the information of the N modules and the information of the M modules includes: determining the deletion modules and the addition modules of the N modules relative to the M modules according to the identifiers of the N modules and the identifiers of the M modules; determining the modification modules of the N modules relative to the M modules according to the identifiers and the version numbers of the N modules and the identifiers and the version numbers of the M modules; determining the K modules according to the deletion modules and the addition modules of the N modules relative to the M modules and the modification modules of the N modules relative to the M modules.

11. The method according to claim 9 or 10, characterized in that, The determination of the activation mode of the first firmware according to the K modules includes: determining an activation mode corresponding to each module in the K modules, obtaining L activation modes, L being an integer less than or equal to K and greater than 0, different activation modes corresponding to different priorities; determining an activation mode with the highest priority in the L activation modes as the activation mode of the first firmware.

12. The method of claim 11, wherein, The information of the module further includes a feature description and an activation mode of the module, and the determination of the L activation modes according to the K modules includes: obtaining activation modes of the addition modules and the deletion modules in the K modules, obtaining L1 activation modes, L1 being an integer greater than or equal to 0; determining activation modes of the modification modules in the K modules according to the feature descriptions of the modification modules, obtaining L2 activation modes, L2 being an integer greater than or equal to 0; determining the L activation modes according to the L1 activation modes and the L2 activation modes, L being less than or equal to L1+L2.

13. A firmware activation method, characterized by, including: sending information of a first firmware to a peripheral device of a server, the first firmware being a firmware to be upgraded; receive first indication information from the peripheral device, the first indication information indicating an activation mode of the first firmware; the activation mode of the first firmware is determined by the peripheral device according to information of the first firmware and information of a second firmware, and the activation mode of each of the determined modules is determined, different activation modes correspond to different priorities, and the activation mode with the highest priority is determined; the second firmware is the firmware currently used by the peripheral device; the activation mode of the first firmware includes one of host power-off, host reset, soft reset, and immediate effect; activate the first firmware according to the activation mode of the first firmware.

14. The method of claim 13, wherein, The method further comprises: sending third indication information to the peripheral device, the third indication information being used to instruct the peripheral device to perform firmware upgrade.

15. The method according to claim 13 or 14, characterized in that, The method further comprises: receiving fourth indication information from the peripheral device, the fourth indication information being used to indicate that the firmware upgrade of the peripheral device is successful; The activation of the first firmware according to the activation mode comprises: In the case of receiving the fourth indication information, the first firmware is activated according to the activation mode of the first firmware.

16. A peripheral device of a server, characterized by The peripheral device comprises a processor, a memory and a communication interface, the communication interface is used to receive information from other electronic devices outside the peripheral device and output information to other electronic devices outside the peripheral device, the processor calls a computer program stored in the memory to implement the method of any one of claims 8-12.

17. An electronic device, comprising: The electronic device comprises a processor, a memory and a communication interface, the communication interface is used to receive information from other electronic devices outside the electronic device and output information to other electronic devices outside the electronic device, the processor calls a computer program stored in the memory to implement the method of any one of claims 13-15.

18. A chip, characterized by The chip comprises a processor for executing a program stored in a memory, when the program is executed, the chip executes the method of any one of claims 13-15.

19. A server, characterized by The server comprises the peripheral device of claim 16; and the server comprises the electronic device of claim 17, or at least one of the chip of claim 18. The server comprises the peripheral device of claim 16; and the server comprises the electronic device of claim 17, or at least one of the chip of claim 18.

Citation Information

Patent Citations

  • Software packet upgrade method and device

    CN101150830A

  • Firmware upgrading method for storage device, and storage device

    CN107066300A

  • Software-defined automobile system, activation method, development process and automobile

    CN114528050A