A chip starting method, device, apparatus and medium

By updating the boot parameters after chip firmware upgrade, the chip medium can be flexibly selected as the boot medium, which solves the problem of idle medium during chip firmware upgrade, improves medium utilization, and simplifies the design.

CN119987881BActive Publication Date: 2026-05-08SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
Filing Date
2025-02-21
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, when upgrading chip firmware, it is not possible to flexibly specify the boot medium, resulting in a storage medium being idle for a long time, which increases the design complexity and cost of the chip and external circuits.

Method used

After the chip firmware is upgraded, the boot parameters in the target storage area of ​​all chip media are updated. The media type and redundancy mode are determined by reading the chip pin level status. The corresponding chip media is selected as the boot media, and the new firmware program is executed to enable chip boot.

Benefits of technology

It enables flexible switching of chip media, avoids long-term idleness of a certain media, improves media utilization, simplifies the design of chips and external circuits, and reduces design complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987881B_ABST
    Figure CN119987881B_ABST
Patent Text Reader

Abstract

The application discloses a chip starting method and device, equipment and medium, and relates to the technical field of computers, which comprises the following steps: after the chip firmware is upgraded, updating the starting parameters in the target storage area of all chip media; wherein the starting parameters in the target storage area represent the specified starting state of the corresponding chip medium, and the specified starting state represents whether to start from the corresponding chip medium; after the chip is powered on again, reading the starting parameters in the target storage area of all chip media, so as to select the corresponding chip medium as the starting medium from all chip media based on the read starting parameters, and read the new firmware program obtained after the chip firmware is upgraded from the starting medium; and executing the new firmware program to realize the chip starting. The application avoids the situation that a certain chip medium is idle for a long time, improves the utilization rate of the chip medium, simplifies the design of the chip and external circuit, and reduces the design complexity and cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a chip boot method, apparatus, device, and medium. Background Technology

[0002] In the field of chip technology, chip firmware is typically stored in electrically erasable programmable ROM (EEPROM) or FLASH (flash memory) chips. To ensure stable chip operation, users can use a specific flashing program to write new firmware programs into the EEPROM or FLASH chip, thereby completing firmware upgrades. To prevent the chip from failing to boot due to damage to a single storage medium, chips typically employ dual Flash or dual EEPROMs for redundant firmware backup.

[0003] In traditional technologies, firmware upgrades require writing the new firmware program into two Flash or EEPROMs. Furthermore, due to design simplification, most chips typically boot from a single Flash or EEPROM, making it impossible to flexibly specify the boot medium, leaving the other storage medium idle for extended periods. While some chips can achieve booting from a specified medium via external pins, this method requires not only additional pins to indicate the boot medium but also external circuitry to record the firmware upgrade status and input it back to the chip via pins. This undoubtedly increases the design complexity and cost of both the chip and the external circuitry. Therefore, these technical problems urgently need to be addressed by those skilled in the art. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a chip boot method, apparatus, device, and medium. This application avoids the situation where a chip medium is idle for a long time, improves the utilization rate of the chip medium, simplifies the design of the chip and external circuits, and reduces design complexity and cost. The specific solution is as follows:

[0005] In a first aspect, this application discloses a chip boot method, including:

[0006] After the chip firmware is upgraded, the boot parameters in the target storage area of ​​all chip media are updated; the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media.

[0007] After the chip is powered on again, the boot parameters in the target storage area of ​​all chip media are read so that the corresponding chip media can be selected as the boot media based on the read boot parameters, and the new firmware program obtained after the chip firmware upgrade can be read from the boot media.

[0008] Execute the new firmware program to enable chip boot.

[0009] Optionally, the chip firmware boot method also includes:

[0010] The medium type is determined by reading the voltage level of the first chip pin, and the redundancy method is determined by reading the voltage level of the second chip pin. Based on the redundancy method, all chip media are identified as the first chip medium and the second chip medium. The redundancy method includes dual-medium redundancy or dual-partition redundancy.

[0011] Accordingly, the boot parameters in the target storage area of ​​all chip media are updated. The boot parameters in the target storage area of ​​all chip media are read so that the appropriate chip media can be selected as the boot media from all chip media based on the read boot parameters, including:

