Firmware burning method and device, computer equipment and storage medium

By introducing a second core into the substrate management controller, the firmware burn-in request and mirror data are independently processed, and the low burn-in efficiency and error-prone problems caused by BMC firmware exceptions are solved, and an efficient and robust firmware burn-in process is achieved. And provide real-time progress feedback.

CN119088407APending Publication Date: 2024-12-06SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411230053.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the prior art, when the firmware of the substrate management controller (BMC) in the server is abnormal or lacks the initial firmware, firmware burning depends on the normal operation of the BMC firmware, resulting in low efficiency and error-proneness, and requires a fire fixture to each The device is burned separately.

Method used

Design a firmware burning method, using the second core in the substrate management controller to independently receive the burning request and mirror data issued by the CPU, and determine the device to be burned according to the device type and information to realize continuous burning of mirror data , avoid relying on BMC firmware to run normally and burn it separately.

Benefits of technology

Improves firmware burning efficiency, enhances system robustness, realizes decoupling from BMC firmware, reduces the risk of firmware burning, and allows real-time feedback on the burning progress, improving user interface monitoring and resource allocation efficiency .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088407A_ABST
    Figure CN119088407A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a firmware burning method and device, computer equipment and a storage medium, which are applied to a BMC (Baseboard Management Controller), the method comprises the following steps: under the condition that firmware of a baseboard management controller running on a first kernel is abnormal, a second kernel receives a burning request issued by a CPU (Central Processing Unit) and mirror image data of target firmware, the burning request comprises a device type and device information of a to-be-burnt device corresponding to the mirror image data; storing the mirror image data in a memory, and determining a to-be-burnt device according to the device type and the device information; and based on the burning request, reading the mirror image data from the memory, and continuously burning the read mirror image data to the to-be-burnt device. According to the method and the device, the problems of low efficiency and easiness in making mistakes due to the fact that firmware burning of the devices depends on normal operation of BMC firmware or independent firmware burning is carried out on each device through a burning jig can be avoided.
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 burning method, device, computer equipment and storage medium. Background Art

[0002] The server includes many devices with independent firmware, including the flash memory of the baseboard management controller (BMC), the flash memory of the basic input / output system (BIOS), the field-programmable gate array (FPGA), and the power supply unit (PSU). These devices are connected to the BMC through various interfaces. For example, the flash memory of the BMC and the flash memory of the BIOS are connected to the BMC through the synchronous serial communication interface (Serial Peripheral Interface, SPI). For another example, the FPGA is connected to the BMC through the joint test action group interface (Joint Test Action Group, JTAG). For another example, the PSU is connected to the BMC through the serial communication interface (Inter-Integrated Circuit, I2C) interface. The firmware burning and upgrading of these devices usually also need to go through the BMC firmware.

[0003] In the related art, the user uploads the image data of the firmware to be burned through the web interface provided when the BMC firmware is running, and sends the image data of the firmware to be burned to the local storage space of the BMC through the network. The BMC obtains the image data of the firmware to be burned from the local storage space, and determines the device to be burned by judging the image header field, and then burns the image data for the device to be burned through different interfaces to complete the firmware burning and upgrading of the device. This firmware burning method relies on the normal operation of the BMC firmware. When the BMC firmware is abnormal or the initial firmware of the BMC is not burned, each device can only be burned separately through the burning fixture, which is inefficient and prone to errors. Summary of the invention

[0004] In view of this, the present invention provides a firmware burning method, apparatus, computer equipment and storage medium, which can avoid the low efficiency and error-prone problems caused by relying on the normal operation of BMC firmware to burn the firmware of the device, or burning the firmware of each device separately through a burning fixture.

[0005] In a first aspect, the present invention provides a firmware burning method, which is applied to a baseboard management controller, the baseboard management controller is connected to a central processing unit (CPU) and a memory, respectively, the baseboard management controller includes a first core and a second core, the method includes: when an abnormality occurs to the baseboard management controller firmware running on the first core, the second core receives a burning request issued by the CPU and the image data of the target firmware, the burning request includes the device type and device information of the device to be burned corresponding to the image data; the second core stores the image data in the memory, and determines the device to be burned according to the device type and the device information; based on the burning request, the second core reads the image data from the memory, and continuously burns the read image data to the device to be burned.

