Firmware upgrading method and computing equipment
By obtaining the upgrade files and communication topology information of external devices and using the baseboard management controller to determine the upgrade file transmission path, the problem of low efficiency of external device firmware upgrade in the existing technology is solved, fast and accurate firmware upgrade is achieved, and development and maintenance costs are reduced.
Patent Information
- Application Number
- CN202510707072.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
AI Technical Summary
The existing technology is inefficient, time-consuming and labor-intensive when upgrading the firmware of external devices of computing devices. Especially as the number of external devices increases, the development and maintenance workload is heavy and the flexibility is poor.
By obtaining the upgrade file and communication topology information of the external device, using the baseboard management controller to determine the upgrade file transmission path, the communication topology information is directly obtained from the external device for firmware upgrade. The communication topology information of the external device is pre-recorded in the non-volatile memory, and the firmware upgrade package is used to uniformly manage the upgrade of multiple external devices.
The efficiency of firmware upgrade is improved, the development and maintenance costs of computing devices are reduced, the flexibility of firmware upgrade is enhanced, and the firmware upgrade of multiple external devices can be completed quickly and accurately.
Smart Images

Figure CN120631396A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computing devices, and in particular to a firmware upgrade method and computing device. Background Art
[0002] With the development of computer technology, computing devices (such as servers) have become more complex and diverse in form factors. Computing devices can be connected to a variety of external devices (such as graphics cards, cue cards, etc.). During the use of computing devices, the firmware (File Wave, FW) of the external devices may need to be upgraded based on user needs.
[0003] Currently, when upgrading the firmware of an external device, the related technology usually manually writes the upgrade information related to the external device into the computing device to complete the firmware upgrade of the external device. However, as the number of external devices connected to computing devices increases, the firmware upgrade method of the related technology is time-consuming and labor-intensive, and has low efficiency. Summary of the Invention
[0004] The embodiments of the present application provide a firmware upgrade method and a computing device, which can improve the efficiency of firmware upgrades for external devices.
[0005] In a first aspect, an embodiment of the present application provides a firmware upgrade method, comprising: obtaining an upgrade file of an external device and communication topology information of the external device, and upgrading the firmware of the external device according to the upgrade file and the communication topology information of the external device.
[0006] In this solution, the communication topology information in the external device can be pre-entered into the external device. In this way, the communication topology information required for firmware upgrade can be directly obtained from the external device, thereby quickly and effectively completing the firmware upgrade of the external device, thereby improving the efficiency of the firmware upgrade of the external device.
[0007] In one possible implementation, the above-mentioned firmware upgrade of the external device based on the upgrade file and the communication topology information of the external device includes: determining the upgrade file transmission path of the external device based on the communication topology information of the external device; and transmitting the upgrade file to the external device based on the upgrade file transmission path to perform the firmware upgrade of the external device.
[0008] In this implementation, by determining the upgrade file transmission path of the external device, the upgrade file can be accurately transmitted to the external device to perform firmware upgrade on the external device.
[0009] In one possible implementation, the above-mentioned determining the upgrade file transmission path of the external device based on the communication topology information of the external device includes: obtaining the access location information of the external device; obtaining the communication topology information of other devices from the communication topology information of the computing device based on the access location information; the other devices are devices passed through on the transmission path between the external device and the baseboard management controller of the computing device; and determining the upgrade file transmission path of the external device based on the communication topology information of the external device and the communication topology information of the other devices.
[0010] In this implementation, when an external device is connected to the computing device at different locations, the computing device can search for the communication topology information of other devices based on the access location information of the external device, thereby accurately determining the upgrade file transmission path of the external device, so as to facilitate the subsequent completion of the firmware upgrade of the external device.
[0011] In a possible implementation, the obtaining of the access location information of the external device includes: upon detecting that the external device is connected to a connector of the computing device, determining the access location information corresponding to the connector as the access location information of the external device.
[0012] In a possible implementation, acquiring the communication topology information in the external device includes: acquiring the communication topology information of the external device from a non-volatile memory of the external device.
[0013] In this implementation, the communication topology information of the external device can be pre-stored in the non-volatile memory of the external device, thereby avoiding the loss of the communication topology information.
[0014] In a possible implementation, the above-mentioned obtaining the communication topology information of the external device from the non-volatile memory of the external device includes: obtaining an access address of the non-volatile memory of the external device; and obtaining the communication topology information of the external device from the non-volatile memory of the external device based on the access address.
[0015] In this implementation, the computing device can quickly and accurately obtain the communication topology information of the external device based on the access address of the non-volatile memory of the external device, thereby improving the efficiency of obtaining the communication topology information and further improving the efficiency of firmware upgrade of the external device.
[0016] In a possible implementation, when there are multiple external devices, the access addresses of the non-volatile memories of different external devices are the same.
[0017] In this implementation, when there are multiple external devices, the same access address of the non-volatile memory can be set for different external devices. In this way, when obtaining communication topology information of the external devices, the communication topology information of different external devices can be quickly and accurately obtained based on the same pre-stored access address, thereby improving the efficiency of obtaining communication topology information and further improving the efficiency of firmware upgrades for the external devices.
[0018] In a possible implementation, obtaining the upgrade file of the external device includes: obtaining a firmware upgrade package; the firmware upgrade package includes upgrade files of multiple external devices; and obtaining the upgrade file of the external device from the firmware upgrade package according to the encoding of the external device.
[0019] In this implementation, since the firmware upgrade package includes upgrade files for multiple external devices, and the upgrade files for the external devices can be obtained through the encoding of the external devices, the upgrade of multiple external devices can be completed through a common firmware upgrade package, reducing the cost of developing and maintaining the firmware upgrade package.
[0020] In a possible implementation, the external device is a single board on which a complex programmable logic device is deployed; and the communication topology information is I2C link topology information.
[0021] In a possible implementation, obtaining the communication topology information of the external device includes: obtaining the communication topology information of the external device from a memory of the computing device; the communication topology information in the memory is written when the external device is connected to the computing device.
[0022] In this implementation, when an external device is connected to a computing device, the computing device can directly obtain the external device's communication topology information and write it to the computing device's memory. Subsequently, when performing a firmware upgrade, the computing device can directly obtain the external device's communication topology information from the memory, improving the efficiency of obtaining communication topology information and, in turn, the efficiency of firmware upgrades for the external device.
[0023] In a second aspect, a computing device is provided, comprising: a baseboard management controller and an external device; the baseboard management controller and the external device are coupled; and the baseboard management controller is used to execute the firmware upgrade method as in the first aspect and its possible implementation.
[0024] In a third aspect, an external device is provided, in which communication topology information of the external device is stored; the external device is used to send the communication topology information to a computing device connected to the external device, so that the computing device can upgrade the firmware of the external device according to the communication topology information of the external device.
[0025] In a possible implementation, the external device includes a non-volatile memory; and the communication topology information is pre-recorded in the non-volatile memory.
[0026] In a fourth aspect, a chip is provided, which includes: a processor and an interface circuit; the interface circuit is used to receive program instructions and transmit them to the processor; the processor is used to run the program instructions to execute the firmware upgrade method in the first aspect and its possible implementation methods.
[0027] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores program instructions. When the program instructions in the computer-readable storage medium are executed by a computing device, the computing device executes the firmware upgrade method in the first aspect and possible implementations thereof.
[0028] In a sixth aspect, a computer program product including program instructions is provided. When the program instructions in a computer-readable storage medium are executed by a computing device, the computing device executes the firmware upgrade method in the first aspect and possible implementations thereof.
[0029] It should be understood that the technical effects brought about by any implementation method in the second to sixth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the system architecture of a firmware upgrade system provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of the system architecture of another firmware upgrade system provided in an embodiment of the present application;
[0032] Figure 3 A flowchart of a firmware upgrade method provided in an embodiment of the present application;
[0033] Figure 4 A flowchart of another firmware upgrade method provided in an embodiment of the present application;
[0034] Figure 5 A flowchart of another firmware upgrade method provided in an embodiment of the present application;
[0035] Figure 6 A flowchart of another firmware upgrade method provided in an embodiment of the present application;
[0036] Figure 7 A flowchart of another firmware upgrade method provided in an embodiment of the present application;
[0037] Figure 8A schematic diagram of the structure of a firmware upgrade device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0039] It should be noted that in the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in the embodiments of this application as "exemplarily" or "for example" should not be interpreted as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0040] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.
[0041] The following is a brief introduction to the relevant terms involved in the embodiments of this application.
[0042] A baseboard management controller (BMC) is a key component in computing devices (such as servers and data center equipment) that monitors and manages system status. A BMC is an embedded controller, typically based on a microprocessor, that collects hardware information, performs system management, and provides remote management capabilities.
[0043] In the embodiment of the present application, the BMC can implement firmware upgrades for external devices connected to the computing device.
[0044] A Complex Programmable Logic Device (CPLD) is a digital integrated circuit that allows users to program its internal logic functions. It is widely used in computer technology, particularly in servers. CPLDs cover a wide range of management functions, from system management and control, board and component power management, to high-speed Peripheral Component Interconnect Express (PCIe) bus expansion. CPLDs offer not only flexible logic design capabilities but also low latency, low power consumption, and high reliability, making them ideal for implementing customized hardware logic and optimizing server performance.
[0045] In the embodiment of the present application, the BMC can perform firmware upgrade on the CPLD in the external device.
[0046] Inter-Integrated Circuit (I2C): I2C is a simple, bidirectional, two-wire serial communication protocol used for short-distance data transmission within computing devices. I2C is primarily used to connect microcontrollers within computing devices and their peripherals, such as sensors, electrically erasable programmable read-only memory (EEPROM), and real-time clocks.
[0047] In the embodiment of the present application, the BMC can obtain the I2C topology information (ie, the communication topology information in this article) pre-entered in the external device, thereby completing the firmware upgrade of the CPLD in the external device.
[0048] The following is an illustrative introduction to the application scenarios of the embodiments of the present application.
[0049] With the development of computer technology, computing devices (such as servers) have become more complex and diverse in form factors. Computing devices can now connect to a wide variety of external devices. To meet diverse user needs and improve the performance, functionality, compatibility, or security of external devices, firmware upgrades can be performed on these devices.
[0050] For example, for external storage devices such as external hard drives and USB flash drives, the computing device can optimize the data reading and writing algorithms of such external devices through firmware upgrades, thereby increasing the data transmission rate and reducing the waiting time for file copying and reading.
[0051] As another example, for external devices with extended functions such as smart cameras, the computing device can add new functions such as face recognition and motion detection area setting to such external devices through firmware upgrades, thereby improving the intelligence and usability of the computing device.
[0052] The firmware upgrade method provided in this application is applied to the scenario of performing firmware upgrade on the external device mentioned above.
[0053] The following is a brief introduction to the technical principles of the embodiments of the present application.
[0054] In this scenario, conventional technology requires writing a corresponding upgrade file (e.g., a 0502 software upgrade package) for each external device, and adapting each external device's upgrade file to the computing device (that is, writing each external device's upgrade file to the computing device), which results in a significant development workload. Furthermore, when external devices are used between different computing devices, if the communication topology information of the added external devices does not match, the computing device must be re-adapted and developed, resulting in limited flexibility and increased maintenance workload for the computing devices.
[0055] To address the above issues, this application provides a firmware upgrade method, in which a computing device can obtain an upgrade file of an external device and communication topology information of the external device. Subsequently, the computing device can upgrade the firmware of the external device based on the upgrade file and the communication topology information of the external device.
[0056] In this solution, the communication topology information of the external device can be pre-entered into the external device. Thus, upon receiving a firmware upgrade instruction, the computing device can directly obtain the communication topology information required for the firmware upgrade from the external device, thereby quickly and efficiently completing the firmware upgrade for the external device and improving the efficiency of the external device firmware upgrade. Furthermore, since the communication topology information of the external device is obtained from the external device, the computing device does not need to develop and maintain the communication topology information of the external device, reducing the development and maintenance costs of the computing device and increasing the flexibility of firmware upgrades.
[0057] The following is an exemplary introduction to the system architecture of the embodiment of the present application.
[0058] The embodiment of the present application provides a system architecture of a firmware upgrade system, such as Figure 1 As shown, the firmware upgrade system may include: a computing device 101 and an external device 102 connected to the computing device 101 .
[0059] The external device 102 can be connected to the computing device 101 through a connector of the computing device 101 to expand the functionality of the computing device 101 .
[0060] In the embodiment of the present application, the computing device 101 can be used to implement firmware upgrades for the external device 102 .
[0061] Specifically, the external device 102 may have communication topology information pre-recorded therein.
[0062] The computing device 101 may respectively obtain the upgrade file of the external device 102 and the above-mentioned communication topology information.
[0063] Subsequently, the computing device 101 may upgrade the firmware of the external device 102 according to the upgrade file and the communication topology information of the external device 102 .
[0064] The computing device 101 may be a network device. The network device may include a server, a data center device, etc. The server may be a single physical server, or two or more physical servers sharing different responsibilities and cooperating to implement various server functions.
[0065] Illustratively, the server may be a blade server, a high-density server, a rack server, a tower server, or the like.
[0066] The external devices 102 are referred to as peripherals for short, and are components used to expand the functions of the computing device 101. For example, the external devices 102 are board-type (also called single boards) such as graphics cards, network cards, and sound cards.
[0067] It should be noted that the embodiment of the present application does not limit the device forms of the computing device 101 and the external device 102.
[0068] The internal structures of the computing device 101 and the external device 102 are described in detail below. Figure 2 As shown, the computing device 101 may include a baseboard management controller 201. The external device 102 may include a non-volatile memory 202 and a logic element 203 to be upgraded with firmware.
[0069] The baseboard management controller 201 is used to implement the firmware upgrade of the logic element 203 to be upgraded in the external device 102 , that is, to execute the firmware upgrade method provided in the embodiment of the present application.
[0070] The baseboard management controller 201 may include one or more processing cores. The baseboard management controller 201 utilizes various interfaces and lines to connect various components within the computing device 101 and the external device 102. The baseboard management controller 201 executes various functions of the computing device 101 by running or executing instructions, programs, code sets, or instruction sets stored in the memory, and by calling data stored in the memory.
[0071] Optionally, the baseboard management controller 201 can be implemented in the form of at least one of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The baseboard management controller 201 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. It is understandable that the above-mentioned modem may not be integrated into the baseboard management controller 201, but may be implemented separately through a communication chip.
[0072] In one possible implementation, the functions of the baseboard management controller 201 can be implemented through a BMC (which can also be called a management software BMC upgrade module in logical division), or through a CPLD (which can also be called a motherboard logic device), or through other types of devices, which is not limited in this embodiment of the present application.
[0073] The non-volatile memory 202 stores communication topology information of the external device 102 (i.e., the external device to which the non-volatile memory 202 belongs). The non-volatile memory 202 is used to send the communication topology information to the computing device 101 connected to the external device 102, so that the computing device 101 can upgrade the firmware of the external device 102 based on the communication topology information of the external device 102.
[0074] In one possible implementation, the non-volatile memory 202 of the external device 102 can be a field replaceable unit (FRU) in the external device 102 (also called a single-board FRU information module in logical division), or an EEPROM, or a flash memory.
[0075] Specifically, when upgrading the firmware of the logic element 203, the baseboard management controller 201 may send a data request for obtaining the communication topology information to the non-volatile memory 202. After receiving the data request, the non-volatile memory 202 may send the communication topology information to the baseboard management controller 201, so that the baseboard management controller 201 can upgrade the firmware of the logic element 203 based on the communication topology information of the external device 102.
[0076] In a possible implementation, the logic element 203 to be upgraded in firmware may be a CPLD of the external device 102 , or an integrated circuit chip firmware (Retimer FW), or other logic elements, which is not limited in the embodiment of the present application.
[0077] For example, assuming that the logic element 203 is a CPLD, the external device is a board equipped with a complex programmable logic device (CPLD). The external device 102 can implement firmware upgrades for the CPLD through the CPLD software logic module.
[0078] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the computing device 101 and the external device 102, except Figure 2 In addition to the components shown, the computing device 101 and the external device 102 may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0079] The following is a detailed introduction to the firmware upgrade method provided in the embodiment of the present application.
[0080] like Figure 3 , which is a flow chart of a firmware upgrade method provided in an embodiment of the present application. Figure 3 The method shown can be applied to a baseboard management controller in a computing device. For example, the method can be applied to Figure 2 The baseboard management controller 201 shown. In addition, the computing device to which the baseboard management controller 201 belongs and the external device connected to the computing device can be connected according to Figure 2 The structure shown is implemented. The firmware upgrade method includes: S301-S302.
[0081] S301: The baseboard management controller obtains an upgrade file for an external device.
[0082] Specifically, in order to complete the firmware upgrade of the external device, the baseboard management controller needs to obtain the upgrade file of the external device.
[0083] Optionally, the upgrade file may include configuration files and parameters, upgrade scripts and tools, hardware adaptation information and other file contents required for the firmware upgrade, so that the firmware of the external device can be upgraded safely and stably based on the upgrade file.
[0084] In one possible implementation, when upgrading the firmware of an external device, the user can pre-compile a firmware upgrade package and write it to the baseboard management controller. The baseboard management controller can then retrieve the upgrade file corresponding to the external device from the firmware upgrade package. The method for retrieving the upgrade file for the external device will be detailed below and will not be repeated here.
[0085] Of course, the user may also write the upgrade files of different external devices into the baseboard management controller separately, which is not limited in the embodiment of the present application.
[0086] S302: The baseboard management controller obtains communication topology information from an external device.
[0087] The communication topology information may be topology information of the external device under a certain communication protocol, so as to subsequently determine the upgrade file transmission path of the external device according to the communication topology information of the external device.
[0088] In one achievable manner, the external device typically communicates with a baseboard management controller in the computing device based on an I2C communication protocol. In this case, the communication topology information of the external device may be I2C link topology information.
[0089] Specifically, the I2C link topology information of the external device may include at least one of the following: an I2C bus (BUS) number, an I2C switch device address (Switch Address), and a CPLD I2C address.
[0090] The I2C BUS number is the I2C bus number of the bus to which the external device is connected, and is used to identify the bus to which the external device is connected.
[0091] The I2C switch device address is the address of the switch device of the bus to which the external device is connected. The switch device is used to switch the I2C channel of the external device.
[0092] The CPLD I2C address is the address used by the CPLD of an external device to identify itself in I2C bus communication.
[0093] Of course, the external device can also communicate with the baseboard management controller in the computing device based on other communication protocols. In this case, the communication topology information of the external device can include topology information under other communication protocols.
[0094] In one practicable manner, as described above, the communication topology information of the external device may be pre-recorded in a non-volatile memory of the external device.
[0095] Since the communication topology information of each external device is usually fixed, the communication topology information of the external device can be recorded in the non-volatile memory of the external device when the external device leaves the factory for subsequent use.
[0096] Optionally, the non-volatile memory of the external device may also store other information of the external device, such as basic information such as a device identification of the external device, a name, a code, and a manufacturing time of the external device.
[0097] Alternatively, the non-volatile memory of the external device can store the communication topology information of the external device in a fixed data format. For example, the first field can be used to indicate the name of the external device, the second field can be used to indicate the I2C bus number of the external device, and the third field can be used to indicate the I2C switch device address. In this way, using the fixed data format, the baseboard management controller can obtain standard communication topology information without further processing such as data identification.
[0098] When the baseboard management controller obtains the communication topology information of external devices, it can use different acquisition methods in different scenarios. The following section describes the methods for obtaining the communication topology information of external devices in detail and will not be repeated here.
[0099] It should be noted that, when obtaining the upgrade file of the external device and the communication topology information in the external device, the baseboard management controller can obtain the upgrade file of the external device and the communication topology information in the external device respectively, but the execution order is not limited, that is, the baseboard management controller can execute S301 first and then execute S302; it can also execute S302 first and then execute S301; it can also execute S301 and S302 at the same time, that is, Figure 3 The execution order of S301 and S302 is not limited.
[0100] In some embodiments, when the baseboard management controller obtains the upgrade file of the external device and the communication topology information in the external device respectively, it can automatically trigger the acquisition based on the firmware upgrade instruction and a pre-set timer.
[0101] For example, a user can upgrade the firmware of an external device based on actual needs. In this case, the user can perform the firmware upgrade operation on the computing device. In response to the user's operation, the baseboard management controller in the computing device can obtain the firmware upgrade instruction and, based on the firmware upgrade instruction, trigger the acquisition of the upgrade file and communication topology information of the external device.
[0102] For example, a user can set a timer on a computing device to update the firmware of an external device based on actual needs. In this case, the baseboard management controller in the computing device can automatically trigger the acquisition of the upgrade file and communication topology information of the external device periodically based on the time corresponding to the timer. Of course, the baseboard management controller can also be pre-configured with a firmware upgrade program to achieve periodic automatic triggering of the acquisition of the upgrade file and communication topology information of the external device.
[0103] S303: The baseboard management controller upgrades the firmware of the external device according to the upgrade file and the communication topology information of the external device.
[0104] Specifically, after obtaining the communication topology information of the external device, the baseboard management controller can establish an upgrade file transmission path for the external device based on the communication topology information of the external device. In this way, the upgrade file can be sent to the external device through the upgrade file transmission path of the external device to complete the firmware upgrade of the external device.
[0105] In one achievable method, if the baseboard management controller and the external device are directly connected, that is, the transmission path between the baseboard management controller and the external device does not include other devices, the baseboard management controller can directly upgrade the firmware of the external device based on the upgrade file and the communication topology information of the external device.
[0106] In another possible implementation method, if the transmission path between the baseboard management controller and the external device also includes other devices (which may refer to electronic devices inside the computing device, between the baseboard management controller and the external device, such as I2C switch devices), it is also necessary to obtain the communication topology information of the devices passed through on the transmission path between the external device and the baseboard management controller of the computing device.
[0107] In this case, the baseboard management controller performs a firmware upgrade on the external device based on the upgrade file and the communication topology information of the external device, specifically including: the baseboard management controller determines the upgrade file transmission path for the external device based on the communication topology information of the external device, and transmits the upgrade file to the external device based on the upgrade file transmission path to upgrade the firmware of the external device. The specific implementation method for determining the upgrade file transmission path for the external device will be described in detail below and will not be repeated here.
[0108] As can be seen from the above, the firmware upgrade method provided in the embodiment of the present application mainly includes the following two processes: a process for acquiring communication topology information and a process for upgrading the firmware of an external device.
[0109] First, the process of obtaining communication topology information provided in the embodiment of the present application is introduced in detail.
[0110] In some embodiments, the baseboard management controller can obtain the communication topology information of the external device when triggering the firmware upgrade, or it can obtain the communication topology information of the external device in advance when the external device is connected to the computing device. In other words, the method of obtaining the communication topology information is different in different scenarios. The following describes the method of obtaining the communication topology information for different scenarios:
[0111] Scenario 1: The baseboard management controller obtains the communication topology information of the external device from the non-volatile memory of the external device.
[0112] Specifically, if a computing device has a large number of external devices, to avoid occupying the computing device's memory and resources, the baseboard management controller can send a data acquisition request to the non-volatile memory of the external devices when triggering a firmware upgrade. Subsequently, the non-volatile memory of the external devices can respond to the data acquisition request and send the communication topology information of the external devices to the baseboard management controller.
[0113] Scenario 2: The baseboard management controller obtains the communication topology information of the external device from the memory of the computing device.
[0114] The communication topology information in the memory may be written when the external device is connected to the computing device.
[0115] Optionally, the communication topology information in the memory may be acquired by the baseboard management controller and written into the memory when the external device is connected to the computing device.
[0116] Specifically, if the computing device has sufficient memory and resources, the baseboard management controller can send a data retrieval request to the non-volatile memory of the external device when the external device is connected to the computing device. In response to the data retrieval request, the non-volatile memory of the external device can send the communication topology information of the external device to the baseboard management controller. The baseboard management controller can first write the communication topology information of the external device to the memory of the computing device. Later, unless the firmware is upgraded, the baseboard management controller can retrieve the communication topology information of the external device from the memory of the computing device.
[0117] Optionally, since a computing device usually has multiple external devices, whenever a new external device is connected to the computing device, the baseboard management controller can send a data acquisition request to the non-volatile memory of each external device in a polling manner, thereby obtaining accurate and complete communication topology information.
[0118] In yet another implementation, the communication topology information in the memory may be periodically acquired by the baseboard management controller from an external device.
[0119] Specifically, when the computing device has sufficient memory and resources, the baseboard management controller may also periodically (eg, once a day) send data acquisition requests to the non-volatile memory of the external device to obtain accurate and complete communication topology information.
[0120] As can be seen above, in both scenarios 1 and 2, the baseboard management controller needs to obtain the communication topology information of the external device from its non-volatile memory. For a computing device, there may be multiple external devices connected to the computing device. In this case, the baseboard management controller also needs to obtain the access address of the non-volatile memory of each external device in order to obtain the communication topology information of the external device based on the access address.
[0121] In this case, the method for the baseboard management controller to obtain the communication topology information of the external device from the non-volatile memory of the external device specifically includes:
[0122] The baseboard management controller obtains an access address of the non-volatile memory of the external device, and obtains communication topology information of the external device from the non-volatile memory of the external device based on the access address.
[0123] However, if a large number of external devices are connected to a computing device, it would be time-consuming and inefficient if the baseboard management controller needed to access the volatile memory of each of the different external devices. To address this issue, the present application can pre-set a fixed access address, i.e., set the access address of the non-volatile memory of different external devices to the same access address. In other words, if there are multiple external devices, the access address of the non-volatile memory of different external devices is the same.
[0124] For example, for multiple different external devices, the access addresses of the non-volatile memories of these external devices can all be set to 01. After the baseboard management controller determines that the external device is connected to the computing device, it can directly access the access address 01 to obtain the communication topology information of each external device, eliminating the need to obtain different access addresses for different external devices, thereby improving the efficiency of firmware upgrades. The firmware upgrade process for external devices provided in the embodiments of the present application is then described in detail.
[0125] In some embodiments, since the external device is usually connected to the connector of the computing device, and there are usually multiple devices between the baseboard management controller and the connector, when establishing the upgrade file transmission path of the external device, it is also necessary to obtain the communication topology information between the baseboard management controller and the connector to which the external device is connected (i.e., the entire topology information of the computing device). In this case, combined with Figure 3 ,like Figure 4 As shown, in the above S303, the method in which the baseboard management controller performs firmware upgrade on the external device according to the upgrade file and the communication topology information of the external device specifically includes:
[0126] S401: A baseboard management controller obtains access location information of an external device.
[0127] Specifically, when an external device is connected to a computing device, the baseboard management controller can sense the connection of the external device. In this case, the baseboard management controller can obtain the connection location information of the external device so as to subsequently determine the upgrade file transmission path of the external device (for performing firmware upgrades on the external device) based on the connection location information of the external device.
[0128] In one practicable manner, the method for the baseboard management controller to obtain the access location information of the external device specifically includes: when the baseboard management controller detects that the external device is connected to the connector of the computing device, determining the access location information corresponding to the connector as the access location information of the external device.
[0129] Specifically, the baseboard management controller may pre-store the connection location information of each connector. After the external device is connected to the computing device via the connector, the baseboard management controller can obtain the presence information of the external device connected to the computing device. This presence information is used to indicate the connection indication and connection status of the external device connected to the connector, such as whether it is connected to the computing device and is operating normally.
[0130] In this case, the baseboard management controller may determine the position information of the connector to which the external device is connected from pre-stored connection position information of each connector, and determine the connection position information of the connector as the connection position information of the external device.
[0131] Optionally, the above-mentioned in-place information can be sent directly to the baseboard management controller by the connector of the external device connected to the computing device, or it can be sent to the baseboard management controller by the connector of the external device connected to the computing device through the CPLD of the external device. This embodiment of the present application does not limit this.
[0132] S402: The baseboard management controller obtains communication topology information of other devices from the communication topology information of the computing device according to the access location information.
[0133] Among them, other devices (which may refer to electronic devices inside the computing device, between the baseboard management controller and the connector) are devices passed through on the transmission path between the external device and the baseboard management controller of the computing device.
[0134] Specifically, because different computing devices have different internal topologies, the communication topology information of the entire computing device needs to be pre-stored in the baseboard management controller. After obtaining the access location information of the external device, the baseboard management controller can determine the devices (i.e., the other devices mentioned above) that pass through the transmission path between the external device and the baseboard management controller of the computing device based on the access location information, and obtain the communication topology information of the other devices from the communication topology information of the computing device.
[0135] Optionally, assuming that the other devices also communicate based on the I2C communication protocol, the other devices may be I2C switch devices. The communication topology information of the I2C switch device may include the I2C bus number, I2C switch device address, and CPLD I2C address of the device.
[0136] S403: The baseboard management controller determines an upgrade file transmission path for the external device according to the communication topology information of other devices and the communication topology information of the external device.
[0137] For example, assuming that the external device and other devices communicate based on the I2C communication protocol, the baseboard management controller can match the I2C link topology information of the external device with the I2C link topology information of other devices to generate an upgrade file transmission path for transmitting the upgrade file.
[0138] S404: Transmit the upgrade file to the external device based on the upgrade file transmission path to upgrade the firmware of the external device.
[0139] Specifically, the external device includes a software logic module (such as a CPLD software logic module). After receiving the upgrade file, the software logic module can parse and execute the upgrade file to complete the firmware upgrade of the external device.
[0140] In addition to the two processes above, the baseboard management controller also needs to obtain the upgrade file of the external device when upgrading the firmware of the external device. The following is a detailed description of the process of obtaining the upgrade file of the external device.
[0141] In some embodiments, the communication topology information obtained by the baseboard management controller also includes the code of the external device. The code can uniquely identify the external device. Through the code, the upgrade file of the external device can be obtained from the firmware upgrade package. In this case, combined with Figure 4 ,like Figure 5 As shown, the upgrade file of the external device is obtained in the following ways:
[0142] S501: The baseboard management controller obtains a firmware upgrade package.
[0143] The firmware upgrade package includes upgrade files for multiple external devices.
[0144] Specifically, when upgrading the firmware of an external device, a user can compile a firmware upgrade package that includes upgrade files for multiple external devices. The user can then write the firmware upgrade package to the computing device. After receiving the firmware upgrade package, the computing device can first store the firmware upgrade package.
[0145] S502: The baseboard management controller obtains an upgrade file of the external device from the firmware upgrade package according to the code of the external device.
[0146] In one possible implementation, if the baseboard management controller triggers a firmware upgrade for multiple external devices, the baseboard management controller can obtain the code of each external device requiring a firmware upgrade and, based on the code, retrieve each external device requiring a firmware upgrade from the firmware upgrade package. In this way, the present application can upgrade the firmware of multiple external devices using a single firmware upgrade package, thereby improving the efficiency of firmware upgrades.
[0147] Optionally, the baseboard management controller may also obtain the upgrade file of the external device from the firmware upgrade package through other unique identifiers of the external device.
[0148] The following is an illustrative introduction to the firmware upgrade method provided in the embodiments of the present application in conjunction with a specific firmware upgrade scenario.
[0149] Scenario 1: Multiple different external devices are connected to the computing device at the same time.
[0150] like Figure 6 As shown, in a scenario where multiple different external devices are simultaneously connected to a computing device, taking the multiple different external devices as a first external device and a second external device as an example, the firmware upgrade method provided in the embodiment of the present application specifically includes:
[0151] S601: In response to a first external device and a second external device being connected to a computing device, a baseboard management controller obtains access location information of the first external device and access location information of the second external device.
[0152] S602: The baseboard management controller obtains communication topology information of a first external device among the first external devices and communication topology information of a second external device among the second external devices.
[0153] The communication topology information of the first external device includes the communication topology information and the code of the first external device; the communication topology information of the second external device includes the communication topology information and the code of the second external device.
[0154] S603. The baseboard management controller determines an upgrade file transmission path for the first external device based on the access location information of the first external device and the communication topology information of the first external device, and determines an upgrade file transmission path for the second external device based on the access location information of the second external device and the communication topology information of the second external device.
[0155] S604: The baseboard management controller obtains a firmware upgrade package.
[0156] S605: The baseboard management controller obtains an upgrade file of the first external device from the firmware upgrade package according to the code of the first external device, and obtains an upgrade file of the second external device from the firmware upgrade package according to the code of the second external device.
[0157] S606: The baseboard management controller sends the upgrade file of the first external device to the first external device based on the upgrade file transmission path of the first external device, so as to upgrade the firmware of the first external device.
[0158] S607: The baseboard management controller sends the upgrade file of the second external device to the second external device based on the upgrade file transmission path of the second external device, so as to upgrade the firmware of the second external device.
[0159] As can be seen from the above, the present application can simultaneously upgrade the firmware of multiple external devices through a shared firmware upgrade package, thereby reducing the maintenance difficulty and development workload of the firmware upgrade and improving the efficiency of the firmware upgrade.
[0160] Scenario 2: The same external device is connected to the computing device at different access locations.
[0161] like Figure 7 As shown, in a scenario where the same external device is connected to a computing device at different access locations, the firmware upgrade method provided in the embodiment of the present application specifically includes:
[0162] S701: In response to a first location where an external device is connected to a computing device, a baseboard management controller obtains first access location information of the external device.
[0163] S702: The baseboard management controller obtains communication topology information of the external devices.
[0164] The communication topology information of the external device includes the communication topology information and the code of the external device.
[0165] S703: The baseboard management controller determines an upgrade file transmission path for the external device according to the first access location information of the external device and the communication topology information of the external device.
[0166] S704: The baseboard management controller obtains a firmware upgrade package.
[0167] S705 : The baseboard management controller obtains an upgrade file of the external device from the firmware upgrade package according to the code of the external device.
[0168] S706: The baseboard management controller sends the upgrade file of the external device to the external device based on the upgrade file transmission path of the external device, so as to upgrade the firmware of the external device.
[0169] S707: The baseboard management controller obtains second access location information of the external device in response to the second access location of the external device to the computing device.
[0170] S708: The baseboard management controller determines an upgrade file transmission path for the external device according to the second access location information of the external device and the communication topology information of the external device.
[0171] S709: The baseboard management controller sends the upgrade file of the external device to the external device based on the upgrade file transmission path of the external device, so as to upgrade the firmware of the external device.
[0172] As can be seen from the above, the present application can perform firmware upgrades on external devices connected to different locations, thereby improving the flexibility and efficiency of firmware upgrades for external devices.
[0173] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the communication device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0174] In the embodiment of the present application, the functional modules of the communication device can be divided according to the above method. For example, the communication device can include functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0175] For example, Figure 8A schematic diagram of a possible structure of a firmware upgrade device (denoted as firmware upgrade device 800) involved in the above embodiment is shown. The actions performed by the firmware upgrade device 800 are implemented by a computing device or by a computing device executing corresponding software. The firmware upgrade device 800 may include a communication unit 801 and a processing unit 802.
[0176] The communication unit 801 is used to obtain the upgrade file of the external device and the communication topology information of the external device. The processing unit 802 is used to upgrade the firmware of the external device according to the upgrade file and the communication topology information of the external device.
[0177] In one achievable manner, the processing unit 802 is specifically configured to: determine an upgrade file transmission path of the external device according to communication topology information of the external device; and transmit the upgrade file to the external device based on the upgrade file transmission path to perform firmware upgrade on the external device.
[0178] In one achievable method, the processing unit 802 is specifically used to: obtain access location information of an external device; obtain communication topology information of other devices from the communication topology information of the computing device based on the access location information; the other devices are devices passed through on the transmission path between the external device and the baseboard management controller of the computing device; determine the upgrade file transmission path of the external device based on the communication topology information of the external device and the communication topology information of the other devices.
[0179] In one achievable manner, the processing unit 802 is specifically configured to: upon detecting that the external device is connected to a connector of the computing device, determine access location information corresponding to the connector as the access location information of the external device.
[0180] In one achievable manner, the communication unit 801 is specifically configured to obtain the communication topology information of the external device from a non-volatile memory of the external device.
[0181] In one achievable manner, the communication unit 801 is specifically configured to: obtain an access address of a non-volatile memory of the external device; and obtain communication topology information of the external device from the non-volatile memory of the external device based on the access address.
[0182] In one practicable manner, when there are multiple external devices, the access addresses of the non-volatile memories of different external devices are the same.
[0183] In one possible implementation, the communication unit 801 is specifically configured to: obtain a firmware upgrade package including upgrade files of multiple external devices; and obtain the upgrade files of the external device from the firmware upgrade package according to the encoding of the external device.
[0184] In one practicable manner, the external device is a single board on which a complex programmable logic device is deployed; and the communication topology information is I2C link topology information.
[0185] An embodiment of the present application also provides a computing device, including: a baseboard management controller and a memory; the baseboard management controller and the memory are coupled; the memory is used to store program instructions; the baseboard management controller is used to call program instructions so that the computing device executes any one of the firmware upgrade methods provided in the above embodiments.
[0186] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above-mentioned method embodiment can be completed by computer instructions to the relevant hardware, and the program can be stored in the above-mentioned computer-readable storage medium. When the program is executed, it may include the processes of the above-mentioned method embodiments. The computer-readable storage medium can be the memory of any of the above-mentioned embodiments. The above-mentioned computer-readable storage medium can also be an external storage device of the above-mentioned recovery device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above-mentioned recovery device. Furthermore, the above-mentioned computer-readable storage medium can also include both the internal storage unit of the above-mentioned recovery device and an external storage device. The above-mentioned computer-readable storage medium is used to store the above-mentioned computer program and other programs and data required by the above-mentioned recovery device. The above-mentioned computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0187] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product runs on a computer, it enables the computer to execute any one of the firmware upgrade methods provided in the above embodiments.
[0188] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0189] Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0190] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.
[0191] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A firmware upgrade method, characterized in that: include: Respectively obtaining an upgrade file of an external device and communication topology information in the external device; The firmware of the external device is upgraded according to the upgrade file and the communication topology information of the external device.
2. The method according to claim 1, characterized in that The step of upgrading the firmware of the external device according to the upgrade file and the communication topology information of the external device includes: determining an upgrade file transmission path for the external device according to the communication topology information of the external device; The upgrade file is transmitted to the external device based on the upgrade file transmission path to perform firmware upgrade on the external device.
3. The method according to claim 2, characterized in that The step of determining the upgrade file transmission path of the external device according to the communication topology information of the external device includes: Obtaining access location information of the external device; Obtaining communication topology information of other devices from the communication topology information of the computing device according to the access location information; the other devices are devices passed through on the transmission path between the external device and the baseboard management controller of the computing device; An upgrade file transmission path of the external device is determined according to the communication topology information of the external device and the communication topology information of the other devices.
4. The method according to claim 3, characterized in that The acquiring the access location information of the external device includes: In a case where it is detected that the external device is connected to the connector of the computing device, the connection location information corresponding to the connector is determined as the connection location information of the external device.
5. The method according to any one of claims 1 to 4, characterized in that Acquiring communication topology information in the external device includes: The communication topology information of the external device is acquired from the non-volatile memory of the external device.
6. The method according to claim 5, characterized in that The acquiring the communication topology information of the external device from the non-volatile memory of the external device includes: Obtaining an access address of a non-volatile memory of the external device; Based on the access address, communication topology information of the external device is acquired from a non-volatile memory of the external device.
7. The method according to claim 6, characterized in that In the case that there are multiple external devices, the access addresses of the non-volatile memories of different external devices are the same.
8. The method according to any one of claims 1 to 7, characterized in that The step of obtaining the upgrade file of the external device includes: Obtain a firmware upgrade package; the firmware upgrade package includes upgrade files for multiple external devices; According to the code of the external device, an upgrade file of the external device is obtained from the firmware upgrade package.
9. The method according to any one of claims 1 to 8, characterized in that The external device is a single board deployed with a complex programmable logic device; the communication topology information is I2C link topology information.
10. A computing device, characterized in that include: Baseboard management controller and external devices; The baseboard management controller is coupled to the external device; The baseboard management controller is configured to execute the method according to any one of claims 1 to 9.
Citation Information
Cited By
Industrial-grade solid state disk firmware upgrading reliability detection method and system
CN121166160A