Firmware upgrading method and device, equipment and storage medium

By using the external memory of the substrate management controller to transfer and read back the register data of the logic device, the problems of failure of the logic device firmware upgrade and configuration information security are solved, and the invisible upgrade and high success rate are achieved.

CN118897689APending Publication Date: 2024-11-05INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411119610.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The user-programmable fixed memory space of logic devices is limited, resulting in failure of firmware upgrades and the security of configuration information cannot be guaranteed.

Method used

The external memory of the substrate management controller is used to transfer the register data of the logic device and read back the data after the upgrade is completed, realizing sensorless upgrades, improving the upgrade success rate, and ensuring the security of the configuration data.

Benefits of technology

The invisible upgrade of the firmware of logic devices is realized, which improves the upgrade success rate and ensures the security of configuration data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118897689A_ABST
    Figure CN118897689A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware upgrading method and device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring a firmware upgrading instruction sent by a substrate management controller; according to the firmware upgrading instruction, transferring register data of the logic device to an external memory of the substrate management controller; after all the registers finish data transfer, a data transfer completion instruction is sent to the substrate management controller, so that the substrate management controller starts firmware upgrading of the logic device according to the data transfer completion instruction; and obtaining an upgrade completion instruction sent by the substrate management controller, and reading back the register data from the external memory of the substrate management controller according to the upgrade completion instruction. Real logic device firmware non-inductive upgrading can be achieved, and the upgrading success rate is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a firmware upgrade method, device, equipment and storage medium. Background Art

[0002] Logic devices are critical on server motherboards, and are responsible for timing management, system monitoring, flexible control logic, etc. However, logic devices require frequent firmware (FW) upgrades to improve system performance, fix known issues, add new features, or adapt to hardware changes.

[0003] In the related art, the upgrade of logic devices is divided into offline upgrade and online upgrade. The offline upgrade is performed through a dedicated burning interface, which requires the device to be powered off and requires on-site operation, affecting the normal operation of the business; in the related art, the logic device stores the register data in the user-programmable fixed memory (User Flash Memory, UFM) of the logic device during the upgrade to achieve online upgrade, but the user-programmable fixed memory space of the logic device is limited and is also used to store configuration information. There is no guarantee that there is enough space to store the register data, which can easily lead to upgrade failure and the security of the configuration information cannot be guaranteed. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a firmware upgrade method, device, equipment and storage medium, which can achieve a true senseless upgrade of logic device firmware and improve the upgrade success rate. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a firmware upgrade method, comprising:

[0006] Obtain the firmware upgrade instruction sent by the baseboard management controller;

[0007] According to the firmware upgrade instruction, transferring the register data of the logic device to the external memory of the baseboard management controller;

[0008] After all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction;

[0009] An upgrade completion instruction sent by the baseboard management controller is obtained, and the register data is read back from an external memory of the baseboard management controller according to the upgrade completion instruction.

[0010] Optionally, before obtaining the firmware upgrade instruction sent by the baseboard management controller, the method further includes:

[0011] Obtaining a first data transfer address configured by a user for register data transfer;

[0012] Transferring the register data of the logic device to the external memory of the baseboard management controller includes:

[0013] According to the first data transfer address, the register data of the logic device is transferred to the external memory of the baseboard management controller.

[0014] Optionally, obtaining a firmware upgrade instruction sent by a baseboard management controller includes:

[0015] Obtaining a firmware upgrade instruction sent by a baseboard management controller based on a target firmware; the target firmware is firmware that has passed the baseboard manager version verification detection;

[0016] The process of checking the version of the baseboard manager includes:

[0017] Get the firmware to be upgraded imported by the user;

[0018] Reading the version information of the current firmware of the logic device;

[0019] Comparing the version information of the firmware to be upgraded with the version information of the current firmware of the logic device;

[0020] If the version information of the firmware to be upgraded is inconsistent with the version information of the current firmware of the logic device, it is determined that the firmware to be upgraded passes the version verification test, and the firmware to be upgraded is used as the target firmware;

