A BIOS verification method and electronic device

By verifying the signature information of the BIOS log file, the problem of BIOS boot anomalies was resolved. This enabled accurate identification of abnormal log files and prevention of the use of unauthorized BIOS data, ensuring the normal boot of electronic devices.

CN114547624BActive Publication Date: 2025-10-31联想开天科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210110435.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2025-10-31
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

Existing technology cannot accurately identify abnormal log files in the BIOS, leading to abnormal BIOS startup and an inability to effectively handle illegally modified BIOS data.

Method used

By obtaining the BIOS log file and verifying its signature information, it is determined whether the log file meets preset conditions, and an instruction message is generated to prevent the electronic device from starting and to prevent the use of illegal BIOS data.

Benefits of technology

It enables accurate identification of abnormal log files and prevents the BIOS from failing to boot for extended periods, ensuring the legitimacy of BIOS data and the normal startup of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547624B_ABST
    Figure CN114547624B_ABST
Patent Text Reader

Abstract

This application discloses a BIOS verification method and an electronic device. The method includes: upon receiving a power-on command, obtaining the BIOS log file of the electronic device; verifying the signature information in the log file to determine whether the log file meets a first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS; and if the log file does not meet the first condition, generating corresponding first indication information to prevent the electronic device from starting. This method, through signature information verification, accurately and efficiently identifies abnormal log files, thereby accurately determining the corresponding illegal BIOS data and preventing the BIOS from failing to start for extended periods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of firmware verification for electronic devices, and particularly to a BIOS verification method and an electronic device. Background Technology

[0002] The BIOS (Basic Input / Output System) of computers and other electronic devices records essential operational data, making it extremely important. If the data in the BIOS is corrupted or illegally altered, a corresponding abnormal log file will be created. Because the data in the BIOS and the abnormal log file are incompatible, it will cause the BIOS to fail to boot. However, currently there is no good method to accurately and efficiently identify this abnormal log file, and therefore no appropriate way to handle it, which will result in the BIOS failing to boot for an extended period. Summary of the Invention

[0003] The purpose of this application is to provide a BIOS verification method and electronic device, which can accurately and efficiently identify the abnormal log file and prevent the BIOS from failing to start for a long time.

[0004] To address the aforementioned technical problems, this application provides a BIOS verification method, comprising:

[0005] Upon receiving a power-on command, retrieve the BIOS log file of the electronic device;

[0006] The signature information in the log file is verified to determine whether the log file meets the first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS;

[0007] If the log file does not meet the first condition, a corresponding first indication message is generated to prevent the electronic device from starting.

[0008] Optionally, verifying the signature information in the log file to determine whether the log file meets the first condition includes:

[0009] The signature information is obtained at the first location in the log file;

[0010] The signature information is compared with the reserved information set in the first program;

[0011] If the signature information is the same as the reserved information, it is determined that the signature information meets the first condition.

[0012] Optionally, the first position is the position within the first N bytes of the log file, where N is a positive integer greater than or equal to 1; correspondingly, the signature information is a specific string occupying N bytes.

[0013] Optionally, the first program is stored in a first storage space, the first space having a predetermined number of storage bits, and the method further includes:

[0014] The log file is generated based on the BIOS data information;

[0015] If the log file meets the second condition, the signature information is added to the generated log file through the first program.

[0016] The log file with the added signature information is stored sequentially in the storage location.

[0017] Alternatively, the method may further include:

[0018] If the log file does not meet the second condition, the log file will be identified as an abnormal log file;

[0019] Prevent the abnormal log file from being stored in the storage location, and generate corresponding second indication information to indicate log abnormalities.

[0020] Optionally, verifying the signature information in the log file includes:

[0021] Verify the log file stored in a specific storage location within the first space; or,

[0022] Verify the log files stored in all storage bits of the first space.

[0023] Alternatively, the method may further include:

[0024] Based on the storage information of the abnormal log file and / or the storage information of the log file in the storage location, adjust the running logic of the first program.

[0025] Optionally, the method further includes:

[0026] If the log file meets the first condition, the BIOS boot process is determined to meet preset requirements, and the electronic device is allowed to boot.

[0027] Alternatively, the method may further include:

[0028] Based on the first indication information, determine the BIOS data associated with the corresponding log file.