[0012] Update the boot parameters in the target storage areas of the first chip medium and the second chip medium, and read the boot parameters in the target storage areas of the first chip medium and the second chip medium so as to select the corresponding chip medium as the boot medium from the first chip medium and the second chip medium based on the read boot parameters;

[0013] Accordingly, the new firmware is executed to enable chip boot, including:

[0014] The first firmware program in the new firmware program is migrated to static random access memory (SRAM), and its security and trustworthiness are determined. If the first firmware program is secure and trustworthy, it is executed. The second firmware program in the new firmware program is then migrated to SRAM and executed to enable chip boot.

[0015] Optionally, the chip firmware boot method also includes:

[0016] If the redundancy mode is dual-media redundancy, then the first storage area of ​​the first chip medium is determined as the target storage area of ​​the first chip medium, and the first storage area of ​​the second chip medium is determined as the target storage area of ​​the second chip medium.

[0017] If the redundancy mode is dual-partition redundancy, then the first storage area of ​​the first chip medium is determined as the target storage area of ​​the first chip medium, and the second storage area of ​​the second chip medium is determined as the target storage area of ​​the second chip medium.

[0018] Optionally, a new firmware program is executed to enable the following after the chip boots up:

[0019] Determine if the chip booted successfully;

[0020] If the chip boots successfully, the new firmware is copied to a different chip medium than the boot medium to back up the new firmware.

[0021] Optionally, a new firmware program is executed to enable the following after the chip boots up:

[0022] Trigger startup duration timer operation;

[0023] If the chip boots up successfully, then disable the boot duration timer.

[0024] If the chip fails to boot, and the boot time exceeds the preset time threshold, the new firmware program obtained after the chip firmware upgrade is read from another chip medium other than the boot medium, and the new firmware program is executed to enable chip boot.

[0025] Optionally, the new firmware program obtained after the chip firmware upgrade can be read from a chip medium other than the boot medium, and the new firmware program can be executed to achieve the following after the chip boots up:

[0026] If the chip fails to boot, the process will proceed to the step of reading the new firmware program obtained after the chip firmware upgrade from the boot medium, until the chip boots successfully or the number of jumps meets the preset threshold.

[0027] Optionally, after updating the boot parameters in the target storage area of ​​all chip media, the following also includes:

[0028] Verify the integrity and security of the updated startup parameters;

[0029] If the verification passes, the historical boot parameters in the target storage area will be erased.

[0030] Secondly, this application discloses a chip boot device, comprising:

[0031] The boot parameter update module is used to update the boot parameters in the target storage area of ​​all chip media after the chip firmware is upgraded; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media.

[0032] The boot media selection module is used to read the boot parameters in the target storage area of ​​all chip media after the chip is powered on again, so as to select the corresponding chip media as the boot media based on the read boot parameters, and read the new firmware program obtained after the chip firmware upgrade from the boot media.

[0033] The chip boot module is used to execute new firmware programs to enable chip boot.

[0034] Thirdly, this application discloses an electronic device, including:

[0035] Memory, used to store computer programs;

[0036] A processor for executing computer programs to implement the aforementioned disclosed chip boot method.

[0037] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned chip boot method.

[0038] As can be seen, this application proposes a chip boot method, including: after a chip firmware upgrade, updating boot parameters in the target storage area of ​​all chip media; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media; after the chip is powered on again, reading the boot parameters in the target storage area of ​​all chip media, so as to select the corresponding chip media as the boot media based on the read boot parameters, and reading the new firmware program obtained after the chip firmware upgrade from the boot media; executing the new firmware program to achieve chip boot. In summary, after a chip firmware upgrade, the system updates the boot parameters in the target storage area of ​​the chip media, and these parameters are used to mark whether the corresponding chip media is used as the boot media. After the chip is powered on again, it selects the boot media from all chip media according to the boot parameters, reads the upgraded new firmware program from it and executes it, ultimately completing the chip boot process. This application, by updating the boot parameters, enables the chip to select the corresponding chip media as the boot media from all chip media according to the boot parameters when powered on again. In this way, the system no longer boots from a single chip medium but can switch flexibly, avoiding the long-term idleness of a particular chip medium and improving its utilization rate. Furthermore, this application selects the boot medium by reading boot parameters, eliminating the need for additional pins or dedicated external circuitry to record and transmit firmware upgrade status information. This simplifies the design of the chip and external circuitry, reducing design complexity and cost. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0040] Figure 1 This is a flowchart of a chip boot method disclosed in this application;