[0021] A firmware upgrade instruction is sent to the logic device.

[0022] Optionally, transferring the register data of the logic device to an external memory of the baseboard management controller includes:

[0023] Sending the register data of the logic device to the baseboard management controller in a single-send manner, or sending the register data of the logic device to the baseboard management controller in a continuous-send manner;

[0024] The register data is stored in an external memory of the baseboard management controller through the baseboard management controller.

[0025] Optionally, the baseboard management controller is connected to multiple external memories via a serial peripheral interface.

[0026] Optionally, before obtaining the firmware upgrade instruction sent by the baseboard management controller, the method further includes:

[0027] Acquire a first data transfer address configured by a user for register data transfer; the first data transfer address is an address of an external memory of the baseboard management controller;

[0028] Acquire a second data transfer address configured by a user for register data transfer; the second data transfer address is an address of an external memory of the logic device;

[0029] Before transferring the register data of the logic device to the external memory of the baseboard management controller, the method further includes:

[0030] By querying the external memory connected to the logic device, determining whether the second data transfer address is valid;

[0031] If the second data transfer address is valid, then according to the second data transfer address, the register data of the logic device is transferred to the external memory of the logic device;

[0032] After all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction;

[0033] Acquire an upgrade completion instruction sent by the baseboard management controller, and read back the register data from the external memory of the logic device according to the upgrade completion instruction;

[0034] If the second data transfer address is invalid, an operation of transferring the register data of the logic device to an external memory of the baseboard management controller is performed according to the first data transfer address.

[0035] Optionally, before transferring the register data of the logic device to the external memory of the baseboard management controller, the method further includes:

[0036] Starting a pin latching function according to the firmware upgrade instruction to latch the pin state of the target pin;

[0037] After acquiring the upgrade completion instruction sent by the baseboard management controller, the method further includes:

[0038] The pin latching function is stopped to release the target pin.

[0039] In a second aspect, the present application discloses a firmware upgrade device, comprising:

[0040] An instruction acquisition module is used to acquire a firmware upgrade instruction sent by a baseboard management controller;

[0041] A register data transfer module, used for transferring the register data of the logic device to the external memory of the baseboard management controller according to the firmware upgrade instruction;

[0042] An instruction sending module, used for sending a data transfer completion instruction to the baseboard management controller after all the register data are transferred, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction;

[0043] The register data reading back module is used to obtain the upgrade completion instruction sent by the baseboard management controller, and read back the register data from the external memory of the baseboard management controller according to the upgrade completion instruction.

[0044] In a third aspect, the present application discloses an electronic device, comprising:

[0045] Memory, used to store computer programs;

[0046] The processor is used to execute the computer program to implement the aforementioned firmware upgrade method.

[0047] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned firmware upgrade method when executed by a processor.

[0048] In the present application, a firmware upgrade instruction sent by a baseboard management controller is obtained; according to the firmware upgrade instruction, the register data of the logic device is transferred to the external memory of the baseboard management controller; after all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction; the upgrade completion instruction sent by the baseboard management controller is obtained, and the register data is read back from the external memory of the baseboard management controller according to the upgrade completion instruction. It can be seen that by utilizing the scalability of the external memory capacity of the baseboard management controller, the register data of the logic device is transferred to the external memory of the baseboard management controller before executing the firmware upgrade, which can realize a true senseless upgrade of the firmware of the logic device, improve the success rate of the upgrade, and at the same time ensure the security of the configuration data of the logic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0050] FIG1 is a flowchart of a firmware upgrade method provided by the present application;

[0051] FIG2 is a schematic diagram of a specific firmware upgrade system structure provided by the present application;

[0052] FIG3 is a flowchart of a specific firmware upgrade method provided by the present application;

[0053] FIG4 is a schematic diagram of the structure of a firmware upgrade device provided by the present application;

