Firmware upgrade methods and devices, storage media and electronic devices

By reading the chip registers and firmware file header information of the Retimer card, the manufacturer is automatically identified and the upgrade function is matched, which solves the problem of low firmware upgrade efficiency of Retimer cards and realizes efficient and accurate firmware upgrade.

CN117762453BActive Publication Date: 2026-11-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410038719.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2026-11-17
Estimated Expiration
2044-01-10

AI Technical Summary

Technical Problem

Existing methods for upgrading Retimer card firmware are inefficient, requiring manual querying of manufacturer information and the use of corresponding tools, which is prone to errors and affects work efficiency.

Method used

By reading the register values ​​of the specified chip registers on the Retimer card and the firmware file header information, the manufacturer information is determined, and the corresponding firmware upgrade function is called to perform the upgrade operation when the manufacturer is matched.

Benefits of technology

It improves the efficiency of Retimer card firmware upgrades, reduces error rates and error messages, and ensures the accuracy of upgrades and the stability of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117762453B_ABST
    Figure CN117762453B_ABST
Patent Text Reader

Abstract

This application provides a firmware upgrade method, apparatus, storage medium, and electronic device. The method includes: determining first manufacturer information based on the register value of a specified chip register on a specified signal retimer card of a target device, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer; determining second manufacturer information based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is the second manufacturer; and, if the first manufacturer and the second manufacturer are the same preset manufacturer, performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer. This application solves the problem of low firmware upgrade efficiency in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a firmware upgrade method and apparatus, a storage medium, and an electronic device. Background Technology

[0002] A retimer card is a component made of mixed-signal analog / digital chips. Its principle is to use an internal clock recovery circuit to re-time the input signal to eliminate clock skew and jitter, and to correct the phase and time deviation of the signal. Retimer cards can be used to extend the transmission distance of the interface and improve signal quality, solving problems such as inconsistent signal timing, high loss, and poor integrity when transmitting data at high speed and over long distances.

[0003] However, there is more than one manufacturer of Retimer cards, and each manufacturer uses different files, methods, and tools for firmware upgrades. This means that upgrading Retimer card firmware requires manually identifying the manufacturer and then manually using the corresponding upgrade tool to upgrade the firmware file. Therefore, the firmware upgrade methods in this technology suffer from low efficiency. Summary of the Invention

[0004] This application provides a firmware upgrade method, apparatus, storage medium, and electronic device to at least solve the problem of low efficiency in firmware upgrade methods in related technologies.

[0005] According to one embodiment of this application, a firmware upgrade method is provided, comprising: determining first manufacturer information based on the register value of a specified chip register on a specified signal retimer card of a target device, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is a first manufacturer; determining second manufacturer information based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is a second manufacturer; and performing a firmware upgrade operation on the specified Retimer card by calling a target Retimer card firmware upgrade function corresponding to the first manufacturer when the first manufacturer and the second manufacturer are the same preset manufacturer.

[0006] In an exemplary embodiment, determining the first vendor information based on the register value of a specified chip register on a specified signal retimer card of the target device includes: reading the register value of the input / output (I / O) extension chip register on the specified retimer card; and, if a target register value is read and the target register value is a target value in a set of preset values, determining the vendor information matching the target value as the first vendor information, wherein each preset value in the set of preset values ​​matches a vendor information.

[0007] In one exemplary embodiment, after reading the register value of the input / output IO expansion chip register on the designated Retimer card, the method further includes: in the event that the register value reading fails, writing designated information into a designated system file under the Baseboard Management Controller (BMC) of the target device, wherein the designated system file is a signal renormalizer type file, and the designated information is used to indicate that no Retimer card is inserted in the Retimer card slot of the target device.

[0008] In an exemplary embodiment, determining the second manufacturer information based on the firmware file of the specified Retimer card includes: opening the firmware file of the specified Retimer card in read-only mode and loading the read firmware file of the specified Retimer card into the BMC memory of the Baseboard Management Controller (BMC) of the target device; reading N consecutive bytes starting from the header of the firmware file of the specified Retimer card in the BMC memory to obtain initial firmware information, where N is a positive integer greater than or equal to 1; shifting and concatenating the initial firmware information to obtain shifted and concatenated target firmware information; and, if the target firmware information is target firmware information in a set of preset firmware information, determining the manufacturer information matching the target firmware information as the second manufacturer information, wherein each preset firmware information in the set of preset firmware information matches one manufacturer information.

[0009] In an exemplary embodiment, after shifting and splicing the initial firmware information to obtain the shifted and spliced ​​target firmware information, the method further includes: printing target error information when the target firmware information does not belong to the set of preset firmware information, wherein the target error information is used to describe a firmware upgrade anomaly of the specified Retimer card.

[0010] In an exemplary embodiment, the method further includes: determining whether the first manufacturer information and the second manufacturer information are the same manufacturer information; if the first manufacturer information and the second manufacturer information are the same manufacturer information, performing the following matching operation cyclically with a set of preset manufacturer information as the current manufacturer information, wherein each manufacturer information in the set of preset manufacturer information is the manufacturer information of a preset manufacturer: if the first manufacturer information and the second manufacturer information are the same as the current manufacturer information, determining that the first manufacturer and the second manufacturer are the same preset manufacturer, and ending the loop; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there is preset manufacturer information in the set of preset manufacturer information that has not performed the matching operation, continuing to perform the next round of the matching operation; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there is no preset manufacturer information in the set of preset manufacturer information that has not performed the matching operation, ending the loop;

[0011] When the first manufacturer and the second manufacturer are the same preset manufacturer, the step of performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer includes: when the first manufacturer and the second manufacturer are the same preset manufacturer, calling the target Retimer card firmware upgrade function corresponding to the first manufacturer in the BMC memory of the baseboard management controller (BMC) of the target device, so that the target Retimer card firmware upgrade function reads the firmware upgrade file from the corresponding BMC memory location, and uses the read firmware upgrade file to perform the firmware upgrade operation.

[0012] In an exemplary embodiment, after performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, the method further includes: determining the upgrade operation execution result of the firmware upgrade operation based on the function return value of the target Retimer card firmware upgrade function, and printing the execution result information, wherein the execution result information is used to indicate the upgrade operation execution result.