[0029] This application also provides an electronic device, including:

[0030] The acquisition module is configured to acquire the BIOS log file of the electronic device upon receiving a power-on command;

[0031] The verification module is configured to verify the signature information in the log file and determine whether the log file meets the first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS;

[0032] The determination module is configured to generate corresponding first indication information to prevent the electronic device from starting if the log file does not meet the first condition.

[0033] The method in this embodiment of the application accurately and efficiently identifies the abnormal log file by verifying the signature information, thereby accurately determining the corresponding illegal BIOS data and preventing the BIOS from failing to boot for a long time. Attached Figure Description

[0034] Figure 1 This is a flowchart of a BIOS verification method according to an embodiment of this application;

[0035] Figure 2 Examples of this application Figure 1 A flowchart of one embodiment of step S200;

[0036] Figure 3 This is a flowchart of one embodiment of the verification method of this application;

[0037] Figure 4 This is a flowchart of another embodiment of the verification method of this application;

[0038] Figure 5 This is a flowchart of a specific embodiment of the verification method of this application;

[0039] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0040] Various embodiments and features of this application are described herein with reference to the accompanying drawings.

[0041] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0042] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0043] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0044] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.

[0045] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0046] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0047] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0048] This application discloses a BIOS verification method that can be applied to electronic devices such as computers. This method can verify the log files in the BIOS, thereby verifying abnormalities in the BIOS data.

[0049] The method will now be explained in detail with reference to the accompanying drawings. Figure 1 This is a flowchart of the BIOS verification method according to an embodiment of this application, as follows: Figure 1 As shown, the method includes the following steps:

[0050] S100, upon receiving a power-on command, retrieves the BIOS log file of the electronic device.

[0051] For example, the BIOS log file can be a log file corresponding to BIOS data, which can record logs such as BIOS data call information and BIOS data change information.

[0052] In one embodiment, each BIOS startup can generate a corresponding log file based on the BIOS data and store the log file. For example, it can be stored in the BIOS's first storage space.

[0053] Furthermore, both valid and invalid BIOS data can generate corresponding log files. For example, if BIOS data has been illegally modified, the BIOS will generate a corresponding log file based on the modified invalid BIOS data after startup. However, this log file will be an abnormal log file, distinct from other valid log files. In one embodiment, abnormal log files identified as invalid can be processed, such as by not storing them or by marking them.

[0054] In this embodiment, when a user powers on an electronic device, the relevant components of the electronic device generate a power-on command. The BIOS can receive this power-on command and retrieve the log file from the BIOS's first storage space.

[0055] S200, verify the signature information in the log file to determine whether the log file meets the first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS when the power-on command is received.

[0056] For example, the BIOS can verify some or all of the log files stored in multiple log files, such as verifying only the most recently generated log files, or verifying a specific number of log files sequentially.

[0057] The log file contains signature information, which can be placed in the log file through a first procedure. This signature information can be of various types. For example, on one hand, the signature information can be a specific string, the content of which can be verified during signature verification. On the other hand, the signature information can be information encrypted using a symmetric key, which can be decrypted using the corresponding symmetric key after the log file is obtained. Alternatively, it can be encrypted using the private key from an asymmetric key, and decrypted using the corresponding public key during verification. After decrypting the log file, if the decryption is successful, the log file can be determined to meet the first condition. Of course, the signature information can also be other encrypted information, which the BIOS can verify to determine whether the log file meets the first condition.

[0058] In one embodiment, the signature information can be added to the log file by a first program during the BIOS boot process. For example, a corresponding log file is generated each time the BIOS boots, and the first program can add signature information to each generated log file. Signature information can also be added to certain important log files, thereby saving system resources while ensuring that important log files remain functional.

[0059] The first program can be a BIOS-associated parser. This parser can be used to add signature information to the log file before storing it.

[0060] In one embodiment, the first condition can be set based on the operational logic of the first program. The first program can be used to verify signature information, and it has corresponding operational logic associated with its purpose and function. For example, when the first program adds signature information to the header bytes of a log file, the first condition can be a condition for verifying the signature information in the header bytes, such as determining whether the signature information is the same as specific content. For example, when the first program adds signature information to log files marked as important, the first condition can be a condition for determining whether the signature information in the marked log files is the same as specific content.

