WO2024103583A1 - Bios选项修改的生效方法和装置、非易失性可读存储介质及电子装置 - Google Patents

Bios选项修改的生效方法和装置、非易失性可读存储介质及电子装置 Download PDF

Info

Publication number
WO2024103583A1
WO2024103583A1 PCT/CN2023/081990 CN2023081990W WO2024103583A1 WO 2024103583 A1 WO2024103583 A1 WO 2024103583A1 CN 2023081990 W CN2023081990 W CN 2023081990W WO 2024103583 A1 WO2024103583 A1 WO 2024103583A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
restart
bios option
bios
target
Prior art date
Application number
PCT/CN2023/081990
Other languages
English (en)
French (fr)
Inventor
宁兆男
王兵
张炳会
田牧青
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024103583A1 publication Critical patent/WO2024103583A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4403Processor initialisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • Embodiments of the present application relate to the field of computers, and in particular, to a method and device for validating BIOS option modification, a non-volatile readable storage medium, and an electronic device.
  • BIOS Basic Input Output System
  • specific tools can be used to modify them.
  • the modified BIOS options need to be restarted before they can take effect.
  • the restart methods include warm reboot and cold reboot. After the BIOS options are modified, some BIOS options only need a warm reboot to take effect. However, some BIOS options must be restarted before they can take effect.
  • the BIOS options that are effective after a cold reboot may not take effect after a hot reboot operation is performed, or the BIOS options that are effective after a hot reboot may perform a cold reboot operation. Since the cold reboot time is longer than the hot reboot, the effectiveness efficiency of the BIOS options is reduced.
  • the embodiments of the present application provide a method and device for validating BIOS option modifications, a non-volatile readable storage medium, and an electronic device, so as to at least solve the problem of low efficiency in validating BIOS modifications in the related art.
  • BIOS option modification a method for validating BIOS option modification, including:
  • Detecting a set attribute of the BIOS option set wherein the set attribute is used to indicate whether there is a cold restart BIOS option in the BIOS option set, and the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is performed;
  • the detection of the set attribute of the BIOS option set includes:
  • the tag state is in a set state, determining that the set attribute of the BIOS option set is a cold start attribute, wherein the cold start attribute is used to indicate that the cold restart BIOS option exists in the BIOS option set;
  • the tag state When the tag state is in an unset state, it is determined that the set attribute of the BIOS option set is a hot start attribute, wherein the hot start attribute is used to indicate that the cold restart BIOS option does not exist in the BIOS option set.
  • the detecting of the label status of the target set label corresponding to the BIOS option set includes:
  • the label status of the target set label corresponding to the BIOS option set is determined according to the execution status.
  • the detecting of the label status of the target set label corresponding to the BIOS option set includes:
  • the step of determining the label status of the target set label corresponding to the BIOS option set according to the execution status includes:
  • the method before detecting the tag status of the target set tag corresponding to the BIOS option set, the method further includes:
  • the tag status of the target set tag is processed according to the target validation method.
  • the obtaining of the target validation mode of each target BIOS option modified by executing the above function includes:
  • the target validation mode corresponding to each of the target BIOS options is obtained from the option names and validation modes having a corresponding relationship, wherein the validation modes include a cold restart and a hot restart.
  • the step of processing the tag status of the target set tag according to the target validation mode includes:
  • the tag state of the target set tag is kept in an unset state
  • the tag state of the target set tag is converted to the set state.
  • the determining of the server restart mode of the BIOS option set according to the set attribute includes:
  • the server restart mode is a hot restart.
  • restarting the server in the server restarting method includes:
  • the server restart mode is a cold restart
  • detecting a user control instruction currently received by the server detecting a user control instruction currently received by the server; restarting the server according to the server restart mode and the user control instruction;
  • the user control instruction is executed on the server, wherein the user control instruction is an instruction initiated by the user to restart the server.
  • the detecting of the user control instruction currently received by the server includes:
  • An instruction initiated by a user and currently received by the server to restart the server is detected from the operating system OS as the user control instruction.
  • restarting the server according to the server restart mode and the user control instruction includes:
  • the user control instruction indicates to perform a hot restart on the server, modifying the user control instruction to perform a cold restart on the server, and executing the modified user control instruction;
  • the user control instruction When the user control instruction indicates to perform a cold restart on the server, the user control instruction is directly executed.
  • modifying the user control instruction to a cold restart of the server includes:
  • the user control instruction is modified according to the target control instruction to execute a cold restart on the server.
  • modifying the user control instruction according to the target control instruction to perform a cold restart on the server includes:
  • the CPU is controlled according to the target control instruction to perform a cold restart on the server.
  • controlling the CPU to perform a cold restart on the server according to the target control instruction includes:
  • the register parameters corresponding to the CPU deployed in the server are modified according to the target control instruction carrying the cold restart information, wherein the CPU is used to respond to the target control instruction and control the server to perform a cold restart according to the register parameters.
  • the target control instruction carrying the cold restart information modifies the register corresponding to the CPU deployed in the server.
  • Device parameters including:
  • the CPU When the CPU receives the cold restart information, the CPU obtains a cold restart register parameter corresponding to the cold restart from a server restart mode and a register parameter having a corresponding relationship.
  • the acquiring of a basic input/output system BIOS option set for which function modification is performed in the server includes:
  • BIOS option modification tool In the case of detecting that a BIOS option modification tool is started, creating an initial BIOS option set, wherein the BIOS option modification tool is used to perform the above-mentioned functional modification on the BIOS options;
  • BIOS option modification tool performing the above-mentioned functional modification on the BIOS option, obtaining the target BIOS option on which the above-mentioned functional modification is performed;
  • the target BIOS option is added to the initial BIOS option set to obtain the BIOS option set.
  • BIOS option modification validation device including:
  • a first acquisition module is used to acquire a basic input and output system BIOS option set for which function modification is performed in the server;
  • a detection module configured to detect a set attribute of the BIOS option set, wherein the set attribute is used to indicate whether there is a cold restart BIOS option in the BIOS option set, and the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is performed;
  • a determination module configured to determine a server restart mode of the BIOS option set according to the set attribute, wherein the server restart mode is used to control all BIOS options included in the BIOS option set to take effect after the server is restarted;
  • the restart module is used to restart the server using the server restart method.
  • a non-volatile readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned BIOS option modification validation method when running.
  • an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for validating the BIOS option modification through the computer program.
  • a basic input/output system BIOS option set that has performed function modification in a server is obtained; a set attribute of the BIOS option set is detected, wherein the set attribute is used to indicate whether there is a cold restart BIOS option in the BIOS option set, and the cold restart BIOS option is an option that allows the modification function to take effect only after a cold restart is performed; a server restart mode of the BIOS option set is determined according to the set attribute, wherein the server restart mode is used to control all BIOS options included in the BIOS option set to take effect after the server is restarted; the server is restarted in the server restart mode, i.e., first, a basic input/output system BIOS option set that has performed function modification in a server is obtained, and then the set attribute of the BIOS option set is detected, and according to the set attribute, it can be determined whether there is a cold restart BIOS option in the BIOS option set, and the cold restart BIOS option is an option that allows the modification function to take effect only after
  • FIG1 is a schematic diagram of a hardware environment of a method for validating BIOS option modification according to an embodiment of the present application
  • FIG2 is a flow chart of a method for validating BIOS option modification according to an embodiment of the present application
  • FIG3 is a schematic diagram of a BIOS option modification according to an embodiment of the present application.
  • FIG4 is a schematic diagram of a set attribute detection according to an embodiment of the present application.
  • FIG5 is a schematic diagram of a server restart method according to an embodiment of the present application.
  • FIG6 is a schematic diagram of a BIOS option modification validation process according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a BIOS option modification validation device according to an embodiment of the present application.
  • FIG1 is a hardware environment diagram of a method for taking effect of BIOS option modification according to an embodiment of the present application.
  • the computer terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a microprocessor MCU or a microprocessor MCU).
  • the computer terminal may further include a transmission device 106 and an input/output device 108 for communication functions. It will be appreciated by those skilled in the art that the structure shown in FIG.
  • the computer terminal may further include more or fewer components than those shown in FIG. 1 , or may have a different configuration with the same functions as those shown in FIG. 1 or more functions than those shown in FIG. 1 .
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for validating the BIOS option modification in the embodiment of the present application.
  • the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the above-mentioned optional examples of the network may include a wireless network provided by a communication provider of the computer terminal.
  • the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
  • RF Radio Frequency
  • FIG. 2 is a flow chart of a method for validating BIOS option modification according to an embodiment of the present application. As shown in FIG. 2 , the process includes the following steps:
  • Step S202 obtaining a basic input/output system BIOS option set in the server for which function modification has been performed;
  • Step S204 detecting a set attribute of the BIOS option set, wherein the set attribute is used to indicate whether there is a cold restart BIOS option in the BIOS option set, and the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is performed;
  • Step S206 determining a server restart mode of the BIOS option set according to the set attribute, wherein the server restart mode is used to control all BIOS options included in the BIOS option set to take effect after the server is restarted;
  • Step S208 restart the server using the server restart method.
  • the basic input and output system BIOS option set that has executed function modification in the server is obtained, and then the set attribute of the BIOS option set is detected. According to the set attribute, it can be determined whether there is a cold restart BIOS option in the BIOS option set.
  • the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is executed.
  • the server restart mode applicable to the BIOS option set is determined according to the set attribute. That is, the server restart mode determined according to the set attribute can control all BIOS options included in the BIOS option set to take effect after the above server is restarted, and finally the server is restarted using the server restart mode.
  • the server can be, but is not limited to, any electronic device capable of responding to service requests, providing services, and guaranteeing services.
  • the server can be other clients (such as PCs (Personal Computers), smart phones, etc.) in the network. Mobile phones, ATM (Automated Teller Machine) and other terminals and even large equipment such as train systems) provide computing or application services.
  • the stable operation of the server directly affects the stable operation of the services carried by the server.
  • the BIOS options in the server are modified, they can be effective through restart.
  • Restart includes warm restart and cold restart.
  • some BIOS options can be effective only through warm restart, but some BIOS options must be cold restarted to take effect. In other words, the BIOS options and the restart mode need to match, and the corresponding modification functions of the BIOS options can take effect.
  • BIOS options in the server can be modified in batches by using a specific tool under OS (Operating System).
  • Figure 3 is a schematic diagram of a BIOS option modification according to an embodiment of the present application. As shown in Figure 3, there are BIOS options (BIOS option 1 to BIOS option n) in the server. The server uses a specific tool (SCE tool) under OS (Operating System) to perform batch modifications to obtain a BIOS option set.
  • the BIOS option set includes: ⁇ BIOS option 1, BIOS option 3, BIOS option 5, ..., BIOS option n-1 ⁇ .
  • a basic input/output system BIOS option set on which a functional modification has been performed in a server can be obtained in the following manner, but is not limited to: upon detecting that a BIOS option modification tool is started, an initial BIOS option set is created, wherein the BIOS option modification tool is used to perform the above-mentioned functional modification on the BIOS options; during the process of the BIOS option modification tool performing the above-mentioned functional modification on the BIOS options, a target BIOS option on which the above-mentioned functional modification has been performed is obtained; and the above-mentioned target BIOS option is added to the above-mentioned initial BIOS option set to obtain the above-mentioned BIOS option set.
  • the above-mentioned function modification of the BIOS option may be performed through, but not limited to, an option modification tool, wherein the option modification tool may be, but not limited to, an SCE tool used under an operating system OS corresponding to the server.
  • the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is performed. That is to say, this type of BIOS option, after its corresponding function is modified, takes effect by cold restarting the server, wherein the cold restart may refer to, but is not limited to, Cold Reboot, that is, restarting the server by turning off the power and then turning on the power.
  • the hot restart may refer to, but is not limited to, Warm Reboot, that is, restarting the computer under software control without turning off the power.
  • the concept corresponding to the cold restart BIOS option may be a hot restart BIOS option, and the hot restart BIOS option modification function may take effect when a cold restart and a hot restart are performed on the server.
  • the set attribute of the above-mentioned BIOS option set can be detected in the following manner but is not limited to: detecting the label state of the target set label corresponding to the above-mentioned BIOS option set; when the above-mentioned label state is in a set state, determining that the above-mentioned set attribute of the above-mentioned BIOS option set is a cold start attribute, wherein the above-mentioned cold start attribute is used to indicate that the above-mentioned cold restart BIOS option exists in the above-mentioned BIOS option set; when the above-mentioned label state is in a not-set state, determining that the above-mentioned set attribute of the above-mentioned BIOS option set is a hot start attribute, wherein the above-mentioned hot start attribute is used to indicate that the above-mentioned cold restart BIOS option does not exist in the above-mentioned BIOS option set.
  • FIG. 4 is a schematic diagram of a set attribute detection according to an embodiment of the present application.
  • the BIOS option set All BIOS options ⁇ BIOS option 1, BIOS option 3, BIOS option 5, ..., BIOS option n 1 ⁇ in the set have been modified.
  • the target set tag corresponding to the BIOS option set can have two states, namely, an unset state and a set state. The target set tag of the BIOS option set is detected.
  • the target set tag When it is detected that the target set tag is in the unset state, it proves that there is no cold restart BIOS option in the BIOS option set at this time, and it can be determined that the set attribute of the BIOS option set is a hot start attribute, that is, a hot restart can be performed on the server to make the BIOS option set effective.
  • the target set tag When it is detected that the target set tag is in the set state, it proves that the above-mentioned cold restart BIOS option exists in the BIOS option set at this time, and it can be determined that the set attribute of the BIOS option set is a cold start attribute, that is, a cold restart can be performed on the server to make the BIOS option set effective.
  • the label status of the target set label corresponding to the above-mentioned BIOS option set can be detected in the following manner but is not limited to: detecting the execution status of the above-mentioned cold restart BIOS option during the process of executing the above-mentioned function modification, wherein the above-mentioned execution status is used to indicate whether the above-mentioned cold restart BIOS option is subjected to the above-mentioned function modification; determining the label status of the target set label corresponding to the above-mentioned BIOS option set according to the above-mentioned execution status.
  • the execution state of the cold restart BIOS option is directly related to the label state of the target set label.
  • the label state of the target set label corresponding to the BIOS option set can be determined according to the execution state of the cold restart BIOS option.
  • the label status of the target set label corresponding to the above-mentioned BIOS option set can be detected in the following manner but is not limited to: reading the parameter stored in the status flag register FLAG; when the above-mentioned parameter is a first value, determining that the above-mentioned label status is in the above-mentioned set state; when the above-mentioned parameter is a second value, determining that the above-mentioned label status is in the above-mentioned unset state.
  • the tag status of the target set tag can be detected by reading the parameters stored in the status flag register FLAG, and then determining it based on the parameters. For example: when it is detected that the parameter stored in FLAG is A (the above-mentioned first value), it is determined that the tag status is in the set state; when it is detected that the parameter stored in FLAG is B (the above-mentioned second value), it is determined that the tag status is in the unset state.
  • the label state of the target set label corresponding to the above-mentioned BIOS option set can be determined according to the above-mentioned execution state in the following manner but not limited to: when the above-mentioned execution state indicates that the above-mentioned function modification is not performed on the above-mentioned cold restart BIOS option during the process of executing the above-mentioned function modification, it is determined that the above-mentioned label state of the above-mentioned target set label is set to the unset state; when the above-mentioned execution state indicates that the above-mentioned function modification is performed on the above-mentioned cold restart BIOS option during the process of executing the above-mentioned function modification, it is determined that the above-mentioned label state is converted to the above-mentioned set state.
  • the label status can be set to a default state of not set, but when the above-mentioned execution status indicates that a function modification is performed on the cold restart BIOS option during the process of executing the function modification, the label status is converted from a non-set state to a set state.
  • the following methods may also be included but are not limited to: in the process of executing the above-mentioned function modification, obtaining the target effectiveness method of each target BIOS option that is executed with the above-mentioned function modification; processing the above-mentioned label status of the above-mentioned target set label according to the above-mentioned target effectiveness method.
  • the label status of the target set label is directly related to the subsequent selection and execution of the server restart method, the label status of the target set label can be determined by the target effectiveness method of each target BIOS option modified by the executed function.
  • the target effectiveness mode of each target BIOS option that is modified by executing the above-mentioned function can be obtained in the following manner but is not limited to: obtaining the target option name of each target BIOS option that is modified by executing the above-mentioned function; obtaining the target effectiveness mode corresponding to each of the above-mentioned target BIOS options from the option names and effectiveness modes with corresponding relationships, wherein the above-mentioned effectiveness modes include cold restart and hot restart.
  • the target option name of each target BIOS option whose function modification is executed can be obtained.
  • ⁇ BIOS option 3 ⁇ is modified by the execution function, and the target effectiveness mode corresponding to ⁇ BIOS option 3 ⁇ is queried from the option name and effectiveness mode that record the corresponding relationship, wherein the effectiveness mode includes cold restart and hot restart, and the label status of the target set label of the BIOS option set including ⁇ BIOS option 3 ⁇ is processed according to the target effectiveness mode.
  • the above-mentioned label state of the above-mentioned target set label can be processed according to the above-mentioned target effectiveness mode in the following manner but is not limited to: when the above-mentioned target effectiveness mode is hot restart, the above-mentioned label state of the above-mentioned target set label is maintained in the unset state; when the above-mentioned target effectiveness mode is cold restart, the above-mentioned label state of the above-mentioned target set label is converted to the above-mentioned set state.
  • the label state of the target set label can be set to the unset state by default.
  • the above-mentioned label state of the target set label of the BIOS option set including ⁇ BIOS option 1 ⁇ is maintained in the unset state; in the process of continuing to modify the function of ⁇ BIOS option 3 ⁇ , when it is determined that the target effectiveness mode of ⁇ BIOS option 3 ⁇ is the above-mentioned cold restart, the above-mentioned label state of the target set label of the BIOS option set including ⁇ BIOS option 1, BIOS option 3 ⁇ is converted to the set state.
  • the server restart mode of the above BIOS option set can be determined according to the set attribute, for example: when the set attribute corresponding to the BIOS option set is determined to be a hot start attribute, the server restart mode of the above BIOS option set is determined to be a hot restart; when the set attribute corresponding to the BIOS option set is determined to be a cold start attribute, the server restart mode of the above BIOS option set is determined to be a cold restart.
  • the server restart mode can control all BIOS options included in the above BIOS option set to take effect after the above server is restarted.
  • the server restart mode of the above-mentioned BIOS option set can be determined according to the above-mentioned set attribute in the following manner, but is not limited to: when the above-mentioned set attribute is used to indicate that there is a cold restart BIOS option in the above-mentioned BIOS option set, the above-mentioned server restart mode is determined to be a cold restart; when the above-mentioned set attribute is used to indicate that there is no cold restart BIOS option in the above-mentioned BIOS option set, the above-mentioned server restart mode is determined to be a hot restart.
  • the server restart mode when the set attribute is used to indicate that there is a cold restart BIOS option in the above BIOS option set, that is, in order to control all BIOS options included in the BIOS option set to take effect after the server is restarted, the server restart mode may be determined to be a cold restart;
  • the server restart mode can be determined to be a hot restart.
  • step S208 after determining the server restart method, the server is restarted in the above server restart method, so that all BIOS options included in the above BIOS option set can be controlled to take effect after the server is restarted.
  • the server can be restarted using the server restart method in the following manner but is not limited to: when the server restart method is a cold restart, detecting the user control instruction currently received by the server; restarting the server according to the server restart method and the user control instruction; when the server restart method is a hot restart, executing the user control instruction on the server, wherein the user control instruction is an instruction initiated by the user to restart the server.
  • Figure 5 is a schematic diagram of a server restart method according to an embodiment of the present application.
  • the server restart method is a hot restart
  • all BIOS options included in the BIOS option set can take effect after the above-mentioned server performs a hot restart and a cold restart. Therefore, the user control instructions do not need to be processed and the above-mentioned user control instructions can be directly executed.
  • the user control instruction currently received by the above-mentioned server can be detected in the following manner but is not limited to: accessing the operating system OS corresponding to the above-mentioned server; detecting from the above-mentioned operating system OS the instruction initiated by the user currently received by the above-mentioned server to restart the above-mentioned server as the above-mentioned user control instruction.
  • user control instructions can be detected by but not limited to accessing the operating system OS (Operating System) corresponding to the above-mentioned server.
  • OS Operating System
  • the server can be restarted according to the server restart method and the user control instruction in the following manner, but is not limited to: when the user control instruction indicates a hot restart of the server, the user control instruction is modified to a cold restart of the server, and the modified user control instruction is executed; when the user control instruction indicates a cold restart of the server, the user control instruction is directly executed.
  • the server restart mode is a cold restart
  • the user control instruction currently received by the above-mentioned server is first detected from the operating system OS corresponding to the above-mentioned server.
  • the user control instruction including instructing to perform a hot restart on the above-mentioned server, and instructing to perform a cold restart on the above-mentioned server.
  • the above-mentioned user control instruction indicates to perform a hot restart on the above-mentioned server
  • the above-mentioned user control instruction is modified to a cold restart on the above-mentioned server, and the modified above-mentioned user control instruction is executed; when the above-mentioned user control instruction indicates to perform a cold restart on the above-mentioned server, that is, the user control instruction matches the server restart mode, and the above-mentioned user control instruction can be directly executed.
  • the user control instruction may be modified to perform a cold restart on the server in the following manner but is not limited to: generating a target control instruction carrying cold restart information; and modifying the user control instruction to perform a cold restart on the server according to the target control instruction.
  • the target control instruction is used to modify the user control instruction to perform a cold restart on the server.
  • the user control instruction may be modified to perform a cold restart on the server according to the target control instruction in the following manner, but is not limited to: sending the target control instruction to a central processing unit (CPU) in the server; Control the CPU to perform a cold restart on the server.
  • CPU central processing unit
  • the server restart can be controlled by the CPU (Central Processing Unit).
  • CPU Central Processing Unit
  • the CPU can be controlled to perform a cold restart on the server according to the target control instruction but is not limited to the following method: the register parameters corresponding to the CPU deployed in the server are modified according to the target control instruction carrying the cold restart information, wherein the CPU is used to respond to the target control instruction and control the server to perform a cold restart according to the register parameters.
  • the CPU can determine the restart mode of the server according to the register parameters, and therefore can generate a target control instruction carrying cold restart information, modify the register parameters, and thus modify the above user control instruction to a cold restart performed on the above server.
  • the register parameters corresponding to the above-mentioned CPU deployed in the above-mentioned server can be modified according to the above-mentioned target control instruction carrying the cold restart information in the following manner but not limited to: when the above-mentioned CPU receives the above-mentioned cold restart information, the cold restart register parameters corresponding to the above-mentioned cold restart are obtained from the server restart mode and register parameters with a corresponding relationship; and the current register parameters corresponding to the above-mentioned CPU are modified to the above-mentioned cold restart register parameters.
  • the target control instruction may first obtain the cold restart register parameters corresponding to the cold restart from the server restart mode and register parameters having a corresponding relationship, and then modify the register parameters corresponding to the current CPU to the cold restart register parameters.
  • BIOS option modification taking effect In order to better understand the process of the above-mentioned BIOS option modification taking effect, the above-mentioned BIOS option modification taking effect process is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
  • FIG. 6 is a schematic diagram of a BIOS option modification validation process according to an embodiment of the present application. As shown in FIG. 6 , the method mainly includes the following steps:
  • Step S601 The user uses SCE to modify BIOS options in batches under the OS and inputs a modification option instruction;
  • Step S602 trigger SW SMI (SW System Management Interrupt, software decoding system management interrupt) to execute the corresponding SMI Handler (system management interrupt operation) to modify the BIOS options;
  • SW SMI SW System Management Interrupt, software decoding system management interrupt
  • Step S603 BIOS detects whether all BIOS options modified by the user include those for which Cold Reboot is effective
  • Step S604 If the BIOS option for Cold Reboot to take effect is included, set Flag (label status);
  • Step S605 the SCE tool modifies the BIOS option instruction and returns a success status
  • Step S606 The user uses the reboot command under the OS to reboot (Warm Reboot);
  • Step S607 BIOS detects that the OS uses a restart instruction to restart, and checks whether the Flag is set;
  • Step S608 Flag is not set, and the Warm Reboot process continues
  • Step S609 Flag is set, BIOS converts Warm Reboot to Cold Reboot, and performs Cold Reboot.
  • the embodiment of the present application adopts a method for automatically taking effect after quickly modifying BIOS options.
  • the SCE tool When the SCE tool is used to batch modify BIOS options under the OS, the SCE tool will trigger the SW SMI to execute the corresponding SMI Handler, and the SMI Handler will implement the modification of the BIOS options.
  • the BIOS After modifying the BIOS options, the BIOS will identify whether the BIOS options modified by the SCE tool include options for Cold Reboot to take effect. If so, Set the corresponding Flag.
  • the BIOS successfully modifies the BIOS option, the user can directly use the OS command to restart. After the BIOS detects the OS restart, it checks whether the Flag is set. If the Flag is not set, it continues to perform a warm reboot.
  • the BIOS converts the warm reboot into a cold reboot. In this way, the user does not need to deal with which type of restart is effective for the modified option and which restart method to use. These matters are handled by the method of the above-mentioned application embodiment, which is more convenient and faster for users to use.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
  • the technical solution of the present application, or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
  • a storage medium such as ROM/RAM, a disk, or an optical disk
  • FIG. 7 is a structural block diagram of a BIOS option modification validation device according to an embodiment of the present application; as shown in FIG. 7 , it includes:
  • a first acquisition module 702 is used to acquire a basic input and output system BIOS option set for which function modification is performed in the server;
  • a detection module 704 is used to detect a set attribute of the BIOS option set, wherein the set attribute is used to indicate whether there is a cold restart BIOS option in the BIOS option set, and the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is performed;
  • a determination module 706 is used to determine the server restart mode of the BIOS option set according to the set attribute, wherein the server restart mode is used to control all BIOS options included in the BIOS option set to take effect after the server is restarted;
  • the restart module 708 is used to restart the server using the server restart method.
  • the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
  • the basic input and output system BIOS option set that has executed function modification in the server is obtained, and then the set attribute of the BIOS option set is detected. According to the set attribute, it can be determined whether there is a cold restart BIOS option in the BIOS option set.
  • the cold restart BIOS option is an option that allows the modification function to take effect only when a cold restart is executed.
  • the server restart mode applicable to the BIOS option set is determined. That is, the server restart mode determined according to the set attribute can control all BIOS options included in the BIOS option set to take effect after the above server is restarted. Finally, the server is restarted in the server restart mode.
  • the detection module includes:
  • a first detection unit configured to detect a label state of a target set label corresponding to the above BIOS option set
  • a first determining unit is configured to determine, when the tag state is in a set state, that the set attribute of the BIOS option set is a cold start attribute, wherein the cold start attribute is used to indicate that the cold restart BIOS option exists in the BIOS option set;
  • the second determination unit is used to determine that the set attribute of the BIOS option set is a hot start attribute when the tag state is not set, wherein the hot start attribute is used to indicate that the cold restart BIOS option does not exist in the BIOS option set.
  • the first detection unit is further used for:
  • the label status of the target set label corresponding to the BIOS option set is determined according to the execution status.
  • the first detection unit is further used for:
  • the first detection unit is further used for:
  • the apparatus further comprises:
  • an acquisition module used for acquiring a target effectiveness mode of each target BIOS option to be modified by the above-mentioned function before detecting the tag state of the target set tag corresponding to the above-mentioned BIOS option set, during the process of performing the above-mentioned function modification;
  • the processing module is used to process the label status of the target set label according to the target validation mode.
  • the acquisition module includes:
  • a first acquisition unit is used to acquire a target option name of each target BIOS option modified by executing the above function
  • the second acquisition unit is used to acquire the target validation mode corresponding to each of the above target BIOS options from the option names and validation modes having a corresponding relationship, wherein the above validation modes include cold restart and hot restart.
  • the processing module includes:
  • a maintaining unit used for maintaining the tag state of the target set tag in an unset state when the target validation mode is a hot restart
  • the conversion unit is used to convert the label state of the target set label to the set state when the target validation mode is a cold restart.
  • the above-mentioned determination module includes:
  • a third determining unit configured to determine that the server restart mode is a cold restart when the set attribute indicates that there is a cold restart BIOS option in the BIOS option set;
  • the fourth determining unit is used to determine the above BIOS option set when the above set attribute is used to indicate that there is no cold restart BIOS option in the above BIOS option set.
  • the server restart method described above is a hot restart.
  • the restart module includes:
  • a second detection unit is used to detect the user control instruction currently received by the server when the server restart mode is a cold restart; and restart the server according to the server restart mode and the user control instruction;
  • An execution unit is used to execute the user control instruction on the server when the server restart mode is a hot restart, wherein the user control instruction is an instruction initiated by the user to restart the server.
  • the second detection unit is further used for:
  • An instruction initiated by a user and currently received by the server to restart the server is detected from the operating system OS as the user control instruction.
  • the second detection unit is further used for:
  • the user control instruction When the user control instruction indicates to perform a cold restart on the server, the user control instruction is directly executed.
  • the second detection unit is further used for:
  • the user control instruction is modified according to the target control instruction to execute a cold restart on the server.
  • the second detection unit is further used for:
  • the CPU is controlled according to the target control instruction to perform a cold restart on the server.
  • the second detection unit is further used for:
  • the register parameters corresponding to the CPU deployed in the server are modified according to the target control instruction carrying the cold restart information, wherein the CPU is used to respond to the target control instruction and control the server to perform a cold restart according to the register parameters.
  • the second detection unit is further used for:
  • the CPU When the CPU receives the cold restart information, the CPU obtains a cold restart register parameter corresponding to the cold restart from a server restart mode and a register parameter having a corresponding relationship.
  • the first acquisition module includes:
  • a creating unit configured to create an initial BIOS option set when detecting that a BIOS option modification tool is started, wherein the BIOS option modification tool is used to perform the above-mentioned functional modification on the BIOS options;
  • a third acquisition unit is used to acquire a target BIOS option on which the above-mentioned function modification is performed during the process in which the above-mentioned BIOS option modification tool performs the above-mentioned function modification on the BIOS option;
  • the adding unit is used to add the target BIOS option to the initial BIOS option set to obtain the BIOS option set.
  • An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
  • the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk a magnetic disk or an optical disk.
  • An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
  • modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation.
  • the present application is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种BIOS选项修改的生效方法和装置、存储介质及电子装置,该BIOS选项修改的生效方法包括:获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合(S202);检测BIOS选项集合的集合属性,其中,集合属性用于指示BIOS选项集合中是否存在冷重启BIOS选项,冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项(S204);根据集合属性确定BIOS选项集合的服务器重启方式,其中,服务器重启方式用于控制BIOS选项集合中所包括的全部BIOS选项在服务器重启后均生效(S206);采用服务器重启方式重启服务器(S208),采用上述方法,解决了相关技术中,BIOS修改的生效的效率较低等问题。