[0013] According to another embodiment of this application, a firmware upgrade apparatus is provided, comprising: a first determining unit, configured to determine first manufacturer information based on the register value of a specified chip register on a specified signal retimer card of a target device, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is a first manufacturer; a second determining unit, configured to determine second manufacturer information based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is a second manufacturer; and a first execution unit, configured to perform a firmware upgrade operation on the specified Retimer card by calling a target Retimer card firmware upgrade function corresponding to the first manufacturer when the first manufacturer and the second manufacturer are the same preset manufacturer.

[0014] In an exemplary embodiment, the first determining unit includes: a first reading module, configured to read the register value of the input / output IO expansion chip register on the specified Retimer card; and a first determining module, configured to, when a target register value is read and the target register value is a target value in a set of preset values, determine the manufacturer information matching the target value as the first manufacturer information, wherein each preset value in the set of preset values ​​matches a manufacturer information.

[0015] In one exemplary embodiment, the apparatus further includes: a writing unit, configured to, after reading the register value of the input / output IO extension chip register on the designated Retimer card, write designated information to a designated system file under the Baseboard Management Controller (BMC) of the target device in the event of a failure to read the register value, wherein the designated system file is a signal renormalizer type file, and the designated information is used to indicate that no Retimer card is inserted in the Retimer card slot of the target device.

[0016] In an exemplary embodiment, the second determining unit includes: a first execution module, configured to open the firmware file of the specified Retimer card in read-only mode and load the read firmware file of the specified Retimer card into the BMC memory of the Baseboard Management Controller (BMC) of the target device; a second reading module, configured to read N consecutive bytes starting from the header of the firmware file of the specified Retimer card in the BMC memory to obtain initial firmware information, wherein N is a positive integer greater than or equal to 1; a second execution module, configured to perform shifting and concatenation on the initial firmware information to obtain shifted and concatenated target firmware information; and a second determining module, configured to, when the target firmware information is target firmware information in a set of preset firmware information, determine the manufacturer information matching the target firmware information as the second manufacturer information, wherein each preset firmware information in the set of preset firmware information matches one manufacturer information.

[0017] In one exemplary embodiment, the apparatus further includes: a printing unit, configured to print target error information when the target firmware information does not belong to the set of preset firmware information after the initial firmware information is shifted and spliced ​​to obtain the shifted and spliced ​​target firmware information, wherein the target error information is used to describe a firmware upgrade anomaly of the specified Retimer card.

[0018] In an exemplary embodiment, the apparatus further includes: a judging unit, configured to judge whether the first manufacturer information and the second manufacturer information are the same manufacturer information; and a second execution unit, configured to, when the first manufacturer information and the second manufacturer information are the same manufacturer information, cyclically execute the following matching operation using a set of preset manufacturer information as the current manufacturer information, wherein each manufacturer information in the set of preset manufacturer information is the manufacturer information of a preset manufacturer: when the first manufacturer information and the second manufacturer information are the same as the current manufacturer information, determine that the first manufacturer and the second manufacturer are the same preset manufacturer and end the loop; when the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there is preset manufacturer information in the set of preset manufacturer information that has not performed the matching operation, continue to execute the next round of the matching operation; when the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there is no preset manufacturer information in the set of preset manufacturer information that has not performed the matching operation, end the loop;

[0019] The first execution unit includes a third execution module, configured to, when the first manufacturer and the second manufacturer are the same preset manufacturer, call the target Retimer card firmware upgrade function corresponding to the first manufacturer in the BMC memory of the baseboard management controller (BMC) of the target device, so that the target Retimer card firmware upgrade function reads the firmware upgrade file from the corresponding BMC memory location and uses the read firmware upgrade file to perform the firmware upgrade operation.

[0020] In one exemplary embodiment, the apparatus further includes: a third execution unit, configured to, after performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, determine the upgrade operation execution result of the firmware upgrade operation based on the function return value of the target Retimer card firmware upgrade function, and print execution result information, wherein the execution result information is used to indicate the upgrade operation execution result.

[0021] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0022] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0023] This application addresses the issue of low efficiency, error-proneness, and frequent reports associated with firmware updates for Retimer cards when the Retimer card and firmware file belong to the same manufacturer. The method involves determining first manufacturer information based on the register value of a specified chip register on the Retimer card of the target device. The first manufacturer information identifies the manufacturer to which the specified Retimer card belongs. Second manufacturer information is determined based on the firmware file of the specified Retimer card. When both the first and second manufacturers are the same, the firmware upgrade function corresponding to the first manufacturer is called to perform a firmware upgrade on the specified Retimer card. By first obtaining the manufacturer information of the Retimer card and the firmware manufacturer on the current device, and then determining if they match before proceeding with the upgrade, this method solves the problems of low efficiency, high error rate, and frequent reports associated with firmware updates for Retimer cards. In other words, it addresses the issue of low efficiency in firmware upgrade methods in related technologies. Attached Figure Description

[0024] Figure 1 This is a hardware structure block diagram of a server device for a firmware upgrade method according to an embodiment of this application;

[0025] Figure 2 This is a flowchart illustrating a firmware upgrade method according to an embodiment of this application;

[0026] Figure 3 This is a flowchart illustrating another firmware upgrade method according to an embodiment of this application;

[0027] Figure 4 This is a flowchart illustrating another firmware upgrade method according to an embodiment of this application;

[0028] Figure 5 This is a flowchart illustrating another firmware upgrade method according to an embodiment of this application;

[0029] Figure 6 This is a flowchart illustrating another firmware upgrade method according to an embodiment of this application;

[0030] Figure 7 This is a structural block diagram of an optional firmware upgrade device provided in an embodiment of this application;

[0031] Figure 8 This is a structural block diagram of a computer system for an optional electronic device provided in an embodiment of this application. Detailed Implementation

[0032] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0035] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a firmware upgrade method according to an embodiment of this application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0036] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the firmware upgrade method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0037] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a NIC (Network Interface Controller), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be an RF (Radio Frequency) module used for wireless communication with the Internet.

