Firmware upgrading method, device and equipment
By comparing and upgrading the firmware version of the host bus adapter in the first controller of the server, the problem of incompatibility between the higher and lower versions of firmware is solved, and the automated upgrade process is realized, reducing costs and time expenditures.
Patent Information
- Application Number
- CN202510344757.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-01
AI Technical Summary
In the server, the higher and lower versions of the host bus adapter firmware may be incompatible, resulting in the inability to upgrade the lower version of firmware to the higher version of firmware, thereby increasing the upgrade cost and time.
By determining a second hardware interface matching the first hardware interface in the first controller and comparing the firmware version between the two, if the lower version is lower than the higher version, the higher version of the firmware is upgraded.
The problem of firmware incompatibility can be solved without manual participation, reduce the labor cost of upgrading lower version firmware, and shorten the upgrade time period.
Smart Images

Figure CN120234026A_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, the field of server technologies, and particularly relates to a firmware upgrade method, apparatus, and device. Background Art
[0002] If two or more host bus adapters with different firmware are installed on a server, then when attempting to upgrade the firmware of a lower version to the latest version, the upgrade may fail. This is because on the server, the high-version boot ROM usually runs on all compatible host bus adapters. At this time, there may be incompatibility issues between the high version and the low version, resulting in the inability to load the host bus adapter with the low-version firmware, and thus the inability to upgrade the low-version firmware to the high-version firmware. Summary of the Invention
[0003] Embodiments of this application provide a firmware upgrade method, apparatus, and device. The technical solution of the embodiments of this application is implemented as follows:
[0004] In a first aspect, an embodiment of this application provides a firmware upgrade method. This method is applied to a first controller and includes: determining a second hardware interface that matches the first hardware interface; where the matching includes: the chip type of the first hardware interface matches the chip type of the second hardware interface; determining a first version of a first firmware in the first hardware interface; where the first firmware is used to implement communication between the first hardware interface and a first memory or storage network; determining a second version of a second firmware in the second hardware interface; where the second firmware is used to implement communication between the second hardware interface and a second memory or storage network; comparing the first version of the first firmware with the second version of the second firmware; if the comparison result is that the first version is lower than the second version, upgrading the first firmware in the first hardware interface using the second firmware of the second version.
[0005] Second aspect, an embodiment of the present application provides a firmware upgrade device, the device includes: a first determination module configured to determine a second hardware interface that matches a first hardware interface; wherein, the matching includes: the chip type of the first hardware interface matches the chip type of the second hardware interface; a second determination module configured to determine a first version of a first firmware in the first hardware interface; wherein, the first firmware is used to implement communication between the first hardware interface and a first memory or a storage network; a third determination module configured to determine a second version of a second firmware in the second hardware interface; wherein, the second firmware is used to implement communication between the second hardware interface and a second memory or a storage network; a comparison module configured to compare the first version of the first firmware with the second version of the second firmware; an upgrade module configured to, if the comparison result is that the first version is lower than the second version, upgrade the first firmware in the first hardware interface with the second firmware of the second version.
[0006] Third aspect, an embodiment of the present application provides a first controller, including a sixth memory and a processor, the sixth memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the method described in the first aspect.
[0007] Fourth aspect, an embodiment of the present application provides a server, the hardware layer of the server includes a first controller, a first hardware interface and a second hardware interface, and the software layer of the server includes an operating system.
[0008] Fifth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, and the computer program causes a processor to execute the method described in the first aspect.
[0009] Sixth aspect, an embodiment of the present application provides a computer program product, including computer program instructions, and the computer program instructions cause a processor to execute the method described in the first aspect.
[0010] Seventh aspect, an embodiment of the present application provides a computer program, and the computer program causes a processor to execute the method described in the first aspect.
[0011] In the embodiment of the present application, when the first controller determines that the firmware versions of two hardware interfaces of the same chip type are different, the first controller upgrades the firmware of the lower version with the firmware of the higher version. In this way, there is no need to contact the R & D personnel, that is, no manual participation is required, and the problem that the firmware of the lower version cannot be upgraded to the firmware of the higher version due to the incompatibility between the firmware of the higher version and the firmware of the lower version can be solved, thereby reducing the labor cost of upgrading the firmware of the lower version and shortening the time period for upgrading the firmware of the lower version.
[0012] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, rather than limiting the technical solution of the present application. Description of the Drawings
[0013] The drawings herein are incorporated into the specification and constitute a part of this specification. These drawings show embodiments in accordance with the present application and, together with the specification, are used to illustrate the technical solution of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0014] The flowcharts shown in the drawings are only exemplary descriptions and do not necessarily include all the content and operations / steps, nor do they necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.
[0015] Figure 1 It is a schematic diagram of the implementation process of a firmware upgrade method;
[0016] Figure 2 It is a schematic diagram of the implementation process of a firmware upgrade method provided by an embodiment of the present application Figure 1 ;
[0017] Figure 3 It is a schematic diagram of the implementation process of a firmware upgrade method provided by an embodiment of the present application Figure 2 ;
[0018] Figure 4 It is a schematic diagram of the implementation process of a firmware upgrade method provided by an embodiment of the present application Figure 3 ;
[0019] Figure 5 It is a schematic diagram of the implementation process of obtaining a second firmware of a second version provided by an embodiment of the present application Figure 1 ;
[0020] Figure 6 It is a schematic diagram of the implementation process of obtaining a second firmware of a second version provided by an embodiment of the present application Figure 2 ;
[0021] Figure 7 It is a schematic diagram of the structure of a firmware upgrade device provided by an embodiment of the present application;
[0022] Figure 8 It is a schematic diagram of the structure of a first controller provided by an embodiment of the present application;
[0023] Figure 9 It is a schematic diagram of the structure of a server provided by an embodiment of the present application. Detailed implementation manners
[0024] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be further elaborated in detail below in conjunction with the accompanying drawings and embodiments. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0025] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0026] Those skilled in the art of the present technology can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as generally understood by those of ordinary skill in the art to which the embodiments of the present application belong. It should also be understood that terms such as those defined in a general dictionary should be understood as having a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0027] The descriptions such as "first, second, third" etc. appearing in the embodiments of the present application are only for the purpose of indicating and distinguishing the described objects, without an order, and do not represent a special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.
[0028] In a related art Figure 1 is a schematic diagram of the implementation process of a firmware upgrade method, as Figure 1 shown. The method includes the following steps 101 to step 107:
[0029] Step 101, the system starts up;
[0030] Among them, the system is the operating system of the server, and two or more host bus adapters (HBAs) with different firmware are installed on the server;
[0031] Step 102, upgrade the firmware;
[0032] That is, upgrade the firmware of the lower version;
[0033] Step 103, is it successful? If so, end; otherwise, execute step 104;
[0034] Step 104, R & D confirmation;
[0035] Step 105, select a solution;
[0036] Step 106, perform an upgrade by providing an intermediate version;
[0037] Step 107, release an engineering change to update the firmware version in the repository.
[0038] In some embodiments, the time period required for the solution provided in Step 106 is shorter than that of the solution provided in Step 107.
[0039] It can be understood that in the above related technologies, in the case where the firmware version is different and the low-version host bus adapter cannot upgrade the firmware version, directly contact the R & D personnel for handling. The problem is solved by providing an intermediate version (that is, by allowing the customer to update multiple host bus adapters to the same level in the field or by allowing the customer to update the firmware of multiple adapters to the same version in the actual usage environment), or by releasing an engineering change (EC) to the supplier of the HBA card (i.e., an example of the host bus adapter) to update the firmware version of the HBA card (that is, release an EC to update the firmware version of the HBA card in the repository).
[0040] However, through research and analysis, the inventors of the present application found that the related solutions have problems of long solution cycles and high labor costs. And there are the following two key points in solving the problem of firmware upgrade for low-version HBA cards:
[0041] (1) The inventory firmware versions of the factories or departments that produce or manufacture these adapters are different, including incoming firmware / removable firmware versions. This problem will be encountered during the manufacturing process because similar adapters will have multiple firmware versions;
[0042] (2) The same problem will also exist in the service parts or optional parts (adapters, memory, hard disks) at the user end finally.
[0043] The embodiment of the present application provides a firmware upgrade method, which is applied to a first controller. Figure 2 It is a schematic implementation process of a firmware upgrade method provided by the embodiment of the present application. Figure 1 , as Figure 2 shown, the method includes the following steps 201 to 205:
[0044] Step 201, determine a second hardware interface that matches the first hardware interface; wherein, the matching includes: the chip type of the first hardware interface matches the chip type of the second hardware interface;
[0045] Step 202, determine the first version of the first firmware in the first hardware interface; wherein, the first firmware is used to implement communication between the first hardware interface and a first memory or a storage network;
[0046] Step 203, determine the second version of the second firmware in the second hardware interface; wherein, the second firmware is used to implement communication between the second hardware interface and a second memory or a storage network;
[0047] Step 204, compare the first version of the first firmware with the second version of the second firmware;
[0048] Step 205, if the comparison result is that the first version is lower than the second version, upgrade the first firmware in the first hardware interface with the second firmware of the second version.
[0049] It can be understood that in the embodiments of the present application, when the first controller determines that the firmware versions of two hardware interfaces of the same chip type are different, the first controller upgrades the lower version of the firmware with the higher version of the firmware. In this way, without contacting the R & D personnel, that is, without manual participation, the problem that the lower version of the firmware cannot be upgraded to the higher version of the firmware due to the incompatibility between the higher version of the firmware and the lower version of the firmware can be solved, thereby reducing the labor cost of upgrading the lower version of the firmware and shortening the time cycle of upgrading the lower version of the firmware.
[0050] The further optional implementation manners of the above respective steps and related terms, etc. are described below.
[0051] It should be understood that in the embodiments of the present application, the first controller is not limited. The first controller can detect the firmware versions of the first / second hardware interfaces and upgrade the lower version of the firmware. In some embodiments, the first controller is a Baseboard Management Controller (BMC).
[0052] In the embodiments of the present application, the Baseboard Management Controller (BMC) is a dedicated microcontroller embedded on the server motherboard, used to monitor and manage the hardware status of the server. It operates independently of the main processor and the operating system. Even when the server is powered off or the operating system crashes, the BMC can still work properly. The BMC is the core component for realizing remote management of the server and usually supports the Intelligent Platform Management Interface (IPMI) protocol.
[0053] It should be understood that in the embodiments of the present application, the first / second hardware interface is not limited. A hardware interface refers to the physical or logical specification for connecting and communicating between different hardware components, which defines how hardware devices interact, transfer data, and cooperate. The hardware interface is the basis for realizing function expansion and modular design in computer systems and electronic devices. In some embodiments, the first / second hardware interface includes a host bus adapter.
[0054] In the embodiments of the present application, a host bus adapter is a hardware device used to connect a computer (host or server) to an external storage device or network device. It acts as a bridge between the host and external devices, responsible for data transmission between the server and the storage system, and for converting the bus protocol of the server into the communication protocol of the external device. HBAs are widely used in servers, storage systems, and data centers and are key components for achieving efficient data storage and transmission.
[0055] It should be understood that in the embodiments of the present application, the firmware in the hardware interface is not limited. Firmware is a special software embedded in a hardware device, used to control the basic operations of the hardware and provide an interface between the hardware and the operating system or application programs. It is usually stored in non-volatile memory (such as read-only memory, electrically erasable programmable read-only memory, flash memory) to ensure that it can still be retained after the device is powered off. Firmware is the intermediate layer between hardware and software, and can also be understood as the bridge between hardware and software, responsible for initializing the hardware and managing its basic functions. It enables the operating system and application programs to interact with the hardware without directly operating the hardware. Firmware is usually embedded in the hardware device and is closely integrated with the hardware.
[0056] In some embodiments, firmware updates can be completed in the following ways: (1) Tools provided by the manufacturer: such as the Basic Input / Output System (BIOS) update tool for the motherboard; (2) Operating system support: such as firmware updates pushed by Windows Update; (3) Manual flashing: writing new firmware into the device through specific tools. A failed firmware update may cause the device to malfunction. Therefore, when updating firmware, careful operation is required and the power supply needs to be stable.
[0057] In some embodiments, the first / second hardware interface is a host bus adapter, and the first / second firmware is responsible for the initialization, protocol conversion, device management, data transmission control, error handling, performance optimization, and providing a management interface of the host bus adapter. The firmware in the host bus adapter is the core for the normal operation of the host bus adapter, ensuring efficient and reliable communication between the host system and the external storage device. The update and maintenance of the firmware are crucial for the performance and stability of the host bus adapter.
[0058] In step 201, determine a second hardware interface that matches the first hardware interface; wherein, the matching includes: the chip type of the first hardware interface matches the chip type of the second hardware interface.
[0059] It should be understood that in the embodiments of the present application, the first hardware interface and the second hardware interface are not limited. The hardware interface refers to the physical or logical specification for connection and communication between different hardware components in a computer system, which defines the rules and standards for how hardware devices interact, transfer data, and cooperate with each other. In some embodiments, the first hardware interface and the second hardware interface include: host bus adapters.
[0060] In the embodiments of the present application, "the chip type of the first hardware interface matches the chip type of the second hardware interface" can be understood as that the first hardware interface and the second hardware interface are hardware interfaces of the same chip type produced by the same manufacturer.
[0061] In some embodiments, determining the second hardware interface that matches the first hardware interface includes: querying the product information of a third hardware interface; if the product information of the third hardware interface is the same as the product information of the first hardware interface, use the third hardware interface as the second hardware interface.
[0062] It should be understood that in the embodiments of the present application, the product information of the hardware interface is not limited. In some embodiments, the product information of the hardware interface is Vital Product Data (VPD); wherein, the vital product information is usually stored in the Electrically Erasable Programmable Read-Only Memory (EEPROM) corresponding to the hardware interface, and the vital product information includes one or more of the following: information such as the manufacturer, model, serial number, part number, production date, unique identifier, etc. of the corresponding hardware interface.
[0063] In the embodiments of the present application, "if the product information of the third hardware interface is the same as the product information of the first hardware interface" can be understood as that the model of the third hardware interface is at least the same as the model of the first hardware interface.
[0064] In step 202, determine the first version of the first firmware in the first hardware interface; wherein, the first firmware is used to implement communication between the first hardware interface and a first memory or a storage network.
[0065] It should be understood that in the embodiments of the present application, the first version of the first firmware is not limited, and the first version of the first firmware can be any version.
[0066] In the embodiments of the present application, the first memory and the storage network are not limited. In some embodiments, the first memory is a storage hardware directly connected to the first hardware interface, such as a Fibre Channel disk array, a Serial Attached Small Computer System Interface (SAS) hard disk, etc.; while the storage network (such as a Fibre Channel network, an IP storage network, etc.) is a bridge connecting the storage device and the first hardware interface, and the storage network may include multiple devices such as switches and routers, constructing a complex network topology. When the server communicates with the first memory, the role of the firmware is: the firmware is mainly responsible for implementing the storage protocol and data processing; when the server communicates with the storage network, the role of the firmware is: handling additional tasks such as network protocols and packet transmission.
[0067] In step 203, determine the second version of the second firmware in the second hardware interface; wherein, the second firmware is used to implement the communication between the second hardware interface and the second memory or the storage network.
[0068] It should be understood that in the embodiments of the present application, the second version of the second firmware is not limited, and the second version of the second firmware can be any version.
[0069] In the embodiments of the present application, the second memory and the storage network are not limited. In some embodiments, the second memory is a storage hardware directly connected to the second hardware interface, such as a Fibre Channel disk array, a Serial Attached Small Computer System Interface (SAS) hard disk, etc.; while the storage network (such as a Fibre Channel network, an IP storage network, etc.) is a bridge connecting the storage device and the second hardware interface, and the storage network may include multiple devices such as switches and routers, constructing a complex network topology. When the server communicates with the second memory, the role of the firmware is: the firmware is mainly responsible for implementing the storage protocol and data processing; when the server communicates with the storage network, the role of the firmware is: handling additional tasks such as network protocols and packet transmission.
[0070] In step 204, compare the first version of the first firmware with the second version of the second firmware.
[0071] It should be understood that in the embodiments of the present application, "comparing the first version of the first firmware with the second version of the second firmware" can be understood as comparing the version levels of the first firmware and the second firmware, that is, determining which one of the first firmware and the second firmware is the lower version and which one is the higher version.
[0072] In step 205, if the comparison result is that the first version is lower than the second version, upgrade the first firmware in the first hardware interface by using the second firmware of the second version.
[0073] In some embodiments, the upgrading the first firmware in the first hardware interface by using the second firmware of the second version includes: obtaining the second firmware of the second version; if the server supervised by the first controller runs in an operating system (OS) environment, upgrading the first firmware in the first hardware interface by using the obtained second firmware; wherein, the server realizes communication with the first memory or the storage network through the first hardware interface.
[0074] It can be understood that in the embodiments of the present application, when the first version is lower than the second version and after obtaining the second firmware of the second version, instead of directly upgrading the first firmware, it is determined whether the server supervised by the first controller runs in an operating system environment. If the server supervised by the first controller runs in an operating system environment, the obtained second firmware is used to upgrade the first firmware in the first hardware interface. That is to say, when the server enters the stable stage, the firmware of the lower version is upgraded, so as to avoid other problems (such as data corruption, resource conflicts or incompatibilities, etc.) caused by firmware upgrading during the server startup process, and to ensure the security, stability and compatibility of the upgrading process.
[0075] In some embodiments, the upgrading the first firmware in the first hardware interface by using the obtained second firmware if the server supervised by the first controller runs in an operating system environment includes: if the server supervised by the controller runs on the operating system, display a prompt message; wherein, the prompt message is used to prompt to upgrade the first firmware in the first hardware interface; in response to confirming the prompt message, upgrade the first firmware in the first hardware interface by using the obtained second firmware.
[0076] It should be understood that in the embodiments of the present application, the display content of the prompt message is not limited, and the display content includes the information of upgrading the first firmware in the first hardware interface and a confirmation button. In the embodiments of the present application, the display manner of the prompt message is not limited. In some embodiments, the prompt message is displayed in a pop-up window manner.
[0077] In the embodiments of the present application, the server is a hardware platform that provides computing, storage, and network services, and includes components such as a central processing unit, memory, and storage. The server runs an operating system and application programs, processes client requests, and provides services. The operating system is software that manages hardware resources and provides a running environment for application programs. The operating system interacts with hardware such as the host bus adapter through firmware to ensure the normal operation of the server and support application programs.
[0078] In the embodiments of the present application, the relationship between the BMC, the server, the host bus adapter, and the operating system can be understood as follows: The BMC monitors and manages the hardware status of the server to ensure its stable operation. The HBA connects the server to the storage device to ensure efficient data transmission; the operating system manages the server's hardware resources and supports the operation of application programs; the operating system communicates with the HBA through drivers to ensure normal data transmission; the BMC runs independently of the operating system and can still be remotely managed even if the operating system fails. The BMC is responsible for hardware monitoring and remote management, the HBA is responsible for data storage and transmission, the server provides computing and storage resources, and the operating system manages the hardware and supports application operation. Together, they ensure the stability and efficiency of the server system.
[0079] In some embodiments, obtaining the second firmware of the second version includes: searching for the second firmware of the second version in the local area of the first controller, the controller cluster where the first controller is located, or the Internet; if the second firmware is found, reading the second firmware.
[0080] It should be understood that in the embodiments of the present application, the second firmware of the second version can be searched in the local area of the first controller, or in the controller cluster where the first controller is located, or in the Internet.
[0081] In some embodiments, if the comparison result is that the first version is different from the second version (the first version is lower than the second version or the second version is lower than the first version), a flag is set in the BMC, and this flag is used to indicate that the first version is different from the second version. When this flag is set in the BMC, the BMC will trigger a search for a higher version of the firmware in the BMC, or in the cluster where the BMC is located, or in the Internet, so as to upgrade the lower version of the firmware based on the higher version of the firmware.
[0082] In some embodiments, searching for the second firmware of the second version in the local area of the first controller includes: searching for the second firmware of the second version in the third memory set in the first controller.
[0083] In the embodiments of the present application, considering that the BMC regularly scans the hardware devices connected thereto, including host bus adapters, etc. During the scanning process, the BMC identifies and records the firmware version and status of each hardware device. If the BMC detects that the firmware version of a certain device is low or there are known problems, it will download the corresponding firmware update package from a specified server or storage location. This update package contains the payload for updating the firmware of the device. Therefore, in the embodiments of the present application, the second version of the second firmware may be stored in the first controller, so it is possible to attempt to search for the second version of the second firmware locally from the first controller.
[0084] It should be understood that in the embodiments of the present application, the third memory is not limited. In some embodiments, the third memory is the non-volatile memory in the first controller. Exemplarily, in a possible implementation manner, the third memory is a read-only memory (ROM) provided in the first controller. In another possible implementation manner, the third memory is a flash provided in the first controller. In yet another possible implementation manner, the third memory is an electrically erasable programmable read-only memory of the device in the first controller.
[0085] Exemplarily, in a possible implementation manner, when the BMC checks that the firmware versions of multiple host bus adapters of the same chip are different, it will trigger the function of the BMC to check and confirm whether the firmware files of the host bus adapters of the same chip have been stored in the BMC flash.
[0086] In some embodiments, searching for the second version of the second firmware from the controller cluster where the first controller is located includes: searching for the second version of the second firmware from the fourth memory managed by the controller cluster where the first controller is located.
[0087] It should be understood that in the embodiments of the present application, the cluster where the BMC is located is a set composed of multiple servers (nodes), and these servers work together to provide computing, storage, or network services. In the cluster, each server usually has its own BMC for monitoring and managing the hardware status of the server. In the embodiments of the present application, the "fourth memory managed by the controller cluster" can be understood as the storage resource that all nodes in the controller cluster can access, that is, the shared memory in the controller cluster, which is usually used to store shared data or support distributed applications. The nodes in the cluster are connected to the shared memory through a host bus adapter or a network interface card (NIC).
[0088] In the embodiments of the present application, each BMC has its own corresponding memory. The so-called memory for cluster management is the memory of all BMCs in the same cluster. Each individual BMC in the cluster can find available files from any memory in this cluster, which can also be understood as shared resources.
[0089] In some embodiments, searching for the second firmware of the second version from the Internet includes: searching for the second firmware of the second version from the network file library where the second firmware is located.
[0090] It should be understood that in the embodiments of the present application, "searching for the second firmware of the second version from the Internet" can be understood as searching for the second firmware of the second version from the file repository published on the Internet; among them, the file repository published on the Internet includes: various firmware and driver files corresponding to the products (including: host bus adapters) produced by the corresponding manufacturer. Exemplarily, in a possible implementation manner, the file repository is: repository.
[0091] In some embodiments, searching for the second firmware of the second version from the local of the first controller, the controller cluster where the first controller is located, or the Internet includes: if the second firmware of the second version is not searched from the local of the first controller, searching for the second firmware of the second version from the controller cluster where the first controller is located; if the second firmware of the second version is not searched from the controller cluster where the first controller is located, searching for the second firmware of the second version from the Internet.
[0092] It should be understood that in the embodiments of the present application, the second firmware of the second version is preferentially searched from the local of the first controller. If not searched, the second firmware of the second version is selected to be searched from the controller cluster where the first controller is located. If still not searched, the second firmware of the second version is selected to be searched from the Internet.
[0093] Exemplarily, in a possible implementation manner, Figure 3 is a schematic implementation flow of a firmware upgrade method provided by an embodiment of the present application Figure 2 as Figure 3 shown, the firmware of the low version can be upgraded through the following steps 301 to 310:
[0094] Step 301, the system starts;
[0095] Among them, the system is the operating system of the server, and two or more host bus adapters with different firmware are installed on the server;
[0096] Step 302, the BMC detects the firmware version;
[0097] That is, the BMC detects the firmware versions in multiple host bus adapters;
[0098] Step 303, check for a match; if yes, end; otherwise, execute Step 304;
[0099] Step 304, the BMC sets a flag and searches for a firmware image in the BMC / cluster;
[0100] Among them, the firmware image (FW Image) plays a crucial role in the process of firmware update. It is usually a file containing a complete copy of the firmware, used for backing up, updating, or restoring the firmware;
[0101] Step 305, check if a firmware image is found in the BMC / cluster; if yes, execute Step 306; otherwise, execute Step 307;
[0102] Step 306, the BMC records the upgrade task;
[0103] Step 307, search for a firmware image in the Repository;
[0104] Step 308, a firmware image is found;
[0105] Step 309, check if it is in the OS (i.e., the operating system environment); if yes, execute Step 310; otherwise, continue to execute Step 309;
[0106] Step 310, prompt the user and perform the upgrade.
[0107] It should be understood that in the embodiments of the present application, considering that once the baseboard management controller performs a code flashing operation, it can store a firmware image. When the system starts (the server is powered on), during the process of the server being powered on, the BMC and the host bus adapters in the server will be initialized. When the BMC initialization is completed and the initializations of multiple host bus adapters are all completed, the BMC can read the firmware versions of the cards for comparison. When the BMC detects that the firmware versions of the same type of HBAs are inconsistent, it will record an event (an example of a flag), and then trigger a search for a higher version of the firmware file on the current server in the memory of the BMC or the BMC cluster (when the BMC of this server is a cluster member). If found, the BMC can issue a firmware upgrade task for the low-version card.
[0108] In the embodiments of the present application, the reason for determining whether the server supervised by the first controller is running in the operating system environment is to enable the server to enter a stable stage, avoid unnecessary problems caused by firmware upgrade during the server startup process, and also consider that the firmware upgrade of the host bus adapter may require restarting the server to take effect, so the detection of whether the server is running in the operating system environment is added.
[0109] In some embodiments, obtaining the second firmware of the second version includes: reading the second firmware of the second version from a fifth memory disposed in the second hardware interface through the PLDM protocol or the MCTP protocol.
[0110] It should be understood that in the embodiments of the present application, the Platform Level Data Model (PLDM) protocol and the Management Component Transport Protocol (MCTP) protocol are two protocols for hardware management and communication, and are usually used in combination in modern servers and data centers. They provide a standardized framework for communication between the baseboard management controller and other management components.
[0111] In some embodiments, obtaining the second firmware of the second version includes: if the second firmware of the second version is not searched in the local of the first controller, the controller cluster where the first controller is located, or the Internet, reading the second firmware of the second version from a fifth memory disposed in the second hardware interface through the PLDM protocol or the MCTP protocol.
[0112] Exemplarily, in one possible implementation Figure 4 is a schematic implementation process of a firmware upgrade method provided by the embodiments of the present application Figure 3 , as Figure 4 shown, the firmware of the low version can be upgraded through the following steps 401 to 409:
[0113] Step 401, the system starts;
[0114] Wherein, the system is the operating system of the server, and two or more host bus adapters (HBAs) with different firmwares are installed on the server;
[0115] Step 402, the BMC detects the firmware version;
[0116] That is, the BMC detects the firmware versions in multiple host bus adapters;
[0117] Step 403, check for matching; if yes, end; otherwise, execute Step 404;
[0118] Step 404, the BMC fetches the firmware file from the HBA with a higher firmware version;
[0119] Step 405, check if the firmware file has been fetched; if yes, execute Step 406; otherwise, execute Step 407;
[0120] Step 406, the BMC records the upgrade task;
[0121] Step 407, the BMC reports the event log to let the customer know;
[0122] Step 408, check if it is in the OS (i.e., the operating system environment); if yes, execute Step 409; otherwise, continue to execute Step 408;
[0123] Step 409, prompt the user and perform the upgrade.
[0124] It should be understood that in the embodiment of the present application, the firmware of the host bus adapter has not been flashed by the BMC, but the system has installed a host bus adapter of the same chip type. The baseboard management controller obtains the payload of the firmware from the read-only memory of the host bus adapter through the out-of-band (OOB) communication method of the PLDM protocol or the MCTP protocol.
[0125] The following describes the exemplary application of the processing method provided in the embodiment of the present application in an actual scenario.
[0126] Due to different firmware versions, the processing flow for upgrading the low-version firmware of the HBA to the high-version firmware cannot be executed, resulting in failures of the HBA with the low-version firmware. In the related art, after the production line stops / client reports after-sales, a solution is provided through R & D analysis. However, the time cost of this solution is relatively high and the processing speed is slow, that is, the processing cycle is too long.
[0127] The embodiment of the present application provides a firmware upgrade method. In this method, when there is a situation where the firmware versions of multiple host bus adapters are inconsistent, it will first detect whether the BMC or the BMC cluster has stored the previously updated firmware file. If it exists, the firmware file can be directly obtained from the BMC or the BMC cluster for upgrading the low-version firmware; in addition, if it does not exist in the BMC or the BMC cluster, the BMC can automatically fetch the firmware file of the card from the HBA with a high firmware version for upgrading the low-version firmware. In this way, the participation of R & D personnel is reduced, and the BMC can automatically complete the operation of synchronizing different firmware versions to the same firmware version.
[0128] In some embodiments,Figure 3 Schematic diagram of the implementation process of a firmware upgrade method provided by an embodiment of the present application Figure 2 , as Figure 3 shown, the firmware of the lower version can be upgraded through the following steps 301 to 310:
[0129] Step 301, the system starts up;
[0130] Among them, the system is the operating system of the server, and two or more host bus adapters (HBAs) with different firmware are installed on the server;
[0131] Step 302, the BMC detects the firmware version;
[0132] That is, the BMC detects the firmware version in multiple host bus adapters;
[0133] Step 303, is it a match? If so, end; otherwise, execute Step 304;
[0134] Step 304, the BMC sets a flag and searches for a firmware image from the BMC / cluster;
[0135] Among them, the firmware image (FW Image) plays a crucial role in the firmware update process. It is usually a file containing a complete copy of the firmware, used for backing up, updating, or restoring the firmware;
[0136] Step 305, is a firmware image searched from the BMC / cluster? If so, execute Step 306; otherwise, execute Step 307;
[0137] Step 306, the BMC records the upgrade task;
[0138] Step 307, search for a firmware image from the Repository;
[0139] Step 308, a firmware image is searched;
[0140] Step 309, is it in the OS (i.e., the operating system environment)? If so, execute Step 310; otherwise, continue to execute Step 309;
[0141] Step 310, prompt the user and upgrade.
[0142] In some embodiments, Figure 4 Schematic diagram of the implementation process of a firmware upgrade method provided by an embodiment of the present application Figure 3 , as Figure 4 shown, the firmware of the lower version can be upgraded through the following steps 401 to 409:
[0143] Step 401, the system starts up;
[0144] Wherein, the system is the operating system of the server, and two or more host bus adapters (HBAs) with different firmware are installed on the server;
[0145] Step 402, the BMC detects the firmware version;
[0146] That is, the BMC detects the firmware versions of multiple host bus adapters;
[0147] Step 403, is there a match? If yes, end; otherwise, execute Step 404;
[0148] Step 404, the BMC grabs the firmware file from the HBA with a higher firmware version;
[0149] Step 405, is the firmware file grabbed? If yes, execute Step 406; otherwise, execute Step 407;
[0150] Step 406, the BMC records the upgrade task;
[0151] Step 407, the BMC reports the event log to let the customer know;
[0152] Step 408, is it in the OS (i.e., the operating system environment)? If yes, execute Step 409; otherwise, continue to execute Step 408;
[0153] Step 409, prompt the user and upgrade.
[0154] In some embodiments, Figure 5 This is a schematic implementation process of obtaining the second firmware of the second version provided by the embodiments of the present application Figure 1 , as Figure 5 shown, the BMC issues a self-check access command (i.e., BMC Command), and through the PCIe bus interfaces (i.e., PCIe Bus Interface) corresponding to the host bus adapter A (i.e., Adapter A) and the host bus adapter B (i.e., Adapter) respectively, the transmit direct memory access (i.e., TX DMA), buffer memory (i.e., Buffer Memory), protocol processor (i.e., Protocol Processor), and context memory (i.e., Context Memory), obtain the firmware images of Adapter A and Adapter B, compare the firmware versions of Adapter A and Adapter B, and output the firmware image of the higher version.
[0155] In some embodiments, Figure 6Schematic implementation process of obtaining the second firmware of the second version provided by the embodiments of the present application Figure 2 , as Figure 6 shown, the BMC controller (i.e., BMC Controller) issues a Query, obtains the Vital Product Data Inventory (i.e., VPD Inventory) through PCIe (SLI-Host Interface) A / B / C..., Transmit Direct Memory Access (i.e., TX DMA), and Buffer Memory, and returns it to the BMC through Receive Direct Memory Access (i.e., RXDMA) and PCIe (SLI-Host Interface) A / B / C.... When the 4 PCIe information matches, the BMC controller (i.e., BMC Controller) issues a Grep, and obtains the firmware image through PCIe (SLI-Host Interface) A / B / C..., TX DMA, Buffer Memory, Protocol Processor, Service Processor, and Context Memory, and feeds it back to the BMC again through Context Memory, Service Processor, Protocol Processor, Buffer Memory, RXDMA, and PCIe (SLI-Host Interface) A / B / C... for secondary verification of the 4 PCIe information. After passing the verification, this firmware image is refreshed to the HBA of the lower version firmware, and after completion, it takes effect after restarting.
[0156] In some embodiments, when the server is turned on, the BMC performs self-check and issues an access command to each Lane. When it recognizes that there is the same VPD as the lower version host bus adapter, the signal returns to the BMC. The BMC issues a second command to grab the firmware image (i.e., FW Image) in the register of the same VPD card and returns it to the BMC. The version information or release date is compared, and the higher version firmware is flashed to the host bus adapter of the lower version firmware, and then the system restarts.
[0157] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that these steps must be executed in that specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.; or, the steps in different embodiments may be combined into a new technical solution.
[0158] Based on the foregoing embodiments, an embodiment of the present application provides a firmware upgrade device. The device includes each module included therein, as well as each unit included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits. During implementation, the processor can be an AI acceleration engine (such as an NPU, etc.), a GPU, a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0159] Figure 7 FIG. is a schematic structural diagram of a firmware upgrade device provided by an embodiment of the present application. As Figure 7 shown, the firmware upgrade device 70 includes a first determination module 701, a second determination module 702, a third determination module 703, a comparison module 704, and an upgrade module 705, where:
[0160] The first determination module 701 is configured to determine a second hardware interface that matches the first hardware interface; where the matching includes: the chip type of the first hardware interface matches the chip type of the second hardware interface;
[0161] The second determination module 702 is configured to determine the first version of the first firmware in the first hardware interface; where the first firmware is used to implement communication between the first hardware interface and the first memory or storage network;
[0162] The third determination module 703 is configured to determine the second version of the second firmware in the second hardware interface; where the second firmware is used to implement communication between the second hardware interface and the second memory or storage network;
[0163] The comparison module 704 is configured to compare the first version of the first firmware with the second version of the second firmware;
[0164] The upgrade module 705 is configured to, if the comparison result is that the first version is lower than the second version, upgrade the first firmware in the first hardware interface with the second firmware of the second version.
[0165] In some embodiments, the upgrade module 705 is configured to obtain the second firmware of the second version; if the server supervised by the first controller runs in an operating system environment, upgrade the first firmware in the first hardware interface with the obtained second firmware; where the server realizes communication with the first memory or storage network through the first hardware interface.
[0166] In some embodiments, the upgrade module 705 is configured to search for the second firmware of the second version from the local of the first controller, the controller cluster where the first controller is located, or the Internet; if the second firmware is found, read the second firmware.
[0167] In some embodiments, the upgrade module 705 is configured to search for the second firmware of the second version from a third memory provided in the first controller; search for the second firmware of the second version from a fourth memory managed by the controller cluster where the first controller is located; search for the second firmware of the second version from a network file library where the second firmware is located.
[0168] In some embodiments, the upgrade module 705 is configured to, if the second firmware of the second version is not found locally from the first controller, search for the second firmware of the second version from the controller cluster where the first controller is located; if the second firmware of the second version is not found from the controller cluster where the first controller is located, search for the second firmware of the second version from the Internet.
[0169] In some embodiments, the upgrade module 705 reads the second firmware of the second version from a fifth memory provided in the second hardware interface through the PLDM protocol or the MCTP protocol.
[0170] In some embodiments, the first determination module 701 is configured to query the product information of the third hardware interface; if the product information of the third hardware interface is the same as the product information of the first hardware interface, use the third hardware interface as the second hardware interface.
[0171] The description of the above device embodiments is similar to the description of the above method embodiments and has similar beneficial effects to the method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0172] It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation. In addition, each functional unit in the various embodiments of the present application may be integrated in one processing unit, may exist separately physically, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware, or in the form of a software functional unit, or in the form of a combination of software and hardware.
[0173] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a first controller to execute all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), magnetic disks, or optical discs that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0174] The embodiments of the present application provide a first controller. Figure 8 As shown in the structural schematic diagram of a first controller provided by the embodiments of the present application, Figure 8 as shown, the first controller 80 includes a sixth memory 801 and a processor 802. The sixth memory 801 stores a computer program that can run on the processor 802. When the processor 802 executes the program, it implements the steps in the method provided in the above embodiments.
[0175] It should be noted that the sixth memory 801 is configured to store instructions and applications executable by the processor 802, and can also cache data to be processed or already processed in the processor 802 and each module of the first controller 80, and can be implemented by flash memory (Flash) or random access memory (RAM).
[0176] The embodiments of the present application provide a server. Figure 9 As shown in the structural schematic diagram of a server provided by the embodiments of the present application, Figure 9 as shown, the hardware layer of the server 90 includes a first controller 901, a first hardware interface 902, and a second hardware interface 903, and the software layer of the server 90 includes an operating system 904.
[0177] The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in the method provided in the above embodiments.
[0178] The embodiments of the present application provide a computer program product containing instructions. When it runs on a processor, it enables the processor to execute the steps in the method provided in the above method embodiments.
[0179] It should be noted here that the descriptions of the above storage medium and device embodiments are similar to those of the above method embodiments and have similar beneficial effects to the method embodiments. For the technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0180] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" or "in a possible implementation" or "example" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of this application. Therefore, the "in one embodiment" or "in an embodiment" or "in some embodiments" or "in a possible implementation" or "example" etc. that appear throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of this application, the sequence numbers of the above processes do not mean the order of execution is prior or subsequent. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application. The serial numbers of the embodiments of this application above are only for description and do not represent the advantages or disadvantages of the embodiments. The descriptions of the above embodiments tend to emphasize the differences between the embodiments, and their similarities or similarities can be referred to each other. For the sake of brevity, they will not be elaborated in this article.
[0181] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, object A and / or object B can represent: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0182] It should be noted that in this article, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including a..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In the several embodiments provided in this application, it should be understood that the disclosed devices and apparatuses etc. can be implemented in other ways. The above-described embodiments are merely illustrative. The features disclosed in the several product embodiments provided in this application can be combined arbitrarily without conflict to obtain new product embodiments.
[0183] As described above, it is only the implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claimed rights.
Claims
1. A firmware upgrade method, the method being applied to a first controller, the method comprising: Determine a second hardware interface that matches the first hardware interface; wherein the matching includes: a chip type of the first hardware interface matches a chip type of the second hardware interface; Determining a first version of a first firmware in the first hardware interface; wherein the first firmware is used to implement communication between the first hardware interface and a first storage or storage network; Determining a second version of a second firmware in the second hardware interface; wherein the second firmware is used to implement communication between the second hardware interface and a second storage or storage network; comparing a first version of the first firmware with a second version of the second firmware; If the comparison result is that the first version is lower than the second version, the first firmware in the first hardware interface is upgraded using the second firmware of the second version.
2. The method according to claim 1, wherein the step of upgrading the first firmware in the first hardware interface by using the second firmware of the second version comprises: Obtaining the second firmware of the second version; If the server supervised by the first controller runs in an operating system environment, upgrading the first firmware in the first hardware interface by using the acquired second firmware; The server communicates with the first storage or storage network through the first hardware interface.
3. The method according to claim 2, wherein obtaining the second version of the second firmware comprises: Searching for the second firmware of the second version locally on the first controller, in a controller cluster where the first controller is located, or on the Internet; If the second firmware is found, the second firmware is read.
4. The method according to claim 3, wherein searching for the second version of the second firmware from a local location of the first controller, a controller cluster where the first controller is located, or the Internet comprises: searching a third memory disposed in the first controller for the second firmware of the second version; searching for the second firmware of the second version from a fourth memory managed by the controller cluster where the first controller is located; The second version of the second firmware is searched from the network file library where the second firmware is located.
5. The method according to claim 3, wherein searching for the second version of the second firmware from a local location of the first controller, a controller cluster where the first controller is located, or the Internet comprises: If the second firmware of the second version is not found locally on the first controller, searching for the second firmware of the second version from the controller cluster where the first controller is located; If the second firmware of the second version is not found from the controller cluster where the first controller is located, the second firmware of the second version is searched from the Internet.
6. The method according to any one of claims 2 to 5, wherein obtaining the second firmware of the second version comprises: The second firmware of the second version is read from a fifth memory arranged in the second hardware interface through a PLDM protocol or a MCTP protocol.
7. The method according to claim 1, wherein determining the second hardware interface that matches the first hardware interface comprises: Query product information of the third hardware interface; If the product information of the third hardware interface is the same as the product information of the first hardware interface, the third hardware interface is used as the second hardware interface.
8. A firmware upgrade device, comprising: A first determination module is configured to determine a second hardware interface that matches the first hardware interface; wherein the matching includes: a chip type of the first hardware interface matches a chip type of the second hardware interface; A second determination module is configured to determine a first version of a first firmware in the first hardware interface; wherein the first firmware is used to implement communication between the first hardware interface and a first memory or storage network; A third determination module is configured to determine a second version of a second firmware in the second hardware interface; wherein the second firmware is used to implement communication between the second hardware interface and a second memory or storage network; a comparison module configured to compare a first version of the first firmware with a second version of the second firmware; The upgrade module is configured to upgrade the first firmware in the first hardware interface using the second firmware of the second version if the comparison result shows that the first version is lower than the second version.
9. A first controller, comprising a sixth memory and a processor, wherein the sixth memory stores a computer program executable on the processor, and the processor implements the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.