[0041] Figure 2 This is a schematic diagram of a single NOR Flash dual-mirror address space partitioning disclosed in this application;

[0042] Figure 3 This is a schematic diagram of a dual NOR Flash address space partitioning disclosed in this application;

[0043] Figure 4 This is a schematic diagram of a secure boot process disclosed in this application;

[0044] Figure 5 This is a schematic diagram of a multi-bit default upgrade from flash0 disclosed in this application;

[0045] Figure 6 A schematic diagram of Flash0 and Flash1 address space partitioning and boot process is disclosed.

[0046] Figure 7 This is a schematic diagram of a chip startup device disclosed in this application;

[0047] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] In traditional technologies, firmware upgrades require writing the new firmware program into two Flash or EEPROMs. Furthermore, due to design simplification, most chips typically boot from a single Flash or EEPROM, making it impossible to flexibly specify the boot medium, leaving the other storage medium idle for extended periods. While some chips can achieve booting from a specified medium via external pins, this method requires not only additional pins to indicate the boot medium but also external circuitry to record the firmware upgrade status and input it back to the chip via pins. This undoubtedly increases the design complexity and cost of both the chip and the external circuitry. Therefore, these technical problems urgently need to be addressed by those skilled in the art.

[0050] Therefore, this application proposes a chip startup scheme that can avoid the long-term idleness of a chip medium, improve the utilization rate of the chip medium, simplify the design of the chip and external circuits, and reduce design complexity and cost.

[0051] This application discloses a chip startup method. See also Figure 1 As shown, the method includes:

[0052] Step S11: After the chip firmware upgrade, update the boot parameters in the target storage area of ​​all chip media; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media.

[0053] In this embodiment, after the chip firmware is upgraded, the boot parameters in the target storage area of ​​all chip media are updated; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media.

[0054] In this embodiment, the media type is determined by reading the voltage level of the first chip pin, and the redundancy method is determined by reading the voltage level of the second chip pin. Based on the redundancy method, all chip media are identified as either the first chip media or the second chip media. The redundancy method includes dual-media redundancy or dual-partition redundancy. If the redundancy method is dual-media redundancy, the first storage area of ​​the first chip media is determined as the target storage area of ​​the first chip media, and the first storage area of ​​the second chip media is determined as the target storage area of ​​the second chip media. If the redundancy method is dual-partition redundancy, the first storage area of ​​the first chip media is determined as the target storage area of ​​the first chip media, and the second storage area of ​​the second chip media is determined as the target storage area of ​​the second chip media. In this way, the operating mode and storage area are determined by simply reading the voltage level of the chip pins, eliminating the need for complex hardware circuits or additional sensors, simplifying hardware design, and reducing hardware costs and system complexity.

[0055] For example, the media include Flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), and SD cards. Dual-media redundancy includes dual Flash (Flash0, Flash1), dual EEPROM (EEPROM0, EEPROM1), etc., and dual-partition redundancy includes single Flash with dual partitions (upper half and lower half), etc. For dual Flash, Flash0 is the first chip medium, and Flash1 is the second chip medium. For dual EEPROM, EEPROM0 is the first chip medium, and EEPROM1 is the second chip medium. For single Flash with dual partitions, the upper half is the first chip medium, and the lower half is the second chip medium. Furthermore, the chip pin design remains unchanged. Typically, chips with redundant designs use three chip pins to indicate the current chip operating environment. Two chip pins (i.e., the first chip pin, boot_mode) are used to indicate which boot medium is currently being used. For example, boot_mode=0x00 indicates Flash boot; boot_mode=0x01 indicates EEPROM boot; and boot_mode=0x10 indicates SD card boot. One chip pin (also known as the second chip pin, boot_num) can be used to indicate redundancy mode. For example, boot_num=0x0 indicates dual Flash / EEPROM / SD card redundancy; boot_num=0x1 indicates single / dual Flash / EEPROM / SD card dual-partition redundancy. Further details can be found in [link to documentation]. Figure 2 and Figure 3 As shown, Figure 2 This is a schematic diagram of the address space partitioning for a single NOR Flash dual-image flash memory. Figure 3 This diagram illustrates the address space partitioning of dual NOR Flash memory. The first storage region (Paramter_ROM_P0) stores the boot parameters for the upper half (single-flash boot) or the flash (dual-flash) for the ROM program to read and use. It is stored in a fixed location within the NOR Flash. The second storage region (Paramter_ROM_P1) stores the boot parameters for the lower half (single-flash boot) for the ROM program to read and use. It is also stored in a fixed location within the NOR Flash. In other words, both regions P0 and P1 are used for single-flash dual-image boot, while only region P0 is used for dual-flash boot. The new firmware program includes SPL, UBoot, and Kernel: these are the normal firmware programs for the chip. It should be noted that both dual-media redundancy and dual-partition redundancy are for redundancy backup purposes; each medium can be used as a separate boot medium, storing data independently.