[0038] This embodiment provides a firmware upgrade method. Figure 2 This is a flowchart illustrating a firmware upgrade method according to an embodiment of this application, as shown below. Figure 2 As shown, the process includes the following steps:

[0039] Step S202: Based on the register value of the specified chip register on the specified signal retimer card of the target device, determine the first manufacturer information, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer.

[0040] The firmware upgrade method in this embodiment can be applied to scenarios involving upgrading firmware Retimer cards. Retimer cards are typically installed on high-speed data transmission devices such as network devices, computing devices, and storage devices, for example, servers, network switches, data storage devices, routers, network access devices, etc. In at least some embodiments of this application, the BMC is taken as OpenBMC (Open Baseboard Management Controller), and the firmware upgrade of the firmware Retimer card installed on the server is taken as an example based on the OpenBMC on the server.

[0041] Retimer cards can retime and regenerate high-speed data signals, keeping the signal stable during transmission and thus improving device performance and data transmission quality. However, there are multiple manufacturers of retimer cards, and each manufacturer uses different files, methods, and tools for firmware upgrades. Therefore, when upgrading a retimer card firmware, it is necessary to first determine the manufacturer's information and then use the corresponding upgrade tool to upgrade the corresponding firmware file.

[0042] For example, there are two ways to upgrade the Retimer firmware on a Linux system:

[0043] 1. First, check which manufacturer's Retimer card is installed on the machine. Then, log in to the web interface and use the firmware upgrade function to transfer the corresponding manufacturer's upgrade tool and the new version of the Retimer firmware to the OpenBMC. Then, run the upgrade tool within OpenBMC to upgrade the firmware of the Retimer card. Here, OpenBMC is a server-specific management controller that can automatically monitor the server's operating status, monitor and manage various components connected to the server, and record system alarm events.

[0044] 2. First, check which manufacturer's Retimer card is installed on the machine (device). Then, manually copy the new version of the Retimer firmware to the specified directory of the BMC system on the target machine using the scp command. Finally, manually execute the ssh command to log in to the target machine system and execute the upgrade tool to perform the upgrade.

[0045] Therefore, it is evident that the current method for upgrading Retimer card firmware requires manual intervention. However, when a large number of machines need to be updated with Retimer card firmware versions, and there are Retimer card devices from different manufacturers, this manual operation becomes extremely inefficient. It takes a long time to complete the task, and because the manufacturer information of the Retimer card is not verified, problems such as firmware and card incompatibility leading to upgrade failure and inability to start may occur. In addition, if the upgrade command is executed without knowing whether there is a Retimer card in the corresponding slot, various errors will occur, which will also affect work efficiency.

[0046] To at least partially solve the above problems, in this embodiment, by obtaining the manufacturer information of the Retimer card installed on the current device (e.g., server) and the manufacturer information corresponding to the firmware file, it is determined whether the Retimer card and the firmware file match, that is, whether they correspond to the same manufacturer, and then an upgrade is decided to be performed, thereby solving the problems of low efficiency, easy error and easy error reporting of Retimer card firmware updates.

[0047] Considering that the specified chip register value on the Retimer card can be used to identify the Retimer card manufacturer information, in this embodiment, the first manufacturer information can be determined based on the register value of the specified chip register on the specified Retimer card of the target device (e.g., server). That is, the manufacturer to which the Retimer card belongs can be determined based on the register value of the specified chip register on the Retimer card. Here, the manufacturer represented by the first manufacturer information is the first manufacturer. Taking the specified Retimer card of the target device belonging to the first manufacturer as an example.

[0048] The register values ​​of the specified chip registers on the Retimer cards of different manufacturers can be customized by each manufacturer according to unified rules / specifications. Different manufacturers correspond to different register values. Optionally, the correspondence between manufacturers and register values ​​can be stored in the OpenBMC memory. OpenBMC can interact with the Retimer card through the I2C (Inter-Integrated Circuit, serial bidirectional bus) interface / bus. For example, OpenBMC can read the register values ​​of the specified chip registers on the Retimer card through the I2C interface based on the device address (card slot location) and other information of the Retimer card.

[0049] Step S204: Determine the second manufacturer information based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is the second manufacturer.

[0050] Considering that mismatch between firmware files and Retimer cards can lead to upgrade failures and boot failures, in order to verify whether the firmware file and Retimer card belong to the same manufacturer, if it is determined that the specified Retimer card belongs to the first manufacturer, the manufacturer information of the firmware file can be determined based on the obtained firmware file of the Retimer card, that is, the manufacturer to which the firmware file belongs.

[0051] Optionally, the manufacturer to which the firmware file belongs can be determined based on specified data in the firmware file (e.g., firmware header data). Different manufacturers correspond to different specified data in different firmware files, and the correspondence between the specified data and the manufacturer can be stored in the OpenBMC memory.

[0052] In this embodiment, we take determining that the firmware file of a specified Retimer card belongs to a second manufacturer based on the obtained firmware file of the specified Retimer card as an example.

[0053] Step S206: If the first manufacturer and the second manufacturer are the same preset manufacturer, perform a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer.

[0054] If it is determined that the Retimer card and firmware file belong to the same manufacturer, the firmware upgrade function corresponding to that manufacturer can be called to perform a firmware upgrade operation on the Retimer card.

[0055] Optionally, the corresponding Retimer card firmware upgrade functions of each manufacturer and their corresponding manufacturers can be stored in the OpenBMC memory. The Retimer card firmware upgrade functions can include some parameters, such as the device address of the Retimer card, the path of the firmware file, the firmware version, etc.

[0056] If the Retimer card to be upgraded and the obtained firmware file belong to the same manufacturer, then based on the obtained information of the Retimer card to be upgraded (e.g., device address) and the firmware file, the firmware upgrade function corresponding to that manufacturer is called to perform a firmware upgrade operation on the Retimer card to be upgraded. In this embodiment, if the first manufacturer and the second manufacturer are the same preset manufacturer, a firmware upgrade operation can be performed on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer. Here, the first manufacturer and the second manufacturer are the same manufacturer, and the target Retimer card firmware upgrade function corresponding to the first manufacturer is the same as the target Retimer card firmware upgrade function corresponding to the second manufacturer.