Description

BIOS选项修改的生效方法和装置、非易失性可读存储介质及电子装置
相关申请的交叉引用
本申请要求于2022年11月17日提交中国专利局,申请号为202211461784.9,申请名称为“BIOS选项修改的生效方法和装置、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机领域,特别的,涉及一种BIOS选项修改的生效方法和装置、非易失性可读存储介质及电子装置。
背景技术
随着服务器的快速发展,对服务器性能方而要求越来越高,除性能外其它各方而指标也要求越来越高。各大厂商都试图打造完美型服务器来满足客户各种需求。开发功能的同时也需要更加注重客户体验,任何微小的不好的体验都可能让客户决定不再继续购买同品牌的服务器。
现有技术中,对于服务器中的BIOS(Basic Input Output System,基本输入输出系统)选项,可以使用特定的工具进行修改,但是修改之后的BIOS选项需要经过系统重启之后才可以生效,重启的方式包括热重启Warm Reboot和冷重启Cold Reboot,其中,BIOS选项修改完成之后,有的BIOS选项的功能只需热重启即可生效,但是,有的BIOS选项的功能必须经过冷重启才可以生效,目前,用户在BIOS选项修改完成之后,并不清楚BIOS选项对应的生效规则,因此,可能出现冷重启生效的BIOS选项执行了热重启操作导致功能未生效,或者,热重启生效的BIOS选项执行了冷重启操作,由于冷重启时间长于热重启,导致BIOS选项的功能生效效率降低的情况。
针对相关技术中,BIOS修改的生效的效率较低等问题,尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种BIOS选项修改的生效方法和装置、非易失性可读存储介质及电子装置,以至少解决相关技术中,BIOS修改的生效的效率较低等问题。
根据本申请实施例的一个实施例,提供了一种BIOS选项修改的生效方法,包括:
获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;
检测上述BIOS选项集合的集合属性,其中,上述集合属性用于指示上述BIOS选项集合中是否存在冷重启BIOS选项,上述冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;
根据上述集合属性确定上述BIOS选项集合的服务器重启方式,其中,上述服务器重启方式用于控制上述BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效;
采用上述服务器重启方式重启上述服务器。
可选的,上述检测上述BIOS选项集合的集合属性,包括:
检测上述BIOS选项集合对应的目标集合标签的标签状态;
在上述标签状态处于置起状态的情况下,确定上述BIOS选项集合的上述集合属性为冷启动属性,其中,上述冷启动属性用于指示上述BIOS选项集合中存在上述冷重启BIOS选项;
在上述标签状态处于未置起状态的情况下,确定上述BIOS选项集合的上述集合属性为热启动属性,其中,上述热启动属性用于指示上述BIOS选项集合中不存在上述冷重启BIOS选项。
可选的,上述检测上述BIOS选项集合对应的目标集合标签的标签状态,包括:
在执行上述功能修改的过程中检测上述冷重启BIOS选项的执行状态,其中,上述执行状态用于指示上述冷重启BIOS选项是否被执行上述功能修改;
根据上述执行状态确定上述BIOS选项集合对应的目标集合标签的标签状态。
可选的,上述检测上述BIOS选项集合对应的目标集合标签的标签状态,包括:
读取状态标志寄存器FLAG中存储的参数;
在上述参数为第一数值的情况下,确定上述标签状态处于上述置起状态;
在上述参数为第二数值的情况下,确定上述标签状态处于上述未置起状态。
可选的,上述根据上述执行状态确定上述BIOS选项集合对应的目标集合标签的标签状态,包括:
在上述执行状态指示在执行上述功能修改的过程中在未对上述冷重启BIOS选项执行上述功能修改的情况下,确定上述目标集合标签的上述标签状态被设置在未置起状态;
在上述执行状态指示在执行上述功能修改的过程中在对上述冷重启BIOS选项执行了上述功能修改的情况下,确定上述标签状态被转换为上述置起状态。
可选的,在上述检测上述BIOS选项集合对应的目标集合标签的标签状态之前,上述方法还包括:
在执行上述功能修改的过程中,获取被执行上述功能修改的每个目标BIOS选项的目标生效方式;
根据上述目标生效方式处理上述目标集合标签的上述标签状态。
可选的,上述获取被执行上述功能修改的每个目标BIOS选项的目标生效方式,包括:
获取被执行上述功能修改的每个目标BIOS选项的目标选项名称;
从具有对应关系的选项名称和生效方式中获取每个上述目标BIOS选项对应的目标生效方式,其中,上述生效方式包括冷重启和热重启。
可选的,上述根据上述目标生效方式处理上述目标集合标签的上述标签状态,包括:
在上述目标生效方式为热重启的情况下,将上述目标集合标签的上述标签状态保持在未置起状态;
在上述目标生效方式为冷重启的情况下,将上述目标集合标签的上述标签状态转换为上述置起状态。
可选的,上述根据上述集合属性确定上述BIOS选项集合的服务器重启方式,包括:
在上述集合属性用于指示上述BIOS选项集合中存在冷重启BIOS选项的情况下,确定上述服务器重启方式为冷重启;
在上述集合属性用于指示上述BIOS选项集合中不存在冷重启BIOS选项情况下,确定上述服务器重启方式为热重启。
可选的,上述采用上述服务器重启方式重启上述服务器,包括:
在上述服务器重启方式为冷重启的情况下,检测上述服务器当前接收到的用户控制指令;根据上述服务器重启方式与上述用户控制指令重启上述服务器;
在上述服务器重启方式为热重启的情况下,对上述服务器执行上述用户控制指令,其中,上述用户控制指令为用户发起的对上述服务器执行重启的指令。
可选的,上述检测上述服务器当前接收到的用户控制指令,包括:
访问上述服务器对应的操作系统OS;
从上述操作系统0S中检测上述服务器当前接收到的用户发起的对上述服务器执行重启的指令作为上述用户控制指令。
可选的,上述根据上述服务器重启方式与上述用户控制指令重启上述服务器,包括:
在上述用户控制指令指示了对上述服务器执行热重启的情况下,将上述用户控制指令修改为对上述服务器执行的冷重启,并执行修改后的上述用户控制指令;
在上述用户控制指令指示了对上述服务器执行冷重启的情况下,直接执行上述用户控制指令。
可选的,上述将上述用户控制指令修改为对上述服务器执行的冷重启,包括:
生成携带了冷重启信息的目标控制指令;
根据上述目标控制指令将上述用户控制指令修改为对上述服务器执行冷重启。
可选的,上述根据上述目标控制指令将上述用户控制指令修改为对上述服务器执行冷重启,包括:
将上述目标控制指令发送至上述服务器中的中央处理器CPU;
根据上述目标控制指令控制上述CPU对上述服务器执行冷重启。
可选的,上述根据上述目标控制指令控制上述CPU对上述服务器执行冷重启,包括:
根据携带了冷重启信息的上述目标控制指令修改部署在上述服务器中的上述CPU对应的寄存器参数,其中,上述CPU用于响应上述目标控制指令根据上述寄存器参数控制上述服务器执行冷重启。
可选的,上述根据携带了冷重启信息的上述目标控制指令修改部署在上述服务器中的上述CPU对应的寄存 器参数,包括:
在上述CPU接收到上述冷重启信息的情况下,从具有对应关系的服务器重启方式和寄存器参数中获取上述冷重启对应的冷重启寄存器参数;
将当前上述CPU对应的寄存器参数修改为上述冷重启寄存器参数。
可选的,上述获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合,包括:
在检测到BIOS选项修改工具启动的情况下,创建初始BIOS选项集合,其中,上述BIOS选项修改工具用于对BIOS选项执行上述功能修改;
在上述BIOS选项修改工具对BIOS选项执行上述功能修改的过程中,获取被执行了上述功能修改的目标BIOS选项;
将上述目标BIOS选项添加至上述初始BIOS选项集合中,得到上述BIOS选项集合。
根据本申请实施例的另一个实施例,还提供了一种BIOS选项修改的生效装置,包括:
第一获取模块,用于获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;
检测模块,用于检测上述BIOS选项集合的集合属性,其中,上述集合属性用于指示上述BIOS选项集合中是否存在冷重启BIOS选项,上述冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;
确定模块,用于根据上述集合属性确定上述BIOS选项集合的服务器重启方式,其中,上述服务器重启方式用于控制上述BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效;
重启模块,用于采用上述服务器重启方式重启上述服务器。
根据本申请实施例的又一方而,还提供了一种非易失性可读存储介质,该非易失性可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述BIOS选项修改的生效方法。
根据本申请实施例的又一方而,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,上述处理器通过计算机程序执行上述的BIOS选项修改的生效方法。
在本申请实施例中,获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;检测BIOS选项集合的集合属性,其中,集合属性用于指示BIOS选项集合中是否存在冷重启BIOS选项,冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;根据集合属性确定BIOS选项集合的服务器重启方式,其中,服务器重启方式用于控制BIOS选项集合中所包括的全部BIOS选项在服务器重启后均生效;采用服务器重启方式重启服务器,即首先获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合,然后检测BIOS选项集合的集合属性,根据集合属性可以确定BIOS选项集合中是否存在冷重启BIOS选项,冷重启BIOS选项也就是修改功能仅执行冷重启才允许生效的选项,之后根据集合属性确定BIOS选项集合适用的服务器重启方式,也就是说,根据集合属性确定的服务器重启方式可以控制BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效,最后采用服务器重启方式重启服务器。采用上述技术方案,解决了相关技术中,BIOS修改的生效 的效率较低等问题,实现了提高BIOS修改的生效的效率的技术效果。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下而将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是根据本申请实施例的一种BIOS选项修改的生效方法的硬件环境示意图;
图2是根据本申请实施例的一种BIOS选项修改的生效方法的流程图;
图3是根据本申请实施例的一种BIOS选项修改的示意图;
图4是根据本申请实施例的一种集合属性检测的示意图;
图5是根据本申请实施例的一种服务器重启方式的示意图;
图6是根据本申请实施例的一种BIOS选项修改的生效流程的示意图;
图7是根据本申请实施例的一种BIOS选项修改的生效装置的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下而将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请实施例所提供的方法实施例可以在计算机终端、设备终端或者类似的运算装置中执行。以运行在计算机终端上为例,图1是根据本申请实施例的一种BIOS选项修改的生效方法的硬件环境示意图。如图1所示,计算机终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可 编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,在一个示例性实施例中,上述计算机终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述计算机终端的结构造成限定。例如,计算机终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示等同功能或比图1所示功能更多的不同的配置。
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的BIOS选项修改的生效方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输设备106用于经由一个网络接收或者发送数据。上述的网络可选实例可包括计算机终端的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种BIOS选项修改的生效方法,应用于上述计算机终端,图2是根据本申请实施例的一种BIOS选项修改的生效方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;
步骤S204,检测上述BIOS选项集合的集合属性,其中,上述集合属性用于指示上述BIOS选项集合中是否存在冷重启BIOS选项,上述冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;
步骤S206,根据上述集合属性确定上述BIOS选项集合的服务器重启方式,其中,上述服务器重启方式用于控制上述BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效;
步骤S208,采用上述服务器重启方式重启上述服务器。
通过上述步骤,首先获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合,然后检测BIOS选项集合的集合属性,根据集合属性可以确定BIOS选项集合中是否存在冷重启BIOS选项,冷重启BIOS选项也就是修改功能仅执行冷重启才允许生效的选项,之后根据集合属性确定BIOS选项集合适用的服务器重启方式,也就是说,根据集合属性确定的服务器重启方式可以控制BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效,最后采用服务器重启方式重启服务器。采用上述技术方案,解决了相关技术中,BIOS修改的生效的效率较低等问题,实现了提高BIOS修改的生效的效率的技术效果。
在上述步骤S202提供的技术方案中,服务器可以但不限于为任何具备承担响应服务请求、承担服务、保障服务的能力的电子设备,服务器在网络中可以为其它客户机(如PC(Personal Computer,个人电脑)、智能 手机、ATM(Automated Teller Machine,自动取款机)等终端甚至是火车系统等大型设备)提供计算或者应用服务。服务器的稳定运行,直接影响服务器所承载的业务的稳定运行,目前,对服务器中的BIOS选项进行修改之后,可以通过重启进行生效,其中,重启包括热重启Warm Reboot和冷重启Cold Reboot,其中,BIOS选项修改完成之后,有的BIOS选项的功能只需热重启即可生效,但是,有的BIOS选项的功能必须经过冷重启才可以生效,也就是话,BIOS选项与重启方式需要匹配,BIOS选项对应的修改功能才可以生效。
可选地,在本实施例中,服务器中的BIOS选项可以通过在OS(Operating System,操作系统)下使用特定的工具进行批量修改,图3是根据本申请实施例的一种BIOS选项修改的示意图,如图3所示,服务器中存在BIOS选项(BIOS选项1至BIOS选项n),服务器在OS(Operating System,操作系统)下使用特定的工具(SCE工具)进行批量修改,得到BIOS选项集合,BIOS选项集合包括:{BIOS选项1、BIOS选项3、BIOS选项5、……、BIOS选项n-1}。
在一个示例性实施例中,可以但不限于通过以下方式获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合:在检测到BIOS选项修改工具启动的情况下,创建初始BIOS选项集合,其中,上述BIOS选项修改工具用于对BIOS选项执行上述功能修改;在上述BIOS选项修改工具对BIOS选项执行上述功能修改的过程中,获取被执行了上述功能修改的目标BIOS选项;将上述目标BIOS选项添加至上述初始BIOS选项集合中,得到上述BIOS选项集合。
可选地,在本实施例中,可以但不限于通过选项修改工具对BIOS选项执行上述功能修改,其中,选项修改工具可以但不限于为服务器对应的操作系统OS下使用SCE工具。
在上述步骤S204提供的技术方案中,冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项,也就是说,这一类的BIOS选项,在其对应的功能被执行了修改后,生效的方式是对服务器进行冷重启,其中,冷重启可以但不限于是指Cold Reboot,即通过关闭电源,再打开电源的方式重启服务器。冷重启BIOS选项在执行热重启的情况下,对应的修改功能可能无法生效,其中,热重启可以但不限于是指Warm Reboot,即在不关闭电源的情况,由软件控制重启计算机。
可选地,在本实施例中,冷重启BIOS选项对应的概念可以是热重启BIOS选项,热重启BIOS选项修改功能在对服务器执行了冷重启和热重启的情况下都可以生效。
在一个示例性实施例中,可以但不限于通过以下方式检测上述BIOS选项集合的集合属性:检测上述BIOS选项集合对应的目标集合标签的标签状态;在上述标签状态处于置起状态的情况下,确定上述BIOS选项集合的上述集合属性为冷启动属性,其中,上述冷启动属性用于指示上述BIOS选项集合中存在上述冷重启BIOS选项;在上述标签状态处于未置起状态的情况下,确定上述BIOS选项集合的上述集合属性为热启动属性,其中,上述热启动属性用于指示上述BIOS选项集合中不存在上述冷重启BIOS选项。
可选地,在本实施例中,图4是根据本申请实施例的一种集合属性检测的示意图,如图4所示,BIOS选项集 合中的全部BIOS选项{BIOS选项1、BIOS选项3、BIOS选项5、……、BIOS选项n 1}都被执行了修改,BIOS选项集合对应的目标集合标签可以存在两种状态,即未置起状态和置起状态,对BIOS选项集合的目标集合标签进行检测,在检测到目标集合标签处于未置起状态的情况下,证明此时BIOS选项集合中不存在冷重启BIOS选项,可以确定BIOS选项集合的集合属性为热启动属性,也就是说,可以对服务器执行热重启来生效BIOS选项集合;在检测到目标集合标签处于置起状态的情况下,证明此时BIOS选项集合中存在上述冷重启BIOS选项,可以确定BIOS选项集合的集合属性为冷启动属性,也就是说,可以对服务器执行冷重启来生效BIOS选项集合。
在一个示例性实施例中,可以但不限于通过以下方式检测上述BIOS选项集合对应的目标集合标签的标签状态:在执行上述功能修改的过程中检测上述冷重启BIOS选项的执行状态,其中,上述执行状态用于指示上述冷重启BIOS选项是否被执行上述功能修改;根据上述执行状态确定上述BIOS选项集合对应的目标集合标签的标签状态。
可选地,在本实施例中,冷重启BIOS选项的执行状态直接关系目标集合标签的标签状态,在执行功能修改的过程中,根据冷重启BIOS选项的执行状态可以确定BIOS选项集合对应的目标集合标签的标签状态。
在一个示例性实施例中,可以但不限于通过以下方式检测上述BIOS选项集合对应的目标集合标签的标签状态:读取状态标志寄存器FLAG中存储的参数;在上述参数为第一数值的情况下,确定上述标签状态处于上述置起状态;在上述参数为第二数值的情况下,确定上述标签状态处于上述未置起状态。
可选地,在本实施例中,目标集合标签的标签状态的检测方式可以是读取状态标志寄存器FLAG中存储的参数,再根据参数去确定的,比如:在检测到FLAG中存储的参数为A(上述第一数值)的情况下,确定标签状态处于置起状态;在检测到FLAG中存储的参数为B(上述第二数值)的情况下,确定标签状态处于未置起状态。
在一个示例性实施例中,可以但不限于通过以下方式根据上述执行状态确定上述BIOS选项集合对应的目标集合标签的标签状态:在上述执行状态指示在执行上述功能修改的过程中在未对上述冷重启BIOS选项执行上述功能修改的情况下,确定上述目标集合标签的上述标签状态被设置在未置起状态;在上述执行状态指示在执行上述功能修改的过程中在对上述冷重启BIOS选项执行了上述功能修改的情况下,确定上述标签状态被转换为上述置起状态。
可选地,在本实施例中,标签状态可以设置默认状态为未置起状态,但是,在上述执行状态指示在执行功能修改的过程中在对冷重启BIOS选项执行了功能修改的情况下,将标签状态从未置起状态转换为置起状态。
在一个示例性实施例中,在上述检测上述BIOS选项集合对应的目标集合标签的标签状态之前,还可以但不限于包括以下方式:在执行上述功能修改的过程中,获取被执行上述功能修改的每个目标BIOS选项的目标生效方式;根据上述目标生效方式处理上述目标集合标签的上述标签状态。
可选地,在本实施例中,由于目标集合标签的标签状态直接关系到后续对服务器的重启方式的选择和执行,因此,可以通过被执行功能修改的每个目标BIOS选项的目标生效方式去确定目标集合标签的标签状态。
在一个示例性实施例中,可以但不限于通过以下方式获取被执行上述功能修改的每个目标BIOS选项的目标生效方式:获取被执行上述功能修改的每个目标BIOS选项的目标选项名称;从具有对应关系的选项名称和生效方式中获取每个上述目标BIOS选项对应的目标生效方式,其中,上述生效方式包括冷重启和热重启。
可选地,在本实施例中,如图3所示,在执行BIOS选项的功能修改的过程中,可以获取被执行功能修改的每个目标BIOS选项的目标选项名称,例如,{BIOS选项3}被执行功能修改,从记录了对应关系的选项名称和生效方式中查询{BIOS选项3}对应的目标生效方式,其中,生效方式包括冷重启和热重启,根据目标生效方式处理包含{BIOS选项3}的BIOS选项集合的目标集合标签的标签状态。
在一个示例性实施例中,可以但不限于通过以下方式根据上述目标生效方式处理上述目标集合标签的上述标签状态:在上述目标生效方式为热重启的情况下,将上述目标集合标签的上述标签状态保持在未置起状态;在上述目标生效方式为冷重启的情况下,将上述目标集合标签的上述标签状态转换为上述置起状态。
可选地,在本实施例中,目标集合标签的标签状态可以默认设置为未置起状态,如图3所示,在对{BIOS选项1}执行BIOS选项的功能修改的过程中,确定{BIOS选项1}的目标生效方式为上述热重启的情况下,将包含{BIOS选项1}的BIOS选项集合的目标集合标签的上述标签状态保持在未置起状态;继续对{BIOS选项3}功能修改的过程中,确定{BIOS选项3}的目标生效方式为上述冷重启的情况下,将包含{BIOS选项1、BIOS选项3}的BIOS选项集合的目标集合标签的上述标签状态转换为置起状态。
在上述步骤S206提供的技术方案中,如图4所示,在确定了BIOS选项集合对应的集合属性之后,可以根据集合属性确定上述BIOS选项集合的服务器重启方式,比如:确定了BIOS选项集合对应的集合属性为热启动属性的情况下,确定上述BIOS选项集合的服务器重启方式为热重启;确定了BIOS选项集合对应的集合属性为冷启动属性的情况下,确定上述BIOS选项集合的服务器重启方式为冷重启。目的在于服务器重启方式可以控制上述BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效。
在一个示例性实施例中,可以但不限于通过以下方式根据上述集合属性确定上述BIOS选项集合的服务器重启方式:在上述集合属性用于指示上述BIOS选项集合中存在冷重启BIOS选项的情况下,确定上述服务器重启方式为冷重启;在上述集合属性用于指示上述BIOS选项集合中不存在冷重启BIOS选项情况下,确定上述服务器重启方式为热重启。
可选地,在本实施例中,在集合属性用于指示上述BIOS选项集合中存在冷重启BIOS选项的情况下,也就是说,为了控制BIOS选项集合中所包括的全部BIOS选项在服务器重启后均生效,可以确定服务器重启方式为冷重启;
可选地,在本实施例中,在集合属性用于指示BIOS选项集合中不存在冷重启BIOS选项的情况下,也就是说,为了控制BIOS选项集合中所包括的全部BIOS选项在服务器重启后均生效,可以确定服务器重启方式为热重启。
在上述步骤S208提供的技术方案中,在确定服务器重启方式之后,采用上述服务器重启方式重启上述服务器,可以控制上述BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效。
在一个示例性实施例中,可以但不限于通过以下方式采用上述服务器重启方式重启上述服务器:在上述服务器重启方式为冷重启的情况下,检测上述服务器当前接收到的用户控制指令;根据上述服务器重启方式与上述用户控制指令重启上述服务器;在上述服务器重启方式为热重启的情况下,对上述服务器执行上述用户控制指令,其中,上述用户控制指令为用户发起的对上述服务器执行重启的指令。
可选地,在本实施例中,图5是根据本申请实施例的一种服务器重启方式的示意图,如图5所示,在服务器重启方式为热重启的情况下,BIOS选项集合中所包括的全部BIOS选项在上述服务器执行热重启和冷重启后均可以生效,因此,可以不对用户控制指令进行处理,可以直接执行上述用户控制指令。
在一个示例性实施例中,可以但不限于通过以下方式检测上述服务器当前接收到的用户控制指令:访问上述服务器对应的操作系统OS;从上述操作系统OS中检测上述服务器当前接收到的用户发起的对上述服务器执行重启的指令作为上述用户控制指令。
可选地,在本实施例中,用户控制指令可以但不限于通过访问上述服务器对应的操作系统OS(Operating System)的去检测。
在一个示例性实施例中,可以但不限于通过以下方式根据上述服务器重启方式与上述用户控制指令重启上述服务器:在上述用户控制指令指示了对上述服务器执行热重启的情况下,将上述用户控制指令修改为对上述服务器执行的冷重启,并执行修改后的上述用户控制指令;在上述用户控制指令指示了对上述服务器执行冷重启的情况下,直接执行上述用户控制指令。
可选地,在本实施例中,如图5所示,在服务器重启方式为冷重启的情况下,首先从上述服务器对应的操作系统OS中检测上述服务器当前接收到的用户控制指令,用户控制指令可能存在两种情况,包括指示对上述服务器执行热重启,和指示对上述服务器执行冷重启,在上述用户控制指令指示了对上述服务器执行热重启的情况下,将上述用户控制指令修改为对上述服务器执行的冷重启,并执行修改后的上述用户控制指令;在上述用户控制指令指示了对上述服务器执行冷重启的情况下,也就是说,用户控制指令与服务器重启方式匹配,可以直接执行上述用户控制指令。
在一个示例性实施例中,可以但不限于通过以下方式将上述用户控制指令修改为对上述服务器执行的冷重启:生成携带了冷重启信息的目标控制指令;根据上述目标控制指令将上述用户控制指令修改为对上述服务器执行冷重启。
可选地,在本实施例中,目标控制指令用于将上述用户控制指令修改为对上述服务器执行冷重启。
在一个示例性实施例中,可以但不限于通过以下方式根据上述目标控制指令将上述用户控制指令修改为对上述服务器执行冷重启:将上述目标控制指令发送至上述服务器中的中央处理器CPU;根据上述目标控制指令 控制上述CPU对上述服务器执行冷重启。
可选地,在本实施例中,服务器执行重启可以通过CPU(Central Processing Unit,中央处理器)控制。
在一个示例性实施例中,可以但不限于通过以下方式根据上述目标控制指令控制上述CPU对上述服务器执行冷重启:根据携带了冷重启信息的上述目标控制指令修改部署在上述服务器中的上述CPU对应的寄存器参数,其中,上述CPU用于响应上述目标控制指令根据上述寄存器参数控制上述服务器执行冷重启。
可选地,在本实施例中,CPU可以根据寄存器参数决定服务器执行的重启方式,因此,可以生成携带了冷重启信息的目标控制指令,修改寄存器参数,从而将上述用户控制指令修改为对上述服务器执行的冷重启。
在一个示例性实施例中,可以但不限于通过以下方式根据携带了冷重启信息的上述目标控制指令修改部署在上述服务器中的上述CPU对应的寄存器参数:在上述CPU接收到上述冷重启信息的情况下,从具有对应关系的服务器重启方式和寄存器参数中获取上述冷重启对应的冷重启寄存器参数;将当前上述CPU对应的寄存器参数修改为上述冷重启寄存器参数。
可选地,在本实施例中,目标控制指令首先可以从具有对应关系的服务器重启方式和寄存器参数中获取上述冷重启对应的冷重启寄存器参数,然后将当前上述CPU对应的寄存器参数修改为上述冷重启寄存器参数。
为了更好的理解上述BIOS选项修改的生效的过程,以下再结合可选实施例对上述BIOS选项修改的生效流程进行说明,但不用于限定本申请实施例的技术方案。
在本实施例中提供了一种BIOS选项修改的生效方法,图6是根据本申请实施例的一种BIOS选项修改的生效流程的示意图,如图6所示,主要包括如下步骤:
步骤S601:用户在OS下使用SCE进行批量修改BIOS选项,输入修改选项指令;
步骤S602:触发SW SMI(SW System Management Interrupt,软件解码系统管理中断)执行相应的SMI Handler(系统管理中断操作)进行BIOS选项修改;
步骤S603:BIOS检测用户修改的所有BIOS选项是否包含Cold Reboot生效的;
步骤S604:如果包含Cold Reboot生效的BIOS选项,则置起Flag(标签状态);
步骤S605:SCE工具修改BIOS选项指令返回成功状态;
步骤S606:用户在OS下使用重启指令进行重启(Warm Reboot);
步骤S607:BIOS检测到OS下使用重启指令进行重启,检测Flag是否被置起;
步骤S608:Flag没有被置起,继续进行Warm Reboot;
步骤S609:Flag被置起,BIOS将Warm Reboot转化为Cold Reboot,进行Cold Reboot。
需要说明的是,本申请实施例采用一种快速修改BIOS选项后自动生效的方法,当在OS下使用SCE工具进行批量修改BIOS选项时,SCE工具会触发SW SMI去执行相应的SMI Handler,在SMI Handler实现BIOS选项的修改。在修改BIOS选项之后,BIOS去识别SCE工具修改的BIOS选项是否包含Cold Reboot生效的选项,如果是,则 置起相应Flag。SCE工具修改BIOS选项成功后,用户可直接使用OS下指令进行重启,BIOS检测到OS下重启后去检查Flag是否被置起,如果Flag没有被置起则继续进行Warm Reboot,如果Flag被置起,BIOS将Warm Reboot转化成Cold Reboot。这样用户不用处理修改的选项是那类重启生效,该采用哪种重启方式,这些事情都由上述申请实施例的方法去处理,用户使用起来更加方便更加快速。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。
图7是根据本申请实施例的一种BIOS选项修改的生效装置的结构框图;如图7所示,包括:
第一获取模块702,用于获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;
检测模块704,用于检测上述BIOS选项集合的集合属性,其中,上述集合属性用于指示上述BIOS选项集合中是否存在冷重启BIOS选项,上述冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;
确定模块706,用于根据上述集合属性确定上述BIOS选项集合的服务器重启方式,其中,上述服务器重启方式用于控制上述BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效;
重启模块708,用于采用上述服务器重启方式重启上述服务器。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
通过上述实施例,首先获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合,然后检测BIOS选项集合的集合属性,根据集合属性可以确定BIOS选项集合中是否存在冷重启BIOS选项,冷重启BIOS选项也就是修改功能仅执行冷重启才允许生效的选项,之后根据集合属性确定BIOS选项集合适用的服务器重启方式,也就是说,根据集合属性确定的服务器重启方式可以控制BIOS选项集合中所包括的全部BIOS选项在上述服务器重启后均生效,最后采用服务器重启方式重启服务器。采用上述技术方案,解决了相关技术中,BIOS修改的生效的效率较低等问题,实现了提高BIOS修改的生效的效率的技术效果。
在一个示例性实施例中,上述检测模块,包括:
第一检测单元,用于检测上述BIOS选项集合对应的目标集合标签的标签状态;
第一确定单元,用于在上述标签状态处于置起状态的情况下,确定上述BIOS选项集合的上述集合属性为冷启动属性,其中,上述冷启动属性用于指示上述BIOS选项集合中存在上述冷重启BIOS选项;
第二确定单元,用于在上述标签状态处于未置起状态的情况下,确定上述BIOS选项集合的上述集合属性为热启动属性,其中,上述热启动属性用于指示上述BIOS选项集合中不存在上述冷重启BIOS选项。
在一个示例性实施例中,上述第一检测单元,还用于:
在执行上述功能修改的过程中检测上述冷重启BIOS选项的执行状态,其中,上述执行状态用于指示上述冷重启BIOS选项是否被执行上述功能修改;
根据上述执行状态确定上述BIOS选项集合对应的目标集合标签的标签状态。
在一个示例性实施例中,上述上述第一检测单元,还用于:
读取状态标志寄存器FLAG中存储的参数;
在上述参数为第一数值的情况下,确定上述标签状态处于上述置起状态;
在上述参数为第二数值的情况下,确定上述标签状态处于上述未置起状态。
在一个示例性实施例中,上述第一检测单元,还用于:
在上述执行状态指示在执行上述功能修改的过程中在未对上述冷重启BIOS选项执行上述功能修改的情况下,确定上述目标集合标签的上述标签状态被设置在未置起状态;
在上述执行状态指示在执行上述功能修改的过程中在对上述冷重启BIOS选项执行了上述功能修改的情况下,确定上述标签状态被转换为上述置起状态。
在一个示例性实施例中,上述装置还包括:
获取模块,用于在上述检测上述BIOS选项集合对应的目标集合标签的标签状态之前,在执行上述功能修改的过程中,获取被执行上述功能修改的每个目标BIOS选项的目标生效方式;
处理模块,用于根据上述目标生效方式处理上述目标集合标签的上述标签状态。
在一个示例性实施例中,上述获取模块,包括:
第一获取单元,用于获取被执行上述功能修改的每个目标BIOS选项的目标选项名称;
第二获取单元,用于从具有对应关系的选项名称和生效方式中获取每个上述目标BIOS选项对应的目标生效方式,其中,上述生效方式包括冷重启和热重启。
在一个示例性实施例中,上述处理模块,包括:
保持单元,用于在上述目标生效方式为热重启的情况下,将上述目标集合标签的上述标签状态保持在未置起状态;
转换单元,用于在上述目标生效方式为冷重启的情况下,将上述目标集合标签的上述标签状态转换为上述置起状态。
在一个示例性实施例中,上述确定模块,包括:
第三确定单元,用于在上述集合属性用于指示上述BIOS选项集合中存在冷重启BIOS选项的情况下,确定上述服务器重启方式为冷重启;
第四确定单元,用于在上述集合属性用于指示上述BIOS选项集合中不存在冷重启BIOS选项情况下,确定上 述服务器重启方式为热重启。
在一个示例性实施例中,上述重启模块,包括:
第二检测单元,用于在上述服务器重启方式为冷重启的情况下,检测上述服务器当前接收到的用户控制指令;根据上述服务器重启方式与上述用户控制指令重启上述服务器;
执行单元,用于在上述服务器重启方式为热重启的情况下,对上述服务器执行上述用户控制指令,其中,上述用户控制指令为用户发起的对上述服务器执行重启的指令。
在一个示例性实施例中,上述第二检测单元,还用于:
访问上述服务器对应的操作系统OS;
从上述操作系统OS中检测上述服务器当前接收到的用户发起的对上述服务器执行重启的指令作为上述用户控制指令。
在一个示例性实施例中,上述第二检测单元,还用于:
在上述用户控制指令指示了对上述服务器执行热重启的情况下,将上述用户控制指令修改为对上述服务器执行的冷重启,并执行修改后的上述用户控制指令;
在上述用户控制指令指示了对上述服务器执行冷重启的情况下,直接执行上述用户控制指令。
在一个示例性实施例中,上述第二检测单元,还用于:
生成携带了冷重启信息的目标控制指令;
根据上述目标控制指令将上述用户控制指令修改为对上述服务器执行冷重启。
在一个示例性实施例中,上述第二检测单元,还用于:
将上述目标控制指令发送至上述服务器中的中央处理器CPU;
根据上述目标控制指令控制上述CPU对上述服务器执行冷重启。
在一个示例性实施例中,上述第二检测单元,还用于:
根据携带了冷重启信息的上述目标控制指令修改部署在上述服务器中的上述CPU对应的寄存器参数,其中,上述CPU用于响应上述目标控制指令根据上述寄存器参数控制上述服务器执行冷重启。
在一个示例性实施例中,上述上述第二检测单元,还用于:
在上述CPU接收到上述冷重启信息的情况下,从具有对应关系的服务器重启方式和寄存器参数中获取上述冷重启对应的冷重启寄存器参数;
将当前上述CPU对应的寄存器参数修改为上述冷重启寄存器参数。
在一个示例性实施例中,上述第一获取模块,包括:
创建单元,用于在检测到BIOS选项修改工具启动的情况下,创建初始BIOS选项集合,其中,上述BIOS选项修改工具用于对BIOS选项执行上述功能修改;
第三获取单元,用于在上述BIOS选项修改工具对BIOS选项执行上述功能修改的过程中,获取被执行了上述功能修改的目标BIOS选项;
添加单元,用于将上述目标BIOS选项添加至上述初始BIOS选项集合中,得到上述BIOS选项集合。
本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本申请的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
本实施例中的示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
以上上述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种BIOS选项修改的生效方法,其特征在于,包括:
    获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;
    检测所述BIOS选项集合的集合属性,其中,所述集合属性用于指示所述BIOS选项集合中是否存在冷重启BIOS选项,所述冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;
    根据所述集合属性确定所述BIOS选项集合的服务器重启方式,其中,所述服务器重启方式用于控制所述BIOS选项集合中所包括的全部BIOS选项在所述服务器重启后均生效;
    采用所述服务器重启方式重启所述服务器。
  2. 根据权利要求1所述的方法,其特征在于,所述检测所述BIOS选项集合的集合属性,包括:
    检测所述BIOS选项集合对应的目标集合标签的标签状态;
    在所述标签状态处于置起状态的情况下,确定所述BIOS选项集合的所述集合属性为冷启动属性,其中,所述冷启动属性用于指示所述BIOS选项集合中存在所述冷重启BIOS选项;
    在所述标签状态处于未置起状态的情况下,确定所述BIOS选项集合的所述集合属性为热启动属性,其中,所述热启动属性用于指示所述BIOS选项集合中不存在所述冷重启BIOS选项。
  3. 根据权利要求2所述的方法,其特征在于,所述检测所述BIOS选项集合对应的目标集合标签的标签状态,包括:
    在执行所述功能修改的过程中检测所述冷重启BIOS选项的执行状态,其中,所述执行状态用于指示所述冷重启BIOS选项是否被执行所述功能修改;
    根据所述执行状态确定所述BIOS选项集合对应的目标集合标签的标签状态。
  4. 根据权利要求2所述的方法,其特征在于,所述检测所述BIOS选项集合对应的目标集合标签的标签状态,包括:
    读取状态标志寄存器FLAG中存储的参数;
    在所述参数为第一数值的情况下,确定所述标签状态处于所述置起状态;
    在所述参数为第二数值的情况下,确定所述标签状态处于所述未置起状态。
  5. 根据权利要求3所述的方法,其特征在于,所述根据所述执行状态确定所述BIOS选项集合对应的目标集合标签的标签状态,包括:
    在所述执行状态指示在执行所述功能修改的过程中在未对所述冷重启BIOS选项执行所述功能修改的情况下,确定所述目标集合标签的所述标签状态被设置在未置起状态;
    在所述执行状态指示在执行所述功能修改的过程中在对所述冷重启BIOS选项执行了所述功能修改的情况下,确定所述标签状态被转换为所述置起状态。
  6. 根据权利要求2所述的方法,其特征在于,在所述检测所述BIOS选项集合对应的目标集合标签的标签状态之前,所述方法还包括:
    在执行所述功能修改的过程中,获取被执行所述功能修改的每个目标BIOS选项的目标生效方式;
    根据所述目标生效方式处理所述目标集合标签的所述标签状态。
  7. 根据权利要求6所述的方法,其特征在于,所述获取被执行所述功能修改的每个目标BIOS选项的目标生效方式,包括:
    获取被执行所述功能修改的每个目标BIOS选项的目标选项名称;
    从具有对应关系的选项名称和生效方式中获取每个所述目标BIOS选项对应的目标生效方式,其中,所述生效方式包括冷重启和热重启。
  8. 根据权利要求6所述的方法,其特征在于,所述根据所述目标生效方式处理所述目标集合标签的所述标签状态,包括:
    在所述目标生效方式为热重启的情况下,将所述目标集合标签的所述标签状态保持在未置起状态;
    在所述目标生效方式为冷重启的情况下,将所述目标集合标签的所述标签状态转换为所述置起状态。
  9. 根据权利要求1所述的方法,其特征在于,所述根据所述集合属性确定所述BIOS选项集合的服务器重启方式,包括:
    在所述集合属性用于指示所述BIOS选项集合中存在冷重启BIOS选项的情况下,确定所述服务器重启方式为冷重启;
    在所述集合属性用于指示所述BIOS选项集合中不存在冷重启BIOS选项情况下,确定所述服务器重启方式为热重启。
  10. 根据权利要求1所述的方法,其特征在于,所述采用所述服务器重启方式重启所述服务器,包括:
    在所述服务器重启方式为冷重启的情况下,检测所述服务器当前接收到的用户控制指令;根据所述服务器重启方式与所述用户控制指令重启所述服务器;
    在所述服务器重启方式为热重启的情况下,对所述服务器执行所述用户控制指令,其中,所述用户控制指令为用户发起的对所述服务器执行重启的指令。
  11. 根据权利要求10所述的方法,其特征在于,所述检测所述服务器当前接收到的用户控制指令,包括:
    访问所述服务器对应的操作系统OS;
    从所述操作系统OS中检测所述服务器当前接收到的用户发起的对所述服务器执行重启的指令作为所述用户控制指令。
  12. 根据权利要求10所述的方法,其特征在于,所述根据所述服务器重启方式与所述用户控制指令重启所述服务器,包括:
    在所述用户控制指令指示了对所述服务器执行热重启的情况下,将所述用户控制指令修改为对所述服务器执行的冷重启,并执行修改后的所述用户控制指令;
    在所述用户控制指令指示了对所述服务器执行冷重启的情况下,直接执行所述用户控制指令。
  13. 根据权利要求12所述的方法,其特征在于,所述将所述用户控制指令修改为对所述服务器执行的冷重启,包括:
    生成携带了冷重启信息的目标控制指令;
    根据所述目标控制指令将所述用户控制指令修改为对所述服务器执行冷重启。
  14. 根据权利要求13所述的方法,其特征在于,所述根据所述目标控制指令将所述用户控制指令修改为对所述服务器执行冷重启,包括:
    将所述目标控制指令发送至所述服务器中的中央处理器CPU;
    根据所述目标控制指令控制所述CPU对所述服务器执行冷重启。
  15. 根据权利要求14所述的方法,其特征在于,所述根据所述目标控制指令控制所述CPU对所述服务器执行冷重启,包括:
    根据携带了冷重启信息的所述目标控制指令修改部署在所述服务器中的所述CPU对应的寄存器参数,其中,所述CPU用于响应所述目标控制指令根据所述寄存器参数控制所述服务器执行冷重启。
  16. 根据权利要求15所述的方法,其特征在于,所述根据携带了冷重启信息的所述目标控制指令修改部署在所述服务器中的所述CPU对应的寄存器参数,包括:
    在所述CPU接收到所述冷重启信息的情况下,从具有对应关系的服务器重启方式和寄存器参数中获取所述冷重启对应的冷重启寄存器参数;
    将当前所述CPU对应的寄存器参数修改为所述冷重启寄存器参数。
  17. 根据权利要求1所述的方法,其特征在于,所述获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合,包括:
    在检测到BIOS选项修改工具启动的情况下,创建初始BIOS选项集合,其中,所述BIOS选项修改工具用于对BIOS选项执行所述功能修改;
    在所述BIOS选项修改工具对BIOS选项执行所述功能修改的过程中,获取被执行了所述功能修改的目标BIOS选项;
    将所述目标BIOS选项添加至所述初始BIOS选项集合中,得到所述BIOS选项集合。
  18. 一种BIOS选项修改的生效装置,其特征在于,包括:
    第一获取模块,用于获取服务器中执行了功能修改的基本输入输出系统BIOS选项集合;
    检测模块,用于检测所述BIOS选项集合的集合属性,其中,所述集合属性用于指示所述BIOS选项集合中是否存在冷重启BIOS选项,所述冷重启BIOS选项为修改功能仅执行冷重启才允许生效的选项;
    确定模块,用于根据所述集合属性确定所述BIOS选项集合的服务器重启方式,其中,所述服务器重启方式用于控制所述BIOS选项集合中所包括的全部BIOS选项在所述服务器重启后均生效;
    重启模块,用于采用所述服务器重启方式重启所述服务器。
  19. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质包括存储的程序,其中,所述程序运行时执行权利要求1至17中任一项所述的方法。
  20. 一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行权利要求1至17中任一项所述的方法。
