Controller starting configuration method, controller starting method and related device

By burning the merged firmware to the controller and configuring the program firmware step by step based on the hardware security engine, a secure startup trust chain is formed, which solves the problem of secure startup of the controller and realizes the legality and credibility of the program. And improves safety configuration and maintenance efficiency.

CN119473323APending Publication Date: 2025-02-18ZHEJIANG LEAPENERGY TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411320869.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

How to achieve secure startup of the controller to ensure that the program is legal and trustworthy before loading and executing the program code.

Method used

By burning the merged firmware to the controller, the merged firmware includes the hardware security engine configuration program firmware, the upgrade bootloader firmware, and the application firmware. Based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is configured step by step safely to form a secure startup trust chain.

Benefits of technology

The secure startup of the controller is realized, and by forming a secure startup trust chain, the legality and credibility of the program are ensured, and the security configuration and maintenance efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473323A_ABST
    Figure CN119473323A_ABST
Patent Text Reader

Abstract

The invention discloses a controller starting configuration method, a controller starting method and a related device. The method comprises the following steps: burning merged firmware to a controller; wherein the combined firmware is obtained by combining all firmware needed in the safe starting process of the controller, and the combined firmware comprises hardware safety engine configuration program firmware; booting the controller to point to hardware security engine configuration program firmware based on target startup booting information in the controller; and configuring program firmware based on a hardware security engine, and performing step-by-step security configuration on residual firmware in the merged firmware to form a security startup trust chain. By means of the mode, related configuration of safe starting of the controller can be completed, and safe starting of the controller is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of controller technology, and in particular to a controller startup configuration method, a controller startup method and related devices. Background Art

[0002] With the development of information technology, information security has received more and more attention. Secure boot is a requirement in information security standards. Secure boot requires that before the controller loads and executes any program code, it must ensure that the program is legal and trustworthy. Therefore, how to achieve controller secure boot has become one of the issues to be solved. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a controller startup configuration method, a controller startup method and related devices, which can complete the relevant configuration of the controller safe startup to achieve the controller safe startup.

[0004] To solve the above technical problems, the first aspect of the present application provides a controller startup configuration method, the method comprising: burning a merged firmware to the controller; wherein the merged firmware is obtained by merging various firmware required for the controller's secure startup process, and the merged firmware includes a hardware security engine configuration program firmware; based on the target startup boot information in the controller, the controller is guided to point to the hardware security engine configuration program firmware; based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured step by step to form a secure startup trust chain.

[0005] Among them, the merged firmware also includes upgraded boot program firmware and application firmware; based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured step by step to form a secure boot trust chain, including: determining that the hardware security engine firmware is installed in the controller; obtaining the secure boot key; using the secure boot key to sign the upgraded boot program firmware, the application firmware and the target boot boot information in turn; based on the signed target boot boot information, the signed upgraded boot program firmware and the signed application firmware, a secure boot trust chain is formed.

[0006] Before determining whether the hardware security engine firmware is installed in the controller, the controller startup configuration method further includes: reading a parameter value of a flag bit of the controller; and determining whether the hardware security engine firmware is installed in the controller based on the parameter value of the flag bit.

[0007] Before obtaining the secure boot key, the controller startup configuration method also includes: in response to the hardware security engine firmware not being installed in the controller, updating the parameter value of the flag bit so that the hardware security engine firmware in the merged firmware is updated to an enabled state; wherein the parameter value of the updated flag bit indicates that the hardware security engine firmware has been installed; resetting the controller, and re-executing the steps of determining whether the hardware security engine firmware is installed in the controller and subsequent steps.

[0008] Among them, before booting the controller to point to the hardware security engine configuration program firmware based on the target startup boot information in the controller, the controller startup configuration method also includes: determining the valid target startup boot information in the storage address of the controller; based on the target startup boot information in the controller, booting the controller to point to the hardware security engine configuration program firmware, including: based on the valid target startup boot information in the controller, booting the controller to point to the hardware security engine configuration program firmware.