[0006] Based on the method of the first aspect above, when an exception occurs in the baseboard management controller firmware running on the first core, the second core receives the burning request and the image data of the target firmware sent by the central processing unit, stores the image data in the memory, and determines the device to be burned according to the device type and device information; based on the burning request, the image data in the memory is continuously burned to the device to be burned.

[0007] Since the baseboard management controller includes a first core and a second core, and when the BMC firmware running on the first core is abnormal, an independent process is running on the second core, which can independently burn the image data of the target firmware into the device to be burned. This firmware burning method does not need to rely on the normal operation of the baseboard management controller firmware, nor does it need to use a burning fixture to burn the firmware of each device separately. Therefore, this firmware burning method can improve the burning efficiency, enhance the system robustness, achieve decoupling from the baseboard management controller firmware, and reduce the risk of firmware burning failure.

[0008] In an optional implementation, the second core continuously burns the read image data into the device to be burned, and also includes: when the second core receives a query request sent by the CPU, it queries the burning progress of the image data burned in the device to be burned at the current moment; the second core feeds back the burning progress to the central processing unit.

[0009] Based on the above method, the burning progress can be fed back to the central processing unit in real time, so that the central processing unit can display the burning progress on the corresponding user interface, which is convenient for users to monitor the burning progress of the firmware in real time. In the case of simultaneous burning of multiple devices, the resource allocation of different devices can be dynamically adjusted according to the progress to ensure maximum efficiency.

[0010] In an optional implementation, the burning request also includes the total amount of mirror data, and the second kernel queries the burning progress of the mirror data that has been burned in the device to be burned at the current moment, including: the second kernel records the amount of mirror data that has been burned at the current moment during the process of continuously burning the read mirror data to the device to be burned; the second kernel calculates the ratio of the amount of mirror data that has been burned to the total amount of mirror data, and determines the ratio as the queried burning progress.

[0011] Based on the above method, the burning progress of the target firmware can be determined by calculating the ratio of the amount of burned image data to the total amount of image data.

[0012] In an optional embodiment, the device to be burned is determined according to the device type and device information, including: if the device type is a power supply unit type, the second core determines that the device information includes the target address and target port number of the device to be burned on the integrated circuit bus, and identifies and determines the device to be burned based on the target address and target port number.

[0013] Alternatively, if the device type of the device to be programmed is a programmable logic device type, the second core determines that the device information is the target manufacturer information, target model information and target version information corresponding to the device to be programmed, and identifies and determines the device to be programmed based on the target manufacturer information, target model information and target version information.

[0014] Alternatively, if the device type of the device to be programmed is a flash memory type of a baseboard management controller, the second core determines that the device information is the first chip select information of the flash memory of the baseboard management controller, and identifies and determines the device to be programmed based on the first chip select information.

[0015] Alternatively, if the device type of the device to be programmed is a flash memory type of a basic input / output system, the second kernel determines that the device information is second chip select information of the flash memory of the basic input / output system, and identifies and determines the device to be programmed based on the second chip select information.

[0016] Based on the above method, the device information of the device to be burned can be determined for different device types, and then the device to be burned for burning the image data of the target firmware can be determined.

[0017] In an optional embodiment, based on the target address and the target port number, the device to be burned is identified and determined, including: the second core obtains the address and port number of each first device in at least one first device connected to the baseboard management controller through the integrated circuit bus; the second core compares the address and port number of each first device in the at least one first device with the target address and the target port number, identifies and determines the device to be burned, and the device to be burned is the first device in the at least one first device that matches the target address and the target port number.

[0018] Based on the above method, by comparing the target address and the target port number with the address and port number of each first device connected through the integrated circuit bus, the first device matching the target address and the target port number can be determined as the device to be burned.

[0019] In an optional embodiment, based on the target manufacturer information, target model information and target version information, the device to be burned is identified and determined, including: the second core reads the register of each second device in at least one second device connected to the baseboard management controller through the joint test action team protocol bus, and obtains the manufacturer information, model information and version information of each second device; the second core compares the manufacturer information, model information and version information of each second device with the target manufacturer information, target model information and target version information, identifies and determines the device to be burned, and the device to be burned is a second device in at least one second device that matches the target manufacturer information, target model information and target version information.

[0020] Based on the above method, by comparing the target manufacturer information, target model information and target version information with the manufacturer information, model information and version information of each second device, it can be determined that the second device that matches the target manufacturer information, target model information and target version information is the device to be burned.

