Information processing method and electronic device
By introducing the first processor into the electronic device to decode and compare and verify the files of the second processor, the problem of low security caused by the processor's inability to verify the files is solved, ensuring the safe start-up and normal operation of the device.
Patent Information
- Application Number
- CN202111678011.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the prior art, processors cannot verify the files related to them, resulting in low security of electronic devices.
By introducing a first processor into an electronic device, decoding and comparing and verifying the relevant files of the second processor using its hardware encryption engine, the integrity and security of the files are ensured.
It realizes that even if the second processor does not support hardware encryption, it can effectively verify the integrity of its files, thereby ensuring the secure startup and normal operation of the electronic device.
Smart Images

Figure CN114357463B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and more specifically, to an information processing method and electronic equipment. Background Art
[0002] Currently, there is a problem of low security in electronic devices due to the processor's inability to verify files related to it. Summary of the Invention
[0003] In view of this, the present application provides an information processing method as follows:
[0004] An information processing method is provided for use in an electronic device, the electronic device comprising a first processor and a second processor, the method comprising:
[0005] During the system startup process of the electronic device, the first processor is started and obtains the relevant files of the second processor from the preset storage unit;
[0006] The first processor verifies the relevant file and obtains a verification result;
[0007] Based on the verification result indicating that the relevant file has passed the verification, the system starts.
[0008] Optionally, in the above method, the first processor verifies the relevant file to obtain a verification result, including:
[0009] The first processor decodes the relevant file to obtain decoding information;
[0010] comparing the decoded information with pre-stored information;
[0011] Based on the consistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has passed the verification;
[0012] Based on the inconsistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has failed verification.
[0013] Optionally, in the above method, the first processor verifies the relevant file to obtain a verification result, including:
[0014] Verifying at least one of the original file and the backup file in the relevant file based on the first processor, indicating that the relevant file has passed the verification;
[0015] The first processor fails to verify both the original file and the backup file in the relevant file, indicating that the relevant file fails verification.
[0016] Optionally, in the above method, after the first processor verifies the relevant file and obtains a verification result, the method further includes:
[0017] The first processor writes the verification result into the preset storage unit, and the verification result is stored corresponding to the relevant file.
[0018] Optionally, the above method further includes:
[0019] After the system is started, the preset storage unit receives and writes the relevant files to be updated, and generates a first message, where the first message indicates that the preset storage unit updates the relevant files.
[0020] Optionally, the above method, after the preset storage unit receives and writes the relevant files to be updated, further includes:
[0021] During the restart of the electronic device system, the first processor verifies the updated relevant files in the preset storage unit to obtain a verification result;
[0022] The preset storage unit stores the verification result and the updated related files in correspondence;
[0023] prohibiting the electronic device system from starting up based on the first message, and restarting the electronic device system;
[0024] During the restart process of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message;
[0025] Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated related file in the storage area.
[0026] Optionally, the above method further includes:
[0027] Based on the verification result indicating that the relevant file has failed verification, the system is prohibited from starting.
[0028] Optionally, after the system is prohibited from starting, the above method further includes:
[0029] During the restart of the electronic device system, the first processor starts up and obtains updated related files from the preset storage unit;
[0030] The first processor verifies the updated relevant files to obtain a verification result;
[0031] Based on the verification result indicating that the updated related file has passed the verification, based on the first message indicating that the electronic device system is prohibited from starting, and the electronic device system is restarted, the first message indicating that the preset storage unit has updated the related file;
[0032] During the restart of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message, and the verification result is stored corresponding to the updated related file;
[0033] Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated related file in the storage area.
[0034] Optionally, the above method further includes:
[0035] Based on the verification result indicating that the relevant file fails verification, the system starts, and the second processor runs based on the historical relevant files stored in the storage area.
[0036] An electronic device, comprising:
[0037] A first processor, a second processor, and a preset storage unit, wherein the preset storage unit stores files related to the second processor;
[0038] Wherein, during the system startup process of the electronic device, the first processor is started and obtains the relevant files of the second processor in the preset storage unit;
[0039] The first processor verifies the relevant file and obtains a verification result;
[0040] Based on the verification result indicating that the relevant file has passed the verification, the system starts. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0042] Figure 1 This is a flowchart of Example 1 of an information processing method provided by this application;
[0043] Figure 2 This is a flowchart of Example 2 of an information processing method provided by this application;
[0044] Figure 3 This is a flowchart of Example 3 of an information processing method provided by this application;
[0045] Figure 4 This is a flowchart of Example 4 of an information processing method provided by this application;
[0046] Figure 5 This is a flowchart of Example 5 of an information processing method provided by this application;
[0047] Figure 6 This is a flowchart of Example 6 of an information processing method provided by this application;
[0048] Figure 7 This is a flowchart of Example 7 of an information processing method provided by this application;
[0049] Figure 8 A schematic structural diagram of an electronic device embodiment provided by this application;
[0050] Figure 9 A schematic diagram of an application scenario of an electronic device provided in this application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0052] like Figure 1 FIG. 1 is a flowchart of an information processing method according to an embodiment of the present invention. The method is applied to an electronic device including a first processor and a second processor. The method includes the following steps:
[0053] Step S101: During the system startup process of the electronic device, the first processor starts up and obtains the relevant files of the second processor from the preset storage unit;
[0054] In the system startup process of the electronic device, after the first processor is powered on and started, the relevant files of the second processor are obtained from the preset storage unit.
[0055] Specifically, the preset storage unit may be a SPI (Serial Peripheral Interface) ROM (Read Only Memory image).
[0056] Taking the second processor as an EC (Embedded Controller) as an example, the relevant file of the second processor may be the firmware (EC image) of the EC.
[0057] Specifically, the first processor may be a ME (Management Engine) provided in a SOC (System on Chip), where the ME is a processor in the SOC that is independent of a CPU (central processing unit), and a hardware cryptographic engine (Hardware Cryptographic Engine) is provided in the first processor.
[0058] Step S102: the first processor verifies the relevant file and obtains a verification result;
[0059] After acquiring the relevant files of the second processor, the first processor verifies the files to obtain a verification result.
[0060] It should be noted that, in this embodiment, the verification of the relevant files of the second processor is performed by the first processor, and the second processor itself does not need to be executed. Therefore, even if the second processor cannot execute the verification process, it will not affect the verification of the relevant files of the second processor.
[0061] Specifically, the SPI ROM stores EC firmware. During the system startup process of the electronic device, the EC firmware stored in the SPI ROM needs to be verified.
[0062] Specifically, when the second processor is a conventional EC, the EC does not support hardware encryption and cannot support RoT, and the verification of the EC's firmware is performed by the first processor. The EC can verify the EC's firmware without performing the encryption and decryption process.
[0063] The preset storage unit may store the original file and the backup file of the relevant file. During verification, as long as one of them passes the verification, the relevant file can be determined to have passed the verification.
[0064] Herein, step S102 specifically includes:
[0065] Verifying at least one of the original file and the backup file in the relevant file based on the first processor, indicating that the relevant file has passed the verification;
[0066] The first processor fails to verify both the original file and the backup file in the relevant file, indicating that the relevant file fails verification.
[0067] In which, during the verification process, the first processor first obtains the original file of the relevant file from the preset storage unit and verifies the original file; if the original file passes the verification, it is determined that the relevant file passes the verification; if the original file fails the verification, the backup file of the relevant file is obtained from the preset storage unit and verified; if the backup file passes the verification, it is determined that the relevant file passes the verification; if the backup file fails the verification, it is determined that the relevant file fails the verification.
[0068] Step S103: Based on the verification result indicating that the relevant file has passed the verification, the system starts.
[0069] If the verification result of the relevant file indicates that the relevant file has passed the verification, the system of the electronic device is started and the device operates normally.
[0070] The first processor may further write the verification result into a preset storage unit, and the preset storage unit stores the verification result and the verification-related files in correspondence with each other.
[0071] Specifically, the verification result includes the verification result of the original file in the relevant file, and the verification result is stored corresponding to the original file; the verification result includes the verification result of the original file and the backup file in the relevant file, and the verification result is stored corresponding to the original file and the backup file.
[0072] For example, if the original file passes verification, the signature corresponding to the original file in the preset storage unit is written as verification success (e.g., success);
[0073] For example, if the original file fails verification, the signature corresponding to the original file in the preset storage unit is written as verification failure (such as fail); if the backup file passes verification, the signature corresponding to the backup file is written as verification success (such as success).
[0074] In summary, this embodiment provides an information processing method, which is applied to an electronic device. The electronic device has a first processor and a second processor. During the system startup process of the electronic device, after the first processor is started, the relevant files of the second processor are obtained from the preset storage unit, and the first processor verifies the relevant files. If the verification is successful, the system starts.
[0075] EC chips are now used to implement Root of Trust (RoT, an architectural solution for establishing a source that can be trusted in a cryptographic system), but they must rely on the EC hardware chip's own encryption engine to complete encryption and decryption functions. Conventional ECs cannot support hardware encryption, so most EC chips cannot support the RoT, resulting in an inability to guarantee the security of the conventional EC firmware. If the solution provided in this embodiment is adopted, the second processor is an EC, and the relevant file is the firmware of the EC, then the process of verifying the first firmware of the second processor is performed by the first processor. When the second processor is an EC, other processors with information processing capabilities in the electronic device can be used to verify the EC firmware. Therefore, even if the EC firmware does not support hardware encryption, the non-EC processor can implement RoT, ensuring the security of the EC firmware.
[0076] like Figure 2 The figure is a flowchart of Example 2 of an information processing method provided by the present application, and the method includes the following steps:
[0077] Step S201: During the system startup process of the electronic device, the first processor is started and obtains the relevant files of the second processor from the preset storage unit;
[0078] Among them, step S201 is consistent with step S101 in embodiment 1 and is not described in detail in this embodiment.
[0079] Step S202: the first processor decodes the relevant file to obtain decoding information;
[0080] It should be noted that, in this embodiment, this step is an explanation of the process of the first processor verifying the relevant files of the second processor.
[0081] After acquiring the relevant file from the second processor, the first processor decodes the relevant file to obtain decoding information.
[0082] Specifically, the core of the first processor is provided with a hardware encryption engine, and the hardware encryption engine decrypts the encrypted related files stored in the preset storage unit to obtain decoding information.
[0083] Step S203: comparing the decoded information with pre-stored information;
[0084] Based on the consistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has passed the verification; based on the inconsistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has failed the verification.
[0085] The first processor is provided with relevant information for determining whether the decoded information can pass verification.
[0086] For example, the pre-stored information is information for determining whether the decoding information is complete. If the decoding information is determined to be consistent with the pre-stored information, the decoding information is complete and the relevant file passes the verification; if the decoding information is determined to be inconsistent with the pre-stored information, the decoding information is incomplete and the relevant file fails the verification.
[0087] For example, the pre-stored information may be the correct information after decoding the relevant file. If the decoded information is judged to be consistent with the pre-stored information, the decoded information is consistent with the correct information, and the relevant file passes the verification; if the decoded information is judged to be inconsistent with the pre-stored information, the decoded information is consistent with the correct information, and the relevant file fails the verification.
[0088] It should be noted that if the relevant files stored in the preset storage unit pass the verification, it indicates that the electronic device can operate safely. If the relevant files fail to pass the verification and are applied, the safe operation of the electronic device may be threatened.
[0089] Step S204: Based on the verification result indicating that the relevant file has passed the verification, the system starts.
[0090] Among them, step S204 is consistent with step S103 in embodiment 1 and is not described in detail in this embodiment.
[0091] In summary, in an information processing method provided by this embodiment, the first processor verifies the relevant file and obtains a verification result, including: the first processor decodes the relevant file to obtain decoded information; compares the decoded information with pre-stored information; based on the consistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has passed verification; based on the inconsistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has failed verification. In this solution, after obtaining the relevant file from the second processor, the first processor decodes the relevant file to obtain decoded information, and based on whether the decoded information is consistent with the pre-stored information, determines whether the relevant file stored in the preset storage unit is secure.
[0092] like Figure 3 The flowchart shown is a third embodiment of an information processing method provided by the present application, which includes the following steps:
[0093] Step S301: During the system startup process of the electronic device, the first processor starts up and obtains the relevant files of the second processor from the preset storage unit;
[0094] Step S302: the first processor verifies the relevant file and obtains a verification result;
[0095] Step S303: Based on the verification result indicating that the relevant file has passed the verification, the system starts;
[0096] Among them, steps S301-303 are consistent with step S101 in Example 1 and are not described in detail in this embodiment.
[0097] Step S304: After the system is started, the preset storage unit receives and writes the relevant files to be updated.
[0098] Wherein, based on updating the relevant files for the preset storage unit, a first message is further generated, and the first message indicates that the preset storage unit updates the relevant files.
[0099] It should be noted that this embodiment is a process of normally updating the firmware of the second processor in the electronic device.
[0100] After the system of the electronic device is started, during normal operation of the system, the system may also receive relevant files to be updated so as to update the relevant files in the preset storage unit.
[0101] Specifically, the related file to be updated is written into the preset storage unit, and the storage area of the preset storage unit is updated so that the original file of the related file stored in the preset storage unit is updated to the related file to be updated.
[0102] Specifically, the backup file in the preset storage unit is also updated so that the original file and the backup file in the preset storage unit are kept consistent.
[0103] In summary, in an information processing method provided by this embodiment, after the system is started, the preset storage unit receives and writes the relevant files to be updated, so as to update the relevant files in the preset storage unit.
[0104] like Figure 4 The flowchart shown is a fourth embodiment of an information processing method provided by the present application, which includes the following steps:
[0105] Step S401: During the system startup process of the electronic device, the first processor starts up and obtains the relevant files of the second processor from the preset storage unit;
[0106] Step S402: the first processor verifies the relevant file and obtains a verification result;
[0107] Step S403: Based on the verification result indicating that the relevant file has passed the verification, the system starts;
[0108] Step S404: After the system is started, the preset storage unit receives and writes the relevant files to be updated.
[0109] Among them, steps S401-404 are consistent with steps S301-304 in Example 3 and are not described in detail in this embodiment.
[0110] Step S405: During the restart of the electronic device system, the first processor verifies the updated related files in the preset storage unit to obtain a verification result;
[0111] Wherein, after the electronic device is normally shut down, during the process of restarting the system of the electronic device, the first processor verifies the relevant files in the preset storage unit to obtain a verification result.
[0112] The relevant files in the preset storage unit are updated after executing step S404 on the relevant files stored in the preset storage unit.
[0113] The process of the first processor verifying the updated related files is similar to the explanation of step S102 in embodiment 1 and embodiment 2, and will not be described in detail in this embodiment.
[0114] Step S406: The preset storage unit stores the verification result and the updated related files in correspondence;
[0115] Specifically, after verification, the preset storage unit stores the verification result and the updated related files therein in correspondence.
[0116] Step S407: prohibiting the electronic device system from starting up based on the first message, and restarting the electronic device system;
[0117] There is a first message in the system of the electronic device, and based on the first message, the electronic device system is prohibited from starting, and the system is restarted, so that the relevant files stored in the second processor are updated during the restart process.
[0118] Step S408: During the restart of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message;
[0119] In the process of restarting the electronic device system, the second processor is not powered off.
[0120] In a specific implementation, after the relevant files stored in the preset storage unit are updated, the system sends a first message to the second processor.
[0121] The second processor detects the verification result of the related file in a preset storage unit based on the first message.
[0122] Since the updated related file is a correct file, the updated related file is verified. Therefore, the verification result stored in the preset storage unit indicates that the corresponding related file has passed the verification.
[0123] Step S409: Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor;
[0124] Wherein, based on the verification result stored in the preset storage unit indicating that the corresponding related file has passed the verification, the second processor copies the related file stored in the preset storage unit to a storage area in the second processor.
[0125] For example, in a specific implementation, a section of code (flash code) is preset in the storage area (flash) of the second processor (EC), and the code is responsible for obtaining the verification result and copying the relevant files to the flash of the EC.
[0126] Here, steps S408-409 are executed during the restart process of the electronic device, after the first processor is powered off but before it is powered on again.
[0127] Step S410: After the electronic device system is restarted, the second processor runs based on the updated related files in the storage area.
[0128] After the electronic device system is restarted, the second processor runs based on the relevant files in its storage area.
[0129] It should be noted that after the electronic device system is restarted, the first processor again executes the process of verifying the relevant files stored in the preset storage unit and writing the verification result into the preset storage unit.
[0130] In summary, in an information processing method provided by this embodiment, after the relevant files in the preset storage unit are updated, during the normal shutdown and restart process of the electronic device system, the first processor verifies the updated relevant files in the preset storage unit, obtains a verification result, and stores the verification result in the preset storage unit corresponding to the relevant files; the electronic device system prohibits startup based on the first message of updating the relevant files in the preset storage unit, and the electronic device system restarts; during the restart process of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message, indicating that the updated relevant files have passed the verification, and the second processor copies the updated relevant files to the storage area in the second processor, so that after the electronic device is restarted, the second processor runs based on the updated relevant files in the storage area. This solution clearly explains that after the relevant files in the preset storage unit are normally updated, the second processor copies the updated relevant files to its internal storage area to run the process based on the updated relevant files.
[0131] like Figure 5 The flowchart shown is a fifth embodiment of an information processing method provided by the present application, which includes the following steps:
[0132] Step S501: During the system startup process of the electronic device, the first processor starts up and obtains the relevant files of the second processor from the preset storage unit;
[0133] Step S502: the first processor verifies the relevant file and obtains a verification result;
[0134] Step S503: Based on the verification result indicating that the relevant file has passed the verification, the system starts;
[0135] Among them, steps S501-503 are consistent with steps S101-103 in Example 1 and are not described in detail in this embodiment.
[0136] Step S504: Based on the verification result indicating that the relevant file has failed verification, the system is prohibited from starting.
[0137] If the verification result of the relevant file indicates that the relevant file has passed the verification, the system of the electronic device is prohibited from starting up to prevent the relevant file that has not passed the verification from affecting the operation of the electronic device, thereby ensuring the safety of the system.
[0138] The first processor may further write the verification result into a preset storage unit, and the preset storage unit stores the verification result and the verification-related files in correspondence with each other.
[0139] Specifically, the verification result includes the verification result of the original file in the relevant file, and the verification result is stored corresponding to the original file; the verification result includes the verification result of the original file and the backup file in the relevant file, and the verification result is stored corresponding to the original file and the backup file.
[0140] For example, if the original file fails verification, the signature corresponding to the original file is written as verification failure (such as fail); if the backup file also fails verification, the signature corresponding to the backup file is written as verification failure (such as fail).
[0141] It should be noted that if the verification result indicates that the relevant file has failed verification, then both the original file and the backup file of the relevant file in the preset storage unit have failed verification. The reason for this situation may be that the firmware in the SIP ROM is completely damaged, and the security of the firmware of the second processor EC in the SIP ROM cannot be guaranteed, resulting in the EC being unable to perform RoT based on the firmware.
[0142] In summary, the information processing method provided in this embodiment further includes: prohibiting system startup based on the verification result indicating that the relevant file has failed verification. In this solution, because all relevant files stored in the preset storage unit are damaged, the security of the relevant files cannot be guaranteed, resulting in the EC being unable to perform RoT based on the firmware stored in the SPI ROM. Therefore, system startup is prohibited to ensure system security.
[0143] like Figure 6 The figure is a flowchart of Example 6 of an information processing method provided by the present application, and the method includes the following steps:
[0144] Step S601: During the system startup process of the electronic device, the first processor starts up and obtains the relevant files of the second processor from the preset storage unit;
[0145] Step S602: the first processor verifies the relevant file and obtains a verification result;
[0146] Step S603: Based on the verification result indicating that the relevant file has passed the verification, the system starts;
[0147] Step S604: Based on the verification result indicating that the relevant file has failed verification, the system is prohibited from starting.
[0148] Among them, steps S601-604 are consistent with steps S501-504 in Example 5 and are not described in detail in this embodiment.
[0149] Step S605: During the restart of the electronic device system, the first processor starts up and obtains updated related files from the preset storage unit;
[0150] It should be noted that if the verification result indicates that the relevant file has failed verification, it means that both the original file and the backup file of the relevant file in the preset storage unit have failed verification. The reason for this situation may be that the firmware in the preset storage unit is completely damaged and the preset storage unit needs to be reburned.
[0151] The burning needs to be performed by professionals. For example, after the system is prohibited from starting and the electronic device is shut down, the SPI ROM is burned on the service side (service), and the correct related files are burned to the SPI ROM to achieve a complete update of the firmware in the SPI ROM.
[0152] Specifically, during the burning process, both the original file and the backup file in the preset storage unit may be updated so that the original file and the backup file in the preset storage unit are kept consistent.
[0153] It should be noted that after the firmware in the SPI ROM is updated, the system of the electronic device can receive / detect the update and generate a first message to indicate that the firmware in the SPI ROM is the updated firmware.
[0154] When the user presses the power button to restart the system of the electronic device, the first processor is powered on and starts up, and then obtains the updated related files in the burned preset storage unit.
[0155] Step S606: the first processor verifies the updated related files and obtains a verification result;
[0156] In which, when the electronic device is turned off and then turned on again normally and the system is restarted, the first processor verifies the relevant files in the preset storage unit to obtain a verification result.
[0157] The process of the first processor verifying the updated related files is similar to the explanation of step S102 in embodiment 1 and embodiment 2, and will not be described in detail in this embodiment.
[0158] Step S607: Based on the verification result indicating that the updated related file has passed the verification, the electronic device system is prohibited from starting based on the first message, and the electronic device system is restarted;
[0159] The first message indicates that the preset storage unit updates the relevant file.
[0160] If the verification result indicates that the updated related file has passed the verification, indicating that the updated related file is safe, the updated related file needs to be copied to the second processor.
[0161] Therefore, based on the first message for updating the relevant file in the preset storage unit, the system startup of the electronic device is prohibited, and the system of the electronic device is restarted, so that the second processor copies the relevant file during the restart process.
[0162] Step S608: During the restart of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message, and the verification result is stored corresponding to the updated related file;
[0163] In the process of restarting the electronic device system, the second processor is not powered off.
[0164] In a specific implementation, after the relevant files stored in the preset storage unit are updated, the system sends a first message to the second processor.
[0165] The second processor detects the verification result of the related file in a preset storage unit based on the first message.
[0166] Since the updated related file is a correct file, the updated related file is verified. Therefore, the verification result stored in the preset storage unit indicates that the corresponding related file has passed the verification.
[0167] Step S609: Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage in the second processor;
[0168] Wherein, based on the verification result stored in the preset storage unit indicating that the corresponding related file has passed the verification, the second processor copies the related file stored in the preset storage unit to a storage area in the second processor.
[0169] In a specific implementation, a section of code (flash code) is embedded in the storage area (flash) of the second processor (EC), and the code is responsible for obtaining the verification result and copying the relevant files to the flash of the EC.
[0170] Here, steps S608-609 are executed during the restart process of the electronic device, after the first processor is powered off but before it is powered on again.
[0171] Step S610: After the electronic device is restarted, the second processor runs based on the updated related files in the storage area.
[0172] After the electronic device system is restarted, the second processor runs based on the relevant files in its storage area.
[0173] It should be noted that after the electronic device system is restarted, the first processor again executes the process of verifying the relevant files stored in the preset storage unit and writing the verification result into the preset storage unit.
[0174] In summary, the information processing method provided by this embodiment further includes: during the system restart of the electronic device, the first processor is started and obtains the updated relevant files from the preset storage unit; the first processor verifies the updated relevant files and obtains a verification result; based on the verification result indicating that the updated relevant files have passed the verification, the electronic device system is prohibited from starting based on the first message, and the electronic device system is restarted, and the first message indicates that the preset storage unit has updated the relevant files; during the electronic device system restart, the second processor detects the verification result in the preset storage unit based on the first message, and the verification result is stored corresponding to the updated relevant files; based on the verification result indicating that the updated relevant files have passed the verification, the second processor copies the updated relevant files to the storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated relevant files in the storage area. This solution clearly explains how to implement the second processor to copy the updated relevant files to its internal storage area after the relevant files in the preset storage unit are burned and updated, so as to run the process based on the updated relevant files.
[0175] like Figure 7 The flowchart shown is a seventh embodiment of an information processing method provided by the present application, and the method includes the following steps:
[0176] Step S701: During the system startup process of the electronic device, the first processor starts up and obtains the relevant files of the second processor from the preset storage unit;
[0177] Step S702: the first processor verifies the relevant file and obtains a verification result;
[0178] Step S703: Based on the verification result indicating that the relevant file has passed the verification, the system starts;
[0179] Among them, steps S701-703 are consistent with steps S101-103 in Example 1 and are not described in detail in this embodiment.
[0180] Step S704: Based on the verification result indicating that the relevant file has failed verification, the system starts, and the second processor runs based on the historical relevant files stored in the storage area.
[0181] It should be noted that the verification of the relevant files in the preset storage unit failed this time, but the second processor's own storage area stores historical relevant files, which have passed the verification and their security is guaranteed. The system continues to start up, and the EC runs based on the historical firmware stored in its own storage area (EC flash), which can ensure the safe operation of the system.
[0182] Therefore, when the verification of the relevant files of the preset storage unit fails, the system still starts, but the second processor runs based on the historical relevant files stored in its local storage area.
[0183] In a specific implementation, when the verification of the relevant files fails, the system will also generate a prompt message to remind the user that the relevant files in the preset storage unit are damaged and need to be updated.
[0184] In a subsequent process, when the user learns that the relevant files in the preset storage unit are damaged based on the prompt information, the user can update the relevant files in the preset storage unit.
[0185] For example, after the relevant files in the preset storage unit are updated, the system generates a first message to prompt the ME and the EC that the firmware in the SPI ROM has been updated.
[0186] It should be noted that, after the firmware in the SPI ROM is updated, the processing process may refer to steps S605-609 in Example 6, which will not be described in detail in this embodiment.
[0187] In summary, the information processing method provided in this embodiment further includes: based on the verification result indicating that the relevant file has failed verification, the system boots up, and the second processor operates based on the historical relevant files stored in the storage area. In this solution, although all relevant files stored in the preset storage unit are damaged and the security of the relevant files cannot be guaranteed, the second processor's own storage area stores the historical relevant files, which have passed verification and are therefore guaranteed to be secure. The system continues to boot up, and the EC operates based on the historical firmware stored in its own storage area, thereby ensuring secure system operation.
[0188] Corresponding to the above-mentioned embodiment of an information processing method provided by the present application, the present application also provides an embodiment of an electronic device applying the information processing method.
[0189] like Figure 8 The figure shows a schematic diagram of the structure of an electronic device embodiment provided by the present application, which includes the following structures: a first processor 801, a second processor 802 and a preset storage unit 803;
[0190] Wherein, the preset storage unit stores relevant files of the second processor;
[0191] Wherein, during the system startup process of the electronic device, the first processor is started and obtains the relevant files of the second processor in the preset storage unit;
[0192] The first processor verifies the relevant file and obtains a verification result;
[0193] Based on the verification result indicating that the relevant file has passed the verification, the system starts.
[0194] Specifically, the second processor may be an EC; the preset storage unit may be an SPI ROM, in which the firmware of the EC is stored; the first processor may be an ME set in the SOC, which is a processor independent of the CPU in the SOC, and a hardware encryption engine is set in the first processor, which can decrypt the firmware of the EC stored in the SIPROM, so that the first processor can verify the firmware of the EC.
[0195] Optionally, the first processor verifies the relevant file to obtain a verification result, including:
[0196] The first processor decodes the relevant file to obtain decoding information;
[0197] comparing the decoded information with pre-stored information;
[0198] Based on the consistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has passed the verification;
[0199] Based on the inconsistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has failed verification.
[0200] Optionally, the first processor verifies the relevant file to obtain a verification result, including:
[0201] Verifying at least one of the original file and the backup file in the relevant file based on the first processor, indicating that the relevant file has passed the verification;
[0202] The first processor fails to verify both the original file and the backup file in the relevant file, indicating that the relevant file fails verification.
[0203] Optionally, the first processor verifies the relevant file, and after obtaining the verification result, the first processor writes the verification result into the preset storage unit, and the verification result is stored corresponding to the relevant file.
[0204] Optionally, after the system is started, the preset storage unit receives and writes the relevant files to be updated, and generates a first message, where the first message indicates that the preset storage unit updates the relevant files.
[0205] Optionally, after the preset storage unit receives and writes the relevant file to be updated, the system of the electronic device is restarted. During the restart process, the first processor verifies the updated relevant file in the preset storage unit to obtain a verification result;
[0206] The preset storage unit stores the verification result and the updated related files in correspondence;
[0207] prohibiting the electronic device system from starting up based on the first message, and restarting the electronic device system;
[0208] During the restart process of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message;
[0209] Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated related file in the storage area.
[0210] Optionally, based on the verification result indicating that the relevant file has failed verification, the system is prohibited from starting.
[0211] Optionally, after the system is prohibited from starting, during the process of restarting the system of the electronic device, the first processor is started and obtains the updated relevant files from the preset storage unit;
[0212] The first processor verifies the updated relevant files to obtain a verification result;
[0213] Based on the verification result indicating that the updated related file has passed the verification, based on the first message indicating that the electronic device system is prohibited from starting, and the electronic device system is restarted, the first message indicating that the preset storage unit has updated the related file;
[0214] During the restart of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message, and the verification result is stored corresponding to the updated related file;
[0215] Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated related file in the storage area.
[0216] Optionally, based on the verification result indicating that the relevant file has failed verification, the system is started, and the second processor runs based on the historical relevant files stored in the storage area.
[0217] The functions of the various structures in the electronic device are explained in the aforementioned method embodiment and will not be described in detail in this embodiment.
[0218] In a specific implementation, various structures in the electronic device are connected via SPI.
[0219] Figure 9 The figure shows an application scenario for an electronic device. Specifically, the first processor is the ME in the SOC, and the second processor is the EC. The EC is provided with a flash storage area, which pre-stores code. The default storage unit uses an SPI ROM, which stores the EC's original firmware file and backup files. Each file is accompanied by a signature, which is the result of the ME verifying the firmware. The ME and SPI ROM, as well as the SPI ROM and EC, are connected via SPI, and the ME and EC are connected via ESPI (Enhanced Serial Peripheral Interface).
[0220] In summary, this embodiment provides an electronic device having a first processor and a second processor. During the system startup process of the electronic device, after the first processor is started, the relevant files of the second processor are obtained from a preset storage unit, and the first processor verifies the relevant files. If the verification is successful, the system starts. Wherein, the second processor is an EC, and the relevant files are the firmware of the EC. Then, the process of verifying the first firmware of the second processor is performed by the first processor. When the second processor is an EC, other processors with information processing capabilities in the electronic device can be used to verify the EC firmware. Therefore, even if the EC firmware does not support hardware encryption, the non-EC processor can implement RoT, ensuring the security of the EC firmware.
[0221] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices provided in the embodiments, since they correspond to the methods provided in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0222] The above description of the provided embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features provided herein.
Claims
1. An information processing method, used in an electronic device, wherein the electronic device includes a first processor and a second processor, the method comprising: During the system startup process of the electronic device, the first processor is started and obtains the relevant files of the second processor from the preset storage unit; The first processor verifies the relevant file and obtains a verification result; Based on the verification result indicating that the relevant file has passed the verification, the system is started; During the restart process of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message; Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated related file in the storage area.
2. The method according to claim 1, wherein the first processor verifies the relevant file and obtains a verification result, comprising: The first processor decodes the relevant file to obtain decoding information; comparing the decoded information with pre-stored information; Based on the consistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has passed the verification; Based on the inconsistency between the decoded information and the pre-stored information, the obtained verification result indicates that the relevant file has failed verification.
3. The method according to claim 1, wherein the first processor verifies the relevant file and obtains a verification result, comprising: Verifying at least one of the original file and the backup file in the relevant file based on the first processor, indicating that the relevant file has passed the verification; The first processor fails to verify both the original file and the backup file in the relevant file, indicating that the relevant file fails verification.
4. The method according to claim 1, wherein the first processor verifies the relevant file and obtains a verification result, further comprising: The first processor writes the verification result into the preset storage unit, and the verification result is stored corresponding to the relevant file.
5. The method according to claim 1, further comprising: After the system is started, the preset storage unit receives and writes the relevant files to be updated, and generates a first message, where the first message indicates that the preset storage unit updates the relevant files.
6. The method according to claim 5, after the preset storage unit receives and writes the relevant files to be updated, further comprising: During the restart of the electronic device system, the first processor verifies the updated relevant files in the preset storage unit to obtain a verification result; The preset storage unit stores the verification result and the updated related files in correspondence; The electronic device system is prohibited from starting up based on the first message, and the electronic device system is restarted.
7. The method according to claim 1, further comprising: Based on the verification result indicating that the relevant file has failed verification, the system is prohibited from starting.
8. The method according to claim 7, after the system is disabled from starting, further comprising: During the restart of the electronic device system, the first processor starts up and obtains updated related files from the preset storage unit; The first processor verifies the updated relevant files to obtain a verification result; Based on the verification result indicating that the updated related files have passed the verification, the electronic device system is prohibited from starting up and the electronic device system is restarted based on the first message indicating that the preset storage unit updates the related files.
9. The method according to claim 1, further comprising: Based on the verification result indicating that the relevant file fails verification, the system starts, and the second processor runs based on the historical relevant files stored in the storage area.
10. An electronic device comprising: A first processor, a second processor, and a preset storage unit, wherein the preset storage unit stores files related to the second processor; Wherein, during the system startup process of the electronic device, the first processor is started and obtains the relevant files of the second processor in the preset storage unit; The first processor verifies the relevant file and obtains a verification result; Based on the verification result indicating that the relevant file has passed the verification, the system is started; During the restart process of the electronic device system, the second processor detects the verification result in the preset storage unit based on the first message; Based on the verification result indicating that the updated related file has passed the verification, the second processor copies the updated related file to a storage area in the second processor, so that after the electronic device system is restarted, the second processor runs based on the updated related file in the storage area.
Citation Information
Patent Citations
Method and device for boot startup of processor operating system, and processor system
CN108363918A
Method, device and server for managing firmware of basic input and output system
CN109446815A