[0054] FIG5 is a structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] In the related art, the upgrade of logic devices is divided into offline upgrade and online upgrade. The logic device stores register data in the user-programmable fixed memory of the logic device during the upgrade to achieve online upgrade. However, the user-programmable fixed memory space of the logic device is limited and is also used to store configuration information. There is no guarantee that there is enough space to store register data, which easily leads to upgrade failure and the security of configuration information cannot be guaranteed. In order to overcome the above technical problems, the present application proposes a firmware upgrade method that can achieve a true senseless upgrade of logic device firmware and improve the upgrade success rate.

[0057] The embodiment of the present application discloses a firmware upgrade method, which is applied to a logic device. Referring to FIG1 , the method may include the following steps:

[0058] Step S11: Obtain a firmware upgrade instruction sent by a baseboard management controller.

[0059] The logic device is connected to the baseboard management controller (BMC) through a bus to obtain the firmware upgrade instruction sent by the baseboard management controller (BMC). The above-mentioned acquisition of the firmware upgrade instruction sent by the baseboard management controller specifically includes: acquiring the firmware upgrade instruction sent by the baseboard management controller based on the target firmware; the target firmware is the firmware that has passed the baseboard manager version verification detection. That is, the baseboard manager version will first perform a version check on the received firmware file, and then send a firmware upgrade instruction to the logic device based on the firmware after the verification passes.

[0060] Among them, the process of the above-mentioned baseboard manager version verification detection can specifically include: obtaining the firmware to be upgraded imported by the user; specifically, when online upgrade is required, the user first logs in to the BMC webpage system and imports the firmware file (FW, Firmware) to be upgraded; reading the version information of the current firmware of the logic device; comparing the version information of the firmware to be upgraded with the version information of the current firmware of the logic device; if the version information of the firmware to be upgraded is inconsistent with the version information of the current firmware of the logic device, then it is determined that the firmware to be upgraded passes the version verification detection, and the firmware to be upgraded is used as the target firmware; and a firmware upgrade instruction is sent to the logic device. It can be understood that if the version information of the firmware to be upgraded is inconsistent with the version information of the current firmware of the logic device, it indicates that the firmware to be upgraded has not been upgraded; if the version information of the firmware to be upgraded is consistent with the version information of the current firmware of the logic device, it indicates that the firmware to be upgraded has been upgraded, and the process can be stopped at this time without repeating the upgrade. That is, after the BMC identifies the FW file to be upgraded, it will perform a version check on it. If the file version of the FW to be upgraded is consistent with the FW version currently running in the logic device system, the BMC will prompt the user that the versions are consistent and no refresh is required. After confirmation, the process ends; if the file version of the FW to be upgraded is inconsistent with the FW version currently running in the system, the logic device will be notified to prepare for the FW upgrade.

[0061] Step S12: According to the firmware upgrade instruction, the register data of the logic device is transferred to the external memory of the baseboard management controller.

[0062] The above-mentioned logic device may specifically be a CPLD (Complex Programmable Logic Device). Since the CPLD has tens of thousands of registers for recording monitoring data and cannot be latched during the CPLD firmware upgrade process, directly upgrading the CPLD will cause the registers to change, resulting in a false alarm of the monitoring function. If the registers have not been transferred, the entire upgrade process will be stuck and cannot proceed, unless the upgrade is performed after the power is turned off. Therefore, in order to achieve a senseless upgrade, it is necessary to transfer the register data of the logic device before the upgrade.

[0063] For example, Figure 2 shows a specific schematic diagram of the logic device firmware upgrade system structure. The BMC is designed to connect to an external memory (flash) through a serial peripheral interface (SPI) for accessing FW. At the same time, the CPLD FW refresh supports BMC online refresh through the JTAG bus or I2C bus, and JTAG header offline burning. When the senseless upgrade function is not required, the external memory of the baseboard management controller can also be replaced with a small-capacity material according to actual needs to achieve cost optimization.

[0064] In addition, the baseboard management controller can be connected to multiple external memories through a serial peripheral interface. For example, as shown in Figure 2, flash0 is the main memory and flash1 is used as a redundant backup memory. Before the firmware is updated, the registers of the CPLD are transferred to the external memory of the BMC to save the register data without powering off the system. After the upgrade is completed, the transferred registers are read back and continue to run in the state before the upgrade, thereby realizing a truly seamless online upgrade.