[0021] In an optional embodiment, based on the burning request, the second kernel reads the image data from the memory, and continuously burns the read image data to the device to be burned, including: based on the burning request, the second kernel calls the driver interface corresponding to the device type, reads the image data from the memory, and continuously burns the read image data to the device to be burned through the driver interface.

[0022] Based on the above method, the second kernel can determine different driver interfaces based on different device types, and then continuously burn the image data in the memory to the device to be burned through the driver interface to complete the burning of the target firmware.

[0023] In a second aspect, the present invention provides a kernel, which is a second kernel, and the second kernel is located on a baseboard management controller and is connected to a first kernel of the baseboard management controller. The second kernel includes a transceiver module and a processing module. The transceiver module is used to receive a burning request and image data of a target firmware sent by a central processing unit when an abnormality occurs to the baseboard management controller firmware running on the first kernel, and the burning request includes a request type, a device type and device information of a device to be burned corresponding to the image data; the processing module is used to store the image data in a memory, and determine the device to be burned according to the device type and the device information; the processing module is also used to read the image data from the memory when the request type indicates a request to burn the target firmware, and continuously burn the read image data to the device to be burned.

[0024] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the firmware burning method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the firmware burning method of the first aspect or any corresponding embodiment thereof.

[0026] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the firmware burning method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0028] Figure 1 is a topology diagram of a firmware burning system according to an embodiment of the present invention;

[0029] Figure 2 is a flowchart of a firmware burning method according to an embodiment of the present invention;

[0030] Figure 3 is a flowchart of another firmware burning method according to an embodiment of the present invention;

[0031] Figure 4is a block diagram of a kernel according to an embodiment of the present invention;

[0032] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0034] As described in the background technology, the BMC obtains the image data of the firmware to be burned from the local storage space, determines the device to be burned by judging the image header field, and then burns the image data for the device to be burned through different interfaces to complete the firmware burning and upgrading of the device. This firmware burning method depends on the normal operation of the BMC firmware. When the BMC firmware is abnormal or the initial firmware of the BMC is not burned, each device can only be burned separately through the burning fixture, which is inefficient and prone to errors.

[0035] In order to solve the above technical problems, an embodiment of the present invention provides a firmware burning method, which can avoid the low efficiency and error-prone problems caused by relying on the normal operation of BMC firmware to burn the firmware of the device, or burning the firmware of each device separately through a burning fixture.

[0036] Below Figure 1 The method provided by the embodiment of the present invention is described by taking the firmware burning system 10 as an example. Figure 1 It is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solution provided in this application.

[0037] like Figure 1 As shown, Figure 1 4 is a topological diagram of a firmware burning system according to an embodiment of the present invention. Figure 1 In the embodiment, the firmware burning system 10 may include a central processing unit 101 , a baseboard management controller 102 , a memory 103 , a flash memory 104 , a device 105 , a device 106 , a device 107 , and a device 108 .

[0038] The central processing unit (CPU) 101 in the embodiment of the present invention, for example, the central processing unit 101 can be the computing and control core of the computer system, and is the final execution unit for information processing and program running. The operating system (OS) of the server host runs on the CPU. The burning tool program runs on the server host OS.

[0039] The baseboard management controller BMC in the embodiment of the present invention, for example, the baseboard management controller 102, may be a hardware-based management controller that provides an interface for accessing server hardware and management functions. The BMC has a heterogeneous core, and the BMC includes a first core and a second core.

[0040] The first core runs the BMC firmware, and the first core may be an ARM Cortex-A core (referred to as A core). The ARM Cortex-A core is a series of high-performance application processors in the ARM architecture, which adopts an advanced superscalar processing architecture, supports multi-core configuration, and can provide excellent performance and energy efficiency balance.

[0041] The second core can be a microcontroller unit (MCU). The MCU core is used to run the freeRTOS system, and the freeRTOS image is stored on an independent flash. The MCU accesses the flash-mcu through an independent SPI interface. Therefore, the startup and operation of the freeRTOS system are not affected by the BMC firmware running on the Cortex-A core, and the stability and security are high.

[0042] In the real-time example of the present invention, a firmware burning process is run on the freeRTOS system, and the process is used to execute the method of the present invention. The MCU core has control over the peripheral (I2C / SPI / JTAG) module through the BMC internal bus. The firmware burning process selects different interfaces and addresses according to the parsed commands, and performs corresponding firmware burning based on the hardware driver implemented on the freeRTOS.