[0009] Determining valid target boot information in the storage address of the controller includes: judging whether the reference boot information and the target boot information in the merged firmware are consistent; and determining that the target boot information is valid in response to the reference boot information and the target boot information being consistent.

[0010] Determining valid target boot information in the storage address of the controller includes: based on the hardware boot mechanism of the controller and the reference boot information, sequentially determining whether the target boot information in the boot storage address of the controller and the target boot information in the configuration storage address are valid.

[0011] Among them, when the target startup boot information in the startup storage address is invalid and the target startup boot information in the configuration storage address is valid, the controller startup configuration method also includes: writing the target startup boot information in the configuration storage address into the startup storage address, and making the target startup boot information written into the startup storage address point to the upgrade boot program firmware in the merged firmware.

[0012] To solve the above technical problems, the second aspect of the present application provides a controller startup method, which includes: performing security checks on each level of firmware on the secure startup trust chain step by step in the order of loading and running; wherein the secure startup trust chain is obtained using the controller startup configuration method provided by the first aspect above; when the security checks are passed step by step, loading and running the startup image files of each level of firmware step by step to guide the controller to complete the startup.

[0013] Among them, according to the loading and running order, the security verification is performed on each level of firmware on the secure boot trust chain step by step, including: determining the target boot boot information, performing a first verification on the signature of the target boot boot information, performing a second verification on the signature of the upgrade boot program firmware, and performing a third verification on the signature of the application firmware; wherein the first verification, the second verification and the third verification are performed in sequence.

[0014] Among them, when the security verification is passed at each level, the startup image files of each level of firmware are loaded and run at each level, including: in response to the first verification being passed, determining to upgrade the boot program firmware according to the direction of the target startup boot information; in response to the second verification being passed, starting the startup image file of the upgraded boot program firmware; in response to the third verification, starting the startup image file of the application firmware.

[0015] The beneficial effects of the present application are as follows: Different from the prior art, the present application burns a merged firmware to the controller; wherein the merged firmware is obtained by merging the various firmware required for the secure boot process of the controller, and the merged firmware includes the hardware security engine configuration program firmware; based on the target boot boot information in the controller, the controller is guided to point to the hardware security engine configuration program firmware; based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured step by step to form a secure boot trust chain to complete the relevant configuration of the controller secure boot. Based on the secure boot trust chain, the secure boot of the controller can be achieved. Furthermore, by providing a merged firmware, during the security configuration process, only the merged firmware needs to be downloaded once, and only one merged firmware needs to be maintained, thereby improving the security configuration efficiency and maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of an implementation method of a controller startup configuration method provided by the present application;

[0017] Figure 2 It is a flowchart of another implementation method of the controller startup configuration method provided by the present application;

[0018] Figure 3 It is a flowchart of an implementation method of a controller startup method provided by the present application;

[0019] Figure 4 It is a schematic diagram of the framework structure of an embodiment of an electronic device provided by the present application;

[0020] Figure 5 It is a schematic diagram of the framework structure of an implementation scheme of a computer-readable storage medium provided in this application. DETAILED DESCRIPTION

[0021] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] It should be noted that in the embodiments of the present application, there are descriptions involving "first", "second", etc., which are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.