PCT/CN2023/081990 2022-11-17 2023-03-16 Bios选项修改的生效方法和装置、非易失性可读存储介质及电子装置 WO2024103583A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211461784.9 2022-11-17
CN202211461784.9A CN115495161B (zh) 2022-11-17 2022-11-17 Bios选项修改的生效方法和装置、存储介质

Publications (1)

Publication Number Publication Date
WO2024103583A1 true WO2024103583A1 (zh) 2024-05-23

Family

ID=85114788

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081990 WO2024103583A1 (zh) 2022-11-17 2023-03-16 Bios选项修改的生效方法和装置、非易失性可读存储介质及电子装置

Country Status (2)

Country Link
CN (1) CN115495161B (zh)
WO (1) WO2024103583A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495161B (zh) * 2022-11-17 2023-04-07 苏州浪潮智能科技有限公司 Bios选项修改的生效方法和装置、存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015079370A (ja) * 2013-10-17 2015-04-23 シャープ株式会社 電子機器
CN109308196A (zh) * 2018-08-22 2019-02-05 腾讯科技(深圳)有限公司 一种多机型设备复用方法、装置及存储介质
US10204011B1 (en) * 2016-06-30 2019-02-12 EMC IP Holding Company LLC Techniques for partially restarting a computing device in response to a configuration change
CN113867814A (zh) * 2021-09-16 2021-12-31 苏州浪潮智能科技有限公司 基于uefi接口实现服务器多类型重启的方法及装置
CN115495161A (zh) * 2022-11-17 2022-12-20 苏州浪潮智能科技有限公司 Bios选项修改的生效方法和装置、存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012100738A1 (de) * 2012-01-30 2013-08-01 Fujitsu Technology Solutions Intellectual Property Gmbh Verfahren zur Konfiguration eines BIOS in einem Computersystem sowie Computerprogrammprodukt
CN114047941B (zh) * 2022-01-12 2022-04-26 飞狐信息技术(天津)有限公司 一种redis服务节点的配置升级方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015079370A (ja) * 2013-10-17 2015-04-23 シャープ株式会社 電子機器
US10204011B1 (en) * 2016-06-30 2019-02-12 EMC IP Holding Company LLC Techniques for partially restarting a computing device in response to a configuration change
CN109308196A (zh) * 2018-08-22 2019-02-05 腾讯科技(深圳)有限公司 一种多机型设备复用方法、装置及存储介质
CN113867814A (zh) * 2021-09-16 2021-12-31 苏州浪潮智能科技有限公司 基于uefi接口实现服务器多类型重启的方法及装置
CN115495161A (zh) * 2022-11-17 2022-12-20 苏州浪潮智能科技有限公司 Bios选项修改的生效方法和装置、存储介质