[0057] Through the above steps, based on the register value of the specified chip register on the specified signal retimer card of the target device, the first manufacturer information is determined, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer; based on the firmware file of the specified Retimer card, the second manufacturer information is determined, wherein the manufacturer represented by the second manufacturer information is the second manufacturer; when the first manufacturer and the second manufacturer are the same preset manufacturer, the firmware upgrade operation of the specified Retimer card is performed by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, which solves the problem of low firmware upgrade efficiency in related technologies and improves firmware upgrade efficiency.

[0058] In one exemplary embodiment, determining first vendor information based on the register value of a specified chip register on a specified signal retimer card of the target device includes:

[0059] S11, Read the register value of the input / output IO expansion chip register on the specified Retimer card;

[0060] S12, if the target register value is read and the target register value is the target value in a set of preset values, the manufacturer information that matches the target value is determined as the first manufacturer information, wherein each preset value in the set of preset values ​​matches a manufacturer information.

[0061] Generally, each Retimer card is configured with an Input / Output Expander (IO Expander) chip register. The register values ​​of the IO Expander chip registers defined by different manufacturers are usually different. By storing the correspondence between the register values ​​of different manufacturers and the manufacturers in the BMC memory, a set of preset values ​​corresponding to different manufacturers can be obtained (the preset value can be the register value itself or the identifier value corresponding to the register value; this embodiment does not limit this). When the BMC reads the register value (target register value) of the IO Expander chip register on the specified Retimer card and finds that it corresponds to one of the target values ​​in the set of preset values, the manufacturer to which the Retimer card belongs can be determined based on the manufacturer information corresponding to the target value.

[0062] For example, combining Figure 3 In this embodiment, taking the example that the target device only uses Retimer cards from manufacturers A and M, with the register value of manufacturer A card being 0x10 and the register value of manufacturer M card being 0x80, the register value of the IO Expander chip used to identify the Retimer card manufacturer information on the Retimer card is read and denoted as reg_value (register value). The manufacturer of the Retimer card is determined by reg_value. If reg_value is equal to 0x10, it is determined to be a manufacturer A card (denoted as card_vendor = CARD_A), and if reg_value is equal to 0x80, it is determined to be a manufacturer M card (denoted as card_vendor = CARD_M). Then, the manufacturer information is saved to the system file retimer_type under OpenBMC.

[0063] This embodiment improves the efficiency and accuracy of retimer card manufacturer information acquisition by reading the IOExpander chip register value on the retimer card, which is used to identify the retimer card manufacturer information, through the BMC.

[0064] In one exemplary embodiment, after reading the register value of the input / output I / O extension chip register on the specified Retimer card, the above method further includes:

[0065] S21, In the event of a failure to read the register value, write specified information into a specified system file under the Baseboard Management Controller (BMC) of the target device. The specified system file is a signal reshaping type file, and the specified information is used to indicate that no Retimer card is inserted in the Retimer card slot of the target device.

[0066] Considering that various errors may occur if the upgrade command is executed directly without knowing whether a Retimer card is in the corresponding slot, in this embodiment, if it fails to read the register value of the input / output IO expansion chip register on the specified Retimer card, it is assumed that no Retimer card is installed in the current slot. An error is reported by writing specified information into the specified system file under the Baseboard Management Controller (BMC) of the target device, that is, indicating that no Retimer card is inserted in the Retimer card slot of the target device.

[0067] For example, combining Figure 4 In this embodiment, if the read fails (I2C access fails), it is assumed that no Retimer card is installed in the current slot. The file `retimer_type` under the OpenBMC system is written with NA (Not Available), then the I2C access error message is printed and the process exits. If the read succeeds (I2C access succeeds), the following steps are executed: Figure 3 The steps are shown.

[0068] In this embodiment, if the failure to read the IO Expander chip register value is confirmed, it can be determined that no Retimer card is installed in the current slot. By writing specific information to a specified location to report an error, the erroneous data can be accurately located for appropriate processing, thereby improving the efficiency of firmware upgrades.

[0069] In one exemplary embodiment, determining second vendor information based on the firmware file of a specified Retimer card includes:

[0070] S31, open the firmware file of the specified Retimer card in read-only mode, and load the read firmware file of the specified Retimer card into the BMC memory of the baseboard management controller (BMC) of the target device;

[0071] S32, read N consecutive bytes starting from the header of the firmware file of the specified Retimer card in the BMC memory to obtain the initial firmware information, where N is a positive integer greater than or equal to 1;

[0072] S33, shift and splice the initial firmware information to obtain the shifted and spliced ​​target firmware information;

[0073] S34, if the target firmware information is the target firmware information in a set of preset firmware information, the manufacturer information that matches the target firmware information is determined as the second manufacturer information, wherein each preset firmware information in the set of preset firmware information matches a manufacturer information.

[0074] To facilitate firmware upgrades for Retimer cards based on BMC, after obtaining the new firmware file from the Retimer card manufacturer or official website, the firmware file of the specified Retimer card can be opened in read-only mode and loaded into the BMC memory of the OpenBMC system of the target device.

[0075] Generally, the header of a firmware file contains specific identifiers or information in a fixed format, which may include manufacturer information. This information may be stored in ASCII code or other formats, and this embodiment does not limit this.

[0076] In this embodiment, obtaining manufacturer information from the header of the firmware file may include the following steps:

[0077] 1. Read the header of the firmware file: First, open the firmware file and read N consecutive bytes from the beginning of the file. N is a positive integer greater than or equal to 1. In this embodiment, N can be 3.

[0078] 2. Shift and concatenate these 3 bytes: Shift and concatenate these 3 bytes according to specific rules to form a string (target firmware information). The shift and concatenation rules may vary from manufacturer to manufacturer, but usually these 3 bytes are concatenated according to ASCII code or other encodings.

[0079] Here, when the target firmware information is the target firmware information in a set of preset firmware information, the manufacturer information that matches the target firmware information is determined as the second manufacturer information. Each preset firmware information in the set of preset firmware information matches one manufacturer information. That is, the preset firmware information corresponding to different manufacturers is different. When the target firmware information is included in a set of preset firmware information corresponding to each manufacturer, the manufacturer information that matches the target firmware information is determined as the second manufacturer information.