[0023] In the description of the application, the meaning of "multiple" is at least two, for example, two, three, etc., unless otherwise clearly and specifically limited. In the embodiment of the present application, all directional indications (such as up, down, left, right, front, back ...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their deformations are intended to cover non-exclusive inclusions. For example, the process, method, system, product or equipment comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes the steps or units not listed, or optionally also includes other steps or units inherent to these processes, methods, products or equipment.

[0024] 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 invention. The appearance of the phrase in various places 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.

[0025] See also Figure 1 , Figure 1 : is a flow chart of an implementation method of a controller startup configuration method provided by the present application, the method comprising:

[0026] S11: Burn the merged firmware to the controller.

[0027] In one embodiment, the merged firmware is obtained by merging the firmware required for the controller security boot process. According to the needs of the controller security boot process, the merged firmware may include at least one of the hardware security engine configuration program firmware, the upgrade boot program firmware (also called Bootloader firmware), the application firmware, and the hardware security engine firmware (also called HSE firmware). In a specific embodiment, the merged firmware includes the hardware security engine configuration program firmware, and the hardware security engine configuration program firmware is used to guide the controller to perform step-by-step security configuration on the remaining firmware in the merged firmware.

[0028] The controller includes but is not limited to MCU (micro control unit), PLC (programmable logic controller), DSP (digital signal processor), etc. In a specific embodiment, the controller is MCU (micro control unit).

[0029] S12: Based on the target startup boot information in the controller, the controller is booted to point to the hardware security engine configuration program firmware.

[0030] In one embodiment, the controller is pre-set with target boot information. When the controller is powered on, the target boot information is first searched. The target boot information is used to guide the controller to point to a certain firmware and run the pointed firmware. For example, the target boot information can point to the hardware security engine configuration program firmware, and the controller runs the hardware security engine configuration program firmware; for another example, the target boot information can also point to the upgrade boot program firmware, and the controller runs the upgrade boot program firmware.

[0031] S13: Based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured step by step to form a secure boot trust chain.

[0032] In one embodiment, the merged firmware also includes upgrade boot program firmware and application firmware; the execution order of the hardware security engine configuration program firmware includes: determining that the hardware security engine firmware is installed in the controller; obtaining a secure boot key; using the secure boot key to sign the upgrade boot program firmware, the application firmware, and the target boot boot information in sequence; based on the signed target boot boot information, the signed upgrade boot program firmware, and the signed application firmware, a secure boot trust chain is formed.

[0033] Specifically, first check whether the hardware security engine firmware is installed. In one embodiment, after the HSE firmware is installed, a flag bit is usually set in a register of the MCU to indicate the presence of the firmware. Therefore, in a specific embodiment, the parameter value of the controller flag bit can be read; based on the parameter value of the flag bit, determine whether the hardware security engine firmware is installed in the controller. For example, when the parameter value of the flag bit is 1, it means that the hardware security engine firmware has been installed, and when the parameter value of the flag bit is 0, it means that the hardware security engine firmware is not installed. If the hardware security engine firmware is not installed. In another embodiment, the API function provided by the software development kit (SDK) or firmware library of the MCU can also determine the status of the HSE firmware by reading internal registers or performing other necessary checks, so these functions can be directly called to determine whether the HSE firmware has been installed. In other embodiments, the HSE firmware is generally stored in a storage area of ​​the MCU after installation, so the content of the HSE firmware in the storage area of ​​the MCU can be checked to determine whether the HSE firmware has been installed.

[0034] If the HSE firmware has been installed, further obtain the secure boot key. In a specific implementation, ADKP can be written to obtain the key required for the secure boot mechanism. The upgrade boot program firmware is signed with the secure boot key, and the signed upgrade boot program firmware can be written into the boot image file of the upgrade boot program firmware; the application firmware is signed with the secure boot key, and the signed application firmware can be written into the boot image file of the application firmware; the target boot boot information is signed with the secure boot key, and the signed target boot boot information is written into the boot storage address. Finally, based on the signed target boot boot information, the signed upgrade boot program firmware and the signed application firmware, the MCU chip is configured to enable the secure boot mechanism, so that the above-mentioned secure boot related configuration intervenes in the MCU startup process to form a complete secure boot trust chain for the App startup process. It can be understood that after the controller configuration is completed, a reset is required before starting the controller.

[0035] If the HSE firmware is not installed, and the merged firmware contains the HSE firmware, that is, the HSE firmware has been burned into the controller, then the parameter value of the flag bit can be updated to update the hardware security engine firmware in the merged firmware to an enabled state, wherein the updated parameter value of the flag bit indicates that the hardware security engine firmware has been installed; reset the controller, and re-execute the steps of determining that the hardware security engine firmware is installed in the controller and its subsequent steps. In a specific embodiment, if the HSE firmware is not installed, the HSE firmware can be enabled by writing a flag bit to the UTEST field of the FLASH, and then actively resetting the MCU, because the HSE firmware has been merged and burned into the MCU, combined with the HSE firmware enabling operation, the MCU will automatically install the HSE firmware into the MCU encrypted hidden space, and the HSE firmware installation can be completed.

[0036] In the above method, the merged firmware is burned to the controller; wherein, the merged firmware is obtained by merging the various firmwares required for the controller's secure boot process, and the merged firmware includes the hardware security engine configuration program firmware; based on the target boot boot information in the controller, the controller is guided to point to the hardware security engine configuration program firmware; based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured step by step to form a secure boot trust chain to complete the relevant configuration of the controller's secure boot. Based on the secure boot trust chain, the controller can be securely booted. Furthermore, by providing a merged firmware, during the security configuration process, only the merged firmware needs to be downloaded once, and only one merged firmware needs to be maintained, thereby improving the security configuration efficiency and maintenance efficiency.

[0037] See also Figure 2 , Figure 2 : is a flow chart of another embodiment of the controller startup configuration method provided by the present application, the method comprising:

[0038] S21: Burn the merged firmware to the controller.

[0039] S22: Determine valid target startup boot information in the storage address of the controller.

[0040] In one embodiment, the merged firmware also includes reference boot boot information, which is used to boot the MCU to the hardware security engine configuration program firmware. It can be determined whether the reference boot boot information in the merged firmware is consistent with the target boot boot information in the storage address of the controller; in response to the reference boot boot information and the target boot boot information being consistent, the target boot boot information is determined to be valid. In response to the reference boot boot information and the target boot boot information being consistent, the target boot boot information is determined to be invalid. In other embodiments, the merged firmware may also not include reference boot boot information, and only the valid target boot boot information is stored in the storage address of one controller, and the other storage addresses do not store the boot boot information. Then, it can be determined whether there is boot boot information in the storage address to determine the valid target boot boot information. It can be understood that the valid target boot boot information in the storage address refers to the valid target boot boot information stored in the storage space pointed to by the storage address. In this embodiment, the controller can determine the target boot boot information in multiple storage addresses of the controller simultaneously or in a preset order to determine the valid target boot boot information.

[0041] In another embodiment, based on the hardware startup mechanism of the controller and the reference startup boot information, it is sequentially determined whether the target startup boot information in the startup storage address of the controller and the target startup boot information in the configuration storage address are valid. That is, the controller first determines whether the target startup boot information in the startup storage address of the controller is valid, and if not, then determines whether the target startup boot information in the configuration storage address is valid.

[0042] In a specific embodiment, the startup storage address does not store the target startup boot information that is the same as the reference startup boot information. Therefore, the controller can determine that the target startup boot information in the startup storage address is invalid, while the configuration storage address stores the target startup boot information that is the same as the reference startup boot information, that is, the target startup boot information in the configuration storage address is valid. Then, the target startup boot information in the configuration storage address can be written to the startup storage address, and the target startup boot information written to the startup storage address is pointed to the upgrade boot program firmware in the merged firmware, so that when the controller is started, the valid target startup boot information can be found from the startup storage address, and the upgrade boot program firmware can be found according to the valid target startup boot information, the upgrade boot program firmware can be started, and then the application can be started.

[0043] S23: Based on the valid target boot information in the controller, the controller is booted to point to the hardware security engine configuration program firmware.

[0044] S24: Based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured step by step to form a secure boot trust chain.

[0045] For the specific implementation of steps S21, S23 and S24, please refer to steps S11-S13 of the first implementation of the controller startup configuration method provided in this application, which will not be repeated here.

[0046] This embodiment provides a configuration storage address, in which valid target startup boot information is stored, so as to find the hardware security engine configuration program firmware according to the valid target startup boot information, and run the hardware security engine configuration program firmware to complete the controller startup configuration process.

[0047] See also Figure 3 , Figure 3 : is a flow chart of an implementation of a controller startup method provided by the present application, the method comprising:

[0048] S31: Perform security verification on each level of firmware on the secure boot trust chain in a step-by-step manner according to the loading and running sequence.

[0049] The secure boot trust chain is obtained by using any of the above controller boot configuration methods. Specifically, the target boot boot information is determined, a first verification is performed on the signature of the target boot boot information, a second verification is performed on the signature of the upgrade boot program firmware, and a third verification is performed on the signature of the application firmware; wherein the first verification, the second verification and the third verification are performed in sequence.

[0050] S32: When the security check is passed level by level, the boot image files of the firmware of each level are loaded and run level by level to guide the controller to complete the startup.

[0051] Specifically, in response to the first verification passing, the upgrade boot program firmware is determined according to the direction of the target startup boot information; in response to the second verification passing, the startup image file of the upgrade boot program firmware is started; in response to the third verification, the startup image file of the application firmware is started.

[0052] In a specific implementation, the MCU hardware automatically searches for valid target boot information, performs a first verification on the signature of the target boot information, and determines the upgrade boot program firmware according to the direction of the target boot information when the first verification passes, performs a second verification on the signature of the upgrade boot program firmware, and starts the boot image file of the upgrade boot program firmware when the second verification passes, and further performs a third verification on the signature of the application firmware, and starts the boot image file of the application firmware when the third verification passes. The third verification can be performed by the upgrade boot program. It can be understood that if any of the above verification processes fails, the controller startup process terminates.

[0053] In a specific implementation, taking the controller including NXP K3 series chips as an example, the existing startup configuration process of the chip is to download the bin file of HSE firmware to complete HSE installation; download the bin file of Bootloader to prepare for subsequent configuration; download HSECfgProject (Hardware Security Engine Configuration Program) firmware to complete HSE firmware configuration and sign Bootloader; through the above steps, the controller Bootloader is ready, and then the bin of the application is upgraded to the MCU through upgrading. This method has cumbersome and complicated steps, is time-consuming and easily increases failure points, affecting production efficiency and quality.

[0054] The controller startup configuration method provided by the present application includes: burning the merged firmware to the controller, and after the controller is powered on, according to the hardware startup mechanism of the NXP K3 series chip, first check whether the target startup boot information in the startup storage address (i.e., address 0x00400000) is valid, if not valid, then check whether the target startup boot information in the configuration storage address (i.e., address 0x00500000) is valid. In a specific implementation, the target startup boot information in the address 0x00400000 is invalid, the target startup boot information in the address 0x00500000 is valid, and the valid target startup boot information points to the hardware security engine configuration program firmware, so the hardware security engine configuration program firmware runs. Further, check whether the HSE firmware has been installed. If installed, write the secure boot key, use the secure boot key to sign the Bootloader and application, write the valid target boot information to the address 0x00400000, and use the secure boot key to sign the valid target boot information, configure the MCU chip, enable the secure boot mechanism, so that the above secure boot related configuration intervenes in the MCU startup process, so as to realize the complete secure boot trust chain of the App startup process, and reset the controller.

[0055] After resetting the controller, the controller can start the controller Bootloader according to the target boot information written in 0x00400000, and then start the controller App to implement the secure boot process.

[0056] See also Figure 4 , Figure 4 It is a schematic diagram of the framework structure of an embodiment of an electronic device provided in the present application.

[0057] The electronic device 40 includes a memory 41 and a processor 42 coupled to each other, the memory 41 stores program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above method embodiments. Specifically, the electronic device 40 may include but is not limited to: a desktop computer, a laptop computer, a server, a mobile phone, a tablet computer, etc., which are not limited here.

[0058] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.

[0059] See also Figure 5 , Figure 5 It is a schematic diagram of the framework structure of an implementation scheme of a computer-readable storage medium provided in this application.

[0060] The computer-readable storage medium 50 stores program instructions 51 , and when the program instructions 51 are executed by a processor, they are used to implement the steps in any of the above method embodiments.

[0061] The computer-readable storage medium 50 may specifically be a medium that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the computer program. The server may send the stored computer program to other devices for execution, or may also execute the stored computer program itself.

[0062] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0063] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A controller startup configuration method, characterized in that: include: Burning the merged firmware to the controller; wherein the merged firmware is obtained by merging the firmware required for the secure boot process of the controller, and the merged firmware includes the hardware security engine configuration program firmware; Based on the target boot information in the controller, guide the controller to point to the hardware security engine configuration program firmware; Based on the hardware security engine configuration program firmware, the remaining firmware in the merged firmware is securely configured level by level to form a secure boot trust chain.