[0056] Based on this, in this embodiment, updating the boot parameters in the target storage areas of all chip media includes updating the boot parameters in the target storage areas of the first chip media and the second chip media.

[0057] Step S12: After the chip is powered on again, the boot parameters in the target storage area of ​​all chip media are read so that the corresponding chip media can be selected as the boot media based on the read boot parameters, and the new firmware program obtained after the chip firmware upgrade is read from the boot media.

[0058] As can be seen, after each firmware upgrade, the boot parameters need to be updated simultaneously to determine which chip medium to boot from next time. Furthermore, after the chip is powered on again, the boot parameters in the target storage areas of all chip media are read to select the appropriate chip medium as the boot medium based on the read boot parameters, thereby achieving booting from the specified medium. Specifically, this embodiment reads the boot parameters in the target storage areas of the first and second chip media to select the appropriate chip medium as the boot medium based on the read boot parameters. In this way, this application no longer fixates on booting from a single chip medium but can flexibly switch chip media, avoiding the situation where a certain chip medium is idle for a long time and improving the utilization rate of the chip media.

[0059] For example, taking dual-Flash boot as an example, for The startup parameters are explained below. As shown in Table 1, "valid" indicates the specified startup state corresponding to the startup parameter. To initiate a valid state, To initiate an invalid state, except and All external states are in error status.

[0060] Table 1

[0061]

[0062] Step S13: Execute the new firmware program to enable chip boot.

[0063] In this embodiment, the first firmware program (SPL program) in the new firmware program is migrated to static random-access memory (SRAM), and it is determined whether the first firmware program is safe and trustworthy. If the first firmware program is safe and trustworthy, the first firmware program is executed, and the second firmware program (UBoot and Kernel) in the new firmware program is migrated to static random-access memory, and then the second firmware program is executed to achieve chip boot.

[0064] Furthermore, it determines whether the chip boots successfully; if the chip boots successfully, the new firmware program is copied to other chip media besides the boot medium to achieve backup of the new firmware program.

[0065] Furthermore, a startup duration timer is triggered. If the chip starts successfully, the startup duration timer is turned off. If the chip fails to start, and the startup duration exceeds a preset duration threshold, the new firmware program obtained after the chip firmware upgrade is read from another chip medium other than the startup medium, and the new firmware program is executed to achieve chip startup. If the chip fails to start, the process jumps to the step of reading the new firmware program obtained after the chip firmware upgrade from the startup medium until the chip starts successfully or the number of jumps meets the preset threshold. For example, after the chip powers on, it first reads the boot parameters from medium 1, then from medium 2. By comparing the boot parameters in the two media, it determines which medium to boot from. Assuming it decides to boot from medium 0, the firmware program is transferred from medium 0 and execution begins. Simultaneously, the WDT (Watchdog Timer) is started. If startup is successful, the WDT is disabled. If startup fails, the WDT cannot be disabled, and after the WDT times out, the program is transferred from medium 1 and execution begins. The WDT is restarted. If startup is successful, the WDT is disabled. If startup fails, the WDT cannot be disabled, and after the WDT times out, the process jumps back to medium 0 to execute the boot process. In some implementations, this jump is repeated up to three times. If startup fails after all attempts, the firmware is considered faulty, and the chip cannot boot. In this way, by setting a switching mechanism in case of startup failure, multiple attempts to boot from different media increase the probability of successful chip startup and reduce the possibility of failure due to a single media failure.

[0066] Furthermore, the integrity and security of the updated boot parameters are verified; if the verification passes, the historical boot parameters in the target storage area are erased. This ensures that a boot failure will not result in a failure to boot, improving the reliability and stability of the chip's boot process.