[0043] In the embodiment of the present invention, the burning tool program running on the server host OS sends the burning command and the mirror data to the freeRTOS system through the UART interface.

[0044] The memory in the embodiment of the present invention, for example, the memory 103, may be a Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), which may also be referred to as DDR for short.

[0045] The flash memory (also referred to as flash) in the embodiment of the present invention, for example, the flash memory 104, can be any storage resource independent of the BMC. The flash memory is used to store the freeRTOS image.

[0046] The devices in the embodiments of the present application, such as devices 105 to 108, can be any device that needs to burn firmware. For example, device 105 can be a PSU, device 106 can be a flash of a BMC (flash-bmc), device 106 can be a flash of a BIOS (flash-bios), and device 106 can be an FPGA.

[0047] Figure 1 The firmware burning system 10 shown is only used as an example and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in the specific implementation process, the firmware burning system 10 can also include other devices, and the number of devices can also be determined according to specific needs without limitation.

[0048] According to an embodiment of the present invention, a firmware burning method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0049] In this embodiment, a firmware burning method is provided, which can be used for the above-mentioned BMC, and the baseboard management controller is connected to the central processing unit CPU and the memory respectively. Figure 2 is a flowchart of a firmware burning method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0050] S201: When an exception occurs to the baseboard management controller firmware running on the first core, the second core receives a burning request and image data of the target firmware sent by the central processing unit.

[0051] The burning request includes the device type and device information of the device to be burned corresponding to the image data. Optionally, the burning request also includes the total quantity of the image data.

[0052] In an example, the second core receives a request sent by the CPU, the request carries a preset field, and the second core determines that the request is a burning request based on the preset field.

[0053] For example, a command can be 6 bytes, and the format is defined as follows:

[0054] Field Number Field Size Field Name Field Description

[0055] 1 1byte Command Type 0x0: Image burning request

[0056] 0x1: Image burning progress query

[0057] 2 1byte Image Type 0x0:PSU

[0058] 0x1: FPGA

[0059] 0x2: BMC

[0060] 0x3: BIOS

[0061] 3 2byte Image Size Unit Kb

[0062] 4 2byte Other Info BYTE0: I2C address

[0063] BYTE1: I2C port number / CS chip select

[0064] The preset field may be "0x0" corresponding to "Command Type." Optionally, when the preset field is "0x1" corresponding to "Command Type," the second core determines that the request is a query request.

[0065] It can be understood that the command may also carry device type, device information, the total amount of mirror data, etc.

[0066] In the embodiment of the present invention, the device type of the device to be programmed corresponding to the image data may be PSU, FPGA, BMC or BIOS. The device type corresponds to the field "Image Type" in the above table.

[0067] In the embodiment of the present invention, the device information is associated with the device type. Different device types correspond to different devices. The device information corresponds to the field "Other Info" in the above table. For example, the device information can be address information, port number, or CS chip select signal.

[0068] In the embodiment of the present invention, the total amount of mirror data is used to indicate the size of the mirror data. The total amount of mirror data corresponds to the field "Other Info" in the above table. The unit of the total amount of mirror data can be kilobytes Kb.

[0069] In an embodiment of the present invention, the image data of the target firmware is used to update or replace a set of data of the existing firmware in the device. The image data generally contains all necessary components of the target firmware, including but not limited to program code, configuration files, drivers, etc. The image data is an important component in the firmware upgrade process, and contains all or part of the new version of the firmware required for the device to operate.

[0070] In the embodiment of the present invention, the abnormality of the BMC firmware may be that the first core of the BMC runs abnormally, or the first core does not have the initial firmware.

[0071] It can be understood that the burning tool program running on the server host OS sends the burning command and the image data of the target firmware to the freeRTOS system through the UART interface. The firmware burning process running on the freeRTOS system of the second kernel listens to the burning request of the UART interface, receives the burning request and the image data of the target firmware, and parses them to obtain the device type and device information included in the burning request.

[0072] S202: The second core stores the image data in the memory, and determines the device to be programmed according to the device type and device information.

[0073] In some optional implementations, if the device type is a power supply unit type, the second core determines that the device information includes the target address and target port number of the device to be burned on the integrated circuit bus, and identifies and determines the device to be burned based on the target address and target port number.

[0074] In one example, the second kernel obtains the address and port number of each first device in at least one first device connected to the baseboard management controller through the integrated circuit bus; the second kernel compares the address and port number of each first device in at least one first device with the target address and target port number to identify and determine the device to be burned.