2. The method according to claim 1, characterized in that The merged firmware also includes upgrading boot program firmware and application firmware; The step of configuring the program firmware based on the hardware security engine, and performing security configuration on the remaining firmware in the merged firmware step by step to form a secure boot trust chain includes: Determining that hardware security engine firmware is installed in the controller; Get the secure boot key; Using the secure boot key to sign the upgrade boot program firmware, the application firmware and the target boot boot information in sequence; The secure boot trust chain is formed based on the signed target boot boot information, the signed upgrade boot program firmware and the signed application firmware.

3. The method according to claim 2, characterized in that Before determining to install the hardware security engine firmware in the controller, the method further includes: Read the parameter value of the flag bit of the controller; Based on the parameter value of the flag bit, it is determined whether the hardware security engine firmware is installed in the controller.

4. The method according to claim 3, characterized in that Before obtaining the secure boot key, the method further includes: In response to the hardware security engine firmware not being installed in the controller, updating the parameter value of the flag bit so that the hardware security engine firmware in the merged firmware is updated to an enabled state; wherein the updated parameter value of the flag bit indicates that the hardware security engine firmware has been installed; Reset the controller, and re-execute the step of determining that the hardware security engine firmware is installed in the controller and subsequent steps.

5. The method according to claim 1, characterized in that Before guiding the controller to point to the hardware security engine configuration program firmware based on the target startup boot information in the controller, the method further includes: Determine the target startup boot information that is valid in the storage address of the controller; The step of guiding the controller to point to the hardware security engine configuration program firmware based on the target startup boot information in the controller includes: Based on the target boot information valid in the controller, the controller is guided to point to the hardware security engine configuration program firmware.

