Processor firmware update processing method and electronic device
By using the baseboard management controller to disable and restore the logging function during processor firmware updates, the problem of logging failure during processor upgrades and downgrades is solved, ensuring the reliability of device problem localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-24
AI Technical Summary
During processor upgrade/downgrade, a conflict between the CPLD upgrade/downgrade channel and the logging channel causes the logging function to fail, affecting subsequent device problem localization.
During the processor firmware update process, the baseboard management controller sends a command to disable the logging function, stopping the logging of critical physical signals to the logging storage space and storing it in the preset storage space. The logging function is restored after the update is completed.
It ensures that log records are not lost, guarantees the reliability of device problem localization, and avoids log recording failure caused by channel conflicts.
Smart Images

Figure CN121349749B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of servers, and in particular to a processor firmware update processing method and an electronic device. BACKGROUND
[0002] Currently, various serious problems may occur in the development process and after the centralized storage device is put on the market, such as downtime, system restart, system hanging, and the like, which affect the use of the device. In view of the foregoing problems, in the development process, the OS (Operating System), the BMC (Baseboard Management Controller), or the CPLD (Complex Programmable Logic Device) end is generally used to record and collect logs of event occurrence, to provide a problem solving idea, facilitate finding a root cause of the problem, and save problem solving time. Among them, the change of a hardware key physical signal can only be recorded through the CPLD end.
[0003] In the related art, hardware log recording is performed through the internal storage space of the CPLD. However, in this scheme, if the hardware signal change triggers the log recording function during the upgrade and downgrade of the CPLD, the log recording function will be invalid due to the conflict between the upgrade and downgrade channel of the processor and the log recording channel, which affects subsequent server problem positioning. SUMMARY
[0004] The present application provides a processor firmware update processing method and an electronic device to at least solve the problem that the upgrade and downgrade channel of the processor conflicts with the log recording channel in the related art, resulting in invalid log recording function and affecting subsequent server problem positioning.
[0005] The application provides a processor firmware update processing method, comprising the following steps: a baseboard management controller acquires firmware update information of a target processor, and acquires a firmware version update mode of the target processor based on the firmware update information; when the firmware version update mode is to update current version firmware of the target processor to target version firmware, the baseboard management controller sends a shielding log recording function instruction to the target processor; wherein the current version firmware and the target version firmware have a hardware log recording function; the target processor stops storing log records of received hardware critical physical signals to a log recording storage space and storing the log records to a preset storage space based on the shielding log recording function instruction; the baseboard management controller controls the target processor to update from the current version firmware to the target version firmware, and sends a recovery log recording function instruction to the target processor, and the target processor writes the log records from the preset storage space to the log recording storage space based on the recovery log recording function instruction.
[0006] The application further provides a processor firmware update processing device, comprising: a first acquisition module, used for a baseboard management controller to acquire firmware update information of a target processor; a second acquisition module, used for acquiring a firmware version update mode of the target processor based on the firmware update information; a first sending module, used for the baseboard management controller to send a shielding log recording function instruction to the target processor when the firmware version update mode is to update current version firmware of the target processor to target version firmware; wherein the current version firmware and the target version firmware have a hardware log recording function; a first processing module, used for the target processor to stop storing log records of received hardware critical physical signals to a log recording storage space and storing the log records to a preset storage space based on the shielding log recording function instruction; an update module, used for the baseboard management controller to control the target processor to update from the current version firmware to the target version firmware; a second sending module, used for sending a recovery log recording function instruction to the target processor; and a second processing module, used for the target processor to write the log records from the preset storage space to the log recording storage space based on the recovery log recording function instruction.
[0007] The application further provides an electronic device, comprising: a memory, used for storing a computer program; and a processor, used for executing the computer program to implement the steps of any one of the processor firmware update processing methods.
[0008] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any one of the processor firmware update processing methods.
[0009] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the processor firmware updating processing methods described above.
[0010] By the application, in the case of updating the current version firmware having the hardware logging function to the target version firmware in the target processor, the target processor is controlled by the baseboard management controller to stop storing the received hardware critical physical signal log into the log storage space and to store the log into the preset storage space, and after the target processor is updated to the target version firmware, the log is written into the log storage space from the preset storage space, the technical problem that the processor upgrade and downgrade channel and the log recording channel conflict causes the log recording function to fail is solved, the reliability technical effect that the log recording is not lost and the device problem positioning is achieved is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0012] Figure 1 An application scenario diagram of a processor firmware updating processing method provided by the embodiments of the application;
[0013] Figure 2 A flowchart of a processor firmware updating processing method provided by the embodiments of the application;
[0014] Figure 3 A flowchart of another processor firmware updating processing method provided by the embodiments of the application;
[0015] Figure 4 An application platform example diagram of a processor firmware updating processing provided by the embodiments of the application;
[0016] Figure 5 An example diagram of a processor firmware updating processing provided by the embodiments of the application;
[0017] Figure 6 A structural diagram of a processor firmware updating processing device provided by the embodiments of the application. DETAILED DESCRIPTION
[0018] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0019] It should be noted that, in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0020] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] In combination with the specific application environment architecture or specific hardware architecture on which the processor firmware update processing method depends, the specific application environment architecture or specific hardware architecture is described here.
[0022] At present, the change of the hardware key physical signal of the device is only recorded through the CPLD end. The related art records hardware logs through the CPLD. However, in the process of upgrading the CPLD, if the hardware signal change triggers the log recording function, the log recording function will be disabled due to the conflict between the CPLD upgrade channel and the log recording channel, which will affect the subsequent device problem positioning.
[0023] To solve the above problems, the present application provides a processor firmware update processing method, which avoids the technical problem of log recording function failure caused by log recording disorder in the normal upgrade process between various versions of the processor, and achieves the technical effect of reliable log recording without loss and device problem positioning.
[0024] The processor firmware update processing method of the present application can be applied to, for example Figure 1The application environment shown. The processor firmware update processing method is applied to a server. The server includes a baseboard management controller 101 and a target processor 102. The baseboard management controller 101 obtains firmware update information of the target processor 102 and obtains a firmware version update mode of the target processor 102 based on the firmware update information. When the firmware version update mode is to update the current version firmware of the target processor 102 to the target version firmware, the baseboard management controller 101 sends a shield log recording function instruction to the target processor 102. The current version firmware and the target version firmware have a hardware log recording function. The target processor 102 stops storing the log record of the received hardware critical physical signal to the log recording storage space and stores the log record to the preset storage space based on the shield log recording function instruction. The baseboard management controller 101 controls the target processor 102 to update from the current version firmware to the target version firmware, sends a log recording function recovery instruction to the target processor 102, and the target processor 102 writes the log record from the preset storage space to the log recording storage space based on the log recording function recovery instruction.
[0025] Embodiments of the present application provide a processor firmware update processing method, which is described in detail in combination with the execution flow of the processor firmware update processing method.
[0026] Figure 2 A flowchart of a processor firmware update processing method provided by embodiments of the present application is shown. The processor firmware update processing method can be executed by a processor firmware update processing device of a server. The processor firmware update processing device can be implemented by software and / or hardware and can be integrated in the server. The server can be a computer or other electronic device. As shown in the figure, Figure 2 The method includes the following steps:
[0027] In step 201, the baseboard management controller obtains firmware update information of the target processor and obtains a firmware version update mode of the target processor based on the firmware update information.
[0028] The baseboard management controller (BMC) is a special controller for monitoring and managing a server; the BMC is a separate system under a host server system, and has its own processor and memory; even if the host hardware or operating system is down or off, the host system can still be managed by the BMC system; the target processor can be any processor of the server; in the embodiment of the application, the target processor can be a CPLD (Complex Programmable Logic Device), which is a Complex PLD, a more complex logic element; the CPLD is a digital integrated circuit that users can construct logic functions according to their own needs; the basic design method is to generate a corresponding target file by means of an integrated development software platform, a schematic diagram, a hardware description language, etc., and to transmit the code to the target chip through a download cable (‘in-system’ programming) to realize the designed digital system.
[0029] In the embodiment of the application, the target processor can be updated according to actual application needs; it can be understood that the firmware update of the target processor can be firmware upgrade, firmware downgrade, or firmware downgrade and then upgrade, etc., and the specific setting can be selected according to the actual application scene.
[0030] In the embodiment of the application, the baseboard management controller can receive the firmware update information of the target processor sent by the operating system, and determine the firmware version update mode of the target processor according to the current firmware version of the target processor, the target firmware version to be upgraded, and whether the current firmware version and the target firmware version have the hardware log recording function, etc.
[0031] In some embodiments, the current firmware version identifier and the target firmware version identifier are obtained based on the firmware update information, and the current firmware version identifier and the target firmware version identifier are compared with the recorded firmware version identifier respectively; the recorded firmware version identifier is a firmware version identifier with a hardware logging function; when the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is greater than or equal to the recorded firmware version identifier, it is determined that the firmware version update mode is to update the current version firmware of the target processor to the target version firmware; the current version firmware and the target version firmware have a hardware logging function; when the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is less than the recorded firmware version identifier, it is determined that the firmware version update mode is to update the current version firmware of the target processor to the target version firmware and then update the target version firmware of the target processor to the current version firmware; the current version firmware of the target processor has a hardware logging function and the target version firmware does not have a hardware logging function. The version identifier can uniquely identify a firmware version.
[0032] In step 202, when the firmware version update mode is to update the current version firmware of the target processor to the target version firmware, the baseboard management controller sends a shield logging function instruction to the target processor; the current version firmware and the target version firmware have a hardware logging function.
[0033] In step 203, the target processor stops storing the log records of the received hardware critical physical signals to the log record storage space and storing the log records to a preset storage space based on the shield logging function instruction.
[0034] In the embodiments of the present application, when the firmware version update mode of the target processor based on the firmware update information is to update the current version firmware of the target processor to the target version firmware, the current version firmware and the target version firmware have a hardware logging function. Therefore, in order to avoid the failure of the hardware logging function, the logging function needs to be shielded before upgrading while ensuring that the log records are not lost. The baseboard management controller sends a shield logging function instruction to the target processor, so that the target processor stops storing the log records of the received hardware critical physical signals to the log record storage space and storing the log records to a preset storage space based on the shield logging function instruction.
[0035] The log record storage space is the storage space in which the target processor originally stores the log records; the preset storage space is a temporary storage space designed for the target processor, which is used to store the log records generated during firmware upgrading.
[0036] It should be noted that the firmware versions of the storage system are generally used in matching, the hardware log recording function needs to be supported by the target processor and the baseboard management controller version, and the firmware is uniformly upgraded, so the firmware version of the baseboard management controller supports the hardware log recording function, and the accuracy of the processor firmware update process is further ensured.
[0037] In the embodiment of the application, the baseboard management controller needs to send a shielding log recording function instruction to the target processor, and the baseboard management controller and the target processor can communicate through a bus, such as an I2C bus (Inter-Integrated Circuit, two-wire serial bus); specifically, the baseboard management controller writes an update flag bit into a register of the target processor through the bus, wherein the target processor has a plurality of registers (such as different registers distinguished by a first register, a second register, and a third register) for writing different flag bits to instruct the target processor to perform different operations such as write, read, and erase operations. After writing the update flag bit into one register of the target processor, such as the third register, it is determined that the shielding log recording function instruction is received according to the update flag bit of the register, so as to stop storing the log record of the received hardware critical physical signal to the log record storage space and storing the log record to the preset storage space based on the shielding log recording function instruction.
[0038] Step 204, the baseboard management controller controls the target processor to update from the current version firmware to the target version firmware, and sends a recovery log recording function instruction to the target processor, and the target processor acquires the log record from the preset storage space and writes it into the log record storage space based on the recovery log recording function instruction.
[0039] In the embodiment of the application, the baseboard management controller controls the target processor to update from the current version firmware to the target version firmware after a preset time length, that is, the recovery log recording function instruction is sent to the target processor after the target processor updates from the current version firmware to the target version firmware. Specifically, the baseboard management controller sets the update flag bit in the same register of the target processor through the bus to send the recovery log recording function instruction, so that the target processor determines that the recovery log recording function instruction is received according to the set flag bit of the register, and writes the log record from the preset storage space into the log record storage space based on the recovery log recording function instruction.
[0040] Therefore, when mutual upgrade and downgrade is required between the target processor firmware versions, the baseboard management controller will shield the target processor with the log recording function instruction, and the target processor will shield the log recording function after detecting the shielded log recording function instruction. The normal log recording is restored after the upgrade is completed, and the log recording is stored in the preset storage space. The log recording is obtained from the preset storage space and written into the log recording storage space after the upgrade is completed.
[0041] In summary, the processor firmware update processing method of the present application, in the case of updating the current version firmware of the target processor to the target version firmware, the baseboard management controller controls the target processor to stop storing the log recording of the received hardware critical physical signal in the log recording storage space and stores the log recording in the preset storage space. After the target processor is updated to the target version firmware, the log recording is obtained from the preset storage space and written into the log recording storage space. The technical problem of log recording function failure caused by the conflict between processor upgrade and downgrade channels and log recording channels is solved, and the reliability technical effect of log recording without loss and device problem positioning is achieved.
[0042] Based on the foregoing embodiment description, it can also be determined that the firmware version update mode of updating the current version firmware of the target processor to the target version firmware and updating the target version firmware of the target processor to the current version firmware, the current version firmware of the target processor has hardware log recording function and the target version firmware does not have hardware log recording function. In order to avoid log loss and achieve the reliability of device problem positioning, the baseboard management controller and the target processor and the target memory such as EEPROM (Electrically Erasable Programmable read only memory) under the baseboard management controller are required, which is a storage chip that does not lose data after power failure. The following will be described in detail. Figure 3 .
[0043] Figure 3 Another flowchart of the processor firmware update processing method provided by the embodiment of the present application is shown in the figure. Based on the above-mentioned embodiment, the above-mentioned processor firmware update processing method is further optimized. As shown in Figure 3 , the method comprises:
[0044] Step 301, in the case of updating the current version firmware of the target processor to the target version firmware and updating the target version firmware of the target processor to the current version firmware, the baseboard management controller controls the target processor to update from the current version firmware to the target version firmware; wherein the current version firmware of the target processor has hardware log recording function and the target version firmware does not have hardware log recording function.
[0045] Specifically, the current firmware version identifier and the target firmware version identifier are obtained based on the firmware update information, the current firmware version identifier and the target firmware version identifier are compared with the recorded firmware version identifier respectively, the recorded firmware version identifier is the firmware version identifier with the hardware log recording function, when the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is less than the recorded firmware version identifier, it is determined that the firmware version update mode of updating the current version firmware of the target processor to the target version firmware and updating the target version firmware of the target processor to the current version firmware, the current version firmware of the target processor has the hardware log recording function and the target version firmware does not have the hardware log recording function.
[0046] Specifically, the baseboard management controller and the target processor are downgraded from the current version firmware to the target version firmware (i.e. the version firmware supporting the hardware log recording function is downgraded to the version firmware not supporting the hardware log recording function), and then upgraded from the target version firmware to the current version firmware, and in the scenario that the baseboard management controller is upgraded first during the upgrading and downgrading, the processor firmware update processing stability and accuracy are further ensured.
[0047] In step 302, the baseboard management controller controls the target processor to update from the target version firmware to the current version firmware after storing the target version identifier of the target processor to the target storage; wherein the target processor stores the log record of the received hardware critical physical signal to the preset storage space.
[0048] Specifically, the hardware signal change causes the hardware recording area to be disordered during the process of updating the target processor from the current version firmware to the target version firmware, and the hardware recording area information does not change during the process of updating the target processor from the target version firmware to the current version firmware, and the hardware signal recording function is invalid after upgrading to the current version firmware. Therefore, before controlling the target processor to update from the target version firmware to the current version firmware, the baseboard management controller stores the target version identifier of the target processor to the target storage so that the baseboard management controller can quickly determine the firmware version change of the target processor and control the related log processing in the subsequent process, so as to ensure that the log record is not lost and realize the reliability technical effect of device problem positioning; wherein the target version identifier can uniquely identify a firmware version identifier, which is used to represent the current firmware version of the target processor.
[0049] Specifically, the target processor stores the log record of the received hardware critical physical signal to the preset storage space after updating the target processor from the target version firmware to the current version firmware.
[0050] In step 303, when the current version identifier and the target version identifier are different, the baseboard management controller sends a log erasing instruction to the target processor, the target processor erases the log in the log record storage space, and stores the log record in the preset storage space to the log record storage space after the log erasing ends.
[0051] In the embodiments of the present application, the baseboard management controller sends a log erasing instruction to the target processor, including that the baseboard management controller writes a log erasing flag bit to a first register of the target processor through a bus to send the log erasing instruction. Specifically, the baseboard management controller writes a log erasing flag bit to a register, such as a first register, of the target processor through a bus to send the log erasing instruction, so that the target processor determines that the log erasing instruction is received according to the log erasing flag bit of the register, and erases the log in the log record storage space based on the log erasing instruction, and stores the log record in the preset storage space to the log record storage space after the log erasing ends.
[0052] In some embodiments, when the current version identifier and the target version identifier are different, the baseboard management controller sends a log collecting instruction to the target processor, and the target processor records the log of the received hardware critical physical signal to a target register of the target processor, and the baseboard management controller acquires the target log from the target register and saves it after a preset time length.
[0053] In the embodiments of the present application, the baseboard management controller sends a log collecting instruction to the target processor, including that the baseboard management controller writes a log collecting flag bit to a second register of the target processor to send the log collecting instruction.
[0054] Specifically, the baseboard management controller writes a log collecting flag bit to a register, such as a second register, of the target processor through a bus to send the log collecting instruction, so that the target processor determines that the log collecting instruction is received according to the log collecting flag bit of the register, and records the log of the received hardware critical physical signal to a target register of the target processor based on the log collecting instruction, and the baseboard management controller acquires the target log from the target register and saves it after a preset time length. In this way, the baseboard management controller can acquire the target log from the target register and save it, realize triggering log collection once after the target processor is updated from the target version firmware to the current version firmware and storing in the baseboard management controller, and further improve the effectiveness of log record, so as to ensure the reliability of subsequent problem positioning.
[0055] It should be noted that the firmware versions of the storage system are generally used in matching, the hardware logging function needs to be supported by the target processor and the baseboard management controller version, and the firmware is uniformly upgraded and downgraded. Before the baseboard management controller controls the target processor to update from the current version firmware to the target version firmware, the firmware of the baseboard management controller is updated to the same firmware version as the target version firmware. Before the baseboard management controller controls the target processor to update from the target version firmware to the current version firmware, the firmware of the baseboard management controller is updated to the same firmware version as the current version firmware, further ensuring the reliability of the processor firmware update processing.
[0056] In summary, the processor firmware update processing method of the present application, in the case that the target processor has the current version firmware with hardware logging function updated to the target version firmware without hardware logging function and the target version firmware of the target processor is updated to the current version firmware, the target version identifier of the target processor is stored to the target storage by the baseboard management controller after the target processor is controlled to update from the target version firmware to the current version firmware. In the case that the current version identifier and the target version identifier are not the same, the baseboard management controller controls the target processor to erase the log in the log recording storage space, and stores the log recording of the preset storage space to the log recording storage space after the log erasing is completed. The technical problem of log recording function disorder caused by the conflict between the processor upgrade channel and the log recording channel, and further the failure of the log recording function is solved, and the reliability technical effect of log recording without loss and device problem positioning is achieved.
[0057] Based on the description of the foregoing embodiments, the present application makes different processing for different processor upgrade scenarios. The log recording function failure in special scenarios is solved by the cooperation of the baseboard management controller and the target storage such as EEPROM under the baseboard management controller, and the reliability of the positioning means is ensured. Therefore, the application defects on the hardware chip are compensated by the way of software code import, without additional hardware facility investment, saving the development cost, and ensuring the function availability and reliability. The CPLD version identifier information is stored in the EEPROM for the BMC to acquire, the EEPROM power-off data is not lost, and the judgment of the BMC is more accurate and reliable.
[0058] Exemplary, Figure 4 The application platform example diagram of the processor firmware update processing provided by the embodiments of the present application is as follows, Figure 4As shown, the baseboard management controller 101, i.e. BMC; the target processor 102 can be a CPLD; the target memory 103 can be an EEPROM; the mainboard key module 104 can be a CPU (Central Processing Unit), a PCH (Platform Controller Hub), a PSU (PC Power supply unit) and a BBU (Backup Battery Unit) and the like.
[0059] Specifically, the hardware platform has a mainboard, the mainboard on-board CPU, PCH, BMC, power module, CPLD, EEPROM and the like, the key signals of the PSU and BBU are connected to the mainboard CPLD, the key signals of the mainboard CPU and PCH, the key signals of the power module are also connected to the CPLD, and after the CPLD receives these signals, it records the changes of these signals in the internal storage space of the CPLD through internal logic.
[0060] Specifically, the BMC is interconnected with the CPLD through I2C, and the BMC can realize the following operations through I2C: 1) synchronizing the timestamp to the CPLD for recording the time when the log occurs; 2) controlling the read-write operation and clearing logic of the internal key signal log of the CPLD; 3) realizing the collection and saving of the hardware key signal log. As long as the key physical signal received by the CPLD has a level change, it will trigger the recording of one log record, and record the latest level state of the current signal to the internal storage space of the CPLD. After the CPLD is powered off, the data in the specific storage space of the CPLD can still be saved, and the BMC can collect the logs through I2C and query the signal records in the recent times. Therefore, the BMC is interconnected with the CPLD through the bus, can automatically identify the failure of the log function caused by the version change of the CPLD, does not need manual intervention, and closely combines the management function of the BMC, the hardware control function of the CPLD and the persistent storage function of the EEPROM, forms a new architecture for cooperative work, realizes that from detection to execution of remedial measures, all are automatically completed by the system, and significantly improves the efficiency and reliability.
[0061] It can be understood that the mainboard is a whole, and the on-board BMC, CPLD, EEPROM and mainboard key module and the like; the key signals of the mainboard key module are connected to the CPLD, facilitating the CPLD to record the changes of the key signals; the BMC and the CPLD are interconnected, and cooperate to complete the key operations such as log collection, log saving and log clearing; the I2C of the BMC is hung with the EEPROM, part of which is used to record the board card information, and the other part is used to store the firmware version number information of the CPLD. When the log recording function is failed due to the upgrade and downgrade between the new and old version firmwares of the BMC and the CPLD, it is used to repair the log recording function.
[0062] As an example, the BMC and the CPLD are both version firmware supporting the hardware logging function. When the CPLD firmware version needs to be upgraded or downgraded, the BMC notifies the CPLD of the CPLD update flag through the I2C. After the CPLD detects the update flag, the CPLD shields the logging function. After the upgrade is completed, the logging function is restored.
[0063] As another example, the BMC and the CPLD are downgraded from version firmware supporting the hardware logging function to version firmware not supporting the hardware logging function, and then upgraded from version firmware not supporting the hardware logging function to version firmware supporting the hardware logging function, and the BMC is upgraded first in the scenario of the upgrade and downgrade.
[0064] Specifically, the BMC is automatically restarted after being updated, at this time, the CPLD is version firmware supporting the hardware logging function, and the BMC is version firmware not supporting the hardware logging function. When the CPLD is downgraded to version firmware not supporting the hardware logging function, if the signal change triggers the logging, at this time, the BMC version firmware not supporting the hardware logging function cannot notify the CPLD version firmware supporting the hardware logging function to shield the logging function, so as to cause the logging disorder. When the version firmware not supporting the hardware logging function is upgraded to version firmware supporting the hardware logging function, the logging space does not lose due to power failure, and is still in a disorder state. After being upgraded to version firmware supporting the hardware logging function, the logging function is invalid. The BMC is upgraded first, and is version firmware supporting the hardware logging function. The BMC can record the CPLD version identification before and after the upgrade through the EEPROM hung by the BMC. When the CPLD is restarted after being downgraded, the BMC detects that the CPLD version number is upgraded from version firmware not supporting the hardware logging function to version firmware supporting the hardware logging function, and then notifies the CPLD to collect the hardware log first, and then notifies the CPLD to clear the already disordered logging space, so as to restore the hardware log function from the invalid state.
[0065] An example of the processor firmware update processing provided by the embodiment of the present application is shown in the following table. Figure 5 An example of the processor firmware update processing provided by the embodiment of the present application is shown in the following table. Figure 5As shown, the substrate management controller 101, i.e. BMC; the target processor 102 can be a CPLD, including a first slave device 1021, a second slave device 1022, a log storage space 1023 and a preset storage space 1024; the target memory 103 can be an EEPROM; the mainboard key module 104 can be a CPU (Central Processing Unit), a PCH (Platform Controller Hub), a PSU (PC Power supply unit) and a BBU (Backup Battery Unit) and the like.
[0066] The key physical signals input to the CPLD, wherein when any signal occurs level 0 / 1 or 1 / 0 inversion change, the log recording logic is triggered; after receiving the trigger instruction, the log recording logic writes the level state 0 or 1 of the current signal to the CPLD internal storage space.
[0067] Specifically, for the firmware version upgrade of the CPLD with the hardware log recording function, the hardware signal change during the upgrade process triggers the hardware log recording, resulting in the failure of the hardware log recording function. Therefore, the BMC first writes the CPLD update flag to the register of the I2C slave device Slave1 through I2C. After receiving the update flag, the CPLD will actively shield the log recording function. After writing the CPLD update flag, the BMC will delay the CPLD update. After the CPLD update is completed, the BMC will set the CPLD update flag (such as 55-00), and the CPLD will restore the hardware log recording function. During the shielding of the log recording function, the signal change record will be temporarily stored in the storage space temporarily designed by the CPLD. After the log recording function is released, the temporarily stored information will be written to the log recording space.
[0068] Specifically, the CPLD is downgraded to a version of firmware without hardware logging function, and then upgraded to a version of firmware with hardware logging function. During the process of downgrading to the version of firmware without hardware logging function, the change of hardware signal causes disorder of the hardware logging area. During the process of upgrading, the information of the hardware logging area remains unchanged. After the CPLD is upgraded to the version of firmware with hardware logging function, the hardware signal logging function is invalid. Therefore, during the process of downgrading the CPLD to the version of firmware without hardware logging function, the BMC is downgraded earlier than the CPLD, and the CPLD is still the version of firmware with hardware logging function. During the process of downgrading the CPLD, the change of signal causes disorder of the hardware logging area. After the downgrading is completed and the power is restarted, the logging area is still in a disorder state, but the version of firmware without hardware logging function does not have hardware logging function, and therefore, it is not necessary to be concerned. On the basis of the foregoing, the upgrading operation is performed again. The BMC is upgraded first. After the BMC is upgraded, the automatic restart records the current CPLD version identifier in the EEPROM hung below the BMC. Then, the CPLD is upgraded. After the CPLD is upgraded, the power is restarted. After the BMC is started, the current CPLD version identifier is read, and is compared with the version identifier recorded in the EEPROM. The CPLD first new version identifier with hardware logging function is taken as a reference in the BMC. It is found through comparison that the CPLD is upgraded from the version of firmware without hardware logging function to the version of firmware with hardware logging function, and therefore, the logging collection is triggered once.
[0069] Specifically, the BMC writes the log collection flag bit to the register of the slave device Slave1 of the I2C, and notifies the CPLD to collect the current log and store the log in the register of the slave device Slave2 of the I2C. The BMC delays the collection of the log of the slave device Slave2 of the I2C, and saves the log. At this time, the collected log is the log with recording disorder since the old version. The BMC collects the log, and then writes the log erasing flag bit to the register of the slave device Salve1 of the I2C again, and notifies the CPLD to perform a full erasing operation on the log recording area, so as to clear the log recording area with recording disorder, and restore the hardware log recording to normal. During the process of restarting the CPLD after the upgrading is completed to the erasing of the log recording area, if there is a change of signal, the CPLD will record the change in the temporarily designed storage space first. After the erasing is completed, the change of signal is written to the log recording area again.
[0070] Therefore, the BMC can automatically identify and interpret the log function failure information caused by the CPLD version change without manual intervention; the BMC, the CPLD and the EEPROM cooperate with each other, the BMC performs management, the EEPROM stores information, and the CPLD performs execution, so as to jointly complete the log recording function failure problem caused by the CPLD upgrade and downgrade; during the CPLD upgrade process, the generated hardware signal change information is temporarily stored in the cache space designed by the CPLD, and after the upgrade is completed, the logs in the cache space are recorded to the log recording space again, so as to avoid the problem of log loss.
[0071] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.
[0072] Figure 6 A structural schematic diagram of a processor firmware update processing device provided by the embodiment of the application is shown in the figure. The device can be realized by software and / or hardware, and can be integrated in an electronic device. As shown in the figure, the device is applied to a server and includes: Figure 6
[0073] The first obtaining module 601 is configured to obtain firmware update information of a target processor by a baseboard management controller.
[0074] The second obtaining module 602 is configured to obtain a firmware version update mode of the target processor based on the firmware update information.
[0075] The first sending module 603 is configured to send a shielding log recording function instruction to the target processor by the baseboard management controller in the case that the firmware version update mode is to update the current version firmware of the target processor to target version firmware; and the current version firmware and the target version firmware have a hardware log recording function.
[0076] The first processing module 604 is configured to stop storing the log recording of the received hardware critical physical signal to a log recording storage space and storing the log recording to a preset storage space by the target processor based on the shielding log recording function instruction.
[0077] The updating module 605 is configured to control the target processor to update from the current version firmware to the target version firmware by the baseboard management controller.
[0078] The second sending module 606 is configured to send a log recording function recovery instruction to the target processor.
[0079] The second processing module 607 is configured to acquire, by the target processor, the log record from the preset storage space based on the recovery log record function instruction and write the log record into the log record storage space.
[0080] Optionally, the apparatus further includes: the updating module 605 is further configured to, in a case where the version updating mode is to update the current version firmware of the target processor to the target version firmware and then update the target version firmware of the target processor to the current version firmware, control the target processor to update from the current version firmware to the target version firmware, wherein the current version firmware of the target processor has the hardware log record function and the target version firmware does not have the hardware log record function; a storage updating module is configured to, after the baseboard management controller stores the target version identifier of the target processor into the target memory, control the target processor to update from the target version firmware to the current version firmware; wherein the target processor stores the log record of the received hardware critical physical signal into the preset storage space; a third sending module is configured to, in a case where the current version identifier and the target version identifier are different, send, by the baseboard management controller, a log erasing instruction to the target processor; and a third processing module is configured to, by the target processor, erase the log in the log record storage space and store the log record in the preset storage space into the log record storage space after the log erasing is completed.
[0081] Optionally, the apparatus further includes: a fourth sending module is configured to, in a case where the current version identifier and the target version identifier are different, send, by the baseboard management controller, a log collecting instruction to the target processor; a recording module is configured to, by the target processor, record the log of the received hardware critical physical signal into a target register of the target processor; and a third acquiring module is configured to, after a preset time length, acquire, by the baseboard management controller, the target log from the target register and save the target log.
[0082] Optionally, the third sending module is specifically configured to write, by the baseboard management controller, a log erasing flag bit into a first register of the target processor to send the log erasing instruction.
[0083] Optionally, the fourth sending module is specifically configured to write, by the baseboard management controller, a log collecting flag bit into a second register of the target processor to send the log collecting instruction.
[0084] Optionally, the apparatus further comprises: the updating module 605, further configured to update the firmware of the baseboard management controller to the same firmware version as the target version firmware before the baseboard management controller controls the target processor to update from the current version firmware to the target version firmware; and the updating module 605, further configured to update the firmware of the baseboard management controller to the same firmware version as the current version firmware before the baseboard management controller controls the target processor to update from the target version firmware to the current version firmware.
[0085] Optionally, the second obtaining module 602 is specifically configured to: obtain a current firmware version identifier and a target firmware version identifier based on the firmware update information; compare the current firmware version identifier and the target firmware version identifier with a recorded firmware version identifier respectively; the recorded firmware version identifier is a firmware version identifier with a hardware log recording function; when the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is greater than or equal to the recorded firmware version identifier, determine a firmware version update mode of updating the current version firmware of the target processor to the target version firmware; the current version firmware and the target version firmware have the hardware log recording function; when the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is less than the recorded firmware version identifier, determine a firmware version update mode of updating the current version firmware of the target processor to the target version firmware and then updating the target version firmware of the target processor to the current version firmware; the current version firmware of the target processor has the hardware log recording function and the target version firmware does not have the hardware log recording function.
[0086] Optionally, the first sending module 603 is specifically configured to: write an update flag bit into a third register of the target processor by the baseboard management controller through a bus to send the shielding log recording function instruction.
[0087] Optionally, the second sending module 606 is specifically configured to: send a recovery log recording function instruction to the target processor by the baseboard management controller, comprising: set the update flag bit in the third register of the target processor by the baseboard management controller through the bus to send the recovery log recording function instruction.
[0088] The description of the features in the embodiments of the processor firmware update processing apparatus can refer to the related description of the embodiments of the processor firmware update processing method, which will not be repeated here.
[0089] The embodiment of the present application further provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the processor firmware updating processing method embodiments.
[0090] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the processor firmware updating processing method embodiments when running.
[0091] In an example embodiment, the computer readable storage medium can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0092] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the processor firmware updating processing method embodiments.
[0093] The embodiment of the present application further provides another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the processor firmware updating processing method embodiments.
[0094] The skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0095] The above describes in detail a processor firmware updating processing provided by the present application. The principles and implementation manners of the present application are described by applying specific examples in the present text, and the above description of the examples is only applicable to help understand the method of the present application and its core idea. It should be noted that, for the ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A CPLD firmware update processing method, characterized in that, The method includes: The substrate management controller obtains firmware update information of the complex programmable logic device (CPLD) and obtains the firmware version update mode of the CPLD based on the firmware update information. When the firmware version update mode is to update the current firmware version of the CPLD to the target firmware version, the baseboard management controller sends a command to the CPLD to disable the logging function; wherein the current firmware version and the target firmware version have hardware logging function; The CPLD, based on the instruction to disable logging, stops storing logs of received key physical signals to the log storage space and stores the logs to a preset storage space; wherein, the log storage space is the original storage space where the CPLD stores logs; the preset storage space is a temporary storage space designed by the CPLD for storing logs generated during firmware upgrades. The baseboard management controller controls the CPLD to update from the current firmware version to the target firmware version, and sends a recovery log recording function instruction to the CPLD. The CPLD then retrieves the log records from the preset storage space and writes them into the log recording storage space based on the recovery log recording function instruction.
2. The CPLD firmware update processing method according to claim 1, characterized in that, The method further includes: When the version update mode is to update the current firmware version of the CPLD to the target firmware version and then update the target firmware version of the CPLD to the current firmware version, the baseboard management controller controls the CPLD to update from the current firmware version to the target firmware version; wherein the current firmware version of the CPLD has a hardware logging function and the target firmware version does not have a hardware logging function. After the baseboard management controller obtains the target version identifier of the CPLD and stores it in the target memory, it controls the CPLD to update from the target version firmware to the current version firmware; wherein, the CPLD stores the log records of receiving key physical signals of hardware in the preset storage space; If the current version identifier and the target version identifier are different, the baseboard management controller sends a log erasure command to the CPLD. The CPLD erases the logs in the log record storage space and stores the log records in the preset storage space after the log erasure is completed.
3. The CPLD firmware update processing method according to claim 2, characterized in that, The method further includes: If the current version identifier and the target version identifier are different, the baseboard management controller sends a log collection instruction to the CPLD, and the CPLD records the logs of the received hardware key physical signals to the target register of the CPLD; After a preset time period, the baseboard management controller retrieves the target log from the target register and saves it.
4. The CPLD firmware update processing method according to claim 2, characterized in that, The baseboard management controller sends a log erase command to the CPLD, including: The baseboard management controller writes the log erase flag into the first register of the CPLD via the bus to send the log erase command.
5. The CPLD firmware update processing method according to claim 3, characterized in that, The baseboard management controller sends a log collection instruction to the CPLD, including: The baseboard management controller writes the log collection flag bit into the second register of the CPLD to send the log collection command.
6. The CPLD firmware update processing method according to claim 2, characterized in that, The method further includes: Before the baseboard management controller controls the CPLD to update from the current firmware version to the target firmware version, the firmware of the baseboard management controller is updated to the same firmware version as the target firmware version; Before the baseboard management controller controls the CPLD to update from the target version firmware to the current version firmware, the firmware of the baseboard management controller is updated to the same firmware version as the current version firmware.
7. The CPLD firmware update processing method according to claim 1, characterized in that, The step of obtaining the firmware version update mode of the CPLD based on the firmware update information includes: Based on the firmware update information, obtain the current firmware version identifier and the target firmware version identifier; The current firmware version identifier, the target firmware version identifier, and the recorded firmware version identifier are compared respectively; wherein, the recorded firmware version identifier is a firmware version identifier with hardware logging function; When the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is greater than or equal to the recorded firmware version identifier, it is determined that the current firmware version of the CPLD will be updated to the firmware version update mode of the target firmware version; wherein, the current firmware version and the target firmware version have hardware log recording function; When the current firmware version identifier is greater than or equal to the recorded firmware version identifier and the target firmware version identifier is less than the recorded firmware version identifier, a firmware version update mode is determined to update the current firmware version of the CPLD to the target firmware version and then update the target firmware version of the CPLD to the current firmware version; wherein the current firmware version of the CPLD has a hardware log recording function and the target firmware version does not have a hardware log recording function.
8. The CPLD firmware update processing method according to claim 1, characterized in that, The baseboard management controller sends a command to the CPLD to disable the log recording function, including: The baseboard management controller writes the update flag bit into the third register of the CPLD via the bus to send the instruction for the masked log recording function.
9. The CPLD firmware update processing method according to claim 8, characterized in that, The baseboard management controller sends a recovery log recording function instruction to the CPLD, including: The baseboard management controller sets the update flag bit in the third register of the CPLD via the bus to send the recovery log recording function instruction.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the CPLD firmware update processing method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
BMC upgrading log storage method and system, equipment and medium
CN114003575A