Board-mounted firmware version detection method and device
Technical Field
The invention belongs to the technical field of firmware burning, and particularly relates to a method and a device for detecting a board-mounted firmware version.
Background
The architecture of the server is built by boards with different functions, part of the boards are simple in function, such as a front panel, a rear panel, an adapter plate and the like, the boards are only provided with simple logic and power devices, and part of the boards need more functions, such as a fan board, a power control board, a hard disk backboard and the like, and need to carry controllers with different numbers, such as a CPLD, a MCU, a BMC and a BIOS. Different controllers can be matched with different firmware, even if more than two same controllers are arranged on the same board card, the firmware required to be carried is different, for example, the VRD, even if the VRD with the same model is positioned at different positions or output differently, the burned firmware is also different. If the loaded firmware has a fault, the function of the whole server system is affected and the server system cannot operate normally.
In the product development stage, after the board card finishes the part beating, a factory can burn the firmware into the specified chip, and the produced board card is handed over to a test unit for system function test after the system is assembled. The factory test is carried out under the condition of assembly and shipment, basic function verification is carried out, and only normal startup can be confirmed in the development stage, and whether each interface can normally identify a device, such as a hard disk and a PCIE card, is usually carried out. Further functional tests are performed after the transfer to the test unit. When the test has problems, the research and development personnel are required to judge the failure factors of the test failure. But developers often find a situation: because the firmware version is changed frequently in the development stage, the firmware carried by the controller on some board cards is different from the firmware version required by system planning, even the problem of error and leakage caused by no burning occurs, so that the system function can not operate normally, so that research and development personnel need to spend extra time to perform problem positioning, the operation time of research and development personnel and test personnel is wasted, and even the time course of the whole test is prolonged.
Therefore, a direct and fast method is needed to judge whether the firmware loading version of the onboard controller is correct or not in the functional test stage, and remind the tester to update.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method and an apparatus for detecting a board-mounted firmware version, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for detecting a board-mounted firmware version, including:
caching the I2C address of each controller and the correct version requirement of the firmware in a register inside the BMC;
after the system is powered on, the BMC is started, and calls the controller through the I2C address recorded by the internal temporary memory;
judging whether the call gets a response: if the call is responded, comparing the checksum of the firmware, if the checksum is consistent, the version is correct, otherwise, the version is abnormal; if the call has no response, the controller is indicated to burn blank;
each controller is correspondingly provided with a buzzer, and the buzzer rings to give an alarm when the version is abnormal.
Further, the method further comprises: and the operator releases the warning after rewriting the firmware with the correct version.
Further, the method further comprises:
a firmware detection I2C channel is respectively arranged between the BMC and each controller;
the BMC may be calling at the same time each firmware detects the I2C channel.
Further, the method further comprises: detection prior to the call ensures that each I2C channel is normal.
Further, the method further comprises: and upgrading and detecting the BMC firmware to ensure that the BMC firmware is correct.
In a second aspect, the present invention provides a device for detecting a version of a firmware on board, including:
BMC, a plurality of controllers and I2C bus; the BMC is connected with the controllers through an I2C bus; the controller includes: CPLD, MCU, VRD and BIOS; and the output ends of the MCU, the VRD and the BIOS are respectively provided with PCIE Switch to be in butt joint with the I2C bus.
The beneficial effect of the invention is that,
the invention provides a board-mounted firmware version detection method and device, which utilizes a BMC (baseboard management controller) of a system to detect the correctness of the firmware version of each controller and alarms through a buzzer; the method helps the operating personnel to preliminarily get rid of the problems, accelerates the research and development personnel to locate the problems, and improves the testing efficiency and the product competitiveness of the server product.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
Fig. 2 is a schematic block diagram of an apparatus of one embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
CPLD: complex Programmed Logic device, Complex programmable Logic device.
MCU: micro Control Unit, microprocessor.
BMC: a Basebard Management Controller, a Baseboard Management Controller.
BIOS: basic Input/Output System, Basic Input/Output System.
VRD: voltage Regulator.
Based on daily development, because a customer needs to directly assemble a prototype for shipment by an assembly factory, and a project is preliminarily finished, research and development personnel do not support online, but when the assembly is finished and the delivery test is carried out, part of machine tables cannot be started. Research personnel remotely command operating personnel to perform detection and debugging, and finally find that the firmware of the fan plate controller is not recorded, so that the fan does not operate, and the system is overheated and cannot be started. Although the problem is eliminated successfully, the delivery time is delayed, and the machine cannot be delivered to the customer on time.
The BMC is often used in a server system to monitor whether the system is operating normally, whether any voltage or temperature changes abnormally, whether the fan is rotating too slowly or too fast, and how many devices are on the system are recorded by the BMC. The BMC is therefore the controller that is the earliest to start after the system is turned on, except for the CPLD. In some system designs, it may even be necessary to wait for the BMC to boot before sequentially booting the remaining controllers. Based on the characteristic of the BMC, namely the supervisor, the BMC can detect whether the other controllers in the system carry the firmware with the normal version.
Generation based on the above structure
The embodiment provides a board-mounted firmware version detection method, which specifically comprises the following steps:
s1, caching the I2C address of each controller and the correct version requirement of the firmware in a temporary memory in the BMC;
s2, after the system is powered on, the BMC starts, and calls the controller through the I2C address recorded by the internal temporary storage;
s3, judging whether the call gets a response: if the call is responded, comparing the checksum of the firmware, if the checksum is consistent, the version is correct, otherwise, the version is abnormal; if the call has no response, the controller is indicated to burn blank or the I2C channel is abnormal;
and S4, correspondingly installing a buzzer on each controller, alarming through buzzer sound when the version is abnormal, and removing the alarm after the operator burns the firmware with the correct version again.
A common warning method usually warns an error through an LED light signal corresponding to a controller, but the meaning of various light signals is unknown for researchers, and the case is closed and the internal condition cannot be observed after the system is assembled. Therefore, there is a need for an alternative method of informing the operator that a firmware version problem has occurred. In this embodiment, a buzzer is additionally arranged beside each controller, and once the version is abnormal, the buzzer rings, so that an operator can immediately know and immediately process the abnormal version, and the abnormal processing efficiency is improved.
In the embodiment, in order to realize the efficiency improvement of the simultaneous detection of a plurality of firmware, a firmware detection I2C channel is respectively arranged between the BMC and each controller; the BMC may be calling at the same time each firmware detects the I2C channel.
In this embodiment, before the call, it is detected that each I2C channel is normal, and when the call is not responded in step S3, it is directly determined that the controller firmware is not burned.
In this embodiment, the firmware upgrade detection of the BMC is performed to ensure that the firmware of the BMC itself is correct, and the firmware detection of other controllers can be correctly performed.
Based on the above method, the present embodiment provides a corresponding structure, as shown in fig. 2, the present embodiment provides a board firmware version detection apparatus, including: BMC, a plurality of controllers and I2C bus; the BMC is connected with the controllers through an I2C bus; the controller includes: CPLD, MCU, VRD and BIOS; the output ends of the MCU, the VRD and the BIOS are respectively provided with a PCIE Switch to be in butt joint with an I2C bus; once the system is powered on, the BMC can obtain the internal information of each controller through the I2C channel, and can know whether the FW version carried by the controller is correct or not recorded after comparison.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.