[0067] Figure 4A flowchart of a secure boot process is disclosed, including: (1) powering on the chip; (2) reading the chip pin status and accessing the read-only memory; (3) reading the boot parameters of the first chip medium; (4) resetting the chip and configuring the serial peripheral interface controller; (5) reading the boot parameters of the second chip medium; (6) determining whether to boot from the first chip medium. If yes, reset the chip again and configure the serial peripheral interface controller; if no, proceed to the next step; (7) regardless of whether to boot from the first chip medium, determine whether the SPL is secure and trustworthy to achieve secure boot. If it is not trustworthy, stop the boot process. If it is trustworthy, execute the SPL (Secondary Program Loader) and migrate the Uboot (Universal Boot Loader) program to the second chip medium. In Synchronous Dynamic Random Access Memory (SDRAM), the CPU (Central Processing Unit) reads... The UBoot program is executed starting from the specified address. Further, UBoot initializes the relevant hardware, obtains the storage location and size information of the Kernel program, and migrates the Kernel to SDRAM. The CPU starts executing the Kernel program from the specified address in SDRAM, and finally completes the chip boot process.

[0068] Figure 5 A schematic diagram illustrating a multi-bit upgrade from flash0 by default is disclosed. Assuming that flash1 needs to be upgraded first, then... The region's parameters indicate that it should boot from Flash1, and then upgrade Flash0. The parameters of the region indicate that booting should start from Flash0. The entire process uses changes in the boot parameter `valid` to specify the chip medium for booting, thereby enabling the sequential upgrade of Flash1 and Flash0.

[0069] Figure 6 A schematic diagram of Flash0 and Flash1 address space partitioning and boot process is disclosed, including three parts: initial boot process, Web remote upgrade process, and non-initial boot process. Initial boot process: The chip is powered on, and the ROM program reads the chip pin states and the data in Flash0. Configure the SOC (System on Chip), reset the QSPI (Quad Serial Peripheral Interface) controller, and then read the data from Flash 1. Determine the boot medium; if it is unsafe, stop the boot process; if safe, proceed. Program, read The process involves acquiring boot count information, migrating and executing boot programs such as SPL, and then migrating and executing U-boot to complete the Flash0 boot process. The web-based remote upgrade process involves remotely upgrading Flash via the web, including PRE, SPL, U-boot, and the Kernel. Upon completion, Flash1 and Flash0 are updated sequentially. , The valid flag is 0xA5. Non-first-time boot process: The chip powers on, the ROM program reads the pin status and data from Flash 0. Read Flash 1 again Determine the boot media and its security. If secure, proceed. The program obtains information such as the number of boot attempts, migrates and executes the SPL program, then migrates and executes the U-boot program to complete the Flash boot process.

[0070] This application enables chip firmware upgrades to boot from a specified medium without using additional chip pins or external update circuitry. That is, without the need for additional chip pins or external circuitry, the chip can be specified to boot from either Flash0 or Flash1, reducing chip and external circuit design complexity. Furthermore, after writing new firmware to a specific Flash memory, the chip can be specified to boot from that new firmware Flash. After booting, the new firmware is automatically backed up to another Flash memory for redundancy.

[0071] Furthermore, during chip operation, the status of each chip medium and partition is monitored in real time. For example, integrity checks are performed on the stored data. If the checksum of a chip medium or partition is found to be inconsistent with the pre-calculated value, it is determined that the area may be faulty. Simultaneously, the read / write operation response time of the chip medium is monitored. If the read / write response time of a chip medium exceeds a preset threshold, it is considered that the chip medium may be experiencing performance degradation or failure. Furthermore, when a fault is detected in a chip medium or partition, the chip's control module decides whether to perform a redundancy switch based on the current redundancy method and the fault condition. If a dual-medium redundancy method is currently used, and a fault is detected in the first chip medium, the system automatically switches to the second chip medium for data read / write operations. At the same time, the fault information is recorded in the chip's log for subsequent troubleshooting and maintenance.