6. The method according to claim 5, characterized in that The determining of the target boot information that is valid in the storage address of the controller includes: Determine whether the reference boot information in the merged firmware is consistent with the target boot information; In response to the reference startup guidance information and the target startup guidance information being consistent, it is determined that the target startup guidance information is valid.

7. The method according to any one of claims 5 or 6, characterized in that: The determining of the target boot information that is valid in the storage address of the controller includes: Based on the hardware startup mechanism of the controller and the reference startup boot information, it is sequentially determined whether the target startup boot information in the startup storage address of the controller and the target startup boot information in the configuration storage address are valid.

8. The method according to claim 7, characterized in that When the target startup boot information in the startup storage address is invalid and the target startup boot information in the configuration storage address is valid, the method further includes: The target boot boot information in the configuration storage address is written into the boot storage address, and the target boot boot information written into the boot storage address is made to point to the upgrade boot program firmware in the merged firmware.

9. A controller startup method, characterized in that: include: According to the loading and running sequence, security verification is performed on each level of firmware on the secure boot trust chain step by step; wherein the secure boot trust chain is obtained by using the controller startup configuration method according to any one of claims 1 to 8; When the level-by-level security check is passed, the startup image files of the firmware of each level are loaded and run level by level to guide the controller to complete startup.

10. The method according to claim 9, characterized in that The security verification of each level of firmware on the secure boot trust chain is performed level by level according to the loading and running order, including: Determine the target boot boot information, perform a first verification on the signature of the target boot boot information, perform a second verification on the signature of the upgrade boot program firmware, and perform a third verification on the signature of the application firmware; wherein the first verification, the second verification, and the third verification are performed in sequence; And / or, when the level-by-level security check is passed, loading and running the boot image files of the firmware of each level level by level, comprises: In response to the first verification being passed, determining the upgrade boot program firmware according to the direction of the target startup boot information; In response to the second verification being passed, starting the startup image file of the upgrade boot program firmware; In response to the third verification, a boot image file of the application firmware is started.

11. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program data, and when the program data is executed by a processor, it is used to implement the method according to any one of claims 1 to 10.