[0061] S300, if the log file does not meet the first condition, generate corresponding first indication information to prevent the electronic device from starting.

[0062] For example, if a log file does not meet the first condition, it can be determined that the log file is an abnormal log file, which is a log generated based on illegal BIOS data. This further confirms that the original data in the BIOS has been corrupted or illegally modified. In this embodiment, when it is determined that the log file does not meet the first condition, corresponding first indication information is generated. This first indication information includes information indicating that the log file is abnormal, information indicating the BIOS data corresponding to the abnormal log file, and information for prompting the user.

[0063] Furthermore, if the log file does not meet the first condition, the BIOS can prevent the electronic device from booting, thereby preventing the use of illegal BIOS data.

[0064] This method accurately and efficiently identifies the abnormal log file by verifying the signature information, thereby accurately determining the corresponding illegal BIOS data and preventing illegal BIOS data from damaging electronic devices.

[0065] In one embodiment of this application, the signature information in the log file is verified to determine whether the log file meets a first condition, such as... Figure 2As shown, it includes:

[0066] S210, obtain the signature information at the first position in the log file.

[0067] For example, the first position in the log file can be a pre-set position, such as setting the first two bytes of the log file as the first position. The first program can place the signature information in the first position, thereby highlighting the added signature information. When verifying the signature information, the BIOS can obtain the signature information from the first position. Of course, the first position can also be any other position in the log file, and the signature information can be obtained from other agreed-upon positions when verifying the signature information.

[0068] S220, compare the signature information with the reserved information set in the first program.

[0069] For example, the reserved information set by the first program can be information that the first program has pre-stored in the BIOS. After obtaining the signature information, the BIOS can compare the signature information with the reserved information. For example, if the reserved information is the string "55AA", the BIOS can compare the signature information with the string "55AA".

[0070] S230, if the signature information is the same as the reserved information, determine that the signature information meets the first condition.

[0071] Under legitimate circumstances, the signature information is identical to the reserved information. For example, under legitimate circumstances, signature information is added to log files during the generation process, ensuring that all generated log files contain signature information that is identical to or matches the reserved information.

[0072] Therefore, if the signature information matches the reserved information, the signature information is determined to meet the first condition, and thus the log file is determined to meet the first condition. This confirms that the BIOS data corresponding to the log file is valid, allowing the electronic device to boot.

[0073] In one embodiment of this application, the first position is the position of the log file within the first N bytes, where N is a positive integer greater than or equal to 1; correspondingly, the signature information is a specific string occupying N bytes.

[0074] For example, in combination Figure 5The first N bytes of the log file can be pre-defined, such as setting the position of the first two bytes as the first position. This allows the signature information to be directly retrieved from the first position. Correspondingly, the signature information is a specific string occupying two bytes, such as the string "55AA" mentioned above. Therefore, the string "55AA" retrieved from the first position is the signature information, making it easy to extract and avoiding extraction errors.

[0075] In one embodiment of this application, the first program is stored in a first storage space, which has a predetermined number of storage bits.

[0076] For example, the first storage space can be the storage space in an electronic device, such as the storage space in a BIOS. The first program is stored in this first storage space to improve calling efficiency. Furthermore, the first space has a predetermined number of storage bits, each capable of storing one log file. The predetermined number of storage bits can store a predetermined number of log files.

[0077] Furthermore, such as Figure 3 As shown, the method further includes the following steps:

[0078] S400: Generate the log file based on the data information from the BIOS.

[0079] For example, BIOS data is information associated with the BIOS, such as existing BIOS information, changed information, and added information. Log files can record this data and its usage.

[0080] The process of generating log files can be preset, including at least one of the following methods: generating corresponding log files when using BIOS data information, generating log files at preset time intervals, generating log files when BIOS data information is modified, etc.

[0081] S500, if the log file meets the second condition, the signature information is added to the generated log file through the first program.

[0082] For example, the second condition can be a condition set for the log file, including integrity conditions, correctness conditions, time conditions, etc. If there are no errors in the log file, the log file can be considered to meet the second condition, and / or if all content in the log file is complete, the log file can be considered to meet the second condition. Then, a first program adds signature information to the generated log file. This first program can be a parsing program set for the BIOS.

[0083] S600, the log file with the added signature information is stored sequentially in the storage location.

