Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application.
" one kind " of singulative used in the application and appended claims, " described " and "the" are also intended to including majority
Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped
Containing the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing from
In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determining ".
HOST (master) CPU (Central Processing Unit, central processing unit) and BMC is generally comprised in server
(Baseboard Management Controller, baseboard management controller) CPU, wherein, host CPU is used for business processing,
BMC CPU are used for server state monitoring, outband management and firmware upgrade etc..When the firmware upgrade error in server,
For example, server power failure in escalation process, then server will be unable to normally start.
In order to avoid above mentioned problem, prior art increases a piece of ROM in the server by the way of ROM backups
Firmware backup is carried out, when main ROM, which upgrades, to malfunction, is switched to backup ROM, starts server using the firmware backed up in ROM;Or
Person directly selects a piece of Large Copacity ROM for server, and boot section, main area and spare area, normal condition are marked off from the ROM
Lower boot section is first run, and guiding CPU is operated in main area, when main area, which upgrades, to malfunction, is switched to spare area and is started server.
Above-mentioned technical proposal reduces the probability that server can not start to a certain extent, but also increase simultaneously server into
This, and can not solve firmware upgrade success but can not start caused by incompatible version.
The problem of existing for prior art, the application propose a kind of firmware restoration method, and this method is using independent
In main system BMC systems carry out firmware restoration, it is determined that due to caused by firmware upgrade host CPU start failure when, Ke Yicong
Any version firmware that respective modules had successfully upgraded is obtained in storage device and carries out firmware restoration.
It is the server architecture schematic diagram shown in the embodiment of the present application referring to Fig. 1, the schematic diagram illustrate only in server
Main modular.HOST CPU are used for business processing;PCH (Platform Controller Hub, south bridge) is used for extension CPU
Peripheral Interface;BMC CPU are used for server state monitoring, outband management and firmware upgrade etc.;BMC ROM are used to store
The program of BMC systems;ME (Management Engine, management engine) is used to initializing and managing whole system;BIOS
(Basic Input Output System, basic input output system) is used to preserve system setting and system self-starting journey
Sequence etc.;LOGIC (logic) is a kind of user according to respective need and voluntarily digital integrated electronic circuit of constitutive logic function;Storage is set
It is ready for use on and preserves the information such as server log.Wherein, respective module operation institute is preserved in ME, BIOS and LOGIC module respectively
Need firmware.
Referring to Fig. 2, for one embodiment flow chart of the application firmware restoration method, the embodiment is to firmware restoration process
It is described.
Step 201, when the host CPU starts failure, whether current version firmware can use in determining module.
Referring to Fig. 1, need to carry out module (ME, BIOS and LOGIC of firmware upgrade and recovery in the embodiment of the present application
Module) all it is connected on BMC CPU, so that BMC CPU operate to corresponding module.Module mentioned in description refers both to below
Module comprising firmware.
When host CPU starts failure, whether BMC CPU inquire about current version firmware in coupled modules may be used
With to determine whether because firmware upgrade causes host CPU not start.BMC CPU proceed as follows to each module:
The firmware information of current version firmware in acquisition module, is verified to the firmware information of acquisition, is tied according to verification
Fruit is handled as follows.
When the firmware information of verification is incorrect, illustrates that the module may malfunction in upper once firmware upgrade, cause to write
The firmware entered into module is incorrect, or, the firmware damages in the process of running, now, confirms current version in the module
Firmware is unavailable.
When the firmware information of verification is correct, illustrate to be successfully written into module during last firmware upgrade.Now, one can be entered
Step judges whether the upgrading mark of the module, and the upgrading is masked as BMC CPU and is successfully written what is set after firmware to module
Mark.
When the upgrading mark be present, after illustrating last firmware upgrade, host CPU does not successfully start up, it may be possible to due to
Incompatible version causes host CPU not start, and now, equally determines that current version firmware is unavailable in the module.
When in the absence of the upgrading mark, illustrate last firmware upgrade success, and host CPU once normally started after upgrading
Cross.Need exist for supplementary notes a bit, after module is successfully written firmware (set upgrading mark), if host CPU start into
Work(, BMC CPU can remove upgrading mark.Therefore, when firmware information is correct and upgrading mark (the current version in module is not present again
This firmware once successfully started up) when, confirm that current version firmware can use in the module, this time host CPU start failure be not by
Cause in firmware upgrade mistake, without carrying out firmware version recovery, prompt keeper to carry out other investigations.
Step 202, when the current version firmware is unavailable, acquisition respective modules successfully upgraded from storage device
Version firmware.
When the current version firmware in by step 201 determining module is unavailable, start firmware restoration flow.The application
In embodiment, all version firmwares once successfully upgraded are maintained in storage device, unavailable in current version firmware
When, any version firmware successfully upgraded before being obtained from storage device is recovered, and would generally be selected certainly in the recent period
The version firmware that success upgrades.It is without restriction to storage device, if firmware can be stored, for example expansion ROM, system are
Some memories such as external memory storage etc..Preferably, storage device is configured in server it is used to protect in described above mentioned
The files such as daily record are deposited, the application preferred embodiment directly preserves the firmware version of each module using the storage device, therefore, will not
Increase extra hardware cost.For example, can select SD (Secure Digital Memory Card, safe digital card),
The external memories such as eMMC (Embedded Multi Media Card, embedded multi-media card) are as storage device.
Step 203, firmware restoration is carried out to the respective modules according to the version firmware successfully upgraded.
As it was previously stated, preserving all version firmwares successfully upgraded in storage device, each version firmware can successfully write
Just it is saved in after entering module in storage device, can also be after firmware is successfully written module and when host CPU be successfully restarted, then carry out
Firmware preserves.For latter preserving type, specifically, when host CPU starts successfully, current version firmware is in judge module
It is no to have preserved, if current version firmware does not preserve in module, the current version firmware in the module is saved in storage and set
In standby.Each version firmware that the processing mode can ensure to preserve in storage device is all to restart to test through host CPU after successfully upgrading
The firmware demonstrate,proved and (eliminate incompatible version problem), improves the validity that firmware is preserved in storage device, saves and deposit
Store up space.
In addition, it can also preserve modules except can individually preserve each module firmware in storage device and currently transport
The compatible support relation of row firmware version, detailed process are:Current version firmware in module is being saved in it in storage device
Afterwards, the current version information of firmware in all modules is obtained, records the corresponding pass of the current version information of firmware in modules
System, the corresponding relation is saved in storage device, so as in service exception (due between disparate modules firmware or firmware and behaviour
Incompatible caused upper-layer service processing is abnormal between making system, such as, network is obstructed, and running software reports an error, CPU process performances
Decline etc.) when, BMC CPU can recover order (for example, user can pass through when judging service exception according to the version received
The operation interface input version of server recovers order), a version information pair preserved is automatically selected from storage device
It should be related to, firmware restoration be carried out simultaneously to multiple modules, to ensure the normal operation of business.
It can be seen from above description the application use independently of main system BMC systems carry out firmware restoration, it is determined that
When starting failure due to host CPU caused by firmware upgrade, it can obtain what respective modules had successfully upgraded from storage device
Any version firmware carries out firmware restoration.The risk that host CPU can not start can effectively be reduced by the application, and can be detected
Because system caused by incompatible version can not start.
Now still by taking Fig. 1 as an example, firmware restoration process is discussed in detail.
BMC CPU can carry out firmware upgrade and recovery to ME, BIOS and LOGIC module in Fig. 1.It is assumed that each mould
The current version of firmware number run in block is ME2.0, BIOS3.0 and LOGIC2.0, and has been saved in storage device
The firmware and edition compatibility relation (ME2.0, BIOS3.0 and LOGIC2.0 version corresponding relation) of version are stated, current
Under edition compatibility relation, server service normal operation.
Firmware upgrade is carried out to ME modules, after upgraded version ME3.0, ME3.0 firmware is successfully written ME modules, sets and rises
Level is identified as 1.Now, host CPU is restarted.If host CPU is restarted unsuccessfully, host CPU notices unexpected message to BMC CPU.BMC CPU are obtained
After knowing that host CPU is restarted unsuccessfully, the firmware information in modules is verified, to determine whether because host CPU caused by upgrading starts
Failure.
Specifically, when BIOS module and LOGIC modules verify successfully, and the verification of ME modules fails, illustrate in ME modules
Current version firmware is unavailable, it is necessary to carry out firmware restoration;Or when BIOS module, LOGIC modules and ME modules all verify
Successfully, when but upgrading is identified as 1, illustrate that firmware upgrade write-in is successful, but host CPU can not normally start, therefore, ME moulds
Upgraded version in block is unavailable, it is necessary to carry out firmware restoration.
When BIOS module, LOGIC modules and ME modules all verify success, and upgrading is identified as 0, illustrate that host CPU exists
Once successfully restarted after firmware upgrade, and therefore, this time started and be unsuccessfully not due to caused by firmware upgrade, keeper needs to carry out
Other investigations.
When it is determined that ME modules need to carry out firmware restoration, obtain from storage device and once successfully upgraded in ME modules
Version firmware, for example, ME2.0, re-write ME modules and carry out firmware restoration, it is assumed that ME2.0 once cross by normal operation
Version, therefore, after firmware restoration, host CPU can normally start, so as to ensure the normal processing of business.
Above-mentioned is firmware restoration process when host CPU starts failure.It is assumed that ME3.0 is successfully written ME modules, and host CPU
Start successfully, current upgrading is masked as 1, illustrate it is currently first successfully starting up after firmware upgrade, setting upgrading is masked as 0.
BMC CPU can judge that ME3.0 versions whether had been preserved in storage device to be consolidated after host CPU normally starts
Part, when not preserving, ME3.0 firmwares are saved in storage device, and preserve the firmware being currently running in current modules
Edition compatibility relation (ME3.0, BIOS3.0 and LOGIC2.0 version corresponding relation).
It is assumed that current host CPU starts normally, but business can not be handled normally, and user can pass through operation circle of server
Version is issued towards BMC CPU and recovers order, and it is simultaneous that BMC CPU can recover the version that order deletion is currently unavailable according to version
Appearance relation, the other edition compatibility relations for selecting once to preserve from storage device carry out overall firmware restoration, for example, choosing
The version corresponding relation for selecting ME2.0, BIOS3.0 and LOGIC2.0 for preserving carries out firmware restoration, to ensure that server can
To carry out normal business processing.
Corresponding with the embodiment of foregoing firmware restoration method, present invention also provides the embodiment of firmware restoration device.
The embodiment of the application firmware restoration device can be applied on the server.Device embodiment can be real by software
It is existing, it can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as on a logical meaning
Device, it is to run corresponding computer program instructions in BMC ROM by the BMC CPU of server where it to be formed.From hard
For part aspect, as shown in figure 3, being a kind of hardware structure diagram of the application firmware restoration device place server, except Fig. 3 institutes
Outside BMC CPU, module and the BMC ROM that show, the reality of server in embodiment where device generally according to the server
Border function, other hardware can also be included, this is repeated no more.
Fig. 4 is refer to, is the structural representation of the firmware restoration device in the application one embodiment.The firmware restoration fills
Put including determining unit 401, acquiring unit 402 and recovery unit 403, wherein:
Determining unit 401, for when the host CPU starts failure, determining that current version firmware is in each module
It is no available;
Acquiring unit 402, for when the current version firmware is unavailable, obtained from storage device respective modules into
The version firmware that work(upgraded;
Recovery unit 403, it is extensive for carrying out firmware to the respective modules according to the version firmware successfully upgraded
It is multiple.
Further,
The storage device is external memory.
Further,
The determining unit 401, the firmware information specifically for obtaining current version firmware in the module;When described solid
Part information is incorrect, or, the firmware information is correct and when upgrading mark be present, confirms current version firmware in the module
Unavailable, the upgrading is masked as the BMC CPU and the mark set after firmware is successfully written to module;When the firmware information
During correctly and in the absence of upgrading mark, confirm that current version firmware can use in the module.
Further, the firmware restoration device, in addition to:
Clearing cell, for when the host CPU starts successfully and upgrading mark be present, removing the upgrading mark.
Further, the firmware restoration device, in addition to:
Storage unit, for when the host CPU starts successfully, whether current version firmware to have preserved in judge module;
When current version firmware does not preserve in the module, current version firmware in the module is saved in the storage device
In.
Further, the firmware restoration device, in addition to:
The storage unit, it is additionally operable to current version firmware in the module being saved in it in the storage device
Afterwards, the current version information of firmware in the multiple module is obtained;By the current version information of firmware in the multiple module
Corresponding relation is saved in the storage device;
The recovery unit 403, the version for being additionally operable to, when service exception, receive input recover order, and selection preserved
Multiple modules version information corresponding relation;Firmware is carried out to the multiple module according to the version information corresponding relation of selection
Recover.
The function of unit and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatus
Implementation process, it will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method
Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component
The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also
It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality
Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application
God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.