[0072] As can be seen, this application proposes a chip boot method, including: after a chip firmware upgrade, updating boot parameters in the target storage area of ​​all chip media; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media; after the chip is powered on again, reading the boot parameters in the target storage area of ​​all chip media, so as to select the corresponding chip media as the boot media based on the read boot parameters, and reading the new firmware program obtained after the chip firmware upgrade from the boot media; executing the new firmware program to achieve chip boot. In summary, after a chip firmware upgrade, the system updates the boot parameters in the target storage area of ​​the chip media, and these parameters are used to mark whether the corresponding chip media is used as the boot media. After the chip is powered on again, it selects the boot media from all chip media according to the boot parameters, reads the upgraded new firmware program from it and executes it, ultimately completing the chip boot process. This application, by updating the boot parameters, enables the chip to select the corresponding chip media as the boot media from all chip media according to the boot parameters when powered on again. In this way, the system no longer boots from a single chip medium but can switch flexibly, avoiding the long-term idleness of a particular chip medium and improving its utilization rate. Furthermore, this application selects the boot medium by reading boot parameters, eliminating the need for additional pins or dedicated external circuitry to record and transmit firmware upgrade status information. This simplifies the design of the chip and external circuitry, reducing design complexity and cost.

[0073] Accordingly, this application also discloses a chip boot device, see [link to relevant documentation]. Figure 7 As shown, the device includes:

[0074] The boot parameter update module 11 is used to update the boot parameters in the target storage area of ​​all chip media after the chip firmware is upgraded; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media.

[0075] The boot media selection module 12 is used to read the boot parameters in the target storage area of ​​all chip media after the chip is powered on again, so as to select the corresponding chip media as the boot media based on the read boot parameters, and read the new firmware program obtained after the chip firmware upgrade from the boot media.

[0076] The chip boot module 13 is used to execute a new firmware program to enable chip boot.

[0077] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0078] As can be seen, this application proposes a chip boot method, including: after a chip firmware upgrade, updating boot parameters in the target storage area of ​​all chip media; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media; after the chip is powered on again, reading the boot parameters in the target storage area of ​​all chip media, so as to select the corresponding chip media as the boot media based on the read boot parameters, and reading the new firmware program obtained after the chip firmware upgrade from the boot media; executing the new firmware program to achieve chip boot. In summary, after a chip firmware upgrade, the system updates the boot parameters in the target storage area of ​​the chip media, and these parameters are used to mark whether the corresponding chip media is used as the boot media. After the chip is powered on again, it selects the boot media from all chip media according to the boot parameters, reads the upgraded new firmware program from it and executes it, ultimately completing the chip boot process. This application, by updating the boot parameters, enables the chip to select the corresponding chip media as the boot media from all chip media according to the boot parameters when powered on again. In this way, the system no longer boots from a single chip medium but can switch flexibly, avoiding the long-term idleness of a particular chip medium and improving its utilization rate. Furthermore, this application selects the boot medium by reading boot parameters, eliminating the need for additional pins or dedicated external circuitry to record and transmit firmware upgrade status information. This simplifies the design of the chip and external circuitry, reducing design complexity and cost.

[0079] Furthermore, embodiments of this application also provide an electronic device. Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0080] Figure 8 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the chip startup method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0081] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0082] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the chip booting method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.

[0083] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed chip boot method.

[0084] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0085] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to in the method section.

[0086] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0087] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0088] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0089] The above provides a detailed description of a chip boot method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A chip boot method, characterized in that, include: After the chip firmware is upgraded, the boot parameters in the target storage area of ​​all chip media are updated; wherein, the boot parameters in the target storage area represent the specified boot state of the corresponding chip media, and the specified boot state represents whether to boot from the corresponding chip media; After the chip is powered on again, the boot parameters in the target storage area of ​​all the chip media are read so that the corresponding chip media is selected as the boot media from all the chip media based on the read boot parameters, and the new firmware program obtained after the chip firmware upgrade is read from the boot media. The new firmware program is executed to enable chip boot; The chip startup method further includes: The medium type is determined by reading the voltage level of the first chip pin, and the redundancy method is determined by reading the voltage level of the second chip pin. Based on the redundancy method, all chip media are identified as the first chip medium and the second chip medium. The redundancy method includes dual-medium redundancy or dual-partition redundancy. Accordingly, the boot parameters in the target storage area of ​​all chip media are updated, and the boot parameters in the target storage area of ​​all chip media are read to select the corresponding chip media as the boot media from all chip media based on the read boot parameters, including: Update the boot parameters in the target storage area of ​​the first chip medium and the second chip medium, and read the boot parameters in the target storage area of ​​the first chip medium and the second chip medium so as to select the corresponding chip medium as the boot medium from the first chip medium and the second chip medium based on the read boot parameters; Accordingly, executing the new firmware program to enable chip boot includes: The first firmware program in the new firmware program is migrated to the static random access memory, and it is determined whether the first firmware program is safe and trustworthy. If the first firmware program is safe and trustworthy, the first firmware program is executed, and the second firmware program in the new firmware program is migrated to the static random access memory. Then the second firmware program is executed to achieve chip boot.