[0084] For example, the first storage space has a plurality of storage bits, which can be used in the order in which the log files were generated. For instance, the storage bits can be arranged in a queue, and the log files can be stored sequentially in the arranged storage bits.

[0085] For example, 1MB of space can be allocated in the first storage space to store a predetermined number of storage bits. When each storage bit is 10KB, 100 log files can be stored. On one hand, when retrieving log files and verifying their signature information, a specific log file can be selected from the arranged storage bits. For instance, after arranging 100 log files, the specific storage bit could be the one corresponding to the most recently generated and stored log file. On the other hand, multiple or all log files can be retrieved based on the arrangement order of the storage bits, and then the signature information in the log files can be verified.

[0086] In one embodiment of this application, such as Figure 4 As shown and combined Figure 5 The method further includes the following steps:

[0087] S700, if the log file does not meet the second condition, the log file is determined to be an abnormal log file;

[0088] S800, prevent the abnormal log file from being stored in the storage location, and generate corresponding second indication information to indicate log abnormalities.

[0089] Specifically, the second condition can be a condition set for the log file, including integrity conditions, correctness conditions, and time conditions. If the log file does not meet the second condition, it indicates that the log file's integrity condition, correctness condition, and / or time condition do not meet the second condition. This log file is likely an abnormal log file formed due to an illegal attack on BIOS data. Therefore, in this embodiment, the log file that does not meet the second condition is identified as an abnormal log file.

[0090] The BIOS can prevent the exception log file from being stored in the storage location, thereby avoiding errors after verifying the exception log file. A BIOS boot exception can prevent electronic devices from starting.

[0091] In addition, for the occurrence of this abnormal log file, the electronic device can also generate a second indication message to indicate the log abnormality.

[0092] The second indication includes information related to the occurrence of an anomaly in the error log file, thus enabling the user to be clearly informed. For example, the second indication can be presented in the form of sound and / or light, such as by informing the user through a blackout of the electronic device screen and a buzzer alarm.

[0093] In one embodiment, although non-abnormal log files are allowed to be stored in storage locations, and for these log files, the same signature information as the reserved information is added during the generation process, in some cases the signature information may be corrupted, or the signature information may not be successfully added to the log file, or the old log files stored in the BIOS may not have the signature information, thus requiring the log files to still be verified.

[0094] In one embodiment of this application, verifying the signature information in the log file includes:

[0095] Verify the log file stored in a specific storage location within the first space; or,

[0096] Verify the log files stored in all storage bits of the first space.

[0097] For example, log files are stored in storage locations within a first space, including multiple log files stored in their respective corresponding storage locations. For instance, log files can be stored in storage locations with an ordered sequence based on their generation. When verifying the signature information in the log files, the log files stored in specific storage locations within the first space can be verified. These specific storage locations can be pre-defined, such as the currently used storage location or the storage location corresponding to the most recently generated log file.

[0098] Of course, in this embodiment, the log files stored in all storage slots of the first space can also be verified. For example, log files can be retrieved sequentially from the arranged storage slots and verified. If any log file is determined to be an abnormal log file, the electronic device pauses startup, and then the log files stored in other storage slots are determined to be abnormal log files according to the arrangement order.

[0099] In one embodiment of this application, the method further includes the following steps:

[0100] Based on the storage information of the abnormal log file and / or the storage information of the log file in the storage location, adjust the running logic of the first program.

[0101] For example, the execution logic of the first program is related to its purpose and function. For instance, the execution logic of the first program might involve adding signature information to the header bytes of each log file. If the proportion of abnormal log files appearing in the storage space is found to be below a certain value, then adding signature information to the header bytes of every generated log file is no longer necessary; instead, signature information is added only to the header bytes of important log files. Similarly, when verifying log files, only the important log files are verified.

[0102] In one embodiment of this application, the method further includes the following steps:

[0103] If the log file meets the first condition, the BIOS boot process is determined to meet preset requirements, and the electronic device is allowed to boot.

[0104] For example, if a log file meets the first condition, it can be determined that the log file is not an abnormal log file, its corresponding BIOS data is valid data, the BIOS boot process meets the preset requirements, and the electronic device is allowed to boot and enter the operating system.

[0105] In one embodiment of this application, the method further includes the following steps:

[0106] Based on the first indication information, determine the BIOS data associated with the corresponding log file.