[0080] For example, in this embodiment, the firmware file of the Retimer card is opened in read-only mode. If opening the file fails, an I2C access error message is printed and the process exits. If opening the file successfully, the firmware file of the Retimer card is loaded into the OpenBMC memory. The first three consecutive bytes of the firmware file header are read, shifted, and concatenated, denoted as fw_header, where fw (Firmware, firmware version) is the first byte. This value is then used to determine which manufacturer the Retimer card belongs to. Based on the information provided by the two manufacturers, if fw_header equals 0xA55AA5, it is determined to be a card from manufacturer A (denoted as fw_vendor = CARD_A); if fw_header equals 0xE1104C, it is determined to be a card from manufacturer M (denoted as fw_vendor = CARD_M).

[0081] This embodiment demonstrates how reading the header data of a firmware file to determine its manufacturer can improve the efficiency and accuracy of obtaining firmware file manufacturer information.

[0082] In one exemplary embodiment, after shifting and splicing the initial firmware information to obtain the shifted and spliced ​​target firmware information, the above method further includes:

[0083] S41, if the target firmware information does not belong to a set of preset firmware information, print the target error information, which describes the firmware upgrade anomaly of the specified Retimer card.

[0084] For example, in this embodiment, if fwheader is any other value, an error message is printed and the program exits, printing the target error message: Invalid firmware header data.

[0085] In this embodiment, when the target firmware information corresponding to the header data of the obtained firmware file does not belong to the preset firmware information corresponding to each manufacturer, an error message is printed to indicate that the firmware header data is invalid. This can accurately locate the erroneous data for appropriate processing and improve the efficiency of firmware upgrades.

[0086] In one exemplary embodiment, the above method further includes:

[0087] S51, determine whether the first manufacturer information and the second manufacturer information are the same manufacturer information;

[0088] S52, if the first manufacturer information and the second manufacturer information are the same, the following matching operation is performed cyclically using a set of preset manufacturer information as the current manufacturer information, wherein each manufacturer information in the set of preset manufacturer information is the manufacturer information of a preset manufacturer: if the first manufacturer information and the second manufacturer information are the same as the current manufacturer information, the first manufacturer and the second manufacturer are determined to be the same preset manufacturer, and the loop ends; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there are preset manufacturer information in the set of preset manufacturer information that have not undergone matching operation, the next round of matching operation is performed; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there are no preset manufacturer information in the set of preset manufacturer information that have not undergone matching operation, the loop ends.

[0089] In this embodiment, to ensure the accuracy of the called Retimer card firmware upgrade function and thus guarantee firmware upgrade efficiency, it is first determined whether the manufacturer information (first manufacturer information) of the Retimer card to be upgraded and the manufacturer information (second manufacturer information) of the obtained firmware file are the same. If the first manufacturer information and the second manufacturer information are the same, the manufacturer is determined by comparing them sequentially with a set of preset manufacturer information corresponding to each manufacturer. Then, the firmware upgrade function corresponding to that manufacturer is called to perform the firmware upgrade operation on the Retimer card to be upgraded.

[0090] When the first manufacturer and the second manufacturer are the same preset manufacturer, a firmware upgrade operation is performed on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, including:

[0091] S53, if the first manufacturer and the second manufacturer are the same preset manufacturer, call the target Retimer card firmware upgrade function corresponding to the first manufacturer in the BMC memory of the target device's baseboard management controller (BMC), so that the target Retimer card firmware upgrade function can read the firmware upgrade file from the corresponding BMC memory location and use the read firmware upgrade file to perform the firmware upgrade operation.

[0092] Here, the firmware upgrade file can refer to the firmware file of the specified Retimer card. When the first manufacturer corresponding to the specified Retimer card and the second manufacturer corresponding to the firmware file of the specified Retimer card are the same preset manufacturer, the target Retimer card firmware upgrade function corresponding to the first manufacturer (i.e., the second manufacturer) in the OpenBMC memory of the target device is called through OpenBMC. The target Retimer card firmware upgrade function reads the firmware upgrade file from the corresponding OpenBMC memory location and uses the read firmware upgrade file to perform the firmware upgrade operation.

[0093] For example, in this embodiment, the vendor information card_vendor of the Retimer card device is compared with the vendor information fwvendor of the firmware file. If they do not match, an invalid firmware error message is printed and the process exits. If they match, the process proceeds to the next step. If the Retimer card vendor information card_vendor or the firmware file information fwvendor is A card information, the A card upgrade function is called to perform the upgrade operation. If card_vendor or the firmware file information fwvendor is not A card information, the process proceeds to the next step. It is then determined whether card_vendor or the firmware file information fwvendor is M card. If it is not M card, an error is reported and the process exits, printing a card and firmware mismatch error message. If it is M card information, the M card firmware upgrade operation function is called to perform the firmware upgrade.

[0094] In this embodiment, by determining whether the Retimer card manufacturer and the firmware file manufacturer match, and if the card manufacturer and firmware file manufacturer match, the corresponding manufacturer's firmware upgrade function is called to perform the firmware upgrade operation. This avoids errors caused by incompatibility between the firmware file and the Retimer card during the upgrade process, thus improving equipment maintenance efficiency.

[0095] In one exemplary embodiment, after performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, the above method further includes:

[0096] S61, based on the function return value of the target Retimer card firmware upgrade function, determine the execution result of the firmware upgrade operation and print the execution result information, whereby the execution result information is used to indicate the execution result of the upgrade operation.

[0097] To ensure the firmware upgrade operation is successful and the new firmware version functions correctly, in this embodiment, the execution result of the firmware upgrade operation can be determined based on the function return value of the target Retimer card firmware upgrade function; that is, the success of the firmware upgrade is determined based on the function return value.

[0098] For example, in this embodiment, the success of the firmware upgrade operation is determined by checking whether the return value of the firmware upgrade operation function of the A card or M card is zero. A return value of 0 indicates success, while a negative number (garbled characters) indicates failure. The execution result information is printed to indicate the execution result of the upgrade operation.