Also Published As

Publication number Publication date
CN115495161A (zh) 2022-12-20
CN115495161B (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
US20190158626A1 (en) Method, apparatus and computer readable storage medium for processing service
US20200193027A1 (en) Firmware upgrade method, slave station of robot, and machine readable storage medium
US10802916B2 (en) System and method to enable rapid recovery of an operating system image of an information handling system after a malicious attack
US11789718B2 (en) System and method for subscription based solution modification implementation
US11588909B1 (en) System and method for subscription based solution data compatibility
WO2024103583A1 (zh) Bios选项修改的生效方法和装置、非易失性可读存储介质及电子装置
US11341008B2 (en) System and method for reducing failover times in a redundant management module configuration
US10460111B2 (en) System and method to isolate host and system management in an information handling system
WO2024169300A1 (zh) 服务器启动项的调整方法和装置、非易失性可读存储介质及电子装置
CN114257551A (zh) 一种分布式限流的方法及系统、存储介质
CN110806928A (zh) 一种作业提交方法及系统
CN111382008A (zh) 一种虚拟机数据的备份方法、装置及系统
CN115208951A (zh) 请求处理方法、装置、电子设备及计算机可读存储介质
CN113391845A (zh) 一种数据交互方法、装置及相关组件
KR102705465B1 (ko) 이상 처리 방법, 단말 기기 및 저장 매체
CN110675058A (zh) 工单处理方法、电子设备、存储介质及系统
CN106933932B (zh) 数据处理方法、装置及应用服务器
CN114817107B (zh) Pcie设备切换系统、方法、装置、计算机设备和存储介质
CN111694600B (zh) 镜像文件的设计、芯片的运行方法、系统、设备和介质
CN107704399B (zh) 一种存储数据的方法和装置
CN112241283B (zh) 软件升级方法、装置、计算机设备和存储介质
TW201816605A (zh) 應用升級方法及裝置
US20230112219A1 (en) Notification based software management via connected devices
WO2023168746A1 (zh) 基于域控制器平台的arm linux操作系统的USB升级方法及设备
TWI298137B (zh)

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23890029

Country of ref document: EP

Kind code of ref document: A1