[0107] For example, the first indication information includes information indicating a log file anomaly and information indicating the BOIS data corresponding to the abnormal log file. This may include, for example, the name and storage location of the illegal data related to the abnormal log file, thereby facilitating the processing of the illegal data through the first indication information.

[0108] This application also provides an electronic device, such as... Figure 6 As shown, it includes:

[0109] The acquisition module is configured to acquire the BIOS log file of the electronic device upon receiving a power-on command.

[0110] For example, the BIOS log file can be a log file corresponding to BIOS data, which can record logs such as BIOS data call information and BIOS data change information.

[0111] In one embodiment, each BIOS startup can generate a corresponding log file based on the BIOS data and store the log file. For example, it can be stored in the BIOS's first storage space.

[0112] Furthermore, both valid and invalid BIOS data can generate corresponding log files. For example, if BIOS data has been illegally modified, the BIOS will generate a corresponding log file based on the modified invalid BIOS data after startup. However, this log file will be an abnormal log file, distinct from other valid log files. In one embodiment, abnormal log files identified as invalid can be processed, such as by not storing them or by marking them.

[0113] In this embodiment, when a user powers on an electronic device, the relevant components of the electronic device generate a power-on command. The BIOS can receive this power-on command, and the acquisition module can obtain the log file from the BIOS's first storage space.

[0114] The verification module is configured to verify the signature information in the log file to determine whether the log file meets the first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS.

[0115] For example, the verification module can verify some or all of the log files in the multiple stored log files, such as verifying only the most recently generated log files, or verifying a specific number of log files sequentially.

[0116] The log file contains signature information, which can be placed in the log file through a first procedure. This signature information can be of various types. For example, on one hand, the signature information can be a specific string, which the verification module can verify when verifying the signature information. On the other hand, the signature information can be information encrypted with a symmetric key, which the verification module can decrypt using the corresponding symmetric key after obtaining the log file. Alternatively, it can be encrypted using the private key from an asymmetric key, and decrypted using the corresponding public key during verification. After decrypting the log file, if the decryption is successful, the log file can be determined to meet the first condition. Of course, the signature information can also be other encrypted information, which the verification module can verify to determine whether the log file meets the first condition.

[0117] In one embodiment, the signature information can be added to the log file by a first program during the BIOS boot process. For example, a corresponding log file is generated each time the BIOS boots, and the first program can add signature information to each generated log file. Signature information can also be added to certain important log files, thereby saving system resources while ensuring that important log files remain functional.

[0118] The first program can be a BIOS-associated parser. This parser can be used to add signature information to the log file before storing it.

[0119] In one embodiment, the first condition can be set based on the operational logic of the first program. The first program can be used to verify signature information, and it has corresponding operational logic associated with its purpose and function. For example, when the first program adds signature information to the header bytes of a log file, the first condition can be a condition for verifying the signature information in the header bytes, such as determining whether the signature information is the same as specific content. For example, when the first program adds signature information to log files marked as important, the first condition can be a condition for determining whether the signature information in the marked log files is the same as specific content.

[0120] The determination module is configured to generate corresponding first indication information to prevent the electronic device from starting if the log file does not meet the first condition.

[0121] For example, if a log file does not meet the first condition, the determining module can determine that the log file is an abnormal log file. An abnormal log file is a log generated based on illegal BIOS data. Furthermore, the determining module can determine that the original data in the BIOS has been corrupted or illegally modified. In this embodiment, when the determining module determines that the log file does not meet the first condition, it generates corresponding first indication information. This first indication information includes information indicating that the log file is abnormal, information indicating the BIOS data corresponding to the abnormal log file, and information for prompting the user.

[0122] Furthermore, if the log file does not meet the first condition, the determination module can prevent the electronic device from starting, thereby preventing the use of illegal BIOS data.

[0123] In one embodiment of this application, the verification module is further configured as follows:

[0124] The signature information is obtained at the first location in the log file;

[0125] The signature information is compared with the reserved information set in the first program;

[0126] If the signature information is the same as the reserved information, it is determined that the signature information meets the first condition.

[0127] In one embodiment of this application, the first position is the position of the log file within the first N bytes, where N is a positive integer greater than or equal to 1; correspondingly, the signature information is a specific string occupying N bytes.