[0099] This embodiment verifies the success of the Retimer card firmware upgrade by using the return value of the Retimer card firmware upgrade function, which can improve system stability and reliability and ensure that the Retimer card can operate normally.

[0100] As an optional exemplary embodiment of this application, the firmware upgrade method of this application embodiment is explained by taking the example of using only Retimer cards from two manufacturers, Astera (hereinafter referred to as A) and Montage (hereinafter referred to as M), in the server.

[0101] Currently, the most commonly used retimer cards are from Astera and Montage, but their retimer card firmware files, upgrade methods, and upgrade tools differ. When a large number of machines need retimer card firmware updates, and these machines contain retimer cards from different manufacturers, manual operation becomes extremely inefficient. This process is time-consuming, and the lack of verification of the retimer card manufacturer information can lead to firmware and card incompatibility, resulting in upgrade failures and boot failures. Furthermore, executing upgrade commands without knowing if a retimer card is available in the corresponding slot will result in various errors and further impact work efficiency.

[0102] Based on the above background, this application proposes a normalized automatic upgrade method for Retimer card firmware under Linux system based on OpenBMC. This method can obtain the Retimer card manufacturer information and firmware manufacturer information currently installed on the server, determine whether they match, and then decide to upgrade. This solves the problems of low efficiency, error-proneness, and frequent error reports in Retimer card firmware updates. Specifically, it proposes a normalized automatic upgrade method for Retimer card firmware under OpenBMC by automatically identifying the manufacturer of the Retimer card firmware and determining whether it can be upgraded, thereby effectively solving the aforementioned problems.

[0103] Combination Figure 5 The firmware upgrade method in this application embodiment may include the following steps:

[0104] Step S502: Identify the Retimer card manufacturer information;

[0105] Read the register value of the IO Expander chip register on the Retimer card, which is used to identify the Retimer card manufacturer information, determine and save the manufacturer information of the Retimer card to the retimer_type (Retimer type) file under the OpenBMC system, and record it as card_vendor (card manufacturer information).

[0106] Step S504: Identify firmware file manufacturer information;

[0107] Open the firmware file provided by the Retimer manufacturer, read three consecutive bytes starting from the beginning of the file, shift and concatenate them, and then determine which manufacturer the Retimer card belongs to based on this value, denoted as fw_vendor (firmware vendor).

[0108] Step S506: Determine whether both the Retimer card_vendor and the firmware file fw_vendor are from vendor A.

[0109] Compare the vendor information card_vendor of the Retimer card device with the vendor information fw_vendor of the firmware file. If they do not match, print an invalid firmware error message and exit. If they match, proceed to the next step.

[0110] If the Retimer card vendor information (card_vendor) or firmware file information (fw_vendor) is A card information, the A card upgrade function is called to perform the upgrade operation; if card_vendor or firmware file information (fw_vendor) is not A card information, proceed to the next step.

[0111] Step S508: Determine whether both the Retimer card_vendor and the firmware file fw_vendor are M manufacturer information;

[0112] Determine if card_vendor or firmware file information fw_vendor is an M card. If it is not an M card, report an error and exit. If it is M card information, call the firmware upgrade operation function of the M card to perform a firmware upgrade.

[0113] Step S510: Check if the upgrade operation was successful.

[0114] Check the execution result of the Retimer firmware upgrade operation function to determine whether it was executed successfully, and record the execution result log.

[0115] Combination Figure 6 Specifically, the firmware upgrade method in this application embodiment may include the following steps:

[0116] Step 1: OpenBMC reads the IOExpander chip register value on the Retimer card, which is used to identify the Retimer card manufacturer information, via I2C. This value is denoted as reg_value. The reg_value determines which manufacturer the Retimer card belongs to. If reg_value equals 0x10, it is determined to be a card from manufacturer A (denoted as card_vendor = CARD_A). If reg_value equals 0x80, it is determined to be a card from manufacturer M (denoted as card_vendor = CARD_M). The manufacturer information is then saved to the OpenBMC system file retimer_type. If reg_value equals any other value, the register data is invalidated and the program exits. If the read fails, it is assumed that no Retimer card is installed in the current slot. The NA is written to the retimer_type file in the OpenBMC system, and then an I2C access error message is printed before the program exits.

[0117] Step 2: Open the Retimer card's firmware file in read-only mode and load it into OpenBMC memory. If opening the file fails, print an I2C access error message and exit. If opening the file successfully, read the first three bytes of the firmware file header, shift and concatenate them, and denote this as fw_header. Then, determine which manufacturer the Retimer card belongs to based on this value. According to the information provided by the two manufacturers, if fw_header equals 0xA55AA5, it is determined to be a card from manufacturer A (denoted as firmware manufacturer fw_vendor = CARD_A); if fw_header equals 0xE1104C, it is determined to be a card from manufacturer M (denoted as firmware manufacturer fw_vendor = CARD_M); if fw_header is any other value, print an invalid firmware header data error message and exit.

[0118] Step 3: Determine whether the card_vendor of the Retimer card and the fw_vendor of the firmware file are both from Manufacturer A, that is, whether card_vendor = CARD_A and fw_vendor = CARD_A are both true. If so, call the firmware upgrade function astra_retimer_update of Manufacturer A to perform the upgrade operation. Otherwise, proceed to the next step.

[0119] Step 4: Determine whether the card_vendor or firmware file fw_vendor of the Retiner card is manufacturer M information, that is, whether card_vendor = CARD_M and fw_vendor = CARD_M are both true. If so, call the Retimer card firmware upgrade function montage_retimer_update of manufacturer M to perform the upgrade operation. If it is not manufacturer M information, print the card firmware mismatch error message and exit.

[0120] Step 5: Check whether the firmware upgrade operation is successful by checking whether the return value of the firmware upgrade operation function of the A card or M card is zero. A return value of 0 indicates success, and a negative number (garbled characters) indicates failure. Print the execution result information.