[0075] The device to be programmed is the first device in at least one first device that matches the target address and the target port number.

[0076] In the embodiment of the present invention, the integrated circuit bus is an I2C bus.

[0077] In some optional embodiments, if the device type of the device to be burned is a programmable logic device type, the second core determines that the device information is the target manufacturer information, target model information and target version information corresponding to the device to be burned, and identifies and determines the device to be burned based on the target manufacturer information, target model information and target version information.

[0078] In one example, the second kernel reads the register of each second device in at least one second device connected to the baseboard management controller through the joint test action group protocol bus to obtain the manufacturer information, model information and version information of each second device; the second kernel compares the manufacturer information, model information and version information of each second device with the target manufacturer information, target model information and target version information to identify and determine the device to be burned.

[0079] The device to be programmed is a second device in at least one second device that matches the target manufacturer information, the target model information, and the target version information.

[0080] In the embodiment of the present invention, the joint test action group protocol bus is a JTAG bus.

[0081] In some optional implementations, if the device type of the device to be programmed is a flash memory type of a baseboard management controller, the second core determines that the device information is the first chip select information of the flash memory of the baseboard management controller, and identifies and determines the device to be programmed based on the first chip select information. For example, the first chip select information may be flash0 or flash1.

[0082] In some optional implementations, if the device type of the device to be programmed is a flash memory type of a basic input / output system, the second kernel determines that the device information is the second chip select information of the flash memory of the basic input / output system, and identifies and determines the device to be programmed based on the second chip select information.

[0083] S203: Based on the programming request, the second core reads the image data from the memory, and continuously programs the read image data into the device to be programmed.

[0084] In some optional implementations, based on the burning request, the second kernel calls the driver interface corresponding to the device type, reads the image data from the memory, and continuously burns the read image data to the device to be burned through the driver interface.

[0085] In one example, taking the flash memory type of the baseboard management controller as an example, based on the burning request, the second kernel calls the SPI driver interface corresponding to the flash memory type of the baseboard management controller, reads the mirror data from the DDR, and continuously burns the read mirror data into the flash memory of the baseboard management controller through the SPI driver interface.

[0086] Optionally, when receiving the query request sent by the CPU, the second core queries the burning progress corresponding to the image data that has been burned in the device to be burned at the current moment; the second core feeds back the burning progress to the central processing unit.

[0087] Optionally, the second kernel records the amount of image data burned at the current moment during the process of continuously burning the read image data to the device to be burned; the second kernel calculates the ratio of the amount of image data burned to the total amount of image data, and determines the ratio as the queried burning progress.

[0088] In one example, the second core records the first data volume of the burned image data during the process of continuously burning the read image data to the device to be burned; when the first data volume is greater than a preset threshold, the second core reports the burning progress once, and re-records the second data volume of the burned image data from the current moment; when the second data volume is greater than the preset threshold, the second core reports the burning progress for the second time until all the image data are burned to the device to be burned.

[0089] It can be understood that the second core can feed back the burning progress to the burning tool program running on the central processing unit through the UART interface, and the burning progress can be displayed on the interface corresponding to the burning tool program.

[0090] Based on the method from S201 to S203, when an exception occurs to the baseboard management controller firmware running on the first core of the BMC, the second core receives the burning request and the image data of the target firmware sent by the central processing unit, stores the image data in the memory, and determines the device to be burned according to the device type and device information; when the request type indicates a request to burn the target firmware, the image data in the memory is continuously burned to the device to be burned.

[0091] Since the baseboard management controller includes a first core and a second core, and when the BMC firmware running on the first core is abnormal, an independent process is running on the second core, which can independently burn the image data of the target firmware into the device to be burned. This firmware burning method does not need to rely on the normal operation of the baseboard management controller firmware, nor does it need to use a burning fixture to burn the firmware of each device separately. Therefore, this firmware burning method can improve the burning efficiency, enhance the system robustness, achieve decoupling from the baseboard management controller firmware, and reduce the risk of firmware burning failure.

[0092] In this embodiment, a firmware burning method is provided, which can be used for the above-mentioned BMC. Figure 3 is a flowchart of another firmware burning method according to an embodiment of the present invention. Figure 3 As shown in the figure, the second kernel of BMC runs the freeRTOS system, and the firmware burning process runs on the freeRTOS system. The process is used to perform the following steps:

