Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the application.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that some aspects of the application are consistent.
Only for describing the object of specific embodiment at term used in this application, and not intended to be limiting the application." one ", " described " and " being somebody's turn to do " of the singulative used in the application and appended claims is also intended to comprise most form, unless context clearly represents other implications.It is also understood that term "and/or" used herein refer to and comprise one or more project of listing be associated any or all may combine.
Term first, second, third, etc. may be adopted although should be appreciated that to describe various information in the application, these information should not be limited to these terms.These terms are only used for the information of same type to be distinguished from each other out.Such as, when not departing from the application's scope, the first information also can be called as the second information, and similarly, the second information also can be called as the first information.Depend on linguistic context, word as used in this " if " can be construed as into " ... time " or " when ... time " or " in response to determining ".
Usually HOST (master) CPU (Central Processing Unit is comprised in server, central processing unit) and BMC (Baseboard Management Controller, baseboard management controller) CPU, wherein, host CPU is used for business processing, and BMC CPU is used for server state monitoring, outband management and firmware upgrade etc.When the firmware upgrade in server makes mistakes, such as, server power failure in escalation process, then server cannot normally start.
In order to avoid the problems referred to above, prior art adopts the mode of ROM backup, increases a slice ROM in the server and carries out firmware backup, when main ROM upgrading makes mistakes, is switched to backup ROM, utilizes the firmware in backup ROM to start server; Or directly for server selects a slice Large Copacity ROM, mark off boot section, main area and spare area from this ROM, boot section is first run under normal circumstances, guide CPU to be operated in main area, when main area upgrading makes mistakes, be switched to spare area and start server.Technique scheme reduces the probability that server can not start to a certain extent, but too increases the cost of server simultaneously, and cannot solve firmware upgrade success but cannot starting of causing due to incompatible version.
For prior art Problems existing, the application proposes a kind of firmware restoration method, the method adopts carries out firmware restoration independent of the BMC system of main system, when determining that the host CPU caused due to firmware upgrade starts unsuccessfully, arbitrary version firmware that respective modules successfully upgraded can be obtained carry out firmware restoration from memory device.
See Fig. 1, be the server architecture schematic diagram shown in the embodiment of the present application, this schematic diagram illustrate only the main modular in server.HOST CPU is used for business processing; PCH (Platform ControllerHub, south bridge) is for the Peripheral Interface of extension CPU; BMC CPU is used for server state monitoring, outband management and firmware upgrade etc.; BMC ROM is for storing the program of BMC system; ME (Management Engine, management engine) is for initialization and management whole system; BIOS (BasicInput Output System, Basic Input or Output System (BIOS)) is for saved system setting and system self-triggered program etc.; LOGIC (logic) is the digital integrated circuit of a kind of user constitutive logic function voluntarily according to needing separately; Memory device is for preserving the information such as server log.Wherein, preserve respective module in ME, BIOS and LOGIC module respectively and run required firmware.
See Fig. 2, be an embodiment process flow diagram of the application's firmware restoration method, this embodiment is described firmware restoration process.
Step 201, when described host CPU starts unsuccessfully, in determination module, whether current version firmware can be used.
See Fig. 1, the module (ME, BIOS and LOGIC module) of carrying out firmware upgrade and recovery in the embodiment of the present application, is needed all to be connected on BMC CPU, so that BMC CPU operates corresponding module.In below describing, mentioned module all refers to the module comprising firmware.
When host CPU starts unsuccessfully, whether BMC CPU inquires about current version firmware in coupled modules and can use, to determine whether because firmware upgrade causes host CPU to start.BMC CPU all proceeds as follows each module:
The firmware information of current version firmware in acquisition module, verifies the firmware information obtained, is handled as follows according to check results.
When the firmware information verified is incorrect, illustrate that this module may be made mistakes when upper once firmware upgrade, cause the firmware that is written in module incorrect, or this firmware damages in operational process, now, confirms that in this module, current version firmware is unavailable.
When the firmware information verified is correct, successful writing module when last firmware upgrade is described.Now, can judge whether the upgrading mark that there is this module further, this upgrading is masked as the mark arranged after BMC CPU successfully writes firmware to module.
When there is this upgrading mark, after last firmware upgrade is described, host CPU unsuccessful startup, may be because incompatible version causes host CPU to start, now, determine that in this module, current version firmware is unavailable equally.
When there is not this upgrading mark, last firmware upgrade success is described, and after upgrading, host CPU once normally started.Here need supplementary notes a bit, after module successfully writes firmware (namely arranging upgrading mark), if host CPU starts successfully, BMC CPU can remove upgrading mark.Therefore, when firmware information correctly and do not exist again upgrading mark (the current version firmware in module once successfully started) time, confirm that in this module, current version firmware can be used, this time host CPU starts is not unsuccessfully because firmware upgrade mistake causes, without the need to carrying out firmware version recovery, prompting keeper carries out other investigation.
Step 202, when described current version firmware is unavailable, obtains the version firmware that respective modules was successfully upgraded from memory device.
When unavailable by the current version firmware in step 201 determination module, start firmware restoration flow process.In the embodiment of the present application; all version firmwares of once successfully upgrading all are kept in memory device; when current version firmware is unavailable, arbitrary version firmware of successfully upgrading before can obtaining from memory device recovers, and certainly usually can select the version firmware that success is in the recent period upgraded.Without restriction to memory device, as long as can storing firmware, such as expansion ROM, the existing storer of system be as external memory storage etc.As preferably, mentioned in server that configure storage devices is for preserving the files such as daily record in aforementioned description, the application's preferred embodiment directly utilizes this memory device to preserve the firmware version of each module, therefore, can not increase extra hardware cost.Such as, the external memory such as SD (Secure Digital MemoryCard, safe digital card), eMMC (Embedded Multi Media Card, embedded multi-media card) can be selected as memory device.
Step 203, carries out firmware restoration according to described version firmware of successfully upgrading to described respective modules.
As previously mentioned, preserve all version firmwares of successfully upgrading in memory device, each version firmware just can be saved in memory device after successful writing module, also can after firmware success writing module and host CPU is successfully restarted time, then carry out firmware preservation.For rear a kind of preserving type, be specially, when host CPU starts successfully, in judge module, whether current version firmware is preserved, if current version firmware is not preserved in module, is then saved in memory device by the current version firmware in this module.This processing mode can ensure that each version firmware preserved in memory device is all the firmware of restarting authenticated (eliminating incompatible version problem) after successfully upgrading through host CPU, to improve in memory device preserve the validity of firmware, save storage space.
In addition, except the firmware of each module can be preserved separately in memory device, the compatible Matching Relationship of modules current operation firmware version can also be preserved, detailed process is: by after in module, current version firmware is saved in memory device, obtain the current version information of firmware in all modules, the corresponding relation of the current version information of firmware in record modules, this corresponding relation is saved in memory device, so that at service exception, (the incompatible upper-layer service process caused is abnormal between due to disparate modules firmware or between firmware and operating system, such as, network is obstructed, running software reports an error, degradation under CPU handling property) time, BMC CPU can recover order (such as according to the version received, user can when judging service exception, order is recovered) by the operation interface input version of server, automatically a version information corresponding relation preserved is selected from memory device, firmware restoration is carried out to multiple module simultaneously, to ensure the normal operation of business.
Described as can be seen from above, the application adopts and carries out firmware restoration independent of the BMC system of main system, when determining that the host CPU caused due to firmware upgrade starts unsuccessfully, arbitrary version firmware that respective modules successfully upgraded can be obtained carry out firmware restoration from memory device.Effectively can reduce by the application the risk that host CPU cannot start, and can detect that the system caused due to incompatible version cannot start.
Now still for Fig. 1, introduce firmware restoration process in detail.
In Fig. 1, BMC CPU can carry out firmware upgrade and recovery to ME, BIOS and LOGIC module.Suppose, the current version of firmware number run in modules is ME2.0, BIOS3.0 and LOGIC2.0, and in memory device, saved firmware and the edition compatibility relation (the version corresponding relation of ME2.0, BIOS3.0 and LOGIC2.0) of above-mentioned version, under current version compatibility relation, server service normal operation.
Carry out firmware upgrade to ME module, upgraded version is, after ME3.0, ME3.0 firmware successfully writes ME module, arrange upgrading and be designated 1.Now, host CPU is restarted.If host CPU is restarted unsuccessfully, host CPU notices unexpected message to BMC CPU.BMC CPU knows that host CPU is restarted unsuccessfully, the firmware information in verification modules, to determine whether because the host CPU caused of upgrading starts unsuccessfully.
Be specially, when BIOS module and LOGIC module verification succeeds, and when ME module verifies unsuccessfully, illustrate that in ME module, current version firmware is unavailable, need to carry out firmware restoration; Or when BIOS module, LOGIC module and ME module all verification succeeds, but when upgrading is designated 1, illustrate that firmware upgrade write is successful, but host CPU normally cannot start, therefore, the upgraded version in ME module is unavailable, needs to carry out firmware restoration.
When BIOS module, LOGIC module and ME module all verification succeeds, and when upgrading is designated 0, illustrate that host CPU was once successfully restarted after firmware upgrade, therefore, this time start unsuccessfully not because firmware upgrade causes, keeper needs to carry out other investigation.
When determining that ME module needs to carry out firmware restoration, the version firmware of once successfully upgrading in ME module is obtained from memory device, such as, ME2.0, re-writes ME module and carries out firmware restoration, supposes that ME2.0 is the version once normally run, therefore, after firmware restoration, host CPU can normally start, thus the normal process of the business of guarantee.
Above-mentioned is the firmware restoration process of host CPU when starting unsuccessfully.Suppose, ME3.0 successfully writes ME module, and host CPU starts successfully, and current upgrading is masked as 1, illustrates that current is that first after firmware upgrade successfully starts, arranges upgrading and be masked as 0.
BMC CPU can after host CPU normally starts, judge whether preserved ME3.0 version firmware in memory device, when not preserving, ME3.0 firmware is saved in memory device, and preserves the firmware version compatibility relation (the version corresponding relation of ME3.0, BIOS3.0 and LOGIC2.0) run in current modules.
Suppose, current host CPU starts normal, but business cannot normal process, user issues version recovery order by the operation interface of server to BMC CPU, BMC CPU can recover order according to version and delete current disabled edition compatibility relation, from memory device, select other edition compatibility relation of once preserving to carry out overall firmware restoration, such as, select the version corresponding relation of ME2.0, BIOS3.0 and the LOGIC2.0 preserved to carry out firmware restoration, can normal business processing be carried out with Deterministic service device.
Corresponding with the embodiment of aforementioned firmware restoration method, present invention also provides the embodiment of firmware restoration device.
The embodiment of the application's firmware restoration device can be applied on the server.Device embodiment can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.For software simulating, as the device on a logical meaning, be run computer program instructions corresponding in BMCROM by the BMC CPU of its place server to be formed.Say from hardware view, as shown in Figure 3, for a kind of hardware structure diagram of the application's firmware restoration device place server, except the BMC CPU shown in Fig. 3, module and BMC ROM, in embodiment, the server at device place is usually according to the actual functional capability of this server, other hardware can also be comprised, this is repeated no more.
Please refer to Fig. 4, is the structural representation of the firmware restoration device in the application's embodiment.This firmware restoration device comprises determining unit 401, acquiring unit 402 and recovery unit 403, wherein:
Determining unit 401, for when described host CPU starts unsuccessfully, determines in each module, whether current version firmware can be used;
Acquiring unit 402, for when described current version firmware is unavailable, obtains the version firmware that respective modules was successfully upgraded from memory device;
Recovery unit 403, for carrying out firmware restoration according to described version firmware of successfully upgrading to described respective modules.
Further,
Described memory device is external memory.
Further,
Described determining unit 401, specifically for obtaining the firmware information of current version firmware in described module; When described firmware information is incorrect, or described firmware information is correct and when there is upgrading mark, confirm that in described module, current version firmware is unavailable, described upgrading is masked as the mark arranged after described BMC CPU successfully writes firmware to module; When described firmware information correctly and do not exist upgrading mark time, confirm that in described module, current version firmware can be used.
Further, described firmware restoration device, also comprises:
Clearing cell, during for starting successfully when described host CPU and there is upgrading mark, removes described upgrading mark.
Further, described firmware restoration device, also comprises:
Storage unit, for when described host CPU starts successfully, in judge module, whether current version firmware is preserved; When in described module, current version firmware is not preserved, current version firmware in described module is saved in described memory device.
Further, described firmware restoration device, also comprises:
Described storage unit, also for after being saved in described memory device by current version firmware in described module, obtains the current version information of firmware in described multiple module; The corresponding relation of the current version information of firmware in described multiple module is saved in described memory device;
Described recovery unit 403, also for when service exception, the version receiving input recovers order, selects the version information corresponding relation of multiple modules of preserving; Version information corresponding relation according to selecting carries out firmware restoration to described multiple module.
In said apparatus, the implementation procedure of the function and efficacy of unit specifically refers to the implementation procedure of corresponding step in said method, does not repeat them here.
For device embodiment, because it corresponds essentially to embodiment of the method, so relevant part illustrates see the part of embodiment of the method.Device embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the application's scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, within all spirit in the application and principle, any amendment made, equivalent replacements, improvement etc., all should be included within scope that the application protects.