[0065] In some embodiments, the baseboard management controller is connected to multiple external memories via a serial peripheral interface, and the above-mentioned transferring the register data of the logic device to the external memory of the baseboard management controller includes: reading the remaining space of each external memory connected to the baseboard management controller; selecting the external memory corresponding to the largest remaining space as the target external memory; transferring the register data of the logic device to the target external memory. That is, by querying all memories external to the baseboard management controller, according to the current remaining storage space of each memory, the memory with the largest space is preferentially selected to store the register data of the logic device to ensure successful storage of the register data. In the case that the remaining storage space of the target external memory is insufficient, other memories can be used for storage.

[0066] Before obtaining the firmware upgrade instruction sent by the baseboard management controller, the method further includes: obtaining a first data transfer address configured by a user for register data transfer; transferring the register data of the logic device to the external memory of the baseboard management controller, including: transferring the register data of the logic device to the external memory of the baseboard management controller according to the first data transfer address. That is, the data transfer address is pre-configured so that the logic device transfers the register data to the external memory of the baseboard management controller according to the data transfer address.

[0067] In some embodiments, transferring the register data of the logic device to the external memory of the baseboard management controller may include: sending the register data of the logic device to the baseboard management controller in a single-send manner, or sending the register data of the logic device to the baseboard management controller in a continuous-send manner; and storing the register data in the external memory of the baseboard management controller through the baseboard management controller. That is, the register data may be sent to the baseboard management controller in a single-send or continuous-send manner, and of course other manners may also be used, which are not limited in this embodiment.

[0068] In some embodiments, before the register data of the logic device is transferred to the external memory of the baseboard management controller, it may also include: starting the pin latch function according to the firmware upgrade instruction to latch the pin status of the target pin. The above-mentioned target pin may be a GPIO pin. Since the GPIO pin will be affected during the upgrade process, the level change may occur and cause anomalies. Therefore, as shown in Figure 3, after the logic device receives the upgrade instruction issued by the BMC, the latch function is triggered to ensure that the level of these GPIOs will not change during the upgrade process by latching the pin status. That is, after the CPLD latches the status of all GPIO pins, it passes the internal tens of thousands of registers to the BMC in the format of "register address + data", such as register 1 address + register 1 data; after receiving the register information, the BMC stores it in the SPI flash in sequence. When all register information is transferred, the BMC starts to erase and rewrite the CPLD; after writing and verification are completed, the BMC notifies the CPLD to complete the FW refresh and needs to be reloaded.

[0069] Step S13: after all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction.

[0070] After the logic device completes the transfer of all register data, it sends a data transfer completion instruction to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction. That is, after the register data transfer is completed, the upgrade operation is started.

[0071] Step S14: obtaining an upgrade completion instruction sent by the baseboard management controller, and reading back the register data from the external memory of the baseboard management controller according to the upgrade completion instruction.

[0072] After the upgrade is completed, the register data is read back from the external memory of the baseboard management controller. At the same time, after obtaining the upgrade completion instruction sent by the baseboard management controller, it also includes: stopping the pin latch function to release the target pin. That is, after the CPLD is reloaded, the register transferred to the BMC SPI flash is read back again. After completion, the CPLD releases the pin latch, the new FW takes effect and runs normally, and the online upgrade process ends; thereby, the register and GPIO status can be saved without powering off the system.

[0073] In some embodiments, before obtaining the firmware upgrade instruction sent by the baseboard management controller, the following steps may also be included:

[0074] S201: Acquire a first data transfer address configured by a user for register data transfer; the first data transfer address is an address of an external memory of the baseboard management controller.

[0075] S202: Obtain a second data transfer address configured by the user for register data transfer; the second data transfer address is the address of the external memory of the logic device. That is, if the logic device has an external memory, the register data can also be directly transferred to the external memory of the logic device, and the transfer address needs to be pre-configured.

[0076] S203: Obtain a firmware upgrade instruction sent by a baseboard management controller.