2. The chip startup method according to claim 1, characterized in that, Also includes: If the redundancy method is dual-media redundancy, then the first storage area of ​​the first chip medium is determined as the target storage area of ​​the first chip medium, and the first storage area of ​​the second chip medium is determined as the target storage area of ​​the second chip medium; If the redundancy method is dual-partition redundancy, then the first storage area of ​​the first chip medium is determined as the target storage area of ​​the first chip medium, and the second storage area of ​​the second chip medium is determined as the target storage area of ​​the second chip medium.

3. The chip startup method according to claim 1, characterized in that, After executing the new firmware program to enable chip startup, the process further includes: Determine if the chip booted successfully; If the chip boots successfully, the new firmware program is copied to another chip medium other than the boot medium to achieve a backup of the new firmware program.

4. The chip startup method according to claim 1, characterized in that, After executing the new firmware program to enable chip startup, the process further includes: Trigger startup duration timer operation; If the chip boots up successfully, then disable the boot duration timer. If the chip fails to boot, and the boot time exceeds a preset time threshold, the new firmware program obtained after the chip firmware upgrade is read from another chip medium other than the boot medium, and the new firmware program is executed to enable chip boot.

5. The chip startup method according to claim 4, characterized in that, The step of reading the new firmware program obtained after the chip firmware upgrade from a chip medium other than the boot medium, and executing the new firmware program to achieve chip boot, further includes: If the chip fails to boot, the process jumps to the step of reading the new firmware program obtained after the chip firmware upgrade from the boot medium, until the chip boots successfully or the number of jumps meets the preset threshold.

6. The chip startup method according to any one of claims 1 to 5, characterized in that, After updating the boot parameters in the target storage area of ​​all chip media, the process also includes: Verify the integrity and security of the updated startup parameters; If the verification passes, the historical boot parameter erasure operation in the target storage area is triggered.

7. A chip startup device, characterized in that, include: The startup parameter update module is used to update the startup parameters in the target storage area of ​​all chip media after the chip firmware is upgraded; wherein, the startup parameters in the target storage area represent the specified startup state of the corresponding chip media, and the specified startup state represents whether to start from the corresponding chip media; The boot medium selection module is used to read the boot parameters in the target storage area of ​​all the chip media after the chip is powered on again, so as to select the corresponding chip media as the boot medium from all the chip media based on the read boot parameters, and read the new firmware program obtained after the chip firmware upgrade from the boot medium. A chip boot module is used to execute the new firmware program to enable chip boot; The chip startup device is further configured to: The medium type is determined by reading the voltage level of the first chip pin, and the redundancy method is determined by reading the voltage level of the second chip pin. Based on the redundancy method, all chip media are identified as the first chip medium and the second chip medium. The redundancy method includes dual-medium redundancy or dual-partition redundancy. Accordingly, the boot parameters in the target storage area of ​​all chip media are updated, and the boot parameters in the target storage area of ​​all chip media are read to select the corresponding chip media as the boot media from all chip media based on the read boot parameters, including: Update the boot parameters in the target storage area of ​​the first chip medium and the second chip medium, and read the boot parameters in the target storage area of ​​the first chip medium and the second chip medium so as to select the corresponding chip medium as the boot medium from the first chip medium and the second chip medium based on the read boot parameters; Accordingly, executing the new firmware program to enable chip boot includes: The first firmware program in the new firmware program is migrated to the static random access memory, and it is determined whether the first firmware program is safe and trustworthy. If the first firmware program is safe and trustworthy, the first firmware program is executed, and the second firmware program in the new firmware program is migrated to the static random access memory. Then the second firmware program is executed to achieve chip boot.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the chip startup method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the chip boot method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Starting method applied to multi-mode IoT device, multi-mode IoT device and storage medium

    CN107911816A