[0093] S301: Monitor the UART interface.

[0094] S302: Determine whether the UART interface has a burning request sent by the burning tool program; if not, continue to monitor the UART interface.

[0095] S303: If yes, parse the programming request to obtain the device type and device information of the device to be programmed.

[0096] S304: Receive the image data of the target firmware and write it into DDR.

[0097] S305: Determine the device to be programmed according to the device type and device information.

[0098] S306: Calling the interface driver corresponding to the device type to burn the image data.

[0099] S307: During the process of burning the image data, the progress is fed back through the UART interface.

[0100] S308: The burning is finished, and the UART interface continues to be monitored, waiting for the next burning request.

[0101] In this embodiment, a baseboard management controller is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0102] This embodiment provides a kernel such as Figure 4 As shown, Figure 4 is a structural block diagram of a kernel according to an embodiment of the present invention; the kernel is a second kernel, the second kernel is located on a baseboard management controller and is connected to a first kernel of the baseboard management controller; the second kernel includes a transceiver module 401 and a processing module 402;

[0103] The transceiver module 401 is used to receive the burning request and the image data of the target firmware sent by the CPU when an abnormality occurs to the baseboard management controller firmware running on the first core, wherein the burning request includes the device type and device information of the device to be burned corresponding to the image data;

[0104] The processing module 402 is used to store the image data in the memory and determine the device to be burned according to the device type and device information;

[0105] The processing module 402 is further configured to read the image data from the memory based on the programming request, and continuously program the read image data into the device to be programmed.

[0106] In some optional implementations, the processing module 402 is further used to query the burning progress of the image data burned in the device to be burned at the current moment when receiving the query request sent by the CPU; the transceiver module 401 is used to feed back the burning progress to the central processor.

[0107] In some optional embodiments, the burning request also includes the total amount of mirror data, and the processing module 402 is specifically used to record the amount of mirror data burned at the current moment during the process of continuously burning the read mirror data to the device to be burned; the processing module 402 is also specifically used to calculate the ratio of the amount of burned mirror data to the total amount of mirror data, and determine the ratio as the queried burning progress.

[0108] In some optional implementations, the processing module 402 is further specifically configured to, if the device type is a power supply unit type, determine that the device information includes a target address and a target port number of the device to be programmed on the integrated circuit bus, and identify and determine the device to be programmed based on the target address and the target port number;

[0109] Alternatively, the processing module 402 is further specifically configured to, if the device type of the device to be programmed is a programmable logic device type, determine that the device information is the target manufacturer information, target model information, and target version information corresponding to the device to be programmed, and identify and determine the device to be programmed based on the target manufacturer information, target model information, and target version information;

[0110] Alternatively, the processing module 402 is further specifically configured to determine that the device information is the first chip select information of the flash memory of the baseboard management controller if the device type of the device to be programmed is the flash memory type of the baseboard management controller, and identify and determine the device to be programmed based on the first chip select information;

[0111] Alternatively, the processing module 402 is further specifically configured to determine that the device information is the second chip select information of the flash memory of the basic input and output system if the device type of the device to be programmed is a flash memory type of the basic input and output system, and identify and determine the device to be programmed based on the second chip select information.

[0112] In some optional implementations, the processing module 402 is further specifically configured to obtain an address and a port number of each first device in at least one first device connected to the baseboard management controller via an integrated circuit bus;

[0113] The processing module 402 is also specifically used to compare the address and port number of each first device in at least one first device with the target address and target port number, identify and determine the device to be burned, and the device to be burned is the first device in at least one first device that matches the target address and target port number.

[0114] In some optional embodiments, the processing module 402 is further specifically used to read the register of each second device in at least one second device connected to the baseboard management controller via the joint test action group protocol bus to obtain the manufacturer information, model information and version information of each second device; the processing module 402 is further specifically used to compare the manufacturer information, model information and version information of each second device with the target manufacturer information, target model information and target version information to identify and determine the device to be burned, and the device to be burned is a second device in at least one second device that matches the target manufacturer information, target model information and target version information.

[0115] In some optional implementations, the processing module 402 is further specifically configured to call a driver interface corresponding to the device type based on a burning request, read the image data from the memory, and continuously burn the read image data to the device to be burned through the driver interface.

[0116] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0117] The kernel in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0118] The embodiment of the present invention also provides a computer device having the above Figure 4 The kernel shown.

