How to activate basic input / output system options and computing devices
By determining the restart method of the computing device based on the basic input/output system option modification instructions and cold restart table, the problem of low efficiency in taking effect is solved, a more efficient restart process is achieved, and the stability and reliability of the computing device are ensured.
Patent Information
- Application Number
- CN202511463805.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-10-14
AI Technical Summary
In the existing technology, the efficiency of basic input/output system options is low, especially due to the efficiency problem caused by the continuous use of cold restart.
By obtaining the basic input/output system option modification command, the restart method (cold restart or warm restart) of the computing device is determined according to the option identifier and the cold restart table, and the computing device is restarted according to the determined restart method so that the option modification value takes effect.
It improves the accuracy of restart method determination, avoids computing device failures caused by incorrect restart methods, improves restart efficiency, and maintains the stability and reliability of computing devices.
Smart Images

Figure CN120929309B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computing device technology, and more particularly to a method for enabling basic input / output system options and a computing device. Background Technology
[0002] In the field of computing device technology, when it is necessary to modify the option values of the Basic Input / Output System (PIS) options, specific tools can be used. However, the modified options (PIS options) will only take effect after the computing device is restarted. Restarting can be done via either a cold restart (which takes longer to take effect) or a warm restart (which takes less time to take effect).
[0003] To ensure that all modified options take effect, related technologies typically employ a cold reboot method, controlling the computing device to restart so that the modified options take effect.
[0004] However, in related technologies, regardless of which option value is modified, a cold restart is used, which results in low efficiency in the effective implementation of the options. Summary of the Invention
[0005] This application provides a method and computing device for activating basic input / output system options, so as to at least solve the problem of low efficiency in activating basic input / output system options in related technologies.
[0006] In a first aspect, embodiments of this application provide a method for activating basic input / output system options, including:
[0007] Obtain basic input / output system option modification instructions; basic input / output system option modification instructions include an option identifier of at least one option to be modified, and a target option value for each option to be modified;
[0008] Based on the option identifier of at least one option to be modified and the target option value of each option to be modified, the option value of each option to be modified in memory is modified.
[0009] Based on the option identifier of at least one option to be modified and the cold restart table, determine the restart method of the computing device; the restart method is either a cold restart or a warm restart; the cold restart table includes option information for at least one cold restart option;
[0010] Restart the computing device according to the restart method so that the option modification value of the option to be modified takes effect; the option modification value of the option to be modified is the modified option value of the option to be modified.
[0011] Secondly, embodiments of this application provide an apparatus for enabling basic input / output system options, comprising:
[0012] The acquisition module is used to acquire basic input / output system option modification instructions; the basic input / output system option modification instructions include an option identifier of at least one option to be modified, and a target option value for each option to be modified;
[0013] The processing module is used to modify the option value of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0014] The processing module is also used to determine the restart method of the computing device based on the option identifier of at least one option to be modified and a cold restart table; the restart method is either a cold restart or a warm restart; the cold restart table includes option information for at least one cold restart option;
[0015] The restart module is used to restart the computing device according to the restart method, so that the option modification value of the option to be modified takes effect; the option modification value of the option to be modified is the modified option value of the option to be modified.
[0016] Thirdly, embodiments of this application provide a computing device, including:
[0017] The processor, and the memory that is in communication with the processor;
[0018] Memory is used to store instructions that the computer executes;
[0019] The processor is used to execute computer execution instructions stored in memory to implement the method of the first aspect.
[0020] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of the first aspect.
[0021] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, is used to implement the method of the first aspect.
[0022] This application provides a method for activating basic input / output system options and a computing device. After modifying the option value of an option to be modified, the computing device can determine the restart method (cold restart or warm restart) based on the option identifier of at least one option to be modified and a cold restart table (including option information of at least one cold restart option), and restart the computing device according to the restart method to make the modified option value take effect. This method ensures that the restart method of the computing device matches the actual situation of the option to be modified, improves the accuracy of cold restart method determination, avoids computing device failure due to incorrect restart method, improves the restart efficiency of the computing device, and maintains the stability and reliability of the computing device. Attached Figure Description
[0023] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application;
[0025] Figure 2 A flowchart illustrating a method for enabling basic input / output system options according to an embodiment of this application;
[0026] Figure 3 A flowchart illustrating a second embodiment of a method for enabling basic input / output system options provided in this application.
[0027] Figure 4 A flowchart illustrating a third embodiment of a method for enabling basic input / output system options provided in this application.
[0028] Figure 5 A schematic diagram of a device for enabling basic input / output system options provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0031] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0032] In the field of computing device technology, when it is necessary to modify the option values of the Basic Output Input System (BIOS), specific modification tools (such as the System Configuration Editor (SCE) tool) can be used. However, the modified options (input / output system options) will only take effect after the computing device is restarted. Restarting can be either a cold restart or a warm restart.
[0033] To ensure that all modified options take effect, related technologies typically employ a cold reboot method, controlling the computing device to restart so that the modified options take effect.
[0034] However, in related technologies, regardless of which option value is modified, a cold restart is used, which results in low efficiency in the effective implementation of the options.
[0035] To address the aforementioned issues, this application provides a method for enabling basic input / output system options. After modifying the option value of an option to be modified, the computing device can determine its restart method (cold restart or warm restart) based on the option identifier of at least one option to be modified and a cold restart table (including option information for at least one cold restart option). The computing device is then restarted according to the restart method to make the modified option value take effect. This method ensures that the restart method of the computing device matches the actual situation of the option to be modified, improving the accuracy of cold restart method determination, avoiding computing device malfunctions due to incorrect restart methods, improving the restart efficiency of the computing device, and maintaining the stability and reliability of the computing device.
[0036] First, the application scenarios of the embodiments of this application will be described.
[0037] Figure 1 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Figure 1 As shown, the computing device 10 may include a processor 101, memory 102, non-volatile memory 103, and a BIOS chip 104.
[0038] The processor 101 is electrically connected to the memory 102, the non-volatile memory 103, and the BIOS chip 104.
[0039] Memory 102 is used to store the option values for each option. Among them, the options are BIOS options.
[0040] The non-volatile memory 103 is used to store the cold restart table (also known as the cold restart option table).
[0041] The BIOS chip 104 is used to store the BIOS program (also known as the BIOS firmware code). It should also be noted that the processor 101 is used to load the BIOS program. Furthermore, the processor 101 can run modification tools.
[0042] It should be noted that, Figure 1 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. This embodiment of the application does not... Figure 1 The actual form of the various components included is not limited, nor is the form specified. Figure 1 The interaction methods between components are limited, and can be set according to actual needs when applying the solution.
[0043] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0044] Figure 2 This is a flowchart illustrating a method for enabling basic input / output system options according to an embodiment of this application. See also... Figure 2 The method specifically includes the following steps:
[0045] S201: Obtain the basic input / output system option modification command.
[0046] In this embodiment, the computing device can obtain a basic input / output system option modification instruction. In one implementation, the basic input / output system option modification instruction can be user-inputted.
[0047] The basic input / output system option modification instruction may include an option identifier for at least one option to be modified, and a target option value for each option to be modified.
[0048] S202: Modify the option values of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0049] In this embodiment, the memory can store the option values of multiple options. These multiple options include at least one option to be modified. That is, the memory can store the option value of at least one option to be modified.
[0050] The computing device can modify the option value of each option in memory based on the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0051] In one implementation, the computing device can run a modification tool to modify the option values of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0052] Understandably, a computing device can run a modification tool to generate a modification request based on the option identifier of at least one option to be modified and the target option value of each option to be modified. The computing device can run the modification tool to send the modification request to the BIOS program. The computing device can run the BIOS program to modify the option values of each option to be modified in memory based on the option identifier of at least one option to be modified in the modification request and the target option value of each option to be modified in the modification request.
[0053] S203: Determine the restart method for the computing device based on the option identifier of at least one option to be modified and the cold restart table.
[0054] In this embodiment, the computing device can obtain a cold restart table. In one implementation, the Basic Input / Output System (PIS) option modification instruction includes a user identifier. The computing device can determine the candidate cold restart table corresponding to the user identifier from multiple candidate cold restart tables based on the user identifier. The computing device can then determine the candidate cold restart table corresponding to the user identifier as the cold restart table. For example, the user identifier can be an administrator or a regular user.
[0055] In one implementation, the computing device can access a cold restart table stored in non-volatile memory.
[0056] It should be noted that the cold restart table includes option information for at least one cold restart option. In one implementation, the option information for a cold restart option may include an option identifier (option identifier) and an initial value for the cold restart option. In another implementation, the option information for a cold restart option may also include the tab location of the cold restart option and the option name of the cold restart option.
[0057] The computing device can determine its restart method based on the option identifier of at least one option to be modified and a cold restart table. The restart method can be either a cold restart or a warm restart. In one implementation, the computing device can run a modification tool to determine the restart method based on the option identifier of at least one option to be modified and a cold restart table.
[0058] It should be noted that the value of the option to be modified is the value of the modified option.
[0059] The following describes the process by which a computing device determines its restart method based on the option identifier of at least one option to be modified and a cold restart table.
[0060] In one implementation:
[0061] For any option to be modified, the computing device can determine whether the option meets the cold restart conditions based on the option identifier of the option to be modified and the cold restart table.
[0062] The computing device can determine that the option to be modified is the target option if it finds that the option meets the cold restart conditions. Alternatively, the computing device can determine that the option to be modified is not the target option if it finds that the option does not meet the cold restart conditions.
[0063] The computing device can determine the total number of target options to be modified.
[0064] The computing device can determine the restart method based on the total number of devices.
[0065] S204: Restart the computing device according to the restart method so that the option modification values of the option to be modified take effect.
[0066] In this embodiment, the computing device can be restarted according to the restart method so that the option modification value of the option to be modified takes effect.
[0067] In one implementation, when the reboot method is a cold reboot, the computing device can write the first register value to the register corresponding to the reboot port. The first register value indicates a cold reboot. For example, the reboot port number could be 0xCF9, and the first register value could be 0x06. It should be noted that in another implementation, the computing device can run a modification tool, and when the reboot method is a cold reboot, call the cold reboot interface `ColdReset()` function to generate a cold reboot instruction. The computing device can execute the cold reboot instruction, writing the first register value to the register corresponding to the reboot port. It should be noted that when the value of the register corresponding to the reboot port is the first register value, the computing device can save the current system state, shut down the computing device hardware, completely power off, and then power on and restart the computing device to make the modified option values take effect.
[0068] In one implementation, when the reboot method is a warm reboot, the computing device can write the value of the second register to the register corresponding to the reboot port. The value of the second register indicates the warm reboot mode. For example, the value of the second register can be 0x04. It should be noted that in another implementation, the computing device can run a modification tool, and when the reboot method is a warm reboot, call the warm reboot interface WarmReset() to generate a warm reboot instruction. The computing device can execute the warm reboot instruction, writing the value of the second register to the register corresponding to the reboot port. It should be noted that when the value of the register corresponding to the reboot port is the value of the second register, the computing device quickly reloads the system kernel and drivers through a software-level reset operation, making the modified option values take effect.
[0069] The beneficial effects of this embodiment are as follows: In this embodiment, the computing device can obtain a Basic Input / Output System (PIOS) option modification instruction; the PIOS option modification instruction includes an option identifier of at least one option to be modified, and a target option value for each option to be modified. The computing device can modify the option values of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value for each option to be modified. The computing device can determine the restart method of the computing device based on the option identifier of at least one option to be modified and a cold restart table. The restart method is either a cold restart or a warm restart; the cold restart table includes option information for at least one cold restart option. The computing device can restart the computing device according to the restart method to make the option modification value of the option to be modified effective; the option modification value of the option to be modified is the modified option value of the option to be modified. Through the above method, the restart method of the computing device can be matched with the actual situation of the option to be modified, improving the accuracy of determining the cold restart method, avoiding the situation where the computing device fails due to an incorrect restart method, improving the restart efficiency of the computing device, and maintaining the stability and reliability of the computing device.
[0070] Figure 3 This is a flowchart illustrating a second embodiment of a method for enabling basic input / output system options, provided in this application. See also... Figure 3 The method specifically includes the following steps:
[0071] S301: Obtain the basic input / output system option modification command.
[0072] The basic input / output system option modification instruction includes an option identifier for at least one option to be modified, and a target option value for each option to be modified.
[0073] S302: Modify the option value of each option to be modified in memory according to the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0074] S303: For any option to be modified, determine whether the option meets the cold restart conditions based on the option identifier of the option to be modified and the cold restart table.
[0075] In this embodiment, for any option to be modified, the computing device can determine whether the option to be modified meets the cold restart conditions based on the option identifier of the option to be modified and the cold restart table.
[0076] The computing device can execute S304 if it determines that the option to be modified meets the conditions for a cold restart.
[0077] The computing device can execute S305 if it determines that the option to be modified does not meet the conditions for a cold restart.
[0078] The cold restart table includes option information for at least one cold restart option.
[0079] The following describes the process by which the computing device determines whether an option to be modified meets the cold restart conditions based on the option identifier and the cold restart table.
[0080] In one implementation:
[0081] The option information for the cold reboot option can include the option identifier for the cold reboot option.
[0082] The computing device can determine whether a first cold restart option exists among at least one cold restart option based on the option identifier of the option to be modified and the option identifier of at least one cold restart option. The option identifier of the first cold restart option is the same as the option identifier of the option to be modified.
[0083] The computing device can determine that the option to be modified meets the cold restart conditions if it determines that a first cold restart option exists among at least one cold restart option.
[0084] or,
[0085] The computing device can determine that the option to be modified does not meet the cold restart conditions if it determines that the first cold restart option is not present among at least one cold restart option.
[0086] In one implementation:
[0087] The option information for the cold reboot option can include the option identifier and the initial value of the cold reboot option.
[0088] The computing device can determine whether a first cold restart option exists among at least one cold restart option based on the option identifier of the option to be modified and the option identifier of at least one cold restart option. The option identifier of the first cold restart option is the same as the option identifier of the option to be modified.
[0089] The computing device can determine that the option to be modified does not meet the cold restart conditions if it determines that the first cold restart option is not present among at least one cold restart option.
[0090] or,
[0091] The computing device can determine whether the modified value of the option to be modified is consistent with the initial value of the first cold restart option if it determines that the modified value of the option to be modified is inconsistent with the initial value of the first cold restart option. Alternatively, the computing device can determine that the option to be modified does not meet the cold restart conditions if it determines that the modified value of the option to be modified is consistent with the initial value of the first cold restart option.
[0092] It should be noted that the value of the option to be modified is the value of the modified option.
[0093] S304: The option to be modified is identified as the target option to be modified.
[0094] In this embodiment, the computing device can determine the option to be modified as the target option to be modified if it determines that the option to be modified meets the cold restart conditions.
[0095] S305: Determined that the option to be modified is not the target option to be modified.
[0096] In this embodiment, the computing device can determine that the option to be modified is not the target option to be modified if it determines that the option to be modified does not meet the cold restart conditions.
[0097] S306: Determine the total number of target options to be modified.
[0098] In this embodiment, after determining whether each option to be modified is a target option to be modified, the computing device can determine the total number of target options to be modified. For example, the total number of target options to be modified can be 1.
[0099] S307: Determine the restart method for the computing devices based on the total number.
[0100] In this embodiment, the computing device can determine the restart method based on the total number of devices. The restart method can be either a cold restart or a warm restart.
[0101] In one implementation:
[0102] The computing device can determine whether the total number is a positive integer.
[0103] The computing device can determine whether to restart as a cold restart if the total number is a positive integer.
[0104] or,
[0105] The computing device can determine that its restart method is a warm restart if the total number is not a positive integer. It should be noted that, based on the premise that the total number is not negative, the total number is zero if it is not a positive integer.
[0106] In one implementation:
[0107] The computing device can determine whether the total number is zero.
[0108] If the total number of devices is not zero, the computing device can determine that the restart method is a cold restart.
[0109] or,
[0110] The computing device can determine that the restart method is a warm restart if the total number is zero.
[0111] S308: Restart the computing device according to the restart method so that the option modification values of the option to be modified take effect.
[0112] In this embodiment, the computing device can be restarted according to a restart method to make the modified option value take effect. The modified option value is the changed option value.
[0113] The specific implementation process is the same as that of S204, and will not be described in detail here.
[0114] The beneficial effects of this embodiment are as follows: In this embodiment, the computing device can obtain a Basic Input / Output System (PIOS) option modification instruction; the PIOS option modification instruction includes an option identifier of at least one option to be modified, and a target option value for each option to be modified. The computing device can modify the option values of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value for each option to be modified. For any option to be modified, the computing device can determine whether the option to be modified meets the cold restart conditions based on the option identifier of the option to be modified and the cold restart table (including option information of at least one cold restart option). The computing device can determine the option to be modified as a target option to be modified if it is determined that the option to be modified meets the cold restart conditions; or, if it is determined that the option to be modified does not meet the cold restart conditions, it can determine that the option to be modified is not a target option to be modified. The computing device can determine the total number of target options to be modified. The computing device can determine the restart method of the computing device based on the total number; the restart method is either a cold restart or a warm restart. The computing device can be restarted according to the restart method to make the modified values of the options take effect; the modified values of the options are the changed values of the options to be modified. This method accurately determines the total number of target options to be modified, and based on this total number, determines the restart method of the computing device. This ensures that the restart method matches the actual situation of the options to be modified, improving the accuracy of cold restart method determination, avoiding computing device failure due to incorrect restart methods, improving the restart efficiency of the computing device, and maintaining the stability and reliability of the computing device.
[0115] Figure 4 This is a flowchart illustrating a third embodiment of a method for enabling basic input / output system options, provided in this application. See also... Figure 4 The method specifically includes the following steps:
[0116] S401: Obtain metadata information.
[0117] In this embodiment, the computing device can obtain metadata information. In one implementation, the metadata information belongs to the BIOS program (BIOS firmware code).
[0118] The metadata information includes option identifiers for multiple options, initial values for each option, and attribute values for each option. For example, multiple options may include memory remapping options, CPU virtualization on / off options, etc.
[0119] It should be noted that the attribute value can be either the first attribute value or the second attribute value. It should also be noted that the first attribute value indicates that the option has the ColdReset attribute; the second attribute value indicates that the option does not have the ColdReset attribute.
[0120] S402: Based on the attribute values of each option, determine at least one cold restart option from multiple options.
[0121] In this embodiment, the computing device can determine at least one cold reboot option from multiple options based on the attribute values of each option. In one implementation, the computing device can run the BIOS program (BIOS firmware code) before the BIOS power-on POST ends and before the bootloader starts, call the Create_CRT() function, and determine at least one cold reboot option (an option with cold reboot attributes) from multiple options based on the attribute values of each option.
[0122] In one implementation:
[0123] For any given option, the computing device can determine whether the option's attribute value is a first attribute value. The first attribute value indicates that the option possesses the cold restart attribute.
[0124] The computing device can determine the option as the cold restart option if it determines that the attribute value of the option is the first attribute value.
[0125] or,
[0126] The computing device can determine that an option is not a cold restart option if it determines that the attribute value of the option is not the first attribute value.
[0127] S403: Construct a cold restart table based on the option identifiers of each cold restart option.
[0128] In this embodiment, the computing device can construct a cold restart table (also called a cold restart option table) based on the option identifiers of each cold restart option. In one implementation, the cold restart table can be a hash table. That is, the cold restart table can be stored in non-volatile memory in a hash table structure.
[0129] In one implementation, the computing device can construct a cold restart table based on the option identifier of each cold restart option and the initial value of each cold restart option.
[0130] Additionally, it should be noted that in one implementation, the terminal device's display interface can show the operation controls corresponding to the cold restart table settings options. The terminal device can respond to user actions on these operation controls, generate control commands, and send these commands to the computing device. These control commands indicate whether to enable or disable the cold restart table. If the control command indicates that the cold restart table is enabled, the computing device can obtain metadata information and, based on the attribute values of each option in the metadata information, determine at least one cold restart option from multiple options. Then, based on the option identifiers of each cold restart option, it can construct a cold restart table.
[0131] Additionally, it should be noted that computing devices can obtain new metadata information by acquiring BIOS program update packages, and then build a new cold reboot table based on the new metadata information, thereby updating the cold reboot table.
[0132] S404: Store the cold restart table in the non-volatile memory of the computing device.
[0133] In this embodiment, after constructing the cold restart table, the computing device can store the cold restart table in the computing device's non-volatile memory (such as the Serial Peripheral Interface (SPI) flash memory on the motherboard).
[0134] S405: Obtain the command to modify the basic input / output system options.
[0135] In this embodiment, the computing device can obtain basic input / output system option modification instructions.
[0136] The basic input / output system option modification instruction includes an option identifier for at least one option to be modified, and a target option value for each option to be modified.
[0137] The specific implementation process is the same as that of S201, and will not be described in detail here.
[0138] S406: Modify the option value of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0139] In this embodiment, the computing device can modify the option value of each option to be modified in memory based on the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0140] The specific implementation process is the same as that of S202, and will not be described in detail here.
[0141] S407: Determine the restart method for the computing device based on the option identifier of at least one option to be modified and the cold restart table.
[0142] In this embodiment, the computing device can access the cold restart table stored in non-volatile memory.
[0143] The computing device can determine the restart method based on the option identifier of at least one option to be modified, and the cold restart table.
[0144] The restart method can be either a cold restart or a warm restart.
[0145] The cold reboot table includes option information for at least one cold reboot option.
[0146] The specific implementation process is the same as that of S203, and will not be described in detail here.
[0147] S408: Restart the computing device according to the restart method so that the option modification values of the option to be modified take effect.
[0148] In this embodiment, the computing device can be restarted according to a restart method to make the modified option value take effect. The modified option value is the changed option value.
[0149] The specific implementation process is the same as that of S204, and will not be described in detail here.
[0150] The beneficial effects of this embodiment are as follows: In this embodiment, before obtaining the Basic Input / Output System (PIS) option modification instruction, the computing device can construct a cold restart table. During the construction of the cold restart table: the computing device can obtain metadata information. This metadata information includes option identifiers for multiple options and attribute values for each option. The attribute values are either a first attribute value (indicating that the option has a cold restart attribute) or a second attribute value (indicating that the option does not have a cold restart attribute). The computing device can determine at least one cold restart option from among the multiple options based on the attribute values of each option. The computing device can construct a cold restart table based on the option identifiers of each cold restart option. After constructing the cold restart table, the computing device can store it in its non-volatile memory. By establishing attribute values for options as described above, identifying options with attribute values of the first attribute value (indicating that the option has a cold restart attribute) as cold restart options, and then constructing the cold restart table based on the option identifiers and initial values of each cold restart option, the construction efficiency and accuracy of the cold restart table are improved.
[0151] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0152] Figure 5 This is a schematic diagram of a device for activating basic input / output system options provided in an embodiment of this application. Figure 5 As shown, the basic input / output system options activation device 50 includes an acquisition module 51, a processing module 52, and a restart module 53.
[0153] The acquisition module 51 is used to acquire basic input / output system option modification instructions; the basic input / output system option modification instructions include an option identifier of at least one option to be modified, and a target option value for each option to be modified;
[0154] The processing module 52 is used to modify the option value of each option to be modified in memory according to the option identifier of at least one option to be modified and the target option value of each option to be modified.
[0155] Processing module 52 is further configured to determine the restart method of the computing device based on the option identifier of at least one option to be modified and a cold restart table; the restart method is either a cold restart or a warm restart; the cold restart table includes option information for at least one cold restart option;
[0156] The restart module 53 is used to restart the computing device according to the restart method so that the option modification value of the option to be modified takes effect; the option modification value of the option to be modified is the modified option value of the option to be modified.
[0157] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0158] In one implementation, the processing module 52 is specifically used for:
[0159] For any option to be modified, determine whether the option meets the cold restart conditions based on the option identifier and the cold restart table.
[0160] If it is determined that the option to be modified meets the cold restart conditions, then the option to be modified is determined to be the target option to be modified; or, if it is determined that the option to be modified does not meet the cold restart conditions, then the option to be modified is determined not to be the target option to be modified.
[0161] Determine the total number of target options to be modified;
[0162] Determine the restart method for the computing devices based on the total number.
[0163] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0164] In one implementation, the option information for the cold reboot option includes the option identifier for the cold reboot option;
[0165] Processing module 52 is specifically used for:
[0166] Based on the option identifier of the option to be modified and the option identifier of at least one cold restart option, determine whether there is a first cold restart option among the at least one cold restart option; wherein the option identifier of the first cold restart option is the same as the option identifier of the option to be modified.
[0167] If, among at least one cold restart option, a first cold restart option exists, then the option to be modified is determined to meet the cold restart condition; or...
[0168] If, among at least one cold reboot option, there is no first cold reboot option, then the option to be modified does not meet the cold reboot conditions.
[0169] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0170] In one implementation, the option information for the cold reboot option includes the option identifier and the initial value of the cold reboot option;
[0171] Processing module 52 is specifically used for:
[0172] Based on the option identifier of the option to be modified and the option identifier of at least one cold restart option, determine whether there is a first cold restart option among the at least one cold restart option; wherein the option identifier of the first cold restart option is the same as the option identifier of the option to be modified.
[0173] If at least one cold restart option is identified, and a first cold restart option exists, determine whether the option modification value of the option to be modified is consistent with the initial value of the first cold restart option.
[0174] If the modified value of the option to be modified is inconsistent with the initial value of the first cold restart option, the option to be modified is determined to meet the cold restart conditions; or, if the modified value of the option to be modified is consistent with the initial value of the first cold restart option, the option to be modified is determined not to meet the cold restart conditions.
[0175] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0176] In one implementation, the processing module 52 is further configured to:
[0177] If, among at least one cold reboot option, there is no first cold reboot option, then the option to be modified does not meet the cold reboot conditions.
[0178] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0179] In one implementation, the processing module 52 is further configured to:
[0180] Obtain metadata information; wherein, the metadata information includes option identifiers for multiple options, and attribute values for each option; the attribute value is either a first attribute value or a second attribute value; the first attribute value indicates that the option has the cold restart attribute; the second attribute value indicates that the option does not have the cold restart attribute;
[0181] Based on the attribute values of each option, determine at least one cold restart option from among multiple options;
[0182] Construct a cold restart table based on the option identifiers of each cold restart option;
[0183] The cold restart table is stored in the non-volatile memory of the computing device.
[0184] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0185] In one implementation, the processing module 52 is specifically used for:
[0186] For any option, determine whether the option's attribute value is the first attribute value;
[0187] If the attribute value of an option is determined to be the first attribute value, then the option is determined to be the cold restart option; or,
[0188] If the attribute value of an option is determined to be not the first attribute value, then the option is determined not to be the cold restart option.
[0189] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0190] In one implementation, the basic input / output system option modification instruction includes a user identifier; the processing module 52 is further configured to:
[0191] Based on the user identifier, determine the candidate cold restart table corresponding to the user identifier from multiple candidate cold restart tables;
[0192] The candidate cold restart table corresponding to the user identifier is determined as the cold restart table.
[0193] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0194] In one implementation, module 53 is restarted, specifically for:
[0195] If the reboot method is cold reboot, the value of the first register is written to the register corresponding to the reboot port; the value of the first register indicates the cold reboot method; or,
[0196] When the restart method is a hot restart, the value of the second register is written to the register corresponding to the restart port; the value of the second register indicates the hot restart method.
[0197] The device for activating the basic input / output system options provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0198] Figure 6 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Figure 6 As shown, the computing device 60 includes: a processor 61 and a memory 62 communicatively connected to the processor; the memory 62 is used to store computer execution instructions; the processor 61 is used to execute the computer execution instructions stored in the memory 62 to implement the technical solutions in the aforementioned method embodiments.
[0199] Optionally, the memory 62 can be either standalone or integrated with the processor 61. Optionally, when the memory 62 is a device independent of the processor 61, the computing device 60 may further include a bus 63 for connecting the aforementioned devices.
[0200] The processor is used to execute the technical solutions in the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0201] This application also provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement the technical solutions in the above method embodiments, and their beneficial effects are similar, so they will not be repeated here.
[0202] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, it is used to implement the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be repeated here.
[0203] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for validating a basic input / output system option, the method comprising: The method comprises: obtaining basic input / output system option modification instructions; the basic input / output system option modification instructions comprise option identifiers of at least one to-be-modified option and target option values of the to-be-modified options; modifying, according to the option identifiers of the at least one to-be-modified option and the target option values of the to-be-modified options, option values of the to-be-modified options in the memory; determining a restart mode of the computing device according to the option identifiers of the at least one to-be-modified option and a cold restart table; the restart mode is a cold restart mode or a hot restart mode; the cold restart table comprises option information of at least one cold restart option, and the option information of the cold restart option comprises an option identifier of the cold restart option and an initial value of the cold restart option; restarting the computing device according to the restart mode, so as to make the option modification values of the to-be-modified options take effect; the option modification values of the to-be-modified options are the modified option values of the to-be-modified options; the determining of the restart mode of the computing device according to the option identifiers of the at least one to-be-modified option and the cold restart table comprises: for any to-be-modified option, if it is determined that there is a first cold restart option in the cold restart table based on the option identifier of the to-be-modified option, it is determined whether the option modification value of the to-be-modified option is consistent with the initial value of the first cold restart option, and the option identifier of the first cold restart option is consistent with the option identifier of the to-be-modified option; if not, it is determined that the to-be-modified option meets a cold restart condition; if at least one to-be-modified option meets the cold restart condition, it is determined that the restart mode of the computing device is the cold restart mode, otherwise, it is determined that the restart mode of the computing device is the hot restart mode.
2. The method of claim 1, wherein, The method further comprises: if it is determined that the to-be-modified option meets the cold restart condition, it is determined that the to-be-modified option is a target to-be-modified option; or, if it is determined that the to-be-modified option does not meet the cold restart condition, it is determined that the to-be-modified option is not a target to-be-modified option.
3. The method of claim 2, wherein, The method further comprises: if it is determined that the option modification value of the to-be-modified option is consistent with the initial value of the first cold restart option, it is determined that the to-be-modified option does not meet the cold restart condition.
4. The method of claim 3, wherein, The method further comprises: if it is determined that the first cold restart option does not exist in the at least one cold restart option, it is determined that the to-be-modified option does not meet the cold restart condition.
5. The method according to any one of claims 1 to 4, characterized in that, Before the basic input / output system option modification instructions are obtained, the method further comprises: obtaining metadata information; wherein the metadata information comprises option identifiers of a plurality of options and attribute values of the options; the attribute values are first attribute values or second attribute values; the first attribute values indicate that the options have a cold restart attribute; and the second attribute values indicate that the options do not have a cold restart attribute; determining at least one cold restart option from the plurality of options according to the attribute values of the options; constructing the cold restart table according to the option identifiers of the cold restart options; storing the cold restart table in a non-volatile memory of the computing device.
6. The method of claim 5, wherein, The determining the at least one cold restart option from the plurality of options according to the attribute value of each option comprises: For any option, determining whether the attribute value of the option is the first attribute value; In a case where it is determined that the attribute value of the option is the first attribute value, determining that the option is the cold restart option; or, In a case where it is determined that the attribute value of the option is not the first attribute value, determining that the option is not the cold restart option.
7. The method of claim 1, wherein, The basic input and output system option modification instruction comprises a user identifier; before determining the restart mode of the computing device according to the option identifier of the at least one to-be-modified option and the cold restart table, the method further comprises: According to the user identifier, determining the to-be-selected cold restart table corresponding to the user identifier from a plurality of to-be-selected cold restart tables; Determining the to-be-selected cold restart table corresponding to the user identifier as the cold restart table.
8. The method of claim 1, wherein, The restarting the computing device according to the restart mode comprises: In a case where the restart mode is the cold restart mode, writing a first register value to a register corresponding to a restart port; the first register value indicates the cold restart mode; or, In a case where the restart mode is the hot restart mode, writing a second register value to the register corresponding to the restart port; the second register value indicates the hot restart mode.
9. A computing device, comprising: Comprise: A processor, and a memory connected in communication with the processor; The memory is configured to store computer-executable instructions; The processor is configured to execute the computer-executable instructions stored in the memory to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Basic input / output system (BIOS) option modification effective method and device and storage medium
CN115495161A