[0121] This application proposes a method for multi-vendor normalized automatic upgrade of Retimer card firmware in the OpenBMC system by adding information that reads the header information of the firmware file provided by the manufacturer and concatenates it to form information that can be used to identify the firmware file manufacturer. Combined with the manufacturer identification information read from the Retimer card device, a multi-vendor normalized firmware upgrade architecture and method are proposed. This method supports firmware upgrades of Retimer cards from different manufacturers, greatly saving the manpower and resources required when upgrading the Retimer card version, and avoiding errors caused by incompatibility between the firmware file and the Retimer card during the upgrade, thus greatly improving server maintenance efficiency.

[0122] Those skilled in the art will understand that by adding or supplementing device identification information and firmware header information of other manufacturers' Retimers, it can be expanded into a firmware upgrade tool that supports more Retimer cards from different manufacturers.

[0123] It should be noted that, in this embodiment, in addition to considering the dependencies and constraints between files, other factors can also be considered, such as the correlation between devices and the correlation of system integration, to establish a more comprehensive and detailed set of associations. Optionally, threat intelligence and malicious behavior analysis can be combined to monitor the security status of the set of associated files in real time, and when abnormal operations or malicious tampering are detected, early warnings and security mechanisms can be triggered in a timely manner to prevent or alarm.

[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0125] According to another aspect of the embodiments of this application, a firmware upgrade apparatus is also provided. This apparatus is used to implement the firmware upgrade method provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0126] Figure 7 This is a structural block diagram of an optional firmware upgrade device provided in an embodiment of this application, such as... Figure 7 As shown, the device includes:

[0127] The first determining unit 702 is used to determine the first manufacturer information based on the register value of the specified chip register on the specified signal retimer card of the target device, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer.

[0128] The second determining unit 704 is used to determine the second manufacturer information based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is the second manufacturer.

[0129] The first execution unit 706 is used to perform a firmware upgrade operation on a specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, when the first manufacturer and the second manufacturer are the same preset manufacturer.

[0130] It should be noted that the first determining unit 702 in this embodiment can be used to execute the above step S202, the second determining unit 704 in this embodiment can be used to execute the above step S204, and the first execution unit 706 in this embodiment can be used to execute the above step S206.

[0131] Through the embodiments of this application, a first manufacturer information is determined based on the register value of a specified chip register on a specified signal retimer card of the target device, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer; a second manufacturer information is determined based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is the second manufacturer; when the first manufacturer and the second manufacturer are the same preset manufacturer, a firmware upgrade operation is performed on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, thereby solving the problem of low firmware upgrade efficiency in related technologies.

[0132] In one exemplary embodiment, the first determining unit includes:

[0133] The first reading module is used to read the register values ​​of the input / output IO expansion chip registers on the specified Retimer card;

[0134] The first determining module is used to determine the manufacturer information that matches the target value as the first manufacturer information when the target register value is read and the target register value is the target value in a set of preset values, wherein each preset value in the set of preset values ​​matches a manufacturer information.

[0135] In one exemplary embodiment, the above-described apparatus further includes:

[0136] The write unit is used to write specified information into a specified system file under the Baseboard Management Controller (BMC) of the target device after reading the register value of the input / output IO expansion chip register on the specified Retimer card, in the event that the register value reading fails. The specified system file is a signal renormalizer type file, and the specified information is used to indicate that no Retimer card is inserted in the Retimer card slot of the target device.

[0137] In one exemplary embodiment, the second determining unit includes:

[0138] The first execution module is used to open the firmware file of the specified Retimer card in read-only mode and load the read firmware file of the specified Retimer card into the BMC memory of the baseboard management controller (BMC) of the target device.

[0139] The second reading module is used to read N consecutive bytes starting from the header of the firmware file of the specified Retimer card in the BMC memory to obtain the initial firmware information, where N is a positive integer greater than or equal to 1;

[0140] The second execution module is used to shift and splice the initial firmware information to obtain the shifted and spliced ​​target firmware information.

[0141] The second determining module is used to determine the manufacturer information that matches the target firmware information as the second manufacturer information when the target firmware information is the target firmware information in a set of preset firmware information, wherein each preset firmware information in the set of preset firmware information matches a manufacturer information.

[0142] In one exemplary embodiment, the above-described apparatus further includes:

[0143] The printing unit is used to print target error information after shifting and splicing the initial firmware information to obtain the shifted and spliced ​​target firmware information, if the target firmware information does not belong to a set of preset firmware information. The target error information is used to describe the firmware upgrade anomaly of the specified Retimer card.

[0144] In an exemplary embodiment, the apparatus further includes: a judging unit, configured to judge whether the first manufacturer information and the second manufacturer information are the same manufacturer information; and a second execution unit, configured to, when the first manufacturer information and the second manufacturer information are the same manufacturer information, repeatedly execute the following matching operation with a set of preset manufacturer information as the current manufacturer information, wherein each manufacturer information in the set of preset manufacturer information is the manufacturer information of a preset manufacturer: if the first manufacturer information and the second manufacturer information are the same as the current manufacturer information, determine that the first manufacturer and the second manufacturer are the same preset manufacturer and end the loop; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information and there is preset manufacturer information in the set of preset manufacturer information that has not undergone matching operation, continue to execute the next round of matching operation; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information and there is no preset manufacturer information in the set of preset manufacturer information that has not undergone matching operation, end the loop.

[0145] The first execution unit includes a third execution module, which, when the first manufacturer and the second manufacturer are the same preset manufacturer, calls the target Retimer card firmware upgrade function corresponding to the first manufacturer in the BMC memory of the baseboard management controller (BMC) of the target device, so that the target Retimer card firmware upgrade function reads the firmware upgrade file from the corresponding BMC memory location and uses the read firmware upgrade file to perform the firmware upgrade operation.

[0146] In one exemplary embodiment, the above-described apparatus further includes:

[0147] The third execution unit is used to determine the execution result of the firmware upgrade operation based on the function return value of the target Retimer card firmware upgrade function after performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, and print the execution result information, wherein the execution result information is used to indicate the execution result of the upgrade operation.

[0148] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0149] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0150] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROM (Read-Only Memory), RAM (Random Access Memory), portable hard drives, magnetic disks, or optical disks.