[0119] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0120] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0121] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0122] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0123] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0124] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0125] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0126] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0127] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A firmware burning method, characterized in that: Applied to a baseboard management controller, the baseboard management controller is connected to a central processing unit (CPU) and a memory respectively, the baseboard management controller includes a first core and a second core, and the method includes: When an exception occurs to the baseboard management controller firmware running on the first core, the second core receives a burning request and the image data of the target firmware sent by the CPU, wherein the burning request includes a device type and device information of the device to be burned corresponding to the image data; The second core stores the image data in the memory, and determines the device to be programmed according to the device type and the device information; Based on the programming request, the second core reads the image data from the memory, and continuously programs the read image data into the device to be programmed.

2. The method according to claim 1, characterized in that The step of continuously burning the read mirror data into the device to be burned further comprises: When the second core receives the query request sent by the CPU, it queries the burning progress of the image data that has been burned in the device to be burned at the current moment; The second core feeds back the burning progress to the central processing unit.

3. The method according to claim 2, characterized in that The programming request also includes the total amount of the image data, and the second core queries the programming progress of the image data that has been programmed in the device to be programmed at the current moment, including: The second core records the amount of image data that has been burned at the current moment during the process of continuously burning the read image data to the device to be burned; The second kernel calculates a ratio of the amount of the burned image data to the total amount of the image data, and determines the ratio as the queried burning progress.

4. The method according to claim 1, characterized in that: The step of determining the device to be programmed according to the device type and the device information includes: If the device type is a power supply unit type, the second core determines that the device information includes a target address and a target port number of the device to be programmed on an integrated circuit bus, and identifies and determines the device to be programmed based on the target address and the target port number; Alternatively, if the device type of the device to be programmed is a programmable logic device type, the second kernel determines that the device information is the target manufacturer information, target model information and target version information corresponding to the device to be programmed, and identifies and determines the device to be programmed based on the target manufacturer information, the target model information and the target version information; Alternatively, if the device type of the device to be programmed is a flash memory type of the baseboard management controller, the second core determines that the device information is first chip select information of the flash memory of the baseboard management controller, and identifies and determines the device to be programmed based on the first chip select information; Alternatively, if the device type of the device to be programmed is a flash memory type of a basic input / output system, the second kernel determines that the device information is second chip select information of the flash memory of the basic input / output system, and identifies and determines the device to be programmed based on the second chip select information.

5. The method according to claim 4, characterized in that The step of identifying and determining the device to be programmed based on the target address and the target port number includes: The second core obtains an address and a port number of each first device in at least one first device connected to the baseboard management controller via the integrated circuit bus; The second kernel compares the address and port number of each first device in the at least one first device with the target address and the target port number, identifies and determines the device to be burned, and the device to be burned is the first device in the at least one first device that matches the target address and the target port number.

6. The method according to claim 4, characterized in that The step of identifying and determining the device to be programmed based on the target manufacturer information, the target model information, and the target version information includes: The second core reads the register of each second device in at least one second device connected to the baseboard management controller through the joint test action group protocol bus to obtain the manufacturer information, model information and version information of each second device; The second kernel compares the manufacturer information, model information and version information of each second device with the target manufacturer information, the target model information and the target version information, identifies and determines the device to be burned, and the device to be burned is a second device among the at least one second device that matches the target manufacturer information, the target model information and the target version information.

7. The method according to claim 1, characterized in that Based on the programming request, the second core reads the image data from the memory, and continuously programs the read image data to the device to be programmed, including: Based on the burning request, the second kernel calls the driver interface corresponding to the device type, reads the image data from the memory, and continuously burns the read image data to the device to be burned through the driver interface.

8. A kernel, characterized in that: The core is a second core, which is located on a baseboard management controller and connected to a first core of the baseboard management controller, and the baseboard management controller is connected to a central processing unit CPU and a memory respectively; the second core includes a transceiver module and a processing module; The transceiver module is used to receive a burning request and the image data of the target firmware sent by the CPU when an abnormality occurs to the baseboard management controller firmware running on the first core, wherein the burning request includes the device type and device information of the device to be burned corresponding to the image data; The processing module is used to store the image data in a memory, and determine the device to be programmed according to the device type and the device information; The processing module is further configured to read the image data from the memory based on the programming request, and continuously program the read image data into the device to be programmed.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the firmware burning method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the firmware burning method according to any one of claims 1 to 7.