[0128] In one embodiment of this application, the electronic device further includes an adding module, which is configured to:

[0129] The log file is generated based on the BIOS data information;

[0130] If the log file meets the second condition, the signature information is added to the generated log file through the first program.

[0131] The log file with the added signature information is stored sequentially in the storage location.

[0132] In one embodiment of this application, the added module is further configured as follows:

[0133] If the log file does not meet the second condition, the log file will be identified as an abnormal log file;

[0134] Prevent the abnormal log file from being stored in the storage location, and generate corresponding second indication information to indicate log abnormalities.

[0135] In one embodiment of this application, the verification module is further configured as follows:

[0136] Verify the log file stored in a specific storage location within the first space; or,

[0137] Verify the log files stored in all storage bits of the first space.

[0138] In one embodiment of this application, the added module is further configured as follows:

[0139] Based on the storage information of the abnormal log file and / or the storage information of the log file in the storage location, adjust the running logic of the first program.

[0140] In one embodiment of this application, the determining module is further configured as follows:

[0141] If the log file meets the first condition, the BIOS boot process is determined to meet preset requirements, and the electronic device is allowed to boot.

[0142] In one embodiment of this application, the determining module is further configured as follows:

[0143] Based on the first indication information, determine the BIOS data associated with the corresponding log file.

[0144] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.

Claims

1. A BIOS verification method, comprising: Upon receiving a power-on command, the BIOS log file of the electronic device is retrieved. The log file includes BIOS data call information and BIOS data change information. The signature information in the log file is verified to determine whether the log file meets the first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS; If the log file does not meet the first condition, a corresponding first indication message is generated to prevent the electronic device from starting; wherein, The step of verifying the signature information in the log file to determine whether the log file meets the first condition includes: The signature information is obtained at the first location in the log file; The signature information is compared with the reserved information set in the first program; If the signature information is the same as the reserved information, it is determined that the signature information meets the first condition; The first program is stored in a first storage space, which has a predetermined number of storage bits. The method further includes: The log file is generated based on the BIOS data information; If the log file meets the second condition, the signature information is added to the generated log file through the first program. The second condition is a condition set for the log file. The log file with the added signature information is stored sequentially in the storage location.

2. The method according to claim 1, wherein the first position is the position of the first N bytes in the log file, where N is a positive integer greater than or equal to 1; correspondingly, the signature information is a specific string occupying N bytes.

3. The method according to claim 1, further comprising: If the log file does not meet the second condition, the log file will be identified as an abnormal log file; Prevent the abnormal log file from being stored in the storage location, and generate corresponding second indication information to indicate log abnormalities.

4. The method according to claim 1, wherein verifying the signature information in the log file includes: Verify the log file stored in a specific storage location in the first storage space; or, Verify the log files stored in all storage bits of the first storage space.

5. The method according to claim 3, further comprising: Based on the storage information of the abnormal log file and / or the storage information of the log file in the storage location, adjust the running logic of the first program.

6. The method according to claim 1, further comprising: If the log file meets the first condition, the BIOS boot process is determined to meet preset requirements, and the electronic device is allowed to boot.

7. The method according to claim 1, further comprising: Based on the first indication information, determine the BIOS data associated with the corresponding log file.

8. An electronic device, comprising: The acquisition module is configured to acquire the BIOS log file of the electronic device upon receiving a power-on command. The log file includes BIOS data-related call information and BIOS data change information. The verification module is configured to verify the signature information in the log file and determine whether the log file meets the first condition, wherein the signature information is information added to the log file by a first program associated with the BIOS; The determination module is configured to generate corresponding first indication information to prevent the electronic device from starting if the log file does not meet the first condition; wherein, The verification module is further configured to: obtain the signature information at a first location in the log file; compare the signature information with the reserved information set by the first program; and if the signature information is the same as the reserved information, determine that the signature information meets the first condition. The first program is stored in a first storage space, which has a predetermined number of storage bits. The electronic device also includes an adding module configured as follows: The log file is generated based on the BIOS data information; If the log file meets the second condition, the signature information is added to the generated log file through the first program. The second condition is a condition set for the log file. The log file with the added signature information is stored sequentially in the storage location.

Citation Information

Patent Citations

  • BIOS verification method, configuration method, equipment and system

    CN110245495A