[0077] S204: Determine whether the second data transfer address is valid by querying an external memory connected to the logic device.

[0078] S205: If the second data transfer address is valid, the register data of the logic device is transferred to the external memory of the logic device according to the second data transfer address; that is, first query whether it can be transferred to the external memory of the logic device, and if it can be transferred, transfer the register data according to the second data transfer address.

[0079] S206: After all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction.

[0080] S207: Acquire an upgrade completion instruction sent by the baseboard management controller, and read back the register data from the external memory of the logic device according to the upgrade completion instruction.

[0081] S208: If the second data transfer address is invalid, then according to the first data transfer address, the operation of transferring the register data of the logic device to the external memory of the baseboard management controller is performed. To avoid pre-configuring the address of the logic device external memory but being unable to use it due to changes, a valid address judgment is first performed, and when the second data transfer address is invalid, the external memory of the baseboard management controller is used for storage. In addition to the BMC external memory, the process of transferring the corresponding registers to the BMC external memory can also be modified to transfer to the non-volatile storage medium of the logic device by directly providing the CPLD with an external non-volatile storage medium.

[0082] As can be seen from the above, in this embodiment, the firmware upgrade instruction sent by the baseboard management controller is obtained; according to the firmware upgrade instruction, the register data of the logic device is transferred to the external memory of the baseboard management controller; after all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction; the upgrade completion instruction sent by the baseboard management controller is obtained, and the register data is read back from the external memory of the baseboard management controller according to the upgrade completion instruction. It can be seen that by utilizing the scalability of the external memory capacity of the baseboard management controller, the register data of the logic device is transferred to the external memory of the baseboard management controller before executing the firmware upgrade, which can realize a true senseless upgrade of the firmware of the logic device, ensure the success of the upgrade, and at the same time ensure the security of the configuration data of the logic device.

[0083] Correspondingly, the embodiment of the present application also discloses a firmware upgrade device, as shown in FIG4 , the device includes:

[0084] The instruction acquisition module 11 is used to acquire the firmware upgrade instruction sent by the baseboard management controller;

[0085] A register data transfer module 12, used for transferring the register data of the logic device to the external memory of the baseboard management controller according to the firmware upgrade instruction;

[0086] An instruction sending module 13 is used to send a data transfer completion instruction to the baseboard management controller after all the register data are transferred, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction;

[0087] The register data reading module 14 is used to obtain the upgrade completion instruction sent by the baseboard management controller, and read back the register data from the external memory of the baseboard management controller according to the upgrade completion instruction.

[0088] As can be seen from the above, in this embodiment, the firmware upgrade instruction sent by the baseboard management controller is obtained; according to the firmware upgrade instruction, the register data of the logic device is transferred to the external memory of the baseboard management controller; after all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction; the upgrade completion instruction sent by the baseboard management controller is obtained, and the register data is read back from the external memory of the baseboard management controller according to the upgrade completion instruction. It can be seen that by utilizing the scalability of the external memory capacity of the baseboard management controller, the register data of the logic device is transferred to the external memory of the baseboard management controller before executing the firmware upgrade, which can realize a true senseless upgrade of the firmware of the logic device, ensure the success of the upgrade, and at the same time ensure the security of the configuration data of the logic device.

[0089] In some specific embodiments, the firmware upgrade device may specifically include:

[0090] A first data transfer address acquisition unit, used to acquire a first data transfer address configured by a user for register data transfer before acquiring a firmware upgrade instruction sent by a baseboard management controller;

[0091] Accordingly, the register data transfer module 12 may specifically include:

[0092] A register data transfer unit is used to transfer the register data of the logic device to the external memory of the baseboard management controller according to the first data transfer address.

[0093] In some specific embodiments, the instruction acquisition module 11 may specifically include:

[0094] An instruction acquisition unit, used to acquire a firmware upgrade instruction sent by a baseboard management controller based on a target firmware; the target firmware is firmware that has passed the baseboard manager version verification detection;

