Disclosure of Invention
The embodiment of the invention provides a switching method of a BIOS chip and a substrate management controller, which are used for quickly solving the problem that a server cannot be started due to the failure of the BIOS chip.
A first aspect of an embodiment of the present invention provides a method for switching a BIOS chip, including:
the method comprises the steps that a Baseboard Management Controller (BMC) receives an operation instruction, wherein the operation instruction is a starting instruction for a server, and the server comprises a first BIOS chip and a second BIOS chip;
the BMC monitors whether a first signal sent by the first BIOS chip is received within a first time length and whether a second signal sent by the first BIOS chip is received within a second time length, wherein the first time length and the second time length are different time lengths, and the second time length is a time length after the first time length;
if the BMC does not receive the first signal within the first time length or does not receive the second signal within the second time length, the BMC switches the first BIOS chip to the second BIOS chip to restart the service.
Optionally, the monitoring, by the BMC, whether a first signal sent by the first BIOS chip is received within a first duration, and whether a second signal sent by the first BIOS chip is received within a second duration includes:
the BMC monitors state changes of general purpose input/output (GPIO) between the first time length and the first BIOS chip, and monitors state changes of GPIO between the second time length and the first BIOS chip to judge whether the first signal is received within the first time length and whether the second signal is received within the second time length;
or, the BMC monitors a sending log between the first BIOS chip and the second BIOS chip within the first time period, and monitors a sending log between the first BIOS chip and the second BIOS chip within the second time period to determine whether the first signal is received within the first time period, and whether the second signal is received within the second time period.
Optionally, when the BMC receives the first signal within the first time period and the BMC receives the second signal within the second time period, the method further includes:
the BMC determines that the server is started.
Optionally, the first duration is less than the second duration.
A second aspect of the embodiments of the present invention provides a BMC, which specifically includes:
the server comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving an operation instruction, the operation instruction is a starting instruction for the server, and the server comprises a first BIOS chip and a second BIOS chip;
the monitoring unit is used for monitoring whether a first signal sent by the first BIOS chip is received within a first time length and whether a second signal sent by the first BIOS chip is received within a second time length, wherein the first time length and the second time length are different time lengths, and the second time length is a time length after the first time length;
and the switching unit is used for switching the first BIOS chip to the second BIOS chip to restart the service if the first signal is not received within the first time length or the second signal is not received within the second time length.
Optionally, the monitoring unit is specifically configured to:
monitoring state changes of general purpose input/output (GPIO) between the first BIOS chip and the first time length and monitoring state changes of GPIO between the second BIOS chip and the first BIOS chip within the second time length so as to judge whether the first signal is received within the first time length and whether the second signal is received by the BMC within the second time length;
or monitoring a sending log between the first BIOS chips in the first time length and monitoring a sending log between the second time length and the first BIOS chips to judge whether the first signal is received in the first time length and whether the second signal is received in the second time length.
Optionally, the BMC further comprises:
a determining unit, configured to determine that the server is started up when the first signal is received within the first duration and the second signal is received within the second duration.
Optionally, the first duration is less than the second duration.
A third aspect of embodiments of the present invention provides a processor for executing a computer program, where the computer program executes to perform the steps of the method according to the above aspects.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, performs the steps of the method of the aspects described above.
As can be seen from the above technical solutions, in the embodiment of the present invention, the second BIOS chip and the second BIOS chip are set in the server, and two monitoring points are set for the BIOS chip: the starting and the starting are completed to monitor the two monitoring points, whether the BIOS chip can be normally started or not is automatically detected, and the BIOS chip is automatically switched to the second BIOS chip under the condition that the first BIOS chip is abnormally started, so that the problem that a server system cannot be normally started is quickly solved, and manpower and material resources are saved.
Detailed Description
The embodiment of the invention provides a switching method of a BIOS chip and a substrate management controller, which are used for quickly solving the problem that a server system cannot be started due to the fault of the BIOS chip.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the BIOS startup process, a BMC (Baseboard Management Controller) sets two monitoring points to the BIOS startup process, where the first monitoring point is the early stage of the BIOS startup, the BMC starts to time after detecting a system startup signal, and if a startup start signal sent by the BIOS is not received within a certain time, for example, about 5 seconds, the BMC considers that the startup BIOS chip cannot normally start the system, so as to automatically switch the BIOS chip to a redundant chip. The second monitoring point is the later stage of system startup, when the first monitoring point signal is received, the timer is re-timed, and after a period of time, for example, the signal that the BIOS is started up cannot be received by the BMC within 10 minutes after the first signal is received, so that the BMC considers that the BIOS cannot normally start up the system, automatically switches the BIOS chip to the redundant chip, and starts up the system again. The signals for the BIOS to communicate with the BMC may be changed in state by GPIO (General Purpose Input/Output) or may be sent to the BMC in a series of manners such as sending a log.
Two BIOS chips are installed on the server, and BIOS programs capable of being started are burnt. By the method for monitoring the BIOS starting signal through the BMC, when one BIOS chip cannot be normally started, the BIOS chip is automatically switched to the redundant BIOS chip for starting, so that the time for manual detection and manual switching of the BIOS is shortened, and the problem that a server cannot be started is automatically and quickly solved.
Referring to fig. 1, fig. 1 is a schematic diagram of an embodiment of a switching method of a BIOS chip according to an embodiment of the present invention, including:
101. the BMC receives the operation instruction.
In this embodiment, the BMC may receive an operation instruction, where the operation instruction is a start instruction (i.e., a power-on instruction) for the server, and the server includes a first BIOS chip and a second BIOS chip, where the first BIOS chip is a main chip of the server and the second BIOS chip is a redundant chip of the server.
102. The BMC monitors whether a first signal sent by the first BIOS chip is received within a first time period and whether a second signal sent by the first BIOS chip is received within a second time period, if the BMC does not receive the first signal within the first time period or the BMC does not receive the second signal within the second time period, step 103 is executed, and if the BMC receives the first signal within the first time period and the BMC receives the second signal within the second time period, step 104 is executed.
In this embodiment, the BMC may monitor whether a first signal sent by the first BIOS chip is received within a first duration in real time, and monitor whether a second signal sent by the first BIOS chip is received within a second duration, where the first duration and the second duration are different durations, and the second duration is a duration after the first duration, and the specific first duration may be less than the second duration. That is, the BMC may monitor in real time whether the signal sent by the first BIOS chip is received within the first duration and the second duration, and if the BMC receives the first start signal (i.e., the signal for starting the server) sent by the first BIOS chip within the first duration, for example, within about 5 seconds, no operation is performed. If the first signal is not received, step 103 is executed, and after receiving the first signal, the BMC counts again, and if the BMC does not receive the second signal (i.e., the signal that the start of the server is completed) sent by the first BIOS chip, that is, the second signal, within a second duration, for example, 10 minutes, step 103 is also executed.
When it needs to be described, when monitoring whether a first signal sent by a first BIOS chip is received by the BMC within a first time period and whether a second signal sent by the first BIOS chip is received within a second time period, the BMC may determine whether the first signal is received within the first time period and whether the second signal is received within the second time period by monitoring a state change of a General Purpose Input/Output (GPIO) between the first time period and the first BIOS chip; similarly, the BMC may also monitor a log sent between the first time duration and the first BIOS chip to determine whether the first signal is received in the first time duration, and whether the BMC receives the second signal in the second time duration, which may be determined in other manners, and the two manners are described as examples, and are not limited specifically.
103. The BMC switches the first BIOS chip into a second BIOS chip to restart the server.
In this embodiment, when the BMC does not receive the first signal within the first duration or does not receive the second signal within the second duration, the boot chip of the server is switched from the first BIOS chip to the second BIOS chip to reboot the server.
104. The BMC determines that the server boot is complete.
In this embodiment, when the BMC receives the first signal within the first time period and the BMC receives the second signal within the second time period, it is determined that the server is normally started.
In summary, in the embodiment of the present invention, the second BIOS chip and the second BIOS chip are set in the server, and two monitoring points are set for the BIOS chip: the starting and the starting are completed to monitor the two monitoring points, whether the BIOS chip can be normally started or not is automatically detected, and the BIOS chip is automatically switched to the second BIOS chip under the condition that the first BIOS chip is abnormally started, so that the problem that a server system cannot be normally started is quickly solved, and manpower and material resources are saved.
The embodiment of the present invention is described above from the viewpoint of the switching method of the BIOS chip, and the embodiment of the present invention is described below from the viewpoint of the baseboard management controller.
Referring to fig. 2, fig. 2 is a schematic diagram of an embodiment of a baseboard management controller according to an embodiment of the present invention, the baseboard management controller includes:
a receiving unit 201, configured to receive an operation instruction, where the operation instruction is a start instruction for a server, and the server includes a first BIOS chip and a second BIOS chip;
a monitoring unit 202, configured to monitor whether a first signal sent by the first BIOS chip is received within a first duration, and whether a second signal sent by the first BIOS chip is received within a second duration, where the first duration and the second duration are different durations, and the second duration is a duration after the first duration;
a switching unit 203, configured to switch the first BIOS chip to the second BIOS chip to restart the service if the first signal is not received within the first duration or the second signal is not received within the second duration.
Optionally, the monitoring unit 202 is specifically configured to:
monitoring state changes of general purpose input/output (GPIO) between the first BIOS chip and the first time length and monitoring state changes of GPIO between the second BIOS chip and the first BIOS chip within the second time length so as to judge whether the first signal is received within the first time length and whether the second signal is received by the BMC within the second time length;
or monitoring a sending log between the first BIOS chips in the first time length and monitoring a sending log between the first BIOS chips in the second time length to judge whether the BMC receives the first signal in the first time length and whether the BMC receives the second signal in the second time length.
Optionally, the BMC further comprises:
a determining unit 204, configured to determine that the server is started up completely when the first signal is received within the first time period and the second signal is received within the second time period.
Optionally, the first duration is less than the second duration.
The interaction manner among the units of the baseboard management controller in this embodiment is as described in the embodiment shown in fig. 1, and details thereof are not repeated here.
In summary, in the embodiment of the present invention, the second BIOS chip and the second BIOS chip are set in the server, and two monitoring points are set for the BIOS chip: the starting and the starting are completed to monitor the two monitoring points, whether the BIOS chip can be normally started or not is automatically detected, and the BIOS chip is automatically switched to the second BIOS chip under the condition that the first BIOS chip is abnormally started, so that the problem that a server system cannot be normally started is quickly solved, and manpower and material resources are saved.
The baseboard management controller in the embodiment of the present invention is described above from the perspective of the modular functional entity, and the baseboard management controller in the embodiment of the present invention is described below from the perspective of hardware processing.
Referring to fig. 3, an embodiment of a bmc 300 according to the embodiment of the present invention includes:
an input device 301, an output device 302, a processor 303 and a memory 304 (wherein the number of the processor 303 may be one or more, and one processor 303 is taken as an example in fig. 3). In some embodiments of the present invention, the input device 301, the output device 302, the processor 303 and the memory 304 may be connected by a bus or other means, wherein the connection by the bus is exemplified in fig. 3.
Wherein, by calling the operation instruction stored in the memory 304, the processor 303 is configured to perform the following steps:
receiving an operation instruction, wherein the operation instruction is a starting instruction for a server, and the server comprises a first BIOS chip and a second BIOS chip;
monitoring whether a first signal sent by the first BIOS chip is received within a first time length and whether a second signal sent by the first BIOS chip is received within a second time length, wherein the first time length and the second time length are different time lengths, and the second time length is a time length after the first time length;
if the first signal is not received within the first time period or the second signal is not received within the second time period, the BMC switches the first BIOS chip to the second BIOS chip to restart the service.
Optionally, the monitoring whether the first signal sent by the first BIOS chip is received within a first time period, and whether the second signal sent by the first BIOS chip is received within a second time period includes:
monitoring state changes of general purpose input/output (GPIO) between the first BIOS chip and the first time length and monitoring state changes of GPIO between the second BIOS chip and the first BIOS chip within the second time length so as to judge whether the first signal is received within the first time length and whether the second signal is received by the BMC within the second time length;
or monitoring a sending log between the first BIOS chips in the first time length and monitoring a sending log between the first BIOS chips in the second time length to judge whether the first signal is received in the first time length and whether the second signal is received in the second time length.
Optionally, when the first signal is received within the first time period and the second signal is received within the second time period, the BMC determines that the server is started.
Optionally, the first duration is less than the second duration.
Referring to fig. 4, fig. 4 is a schematic view of an embodiment of an electronic device according to an embodiment of the invention.
As shown in fig. 4, an embodiment of the present invention provides an electronic device 400, which includes a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420, and when the processor 420 executes the computer program 411, the following steps are implemented:
receiving an operation instruction, wherein the operation instruction is a starting instruction for a server, and the server comprises a first BIOS chip and a second BIOS chip;
monitoring whether a first signal sent by the first BIOS chip is received within a first time length and whether a second signal sent by the first BIOS chip is received within a second time length, wherein the first time length and the second time length are different time lengths, and the second time length is a time length after the first time length;
and if the first signal is not received within the first time length or the second signal is not received within the second time length, switching the first BIOS chip to the second BIOS chip so as to restart the service.
In a specific implementation, when the processor 420 executes the computer program 411, any of the embodiments corresponding to fig. 1 may be implemented.
Since the electronic device described in this embodiment is a device used for implementing the method for switching the BIOS chip in the embodiment of the present invention, based on the method described in this embodiment of the present invention, a person skilled in the art can understand the specific implementation manner of the electronic device in this embodiment and various variations thereof, so that how to implement the method in the embodiment of the present invention by the electronic device is not described in detail herein, and as long as the person skilled in the art implements the device used for implementing the method in the embodiment of the present invention, the device used for implementing the method in the embodiment of the present invention belongs to the protection scope of the present invention.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an embodiment of a computer-readable storage medium according to the present invention.
As shown in fig. 5, the present embodiment provides a computer-readable storage medium 500 having a computer program 511 stored thereon, the computer program 511 implementing the following steps when executed by a processor:
receiving an operation instruction, wherein the operation instruction is a starting instruction for a server, and the server comprises a first BIOS chip and a second BIOS chip;
monitoring whether a first signal sent by the first BIOS chip is received within a first time length and whether a second signal sent by the first BIOS chip is received within a second time length, wherein the first time length and the second time length are different time lengths, and the second time length is a time length after the first time length;
and if the first signal is not received within the first time length or the second signal is not received within the second time length, switching the first BIOS chip to the second BIOS chip so as to restart the service.
In a specific implementation, the computer program 511 may implement any of the embodiments corresponding to fig. 1 when executed by a processor.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), block flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other matching elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.