Starting method and device, computer equipment, storage medium and program product
By introducing a second processor to the computer system for code segment verification and executing code segments with the first processor, the processor parallel processing is realized, which solves the problem of long startup time in the prior art and improves startup efficiency and security.
Patent Information
- Application Number
- CN202311436555.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-05-02
AI Technical Summary
The existing secure boot method has the problem of long startup time.
By introducing a second processor in the computer system, it is responsible for verifying multiple code segments, and the first processor executes corresponding code segments according to the verification results to realize parallel processing of different processors and reduce the work burden of the first processor.
This method significantly shortens the startup time of the BIOS firmware, improves startup efficiency, and enhances the safety of the startup process.
Smart Images

Figure CN119918053A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a startup method, device, computer equipment, storage medium and program product. Background Art
[0002] The BIOS (Basic Input Output System) firmware is a key component in the computer motherboard. It is responsible for diagnosing and initializing the processor, memory, hard disk, board and other devices on the motherboard, and after the initialization startup work is completed, it guides the computer into working state. Therefore, it is very important for the BIOS firmware to start safely during operation.
[0003] However, existing secure boot methods have the problem of long boot time. Summary of the invention
[0004] Based on this, it is necessary to provide a startup method, device, computer equipment, storage medium and program product that can reduce the startup time in response to the above technical problems.
[0005] In a first aspect, the present application provides a startup method, applied to a first processor, comprising:
[0006] Obtaining verification results of the second processor verifying the plurality of code segments;
[0007] According to the verification results of the multiple code segments, each of the code segments is executed to start the operating system.
[0008] In the startup method described in the embodiment of the present application, by obtaining the verification results of the second processor verifying multiple code segments, each code segment is executed according to the verification results of the multiple code segments to start the operating system. In the traditional technology, the first processor verifies the code segment and executes the code segment, while the above method verifies the code segment by the second processor and executes the code segment by the first processor, realizing a method of parallel processing of different processors, that is, the second processor shares part of the work of the first processor, and compared with the traditional technology, it can reduce the time conflict of the first processor performing code execution and verification, thereby improving the efficiency of starting the BIOS firmware and greatly shortening the startup time of the BIOS firmware.
[0009] In one embodiment, the plurality of code segments include a first code segment and a second code segment, and executing each of the code segments according to the verification results of the plurality of code segments includes:
[0010] Determining whether the verification result of the first code segment indicates that the verification is passed;
[0011] When it is determined that the verification result of the first code segment indicates that the verification is passed, sending the second code segment to the second processor, and executing the first code segment;
[0012] The second code segment is executed according to the verification result of the second code segment.
[0013] In the embodiment of the present application, the second processor verifies the first code segment and the second code segment, and the first processor executes the first code segment and the second code segment, thereby realizing a method in which two processors respectively process two different code segments in parallel, reducing the burden of a single processor executing tasks, thereby improving the efficiency of executing each code segment, and further shortening the time to start the BIOS firmware.
[0014] In one embodiment, executing the second code segment according to the verification result of the second code segment includes:
[0015] If the verification result of the second code segment indicates that the verification is passed, the second code segment is executed.
[0016] In the embodiment of the present application, each code segment is executed only when the first code segment is verified and the second code segment is verified, thereby realizing a method of verifying first and then executing the code, which can improve the execution efficiency and execution security of each code segment to a certain extent.
[0017] In one embodiment, the second code segment includes a first sub-code segment and a second sub-code segment, and executing the second code segment according to a verification result of the second code segment includes:
[0018] Determining whether the verification result of the first sub-code segment indicates that the verification is passed;
[0019] If it is determined that the verification result of the first sub-code segment indicates that the verification is passed, executing the first sub-code segment;
[0020] The second sub-code segment is executed according to the verification result of the second sub-code segment.
[0021] In the embodiment of the present application, the second processor verifies the first sub-code segment and the second sub-code segment, and the first processor executes the first sub-code segment and the second sub-code segment, thereby realizing a method in which two processors respectively process two different code segments in parallel, reducing the burden of a single processor executing tasks, thereby improving the efficiency of executing each code segment, and thereby shortening the time to start the BIOS firmware.
[0022] In one embodiment, executing the second sub-code segment according to the verification result of the second sub-code segment includes:
[0023] If the verification result of the second sub-code segment indicates that the verification is passed, the second sub-code segment is executed.
[0024] In the embodiment of the present application, each code segment is executed only when the first sub-code segment is verified and the second sub-code segment is verified, realizing a method of verifying first and then executing the code, which can improve the execution efficiency of each code segment to a certain extent.
[0025] In a second aspect, the present application further provides a startup method, which is applied to a second processor, comprising:
[0026] Verify multiple code segments to obtain verification results corresponding to each code segment;
[0027] The verification results corresponding to the code segments are sent to the first processor to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments to start the operating system.
[0028] In an embodiment of the present application, multiple code segments are verified to obtain verification results corresponding to each code segment. The verification results corresponding to each code segment are sent to the first processor to instruct the first processor to execute each code segment according to the verification results corresponding to each code segment to start the operating system. In the traditional technology, the first processor verifies the code segment and executes the code segment, while the above method verifies the code segment by the second processor, and the first processor executes the code segment, realizing a method of parallel processing of different processors, that is, the second processor shares part of the work of the first processor, and can reduce the time conflict of the first processor performing code execution and verification compared to the traditional technology, thereby improving the efficiency of starting the BIOS firmware and greatly shortening the startup time of the BIOS firmware.
[0029] In one embodiment, the multiple code segments include a first code segment and a second code segment, and the multiple code segments are verified to obtain verification results corresponding to each of the code segments, including:
[0030] Verifying the first code segment to obtain a verification result of the first code segment;
[0031] When receiving the second code segment sent by the first processor, the second code segment is verified to obtain a verification result of the second code segment:
[0032] The step of sending the verification results corresponding to the code segments to the first processor includes:
[0033] The verification result of the first code segment and the verification result of the second code segment are sent to the first processor.
[0034] In the embodiment of the present application, the second processor verifies the first code segment and the second code segment, and the first processor executes the first code segment and the second code segment, thereby realizing a method in which two processors respectively process two different code segments in parallel, reducing the burden of tasks performed by a single processor, thereby improving the efficiency of executing each code segment, and further shortening the time to start the BIOS firmware and improving the boot speed.
[0035] In a third aspect, the present application further provides a startup device, which is arranged in a first processor and includes:
[0036] An acquisition module, used to acquire a verification result of the second processor verifying the plurality of code segments;
[0037] The execution module is used to execute each of the code segments according to the verification results of the multiple code segments to start the operating system.
[0038] In one embodiment, the plurality of code segments include a first code segment and a second code segment, and the execution module includes:
[0039] A determination submodule, used to determine whether the verification result of the first code segment indicates that the verification is passed;
[0040] a sending submodule, configured to send the second code segment to the second processor and execute the first code segment when it is determined that the verification result of the first code segment indicates that the verification is passed;
[0041] The execution submodule is used to execute the second code segment according to the verification result of the second code segment.
[0042] In one embodiment, the execution submodule includes:
[0043] The first execution unit is used to execute the second code segment if the verification result of the second code segment indicates that the verification is passed.
[0044] In one embodiment, the second code segment includes a first sub-code segment and a second sub-code segment, and the execution sub-module includes:
[0045] A determination unit, configured to determine whether the verification result of the first sub-code segment indicates that the verification is passed;
[0046] A second execution unit is configured to execute the first sub-code segment if it is determined that the verification result of the first sub-code segment indicates that the verification is passed;
[0047] The third execution unit is used to execute the second sub-code segment according to the verification result of the second sub-code segment.
[0048] In one embodiment, the third execution unit is specifically configured to execute the second sub-code segment if the verification result of the second sub-code segment indicates that the verification is passed.
[0049] In a fourth aspect, the present application further provides a startup device, which is arranged in a second processor and includes:
[0050] A determination module is used to verify multiple code segments and obtain verification results corresponding to each of the code segments;
[0051] The sending module is used to send the verification results corresponding to each of the code segments to the first processor, so as to instruct the first processor to execute each of the code segments according to the verification results corresponding to each of the code segments, so as to start the operating system.
[0052] In one embodiment, the multiple code segments include a first code segment and a second code segment, the determination module is specifically used to verify the first code segment to obtain a verification result of the first code segment, and when receiving the second code segment sent by the first processor, the second code segment is verified to obtain a verification result of the second code segment, and the sending module is specifically used to send the verification result of the first code segment and the verification result of the second code segment to the first processor.
[0053] In a fifth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0054] In a sixth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the steps of the above method when executed by a processor.
[0055] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0056] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 It is a schematic diagram of analyzing a traditional startup method in one embodiment;
[0059] Figure 2 An application environment diagram of a startup method in an embodiment;
[0060] Figure 3 is a flow chart of a startup method in another embodiment;
[0061] Figure 4 is a flow chart of a startup method in another embodiment;
[0062] Figure 5 is a flow chart of a startup method in another embodiment;
[0063] Figure 6 is a flow chart of a startup method in another embodiment;
[0064] Figure 7 is a flow chart of a startup method in another embodiment;
[0065] Figure 8 is a flow chart of a startup method in another embodiment;
[0066] Fig. 9 It is a schematic diagram of the analysis of the startup method in another embodiment;
[0067] Fig.10 is a structural block diagram of a starting device in an embodiment;
[0068] Fig.11 It is a structural block diagram of a starting device in another embodiment;
[0069] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0072] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0073] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0074] The BIOS (Basic Input Output System) firmware is a key component in the computer motherboard. It is responsible for diagnosing and initializing the processor, memory, hard disk, board and other devices on the motherboard, and after the initialization startup work is completed, it guides the computer into working state. Therefore, it is very important for the BIOS firmware to start safely during operation.
[0075] In the prior art, such as Figure 1 As shown, the processor includes a CPU (Central Processing Unit) and a coprocessor, and the code segments that need to be verified and executed include FV_BB, FV_MAIN and OS_Loader. The coprocessor verifies FV_BB using measurement or signature verification method and obtains the verification result of FV_BB. The CPU obtains the verification result of FV_BB from the coprocessor, and if the verification result of FV_BB indicates that the verification is passed, FV_BB is executed. The CPU sends FV_MAIN to the coprocessor, and the coprocessor verifies FV_MAIN to obtain the verification result of FV_MAIN. The CPU obtains the verification result of FV_MAIN from the coprocessor, and if the verification result of FV_MAIN indicates that the verification is passed, FV_MAIN is executed. The CPU sends OS_Loader to the coprocessor, and the coprocessor verifies OS_Loader to obtain the verification result of OS_Loader. The CPU obtains the verification result of OS_Loader from the coprocessor, and if the verification result of OS_Loader indicates that the verification is passed, OS_Loader is executed and the startup is completed. As shown Figure 1As shown, the total boot time T1 of the above method includes the time M_t1 for the coprocessor to verify FV_BB, the time R_t1 for the CPU to execute FV_BB, the time M_t2 for the coprocessor to verify FV_MAIN, the time R_t2 for the CPU to execute FV_MAIN, the time M_t3 for the coprocessor to verify OS_Loader, and the time R_t3 for the CPU to execute OS_Loader. Therefore, the existing secure boot method has the problem of long boot time.
[0076] After introducing the background technology of the test method provided by the embodiment of the present application, the implementation environment involved in the test method provided by the embodiment of the present application will be briefly described below. The startup method provided by the embodiment of the present application can be applied to Figure 2 In the application environment shown. The first processor 201 and the second processor 202 can be processors in the same server, and the first processor 201 and the second processor 202 can each be an independent process. Optionally, the second processor 202 can also be integrated on the first processor 201. In the process of starting the BIOS, the first processor 201 is mainly responsible for executing the code segment, and the second processor 202 is mainly responsible for verifying the code segment. Optionally, the first processor 201 and the second processor 202 can run in parallel. Among them, the first processor 201 can be a CPU, and the second processor 202 can be a computing unit with independent memory space and computing power other than the first processor on the computer motherboard. The server where the first processor 201 and the second processor 202 are located can be implemented with an independent server or a server cluster composed of multiple servers.
[0077] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0078] In an exemplary embodiment, Figure 3 As shown, a startup method is provided, which is applied to Figure 2 Taking the first processor 201 in the example as an example, the method includes the following steps:
[0079] S301: Obtain verification results of a second processor verifying multiple code segments.
[0080] The first processor may be a CPU. The code segment may be the code required for the BIOS firmware to initialize the startup work, and may include BIOS code data (e.g., FV_BB, FV_MAIN), operating system code data (e.g., OS_Loader). The second processor is used to verify any type of code segment, for example, verify FV_BB to obtain the verification result of FV_BB; verify FV_MAIN to obtain the verification result of FV_MAIN; verify OS_Loader to obtain the verification result of OS_Loader.
[0081] In an embodiment of the present application, the first processor can send an acquisition request to the second processor through a dedicated interface; after receiving the acquisition request, the second processor can verify the multiple code segments sequentially or simultaneously to obtain the verification results corresponding to each code segment, and then send the verification results corresponding to each code segment to the first processor through the data sending interface, so that the first processor obtains the verification results of the second processor verifying the multiple code segments.
[0082] Optionally, when the second processor verifies multiple code segments and obtains multiple verification results, the multiple verification results can be sent to the first processor at one time to indicate that the first processor can perform subsequent operations based on the multiple verification results at the same time; optionally, the second processor can also send the multiple verification results to the first processor in batches to indicate that the first processor can perform subsequent operations in sequence based on the multiple verification results. It should be noted here that when sending in batches, the verification results of the corresponding code segments can be sent according to the execution order of each code segment.
[0083] Optionally, the first processor may send a request to obtain the verification result of the first code segment (for example, FV_BB) to the second processor; after receiving the request to obtain the verification result of the first code segment, the second processor may send the verification result of the first code segment to the first processor. Correspondingly, the first processor may send a request to obtain the verification result of the second code segment (for example, FV_MAIN, OS_Loader) to the second processor; after receiving the request to obtain the verification result of the second code segment, the second processor may send the verification result of the second code segment to the first processor.
[0084] S302: Execute each code segment according to the verification results of the multiple code segments to start the operating system.
[0085] The verification result may indicate that the verification passed or failed.
[0086] In the embodiment of the present application, when the first processor obtains the verification results of multiple code segments, it can determine in turn whether the verification result of each code segment indicates that the verification is passed, and when the verification results of all code segments indicate that the verification is passed, the operating system can be started normally. Moreover, during the verification process, when the verification result of any code segment among the multiple code segments indicates that the verification is not passed, an unsafe processing strategy can be executed. Among them, the unsafe processing strategy can include displaying a warning message or issuing an alarm prompt sound on the front-end interface of the server, and stopping the startup work.
[0087] Optionally, the multiple code segments include a first code segment (e.g., FV_BB) and a second code segment (e.g., FV_MAIN, OS_Loader). If the verification result of the first code segment indicates that the verification is passed, the first code segment can be executed; if the verification result of the second code segment also indicates that the verification is passed, the second code segment can be executed to start the operating system.
[0088] Optionally, the multiple code segments include a first code segment (e.g., FV_BB) and a second code segment (e.g., FV_MAIN, OS_Loader). If the verification result of the first code segment indicates that the verification fails, a warning message can be displayed on the front-end interface of the server or an alarm can be sounded, and the startup work can be stopped.
[0089] Optionally, the multiple code segments include a first code segment (for example, FV_BB) and a second code segment (for example, FV_MAIN, OS_Loader). The verification result of the first code segment indicates that the verification is passed, and the verification result of the second code segment indicates that the verification is failed. In this case, a warning message can be displayed on the front-end interface of the server or an alarm can be sounded, and the startup work can be stopped.
[0090] In the startup method described in the embodiment of the present application, by obtaining the verification results of the second processor verifying multiple code segments, each code segment is executed according to the verification results of the multiple code segments to start the operating system. In the traditional technology, the first processor verifies the code segment and executes the code segment, while the above method verifies the code segment by the second processor and executes the code segment by the first processor, realizing a method of parallel processing of different processors, that is, the second processor shares part of the work of the first processor, and compared with the traditional technology, it can reduce the time conflict of the first processor performing code execution and verification, thereby improving the efficiency of starting the BIOS firmware and greatly shortening the startup time of the BIOS firmware.
[0091] In an exemplary embodiment, Figure 4As shown, this embodiment relates to a possible implementation method of how to implement verification results of multiple code segments according to the verification results of multiple code segments when multiple code segments include a first code segment and a second code segment. Based on the above embodiment, the above S302 includes:
[0092] S401: Determine whether the verification result of the first code segment indicates that the verification is passed.
[0093] In an embodiment of the present application, after obtaining the verification result of the first code segment, the first processor can further determine whether the verification result of the first code segment indicates that the verification is passed. If the verification result indicates that the verification is passed, it means that the first code segment is a matching code segment and can be executed. In this scenario, the first processor can perform subsequent operations; if the verification result indicates that the verification is not passed, it means that the first code segment is an unmatched code segment or the first code segment has an abnormality and cannot be executed. In this scenario, the first processor can re-acquire the first code segment, or adjust the first code segment, or execute an unsafe processing strategy. The unsafe processing strategy can be to display a warning message or issue an alarm prompt on the front-end interface of the server, and stop the startup work.
[0094] S402: When it is determined that the verification result of the first code segment indicates that the verification is passed, send the second code segment to the second processor, and execute the first code segment.
[0095] Optionally, when determining that the verification result of the first code segment indicates that the verification is passed, the first processor can extract the second code segment from the database or extract the second code segment from the configuration file, and send the second code segment (for example, FV_MAIN, OS_Loader) to the second processor, and execute the first code segment at the same time or thereafter.
[0096] Optionally, when the first code segment is executed simultaneously, the first processor may be a multi-threaded processor, that is, the first processor may send the second code segment to the second processor and execute the first code segment at the same time when determining that the verification result of the first code segment indicates that the verification is passed.
[0097] S403: Execute the second code segment according to the verification result of the second code segment.
[0098] In an embodiment of the present application, when the first processor obtains the verification result of the second code segment, it can further determine whether the verification result indicates that the verification is successful. If the verification is successful, the second code segment is executed; if the verification fails, an unsafe processing strategy can be executed, for example, a warning message is displayed on the front-end interface of the server or an alarm is sounded, and the startup work is stopped.
[0099] Optionally, if the verification result of the second code segment indicates that the verification is passed, the first processor may also obtain an input instruction from the front-end interface, and execute the second code segment when the input instruction indicates to execute the second code segment, and execute an unsafe processing strategy when the input instruction indicates not to execute the second code segment, for example, displaying a warning message or sounding an alarm on the front-end interface of the server, and stopping the startup work.
[0100] In the embodiment of the present application, the second processor verifies the first code segment and the second code segment, and the first processor executes the first code segment and the second code segment, realizing a method in which two processors respectively process two different code segments in parallel, reducing the burden of executing tasks by a single processor, thereby improving the efficiency of executing each code segment, and further shortening the time to start the BIOS firmware. In addition, the above-mentioned execution of each code segment only when the first code segment is verified and the second code segment is verified, realizes a method of first verifying and then executing the code, which can improve the execution efficiency of each code segment to a certain extent.
[0101] In an exemplary embodiment, Figure 5 As shown, this embodiment relates to a possible implementation method of how to execute the second code segment according to the verification result of the second code segment when the second code segment includes the first sub-code segment and the second sub-code segment. On the basis of the above embodiment, the above S403 includes:
[0102] S501: Determine whether the verification result of the first sub-code segment indicates that the verification is passed.
[0103] The second code segment may include a first sub-code segment and a second sub-code segment. For example, the first sub-code segment is FV_MAIN, and the second sub-code segment is OS_Loader.
[0104] In the embodiment of the present application, after obtaining the verification result of the first sub-code segment, the first processor can further determine whether the verification result of the first sub-code segment indicates that the verification is passed. If the verification result indicates that the verification is passed, it means that the first sub-code segment is a matching code segment and can be executed. In this scenario, the first processor can perform subsequent operations; if the verification result indicates that the verification is not passed, it means that the first sub-code segment is an unmatched code segment or the first sub-code segment has an abnormality and cannot be executed. In this scenario, the first processor can re-acquire the first sub-code segment, or adjust the first sub-code segment, or execute an unsafe processing strategy. The unsafe processing strategy can be to display a warning message or issue an alarm prompt on the front-end interface of the server, and stop the startup work.
[0105] S502: When it is determined that the verification result of the first sub-code segment indicates that the verification is passed, execute the first sub-code segment.
[0106] Optionally, the first processor may execute the first code segment if it is determined that the verification result of the first sub-code segment indicates that the verification is passed. At the same time or afterwards, the second sub-code segment may be extracted from the database or from the configuration file.
[0107] Optionally, when the first sub-code segment is executed simultaneously as mentioned above, the first processor may be a multi-threaded processor, that is, the first processor may extract the second sub-code segment from the database or the configuration file when it is determined that the verification result of the first sub-code segment indicates that the verification is passed.
[0108] S503: Execute the second sub-code segment according to the verification result of the second sub-code segment.
[0109] In an embodiment of the present application, when the first processor obtains the verification result of the second sub-code segment, it can further determine whether the verification result indicates that the verification is successful. If the verification is successful, the second sub-code segment is executed; if the verification fails, an unsafe processing strategy can be executed, for example, a warning message is displayed on the front-end interface of the server or an alarm is sounded, and the startup work is stopped.
[0110] Optionally, if the verification result of the second sub-code segment indicates that the verification is passed, the first processor may also obtain an input instruction from the front-end interface, and execute the second sub-code segment when the input instruction indicates to execute the second sub-code segment, and execute an unsafe processing strategy when the input instruction indicates not to execute the second sub-code segment, for example, displaying a warning message or sounding an alarm on the front-end interface of the server, and stopping the startup work.
[0111] It should be noted that the verification result of the second sub-code segment can be obtained by the first processor from the second processor before the first processor executes the first sub-code segment, or can be obtained by the first processor from the second processor after the first processor executes the first sub-code segment. Preferably, the second sub-code segment is obtained by the first processor from the second processor after the first processor executes the first sub-code segment.
[0112] In the embodiment of the present application, the second processor verifies the first sub-code segment and the second sub-code segment, and the first processor executes the first sub-code segment and the second sub-code segment, realizing a method in which two processors respectively process two different code segments in parallel, reducing the burden of executing tasks by a single processor, thereby improving the efficiency of executing each code segment, and further shortening the time to start the BIOS firmware. In addition, the above-mentioned execution of each code segment only when the first sub-code segment is verified and the second sub-code segment is verified, realizes a method of first verifying and then executing the code, which can improve the execution efficiency of each code segment to a certain extent.
[0113] In an exemplary embodiment, Figure 6 As shown, a startup method is provided, which is applied to Figure 2 Taking the second processor 202 in the example as an example, the method includes the following steps:
[0114] S601. Verify multiple code segments to obtain verification results corresponding to each code segment.
[0115] The code segment may be the code required for the BIOS firmware to perform initialization startup work, and may include BIOS code data (eg, FV_BB, FV_MAIN) and operating system code data (eg, OS_Loader).
[0116] In an embodiment of the present application, the second processor can obtain multiple code segments from a database or a configuration file. Optionally, the second processor can also receive multiple code segments sent by the first processor. After that, the second processor can verify the multiple code segments simultaneously or sequentially to obtain verification results corresponding to each code segment. Optionally, the second processor can verify the multiple code segments upon receiving a request to obtain the verification results of the multiple code segments sent by the first processor; optionally, the second processor can also verify each code segment upon receiving a request to obtain the verification results of each code segment.
[0117] Optionally, the second processor may also verify the received code segment after receiving the code segment sent by the first processor. For example, the second processor may obtain the first code segment from the database, and upon receiving a request to obtain the verification result of the first code segment sent by the first processor, verify the first code segment; and upon receiving the second code segment sent by the first processor, verify the second code segment.
[0118] It should be noted that the verification method may include signature verification, measurement, etc. For example, the verification method is signature verification, and a trusted certificate can be used to sign multiple code segments (for example, BIOS code data and operating system code data), and the signed code segments are verified during the startup work of BIOS initialization. For another example, the verification method is measurement, and during the startup work of BIOS initialization, the measurement values of multiple code segments (for example, BIOS code data, operating system code data) after the first boot are measured are saved in a non-volatile storage space as a reference value. In each subsequent startup work of BIOS initialization, the code segment is measured, and the measurement value is compared with the reference value. If the two are consistent, it means that the verification has passed.
[0119] S602: Send the verification results corresponding to the code segments to the first processor to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments to start the operating system.
[0120] This step is similar to the above Figure 3 The startup method described in the embodiment is consistent, and the details can be found in the above description, which will not be repeated here.
[0121] In an embodiment of the present application, multiple code segments are verified to obtain verification results corresponding to each code segment. The verification results corresponding to each code segment are sent to the first processor to instruct the first processor to execute each code segment according to the verification results corresponding to each code segment to start the operating system. In the traditional technology, the first processor verifies the code segment and executes the code segment, while the above method verifies the code segment by the second processor, and the first processor executes the code segment, realizing a method of parallel processing of different processors, that is, the second processor shares part of the work of the first processor, and can reduce the time conflict of the first processor performing code execution and verification compared to the traditional technology, thereby improving the efficiency of starting the BIOS firmware and greatly shortening the startup time of the BIOS firmware.
[0122] In an exemplary embodiment, Figure 7 As shown, this embodiment relates to a possible implementation method of how to verify multiple code segments and obtain verification results corresponding to each code segment when multiple code segments include a first code segment and a second code segment. On the basis of the above embodiment, the above S601 includes:
[0123] S701: Verify a first code segment to obtain a verification result of the first code segment.
[0124] In the embodiment of the present application, the second processor can verify the first code segment using a verification method such as signature verification or measurement to obtain a verification result corresponding to the first code segment. For example, if the first code segment is FV_BB, the second processor can verify FV_BB to obtain a verification result of FV_BB.
[0125] S702: When receiving the second code segment sent by the first processor, verify the second code segment to obtain a verification result of the second code segment.
[0126] In an embodiment of the present application, the second processor can receive the second code segment sent by the first processor through the data receiving interface. When the second processor receives the second code segment sent by the first processor, the second processor can verify the second code segment to obtain a verification result of the second code segment.
[0127] Optionally, the second code segment includes a first sub-code segment (e.g., FV_MAIN) and a second sub-code segment (e.g., OS_Loader). The second processor may receive the first sub-code segment and the second sub-code segment sent by the first processor through a data receiving interface. When the second processor receives the first sub-code segment and the second sub-code segment, it may first verify the first sub-code segment to obtain a verification result of the first sub-code segment, and then verify the second sub-code segment to obtain a verification result of the second sub-code segment; or it may first verify the second sub-code segment to obtain a verification result of the second sub-code segment, and then verify the first sub-code segment to obtain a verification result of the first sub-code segment. It should be noted that the method for verifying the second code segment, and the method for verifying the first sub-code segment and the second sub-code segment are consistent with the aforementioned method for verifying the first code segment.
[0128] Correspondingly, when the second processor executes S602, the specific execution steps are: sending the verification result of the first code segment and the verification result of the second code segment to the first processor.
[0129] In the embodiment of the present application, the second processor can send the verification result of the first code segment and the verification result of the second code segment to the first processor through the data transmission interface at the same time. Alternatively, the second processor first sends the verification result of the first code segment to the first processor, and then sends the verification result of the second code segment to the first processor.
[0130] Optionally, upon receiving a request to obtain verification results of the first code segment and the second code segment, the second processor may simultaneously send the verification result of the first code segment and the verification result of the second code segment to the first processor through a data sending interface.
[0131] Optionally, the second processor may send the verification result of the first code segment to the first processor through the data transmission interface when receiving a request to obtain the verification result of the first code segment. When receiving a request to obtain the verification result of the second code segment, the verification result of the second code segment is sent to the first processor through the data transmission interface. Wherein, if the second code segment includes a first sub-code segment and a second sub-code segment, the verification result of the first sub-code segment and the verification result of the second sub-code segment may be sent to the first processor at the same time; or when receiving a request to obtain the verification result of the first sub-code segment, the verification result of the first sub-code segment may be sent to the first processor through the data transmission interface, and when receiving a request to obtain the verification result of the second sub-code segment, the verification result of the second sub-code segment may be sent to the first processor through the data transmission interface.
[0132] In the embodiment of the present application, the second processor verifies the first code segment and the second code segment, and the first processor executes the first code segment and the second code segment, thereby realizing a method in which two processors respectively process two different code segments in parallel, reducing the burden of tasks performed by a single processor, thereby improving the efficiency of executing each code segment, and further shortening the time to start the BIOS firmware and improving the boot speed.
[0133] Based on all the above embodiments, a startup method is provided, such as Figure 8 As shown, the method comprises the following steps:
[0134] S801. The second processor verifies the first code segment to obtain a verification result of the first code segment.
[0135] S802: The second processor sends a verification result of the first code segment to the first processor.
[0136] S803: The first processor determines a verification result of the first code segment.
[0137] Execute the following S804, or S805 and the steps after S805:
[0138] S804: If the verification result of the first code segment of the first processor indicates that the verification fails, the first processor executes an unsafe processing strategy.
[0139] S805. If the verification result of the first code segment of the first processor indicates that the verification is passed, the first processor sends the second code segment to the second processor and executes the first code segment; the second code segment includes a first sub-code segment and a second sub-code segment.
[0140] S806: The first processor sends the second sub-code segment and the third sub-code segment to the second processor.
[0141] Among them, the following S807, S808 and S809 can be performed simultaneously:
[0142] S807: The second processor obtains a verification result of the first sub-code segment and a verification result of the second sub-code segment.
[0143] S808, the first processor obtains the verification result of the first sub-code segment from the second processor.
[0144] S809: The first processor determines a verification result of the first sub-code segment.
[0145] Execute the following S810, or S811 and the steps after S811:
[0146] S810: If the verification result of the first sub-code segment of the first processor indicates that the verification fails, the first processor executes an unsafe processing strategy.
[0147] S811. If the verification result of the first sub-code segment of the first processor indicates that the verification is passed, the first processor executes the first sub-code segment.
[0148] S812: The first processor obtains a verification result of the second sub-code segment from the second processor.
[0149] S813: The first processor determines a verification result of the second sub-code segment.
[0150] Execute the following step S814 or S815:
[0151] S814: If the verification result of the second sub-code segment of the first processor indicates that the verification fails, the first processor executes the unsafe processing strategy.
[0152] S815: If the verification result of the second sub-code segment of the first processor indicates that the verification is passed, the first processor executes the second sub-code segment to start the operating system.
[0153] The above steps have been explained above. Please refer to the above content for details and will not be repeated here.
[0154] The startup method described in the above embodiment is exemplified as follows: Fig. 9As shown, the first processor is a CPU, the second processor is a coprocessor, the first code segment is FV_BB, and the second code segment includes a first sub-code segment FV_MAIN and a second sub-code segment OS_Loader. The coprocessor verifies FV_BB using a measurement or signature verification method to obtain a verification result of FV_BB; the CPU obtains the verification result of FV_BB from the coprocessor, and if the verification result of FV_BB indicates that the verification is passed, task scheduling is performed, that is, the CPU sends FV_MAIN and OS_Loader to the coprocessor through the secure coprocessor data sending interface. The coprocessor copies FV_MAIN and OS_Loader to the secure coprocessor private memory space of the coprocessor. After sending FV_MAIN and OS_Loader to the coprocessor, the CPU executes FV_BB. At the same time, the coprocessor verifies FV_MAIN and OS_Loader using a measurement or signature verification method to obtain the verification results of FV_MAIN and OS_Loader. After executing FV_BB, the CPU obtains the verification result of FV_MAIN from the coprocessor. If the verification result of FV_MAIN indicates that the verification is passed, the CPU executes FV_MAIN, and after executing FV_MAIN, obtains the verification result of OS_Loader from the coprocessor. If the verification result of OS_Loader indicates that the verification is passed, OS_Loader is executed to boot the operating system and enter the operating system security operating environment. If the verification result of FV_BB indicates that the verification is not passed, the verification result of FV_MAIN indicates that the verification is not passed, and the verification result of OS_Loader indicates that the verification is not passed, the unsafe processing strategy is executed, for example, a warning message is displayed on the front-end interface of the server or an alarm is sounded, and the startup work is stopped.
[0155] like Fig. 9 As shown, the total boot time T2 of the method provided in the embodiment of the present application includes the time M_t1 for the coprocessor to verify FV_BB, the time R_t1 for the CPU to execute FV_BB, the time R_t2 for the CPU to execute FV_MAIN, and the time R_t3 for the CPU to execute OS_Loader. Among them, the coprocessor to verify FV_MAIN, the coprocessor to verify OS_Loader, and the CPU to execute FV_BB can be performed simultaneously, saving boot time.
[0156] The above-mentioned startup method obtains the verification results of the second processor verifying multiple code segments, and executes each code segment according to the verification results of the multiple code segments to start the operating system. In the traditional technology, the first processor verifies the code segment and executes the code segment, while the above-mentioned method verifies the code segment by the second processor, and the first processor executes the code segment, realizing a method of parallel processing of different processors, that is, the second processor shares part of the work of the first processor, and can reduce the time conflict of the first processor performing code execution and verification compared to the traditional technology, thereby improving the efficiency of starting the BIOS firmware and greatly shortening the startup time of the BIOS firmware. In addition, using the second processor to verify the code segment can improve the security of the BIOS startup work and prevent malicious software from intruding into the BIOS firmware. The method provided in the embodiment of the present application minimizes the impact on the overall boot speed of the computer while maintaining the secure boot feature.
[0157] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0158] Based on the same inventive concept, the embodiment of the present application also provides a starting device for implementing the starting method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more starting device embodiments provided below can refer to the limitations on the starting method above, and will not be repeated here.
[0159] In an exemplary embodiment, Fig.10 As shown, a startup device is provided, which is arranged in a first processor and includes: an acquisition module 10 and an execution module 11, wherein:
[0160] The acquisition module 10 is used to acquire the verification result of the second processor verifying the multiple code segments.
[0161] The execution module 11 is used to execute each of the code segments according to the verification results of the multiple code segments to start the operating system.
[0162] In one embodiment, the plurality of code segments include a first code segment and a second code segment, and the execution module 11 includes:
[0163] The determination submodule is used to determine whether the verification result of the first code segment indicates that the verification is passed.
[0164] The sending submodule is used to send the second code segment to the second processor and execute the first code segment when it is determined that the verification result of the first code segment indicates that the verification is passed.
[0165] The execution submodule is used to execute the second code segment according to the verification result of the second code segment.
[0166] In one embodiment, the execution submodule includes:
[0167] The first execution unit is used to execute the second code segment if the verification result of the second code segment indicates that the verification is passed.
[0168] In one embodiment, the second code segment includes a first sub-code segment and a second sub-code segment, and the execution sub-module includes:
[0169] The determination unit is used to determine whether the verification result of the first sub-code segment indicates that the verification is passed.
[0170] The second execution unit is used to execute the first sub-code segment when it is determined that the verification result of the first sub-code segment indicates that the verification is passed.
[0171] The third execution unit is used to execute the second sub-code segment according to the verification result of the second sub-code segment.
[0172] In one embodiment, the third execution unit is specifically configured to execute the second sub-code segment if the verification result of the second sub-code segment indicates that the verification is passed.
[0173] In an exemplary embodiment, Fig.11 As shown, a startup device is provided, which is set in the second processor, including: a determination module 20 and an execution module 21, wherein:
[0174] A determination module 20 is used to verify multiple code segments and obtain verification results corresponding to each of the code segments;
[0175] The sending module 21 is used to send the verification results corresponding to the code segments to the first processor, so as to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments, so as to start the operating system.
[0176] In one embodiment, the multiple code segments include a first code segment and a second code segment, and the determination module 20 is specifically used to verify the first code segment to obtain a verification result of the first code segment. When receiving the second code segment sent by the first processor, the second code segment is verified to obtain a verification result of the second code segment. The sending module 21 is specifically used to send the verification result of the first code segment and the verification result of the second code segment to the first processor.
[0177] Each module in the above-mentioned startup device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0178] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a startup method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0179] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0180] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0181] Obtaining verification results of the second processor verifying the plurality of code segments;
[0182] According to the verification results of the multiple code segments, each code segment is executed to start the operating system.
[0183] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0184] Determining whether the verification result of the first code segment indicates that the verification is passed;
[0185] When it is determined that the verification result of the first code segment indicates that the verification is passed, sending the second code segment to the second processor and executing the first code segment;
[0186] According to the verification result of the second code segment, the second code segment is executed.
[0187] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0188] If the verification result of the second code segment indicates that the verification is passed, the second code segment is executed.
[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0190] Determining whether the verification result of the first subcode segment indicates that the verification is passed;
[0191] If it is determined that the verification result of the first sub-code segment indicates that the verification is passed, executing the first sub-code segment;
[0192] The second sub-code segment is executed according to the verification result of the second sub-code segment.
[0193] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0194] If the verification result of the second sub-code segment indicates that the verification is passed, the second sub-code segment is executed.
[0195] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0196] Verify multiple code segments and obtain verification results corresponding to each code segment;
[0197] The verification results corresponding to the code segments are sent to the first processor to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments to start the operating system.
[0198] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0199] Verifying the first code segment to obtain a verification result of the first code segment;
[0200] When receiving the second code segment sent by the first processor, verifying the second code segment to obtain a verification result of the second code segment;
[0201] Sending the verification results corresponding to each code segment to the first processor includes:
[0202] The verification result of the first code segment and the verification result of the second code segment are sent to the first processor.
[0203] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0204] Obtaining verification results of the second processor verifying the plurality of code segments;
[0205] According to the verification results of the multiple code segments, each code segment is executed to start the operating system.
[0206] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0207] Determining whether the verification result of the first code segment indicates that the verification is passed;
[0208] When it is determined that the verification result of the first code segment indicates that the verification is passed, sending the second code segment to the second processor and executing the first code segment;
[0209] According to the verification result of the second code segment, the second code segment is executed.
[0210] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0211] If the verification result of the second code segment indicates that the verification is passed, the second code segment is executed.
[0212] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0213] Determining whether the verification result of the first subcode segment indicates that the verification is passed;
[0214] If it is determined that the verification result of the first sub-code segment indicates that the verification is passed, executing the first sub-code segment;
[0215] The second sub-code segment is executed according to the verification result of the second sub-code segment.
[0216] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0217] If the verification result of the second sub-code segment indicates that the verification is passed, the second sub-code segment is executed.
[0218] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0219] Verify multiple code segments and obtain verification results corresponding to each code segment;
[0220] The verification results corresponding to the code segments are sent to the first processor to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments to start the operating system.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] Verifying the first code segment to obtain a verification result of the first code segment;
[0223] When receiving the second code segment sent by the first processor, verifying the second code segment to obtain a verification result of the second code segment;
[0224] Sending the verification results corresponding to each code segment to the first processor includes:
[0225] The verification result of the first code segment and the verification result of the second code segment are sent to the first processor.
[0226] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0227] Obtaining verification results of the second processor verifying the plurality of code segments;
[0228] According to the verification results of the multiple code segments, each code segment is executed to start the operating system.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0230] Determining whether the verification result of the first code segment indicates that the verification is passed;
[0231] When it is determined that the verification result of the first code segment indicates that the verification is passed, sending the second code segment to the second processor and executing the first code segment;
[0232] According to the verification result of the second code segment, the second code segment is executed.
[0233] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0234] If the verification result of the second code segment indicates that the verification is passed, the second code segment is executed.
[0235] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0236] Determining whether the verification result of the first subcode segment indicates that the verification is passed;
[0237] If it is determined that the verification result of the first sub-code segment indicates that the verification is passed, executing the first sub-code segment;
[0238] The second sub-code segment is executed according to the verification result of the second sub-code segment.
[0239] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0240] If the verification result of the second sub-code segment indicates that the verification is passed, the second sub-code segment is executed.
[0241] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0242] Verify multiple code segments and obtain verification results corresponding to each code segment;
[0243] The verification results corresponding to the code segments are sent to the first processor to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments to start the operating system.
[0244] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0245] Verifying the first code segment to obtain a verification result of the first code segment;
[0246] When receiving the second code segment sent by the first processor, verifying the second code segment to obtain a verification result of the second code segment;
[0247] Sending the verification results corresponding to each code segment to the first processor includes:
[0248] The verification result of the first code segment and the verification result of the second code segment are sent to the first processor.
[0249] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0250] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0251] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A startup method, characterized in that: Applied to a first processor, the method comprises: Obtaining verification results of the second processor verifying the plurality of code segments; According to the verification results of the multiple code segments, each of the code segments is executed to start the operating system.
2. The method according to claim 1, characterized in that The multiple code segments include a first code segment and a second code segment, and executing each of the code segments according to the verification results of the multiple code segments includes: Determining whether the verification result of the first code segment indicates that the verification is passed; When it is determined that the verification result of the first code segment indicates that the verification is passed, sending the second code segment to the second processor, and executing the first code segment; The second code segment is executed according to the verification result of the second code segment.
3. The method according to claim 2, characterized in that The step of executing the second code segment according to the verification result of the second code segment includes: If the verification result of the second code segment indicates that the verification is passed, the second code segment is executed.
4. The method according to claim 2, characterized in that: The second code segment includes a first sub-code segment and a second sub-code segment, and executing the second code segment according to a verification result of the second code segment includes: Determining whether the verification result of the first subcode segment indicates that the verification is passed; If it is determined that the verification result of the first sub-code segment indicates that the verification is passed, executing the first sub-code segment; The second sub-code segment is executed according to the verification result of the second sub-code segment.
5. The method according to claim 4, characterized in that The step of executing the second sub-code segment according to the verification result of the second sub-code segment includes: If the verification result of the second sub-code segment indicates that the verification is passed, the second sub-code segment is executed.
6. A startup method, characterized in that: Applied to a second processor, the method comprises: Verifying multiple code segments to obtain verification results corresponding to each of the code segments; The verification results corresponding to the code segments are sent to the first processor to instruct the first processor to execute the code segments according to the verification results corresponding to the code segments to start the operating system.
7. The method according to claim 6, characterized in that The multiple code segments include a first code segment and a second code segment, and the multiple code segments are verified to obtain verification results corresponding to each of the code segments, including: Verifying the first code segment to obtain a verification result of the first code segment; Upon receiving the second code segment sent by the first processor, verifying the second code segment to obtain a verification result of the second code segment; The step of sending the verification results corresponding to the code segments to the first processor includes: The verification result of the first code segment and the verification result of the second code segment are sent to the first processor.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Credible starting method for electricity utilization collecting terminal based on TPM
CN108280351A
Dual-system start-up method and computer readable storage medium
CN109426523A
Code verification method, networking terminal equipment and readable storage medium
CN113642007A
Information processing device and control method of the same
JP2020188440A
Virtualization system with hypervisor embedded in bios or using extensible firmware interface
US8127292B1