[0095] The process of version verification detection of the baseboard manager includes: obtaining the firmware to be upgraded imported by the user; reading the version information of the current firmware of the logic device; comparing the version information of the firmware to be upgraded with the version information of the current firmware of the logic device; if the version information of the firmware to be upgraded is inconsistent with the version information of the current firmware of the logic device, determining that the firmware to be upgraded has passed the version verification detection, and using the firmware to be upgraded as the target firmware; and sending a firmware upgrade instruction to the logic device.

[0096] In some specific embodiments, the register data transfer module 12 may specifically include:

[0097] A data sending unit, used to send the register data of the logic device to the baseboard management controller in a single-send manner, or to send the register data of the logic device to the baseboard management controller in a continuous-send manner;

[0098] The data storage unit is used to store the register data into the external memory of the baseboard management controller through the baseboard management controller.

[0099] In some specific embodiments, the baseboard management controller can be connected to multiple external memories through a serial peripheral interface.

[0100] In some specific embodiments, the firmware upgrade device may specifically include:

[0101] A first data transfer address acquisition unit is used to acquire a first data transfer address configured by a user for register data transfer before acquiring a firmware upgrade instruction sent by a baseboard management controller; the first data transfer address is an address of an external memory of the baseboard management controller;

[0102] A second data transfer address acquisition unit, used to acquire a second data transfer address configured by a user for register data transfer; the second data transfer address is an address of an external memory of the logic device;

[0103] A judging unit, used for judging whether the second data transfer address is valid by querying the external memory connected to the logic device before transferring the register data of the logic device to the external memory of the baseboard management controller;

[0104] A first transfer unit, configured to transfer the register data of the logic device to an external memory of the logic device according to the second data transfer address if the second data transfer address is valid;

[0105] An instruction sending unit, configured to send a data transfer completion instruction to the baseboard management controller after all the register data transfer is completed, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction;

[0106] A register data reading back unit, used for acquiring an upgrade completion instruction sent by the baseboard management controller, and reading back the register data from the external memory of the logic device according to the upgrade completion instruction;

[0107] An execution unit is used to execute an operation of transferring the register data of the logic device to an external memory of the baseboard management controller according to the first data transfer address if the second data transfer address is invalid.

[0108] In some specific embodiments, the firmware upgrade device may specifically include:

[0109] A pin latch unit, used to start a pin latch function according to the firmware upgrade instruction to latch the pin state of the target pin before transferring the register data of the logic device to the external memory of the baseboard management controller;

[0110] The pin lock unlocking unit is used to stop the pin locking function to release the target pin after acquiring the upgrade completion instruction sent by the baseboard management controller.

[0111] Furthermore, an embodiment of the present application also discloses an electronic device, as shown in FIG5 . The content in the figure cannot be regarded as any limitation on the scope of use of the present application.

[0112] FIG5 is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the firmware upgrade method disclosed in any of the aforementioned embodiments.

[0113] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0114] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223 including firmware upgrade instructions, etc. The storage method can be temporary storage or permanent storage.

[0115] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the firmware upgrade method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0116] Furthermore, the embodiment of the present application also discloses a computer program product, which includes a computer program. When the computer program is loaded and executed by a processor, the steps of the firmware upgrade method disclosed in any of the above embodiments are implemented. By utilizing the scalability of the external memory capacity of the baseboard management controller, the register data of the logic device is transferred to the external memory of the baseboard management controller before executing the firmware upgrade, which can achieve a true senseless upgrade of the logic device firmware, improve the upgrade success rate, and at the same time ensure the security of the configuration data of the logic device.

[0117] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the firmware upgrade method steps disclosed in any of the aforementioned embodiments are implemented.

[0118] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0119] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0120] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0121] The above is a detailed introduction to a firmware upgrade method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A firmware upgrade method, It is characterized in that Applied to logic devices, including: Obtain the firmware upgrade instruction sent by the baseboard management controller; According to the firmware upgrade instruction, transferring the register data of the logic device to the external memory of the baseboard management controller; After all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction; An upgrade completion instruction sent by the baseboard management controller is obtained, and the register data is read back from an external memory of the baseboard management controller according to the upgrade completion instruction.