[0151] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, reference is made to... Figure 8 The computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit 801, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0152] refer to Figure 8 , Figure 8 This is a structural block diagram of a computer system for an optional electronic device provided in an embodiment of this application.

[0153] Figure 8 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM). The RAM 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output interface 805 (I / O interface) is also connected to the bus 804.

[0154] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a local area network card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0155] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs various functions defined in the system of this application.

[0156] It should be noted that, Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0157] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0158] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0159] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0160] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0161] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A firmware upgrade method, characterized in that, include: Based on the register value of a specified chip register on a specified signal retimer card of the target device, first manufacturer information is determined, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer; Based on the firmware file of the specified Retimer card, the second manufacturer information is determined, wherein the manufacturer represented by the second manufacturer information is the second manufacturer; When the first manufacturer and the second manufacturer are the same preset manufacturer, the firmware upgrade operation is performed on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer. The determination of the first manufacturer information based on the register value of the specified chip register on the specified signal retimer card of the target device includes: Read the register value of the input / output I / O expansion chip register on the specified Retimer card; When a target register value is read and the target register value is a target value in a set of preset values, the manufacturer information that matches the target value is determined as the first manufacturer information, wherein each preset value in the set of preset values ​​matches a manufacturer information. The determination of the second manufacturer information based on the firmware file of the specified Retimer card includes: The firmware file of the specified Retimer card is opened in read-only mode, and the read firmware file of the specified Retimer card is loaded into the BMC memory of the Baseboard Management Controller (BMC) of the target device. Read N consecutive bytes starting from the header of the firmware file of the specified Retimer card in the BMC memory to obtain the initial firmware information, where N is a positive integer greater than or equal to 1; The initial firmware information is shifted and spliced ​​to obtain the target firmware information after shifting and splicing. When the target firmware information is the target firmware information in a set of preset firmware information, the manufacturer information that matches the target firmware information is determined as the second manufacturer information, wherein each preset firmware information in the set of preset firmware information matches a manufacturer information.

2. The method according to claim 1, characterized in that, After reading the register value of the input / output I / O expansion chip register on the specified Retimer card, the method further includes: In the event of a register value read failure, specified information is written to a designated system file under the Baseboard Management Controller (BMC) of the target device. The designated system file is a signal renormalizer type file, and the specified information is used to indicate that no Retimer card is inserted in the Retimer card slot of the target device.

3. The method according to claim 1, characterized in that, After shifting and splicing the initial firmware information to obtain the shifted and spliced ​​target firmware information, the method further includes: If the target firmware information does not belong to the set of preset firmware information, a target error message is printed, wherein the target error message is used to describe the firmware upgrade anomaly of the specified Retimer card.

4. The method according to claim 1, characterized in that, The method further includes: determining whether the first manufacturer information and the second manufacturer information are the same manufacturer information; if the first manufacturer information and the second manufacturer information are the same manufacturer information, performing the following matching operation cyclically with a set of preset manufacturer information as the current manufacturer information, wherein each manufacturer information in the set of preset manufacturer information is the manufacturer information of a preset manufacturer: if the first manufacturer information and the second manufacturer information are the same as the current manufacturer information, determining that the first manufacturer and the second manufacturer are the same preset manufacturer, and ending the loop; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there is preset manufacturer information in the set of preset manufacturer information that has not performed the matching operation, continuing to perform the next round of the matching operation; if the first manufacturer information and the second manufacturer information are not the same as the current manufacturer information, and there is no preset manufacturer information in the set of preset manufacturer information that has not performed the matching operation, ending the loop; When the first manufacturer and the second manufacturer are the same preset manufacturer, the step of performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer includes: when the first manufacturer and the second manufacturer are the same preset manufacturer, calling the target Retimer card firmware upgrade function corresponding to the first manufacturer in the BMC memory of the baseboard management controller (BMC) of the target device, so that the target Retimer card firmware upgrade function reads the firmware upgrade file from the corresponding BMC memory location, and uses the read firmware upgrade file to perform the firmware upgrade operation.

5. The method according to any one of claims 1 to 4, characterized in that, After performing a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer, the method further includes: Based on the return value of the firmware upgrade function of the target Retimer card, the execution result of the firmware upgrade operation is determined, and the execution result information is printed, wherein the execution result information is used to indicate the execution result of the upgrade operation.

6. A firmware upgrade device, characterized in that, include: The first determining unit is used to determine first manufacturer information based on the register value of a specified chip register on a specified signal retimer card of the target device, wherein the register value of the specified chip register is used to identify the manufacturer to which the specified Retimer card belongs, and the manufacturer represented by the first manufacturer information is the first manufacturer. The second determining unit is used to determine the second manufacturer information based on the firmware file of the specified Retimer card, wherein the manufacturer represented by the second manufacturer information is the second manufacturer; The first execution unit is configured to perform a firmware upgrade operation on the specified Retimer card by calling the target Retimer card firmware upgrade function corresponding to the first manufacturer when the first manufacturer and the second manufacturer are the same preset manufacturer. The first reading module is used to read the register values ​​of the input / output IO expansion chip registers on the specified Retimer card; The first determining module is used to determine the manufacturer information that matches the target value as the first manufacturer information when the target register value is read and the target register value is a target value in a set of preset values; wherein each preset value in the set of preset values ​​matches a manufacturer information. The first execution module is used to open the firmware file of the specified Retimer card in read-only mode and load the read firmware file of the specified Retimer card into the BMC memory of the baseboard management controller (BMC) of the target device. The second reading module is used to read N consecutive bytes starting from the header of the firmware file of the specified Retimer card in the BMC memory to obtain the initial firmware information, where N is a positive integer greater than or equal to 1; The second execution module is used to shift and splice the initial firmware information to obtain the shifted and spliced ​​target firmware information; The second determining module is used to determine the manufacturer information that matches the target firmware information as the second manufacturer information when the target firmware information is the target firmware information in a set of preset firmware information, wherein each preset firmware information in the set of preset firmware information matches a manufacturer information.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 5.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Firmware upgrading method and device

    CN112148323A

  • Firmware processing method, chip, system, and electronic device

    WO2023020073A1