2. The firmware upgrade method according to claim 1, It is characterized in that Before obtaining the firmware upgrade instruction sent by the baseboard management controller, the following steps are also included: Obtaining a first data transfer address configured by a user for register data transfer; Transferring the register data of the logic device to the external memory of the baseboard management controller includes: According to the first data transfer address, the register data of the logic device is transferred to the external memory of the baseboard management controller.

3. The firmware upgrade method according to claim 1, It is characterized in that The obtaining of the firmware upgrade instruction sent by the baseboard management controller includes: Obtaining a firmware upgrade instruction sent by a baseboard management controller based on a target firmware; the target firmware is firmware that has passed the baseboard manager version verification detection; The process of checking the version of the baseboard manager includes: Get the firmware to be upgraded imported by the user; Reading the version information of the current firmware of the logic device; Comparing the version information of the firmware to be upgraded with the version information of the current firmware of the logic device; If the version information of the firmware to be upgraded is inconsistent with the version information of the current firmware of the logic device, it is determined that the firmware to be upgraded passes the version verification test, and the firmware to be upgraded is used as the target firmware; A firmware upgrade instruction is sent to the logic device.

4. The firmware upgrade method according to claim 1, It is characterized in that Transferring the register data of the logic device to the external memory of the baseboard management controller includes: Sending the register data of the logic device to the baseboard management controller in a single-send manner, or sending the register data of the logic device to the baseboard management controller in a continuous-send manner; The register data is stored in an external memory of the baseboard management controller through the baseboard management controller.

5. The firmware upgrade method according to claim 1, It is characterized in that The baseboard management controller is connected to a plurality of external memories via a serial peripheral interface.

6. The firmware upgrade method according to claim 1, It is characterized in that Before obtaining the firmware upgrade instruction sent by the baseboard management controller, the following steps are also included: Acquire a first data transfer address configured by a user for register data transfer; the first data transfer address is an address of an external memory of the baseboard management controller; Acquire a second data transfer address configured by a user for register data transfer; the second data transfer address is an address of an external memory of the logic device; Before transferring the register data of the logic device to the external memory of the baseboard management controller, the method further includes: By querying the external memory connected to the logic device, determining whether the second data transfer address is valid; If the second data transfer address is valid, then according to the second data transfer address, the register data of the logic device is transferred to the external memory of the logic device; After all the register data are transferred, a data transfer completion instruction is sent to the baseboard management controller, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction; Acquire an upgrade completion instruction sent by the baseboard management controller, and read back the register data from the external memory of the logic device according to the upgrade completion instruction; If the second data transfer address is invalid, an operation of transferring the register data of the logic device to an external memory of the baseboard management controller is performed according to the first data transfer address.

7. The firmware upgrade method according to any one of claims 1 to 6, It is characterized in that Before transferring the register data of the logic device to the external memory of the baseboard management controller, the method further includes: Starting a pin latching function according to the firmware upgrade instruction to latch a pin state of a target pin; After acquiring the upgrade completion instruction sent by the baseboard management controller, the method further includes: The pin latching function is stopped to release the target pin.

8. A firmware upgrade device, It is characterized in that Applied to logic devices, including: An instruction acquisition module is used to acquire a firmware upgrade instruction sent by a baseboard management controller; A register data transfer module, used for transferring the register data of the logic device to the external memory of the baseboard management controller according to the firmware upgrade instruction; An instruction sending module, used for sending a data transfer completion instruction to the baseboard management controller after all the register data are transferred, so that the baseboard management controller starts the firmware upgrade of the logic device according to the data transfer completion instruction; The register data reading back module is used to obtain the upgrade completion instruction sent by the baseboard management controller, and read back the register data from the external memory of the baseboard management controller according to the upgrade completion instruction.

9. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the firmware upgrade method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that Used to store computer programs; wherein when the computer programs are executed by a processor, the firmware upgrade method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Logic controller, flash memory upgrading method and device, electronic equipment and medium

    CN120743318A