Chip starting method, chip, electronic equipment and storage medium

By obtaining and using startup chip selection information after powering on the system-level chip, the startup program in the external memory is transported to the chip, and the problems of cumbersome and low efficiency in the prior art are solved, automatic switching start-up is realized, and system response speed is improved.

CN119987874AActive Publication Date: 2025-05-13SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510018235.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-13
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The prior art requires manual setting or connection of dedicated startup chip selection pins when starting in a system-level chip, resulting in cumbersome user operations and limited system response speed and startup efficiency.

Method used

By obtaining pre-configured startup chip selection information after the chip is powered on, and transferring the startup program in the external memory to the chip based on this information, and executing the transported startup program, automatic switching start-up is achieved.

Benefits of technology

Without adding additional chip pins and no need for dedicated software and firmware programs, the system-level chip power-on automatic switching start is realized, improving user operation convenience and system response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987874A_ABST
    Figure CN119987874A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a chip starting method, a chip, electronic equipment and a storage medium, and the method comprises the steps: obtaining pre-configured starting chip selection information after the chip is powered on; according to the starting chip selection information, a starting program of one of the at least two external memories is carried to the chip; and executing the starting program carried to the chip. According to the embodiment of the invention, the starting chip selection information is set, and the starting program of the memory is carried to the chip according to the starting chip selection information, so that the power-on automatic switching starting of the system-level chip is realized under the conditions of not increasing extra chip pins and not needing a special soft firmware program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip application development, and in particular to a chip startup method, a chip, an electronic device and a storage medium. Background Art

[0002] The system-level chip boot program is stored in a non-volatile memory outside the chip. Usually, the system-level chip has two or more non-volatile memories when in use, which are mainly used for redundant fault-tolerant backup and firmware upgrade switching when the chip is started. For example, after the chip is started from the first non-volatile memory for the first time, the user needs to update the boot program and store it in the second non-volatile memory, requiring the next time the chip power is switched to the second non-volatile memory for startup.

[0003] The prior art usually introduces a dedicated boot chip select pin in the system-level chip, and an input value needs to be manually given to the boot chip select pin, or the boot chip select pin needs to be connected to an additional control module. The dedicated boot chip select pin is used as input, and the boot chip select pin selects which memory to boot from through encoding. This cumbersome operation method not only increases the user's operating burden, but also limits the system's response speed and startup efficiency to a certain extent. Summary of the invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a chip startup method, chip, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.

[0005] According to a first aspect of an embodiment of the present invention, a method for starting a chip is provided, wherein the chip is connected to at least two external memories, and the method comprises:

[0006] After the chip is powered on, obtaining pre-configured startup chip selection information;

[0007] According to the startup chip selection information, a startup program in one of the at least two external memories is transferred to the chip;

[0008] Execute a boot process transferred to the chip.

[0009] Optionally, the chip includes an internal memory, and the internal memory stores startup chip selection information;

[0010] After the chip is powered on, obtaining pre-configured startup chip selection information includes:

[0011] After the chip is powered on, the startup chip selection information is read from the internal memory.

[0012] Optionally, the at least two external memories store startup chip select information;

[0013] After the chip is powered on, obtaining pre-configured startup chip selection information includes:

[0014] After the chip is powered on, determining a reading order for the at least two external memories;

[0015] Reading the startup chip selection information from the external memories one by one according to the reading order of the at least two external memories;

[0016] Determine whether the startup chip selection information indicates to start a startup program based on the external memory corresponding to the startup chip selection information;

[0017] If the startup chip select information does not indicate startup based on the startup program of the external memory corresponding to the startup chip select information, then return to the step of reading the startup chip select information from the external memory one by one in the reading order of the at least two external memories until it is determined that the startup chip select information indicates startup based on the startup program of the external memory corresponding to the startup chip select information.

[0018] Optionally, the step of transferring a startup program of one of the at least two external memories to the chip according to the startup chip selection information includes:

[0019] When the startup chip select information indicates to start the chip based on the startup program of the external memory corresponding to the startup chip select information, the startup program of the external memory corresponding to the startup chip select information is transferred to the chip.

[0020] Optionally, the step of transferring a startup program of one of the at least two external memories to the chip according to the startup chip selection information includes:

[0021] When the startup chip select information corresponding to the at least two external memories does not indicate startup based on the startup program of the external memory corresponding to the startup chip select information, the startup program of the external memory with the first order is transferred to the chip according to the reading order.

[0022] According to a second aspect of an embodiment of the present invention, there is provided a chip, the chip comprising: a processor, a first internal memory and a second internal memory; the chip is connected to at least two external memories;

[0023] The processor is configured to read a first boot program in the first internal memory; call the first boot program to obtain pre-configured boot chip selection information; transfer the boot program in one of the at least two external memories to the second internal memory according to the boot chip selection information; and execute the boot program transferred to the chip;

[0024] The first internal memory is used to store the first startup program;

[0025] The second internal memory is used to store the startup program after transportation.

[0026] Optionally, the chip includes a third internal memory, and the third internal memory is used to store startup chip selection information;

[0027] The processor is used to call the first startup program to read the startup chip selection information from the third internal memory after the chip is powered on.

[0028] Optionally, the at least two external memories are used to store startup chip select information;

[0029] The processor is used to determine the reading order for the at least two external memories after the chip is powered on; read the startup chip selection information from the external memories one by one according to the reading order of the at least two external memories; determine whether the startup chip selection information indicates to start the startup program based on the external memory corresponding to the startup chip selection information; if the startup chip selection information does not indicate to start the startup program based on the memory corresponding to the startup chip selection information, then return to the step of reading the startup chip selection information from the external memory one by one according to the reading order of the at least two external memories, until it is determined that the startup chip selection information indicates to start the startup program based on the memory corresponding to the startup chip selection information.

[0030] Optionally, the processor is used to move the startup program of the external memory corresponding to the startup chip select information to the second internal memory when the startup chip select information indicates to start the startup program based on the external memory corresponding to the startup chip select information.

[0031] Optionally, the processor is used to move the startup program of the external memory in the first order to the second internal memory according to the reading order when the startup chip select information corresponding to the at least two external memories does not indicate to start the startup program based on the external memory corresponding to the startup chip select information.

[0032] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the chip startup method as described above when executed by the processor.

[0033] According to a fourth aspect of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the chip startup method as described above.

[0034] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:

[0035] The embodiment of the present invention provides a chip startup method, the method comprising: obtaining pre-configured startup chip selection information after the chip is powered on; transferring a startup program of one of at least two external memories to the chip according to the startup chip selection information; and executing the startup program transferred to the chip. The embodiment of the present invention pre-configures the startup chip selection information, and transfers the startup program of the memory to the chip according to the startup chip selection information, so that the system-level chip is powered on and automatically switched to start without adding additional chip pins or requiring a dedicated software and firmware program. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flowchart of a chip startup method provided by an embodiment of the present invention;

[0037] Figure 2 is a structural block diagram of a chip provided by an embodiment of the present invention;

[0038] Figure 3 is a structural block diagram of another chip provided by an embodiment of the present invention;

[0039] Figure 4 is a structural block diagram of an electronic device provided by an embodiment of the present invention;

[0040] Figure 5 It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0042] One of the core concepts of the embodiment of the present invention is that the system-level chip boot program is stored in a non-volatile memory outside the chip. Usually, the system-level chip has two or more non-volatile memories when in use, which are mainly used for redundant fault-tolerant backup and firmware upgrade switching when the chip is started. For example, after the chip is started from the first non-volatile memory for the first time, the user needs to update the boot program and store it in the second non-volatile memory, requiring the power on the chip to switch to the second non-volatile memory for startup next time.

[0043] The prior art usually introduces a dedicated boot chip select pin in the system-level chip, and an input value needs to be manually given to the boot chip select pin, or the boot chip select pin needs to be connected to an additional control module. The dedicated boot chip select pin is used as input, and the boot chip select pin selects which memory to boot from through encoding. This cumbersome operation method not only increases the user's operating burden, but also limits the system's response speed and startup efficiency to a certain extent.

[0044] The embodiment of the present invention sets the startup chip select information and transfers the startup program of the memory to the chip according to the startup chip select information, so as to realize automatic switching startup of the system-level chip when it is powered on without adding additional chip pins or requiring dedicated software and firmware programs.

[0045] Reference Figure 1 , shows a flowchart of a chip startup method provided by an embodiment of the present invention, the method may specifically include the following steps:

[0046] Step 101, after the chip is powered on, obtaining pre-configured startup chip selection information;

[0047] The chip refers to a SoC chip (System on Chip). The startup chip selection information is configured by the user and is used to instruct a startup program of one memory of at least two external memories to start.

[0048] Obtaining the pre-configured boot chip select information after the chip is powered on is a key step, which is essential to ensure that the system boots correctly and securely. By obtaining the boot chip select information, the system can determine the correct boot path and avoid loading the wrong code, thereby preventing boot failure or potential security threats. In addition, the boot chip select information can also contain important configuration parameters about the boot process, such as boot mode (normal boot, recovery mode, etc.), encryption keys, and other security verification data. This helps to enhance the security of the system and ensure that only verified code can be executed. In some cases, the boot chip select information may also be used to implement multiple boot options, allowing users to select different operating systems or firmware versions as needed. Timely and accurate acquisition of boot chip select information is an important means to ensure system reliability and security, and is also the basis for implementing flexible boot strategies. In this way, developers can better control and optimize the system's boot process to meet the needs of different application scenarios.

[0049] Step 102, according to the startup chip selection information, moving the startup program of one of the at least two external memories to the chip;

[0050] External memory refers to external non-volatile memory connected to the chip. Normally, when the system is powered on or reset, the processor needs to start executing code from a predefined location, which is often located in the external memory. However, since these external memories are relatively slow to access, executing code directly from them may affect system performance. Therefore, after identifying the correct boot device through the boot chip select mechanism, the system will copy the boot code (usually the Bootloader) in the device to the internal RAM or cache area, so that the processor can execute code from these fast-access memories at a higher speed. This not only improves the boot speed, but also enhances the flexibility and configurability of the system, so that it can quickly adapt and work normally even in different application scenarios. In addition, such a design is also convenient for later software upgrades and maintenance, because only the data in the external memory needs to be updated without changing the hardware structure.

[0051] Step 103, executing a startup procedure transferred to the chip.

[0052] The processor executes the boot program transferred to the chip in order to initialize the hardware devices, configure the system environment, and load the operating system or other necessary software after the system is powered on or reset, so that the entire system can run normally. This boot program is usually stored in the chip's memory. It is responsible for performing a series of initialization steps to ensure that the processor and peripherals are in the correct state, and finally guide the system into an operational state.

[0053] The embodiment of the present invention provides a method for starting a chip, the method comprising: obtaining pre-configured startup chip selection information after the chip is powered on; transferring a startup program of one of at least two external memories to the chip according to the startup chip selection information; and executing the startup program transferred to the chip. The embodiment of the present invention sets the startup chip selection information, transfers the startup program of the memory to the chip according to the startup chip selection information, so that the system-level chip is powered on and automatically switched to start without adding additional chip pins or requiring a dedicated software and firmware program.

[0054] In one embodiment, the chip includes an internal memory storing startup chip select information; after the chip is powered on, obtaining the pre-configured startup chip select information includes: after the chip is powered on, reading the startup chip select information from the internal memory.

[0055] The internal memory is a non-volatile memory inside the chip. In this mode, the internal memory stores the startup chip select information, while the external memory does not store the startup chip select information.

[0056] After the chip is powered on, obtaining the boot chip select information stored in the internal memory is a key step to ensure that the system can be properly initialized and started smoothly. This process is critical to the stability and security of the system. When the chip is first powered on, it is in an undefined state and needs to go through a series of preset steps to complete the initialization of hardware and software. The boot chip select information contains important data on how to select and configure various key components in the system (such as processors, memory, and other peripherals). This information usually includes address mapping, device configuration parameters, and initial state settings, which are essential for correctly identifying and activating various parts in the system.

[0057] In one embodiment, the at least two external memories store startup chip select information; after the chip is powered on, obtaining the pre-configured startup chip select information includes: after the chip is powered on, determining a reading order for the at least two external memories; reading the startup chip select information from the external memories one by one according to the reading order of the at least two external memories; determining whether the startup chip select information indicates to start a startup program based on the external memory corresponding to the startup chip select information; if the startup chip select information does not indicate to start a startup program based on the external memory corresponding to the startup chip select information, returning to the step of reading the startup chip select information from the external memory one by one according to the reading order of the at least two external memories until it is determined that the startup chip select information indicates to start a startup program based on the external memory corresponding to the startup chip select information.

[0058] The external memory is an external non-volatile memory. In this mode, each external memory stores the startup chip select information, and an internal memory for storing the startup chip select information is not required.

[0059] Different external memories may store different startup configuration data, including but not limited to boot programs, operating system images, drivers, and other necessary startup files. These data are critical for system startup because they contain information on how to load the operating system and how to configure the hardware. Therefore, determining a clear reading order can ensure that the system accesses these critical data in the correct logical order, thereby avoiding startup failures caused by reading errors or omissions. In addition, considering the limitations of hardware resources and performance optimization, a reasonable reading order can also reduce unnecessary waiting time and improve startup efficiency. If the system randomly tries to access each memory, it may encounter a situation where it cannot respond immediately, such as a memory is busy with other operations or is not ready. By planning the reading order in advance, the access strategy can be optimized according to the characteristics and current status of each memory to ensure that the required information is obtained quickly and efficiently.

[0060] By checking the boot chip select information, the system can identify which external memories are marked as bootable and understand the priority order between them. This helps the system try to load the bootloader from each specified memory in a predetermined order, thus avoiding blindly searching all possible storage devices and saving valuable boot time. Confirming the boot chip select information also helps improve security. If the boot chip select information is tampered with or damaged, the system may try to load data from the wrong location, resulting in boot failure or even security risks. Therefore, by verifying the validity and integrity of the boot chip select information, the system can prevent potential security threats and ensure that only authenticated bootloaders can be loaded and executed.

[0061] In the case of multiple external memories, if the currently checked memory does not have a valid boot program or boot configuration, the system can continue to try the next memory until a device that can be successfully booted is found. This ensures that even if a certain memory fails or has a configuration error, the system still has a chance to boot normally from other memories, thereby avoiding the startup failure of the entire system, improving fault tolerance, enhancing security, and simplifying management processes.

[0062] In one embodiment, the step of moving the startup program of one of the at least two external memories to the chip according to the startup chip select information includes: when the startup chip select information indicates that the startup program of the external memory corresponding to the startup chip select information is to be started, moving the startup program of the external memory corresponding to the startup chip select information to the chip.

[0063] First, moving the boot program from external memory to the internal memory of the chip can significantly improve execution efficiency. The access speed of external memory is usually much slower than that of memory. Once the boot program is loaded into the memory, the processor can directly read instructions from the memory and execute them, which greatly reduces data access latency and speeds up the boot process. Secondly, moving the boot program to the memory is also to meet the need for the processor to execute code directly. Modern processor design requires that instructions must be located in a memory area that can be accessed quickly so that they can be executed efficiently. If the boot program is still kept in the external memory, the processor needs to frequently access these instructions through a slower interface, which will seriously affect the response time and overall performance of the system. In addition, moving the boot program to the memory can also provide higher flexibility and security. In the memory, the boot program can be modified and updated as needed without affecting the original data in the external memory. At the same time, the data in the memory is volatile, which means that the data in the memory will be cleared after the system is shut down, thereby preventing unauthorized access. This is very important for protecting sensitive boot code and configuration information. Finally, this move operation is part of the standard boot process, which ensures that the system is initialized in the intended manner. Once the boot program is successfully loaded into memory, it can start further boot processes, such as loading the operating system kernel, initializing hardware devices, and starting the user interface, etc. This ensures the consistency and reliability of the entire boot process and ensures that the system can reach a fully available state in the shortest time.

[0064] In one embodiment, the step of moving the startup program of one of the at least two external memories to the chip according to the startup chip select information includes: when the startup chip select information corresponding to the at least two external memories does not indicate startup based on the startup program of the external memory corresponding to the startup chip select information, moving the startup program of the external memory that is first in order to the chip according to the reading order.

[0065] In this embodiment, a more intelligent selection algorithm can also be introduced to determine the boot order, rather than a simple fixed order. For example, the system can dynamically adjust the boot order based on the historical success rate, health status, or user preference of each storage. This can be achieved by analyzing log files, hardware self-test results, and user configuration. In addition, detailed fault information can be recorded each time the boot fails, and diagnosis can be performed during subsequent boot processes. The system can perform self-repair based on this information or provide it to the administrator for troubleshooting. For example, if a certain storage frequently has problems, the system can mark the device and lower its priority.

[0066] A default boot mechanism is provided. Even if the boot chip select information of all external memories does not clearly indicate the location of the boot program, the system can still try to load the boot program from the first memory in a preset order. This can prevent the system from falling into an unbootable state because it cannot find the boot point, thereby ensuring the availability of the system. In actual applications, there may be many reasons for incorrect or lost boot chip select information, such as configuration errors, hardware failures, or malicious tampering. By trying to boot in a preset order, the system can automatically find alternatives when encountering these problems, improving the robustness and reliability of the system. In addition, users or administrators do not need to develop detailed recovery plans for each possible boot failure, but can rely on this default boot process. Once the correct reading order is set, the system can automatically handle various abnormal situations encountered during the boot process, reducing the need for manual intervention. If the boot chip select information of all memories is damaged or untrusted, the system can still load the boot program from a predetermined, trusted memory. This prevents malware from gaining control by tampering with the boot configuration and ensures that the system starts running from a known safe state.

[0067] The embodiment of the present invention provides a method for starting a chip, the method comprising: obtaining pre-configured startup chip selection information after the chip is powered on; transferring a startup program of one of at least two external memories to the chip according to the startup chip selection information; and executing the startup program transferred to the chip. The embodiment of the present invention sets the startup chip selection information, transfers the startup program of the memory to the chip according to the startup chip selection information, so that the system-level chip is powered on and automatically switched to start without adding additional chip pins or requiring a dedicated software and firmware program.

[0068] Reference Figure 2 , showing a structural block diagram of a chip provided by an embodiment of the present invention; the chip structure comprises: a processor 20, a first internal memory 21 and a second internal memory 22; the chip is connected to at least two external memories 30;

[0069] The processor 20 is used to read the first boot program in the first internal memory 21; call the first boot program to obtain pre-configured boot chip select information; according to the boot chip select information, move the boot program in one of the at least two external memories to the second internal memory 22; execute the boot program moved to the chip; the first internal memory 21 is used to store the first boot program; the second internal memory 22 is used to store the boot program after moving.

[0070] The first internal memory 21 may be a read-only memory, and the second internal memory 22 may be a random access memory. The startup chip selection information is configured by a user and is used to instruct a startup program of one of the at least two external memories to start.

[0071] Obtaining the pre-configured boot chip select information after the chip is powered on is a key step, which is essential to ensure that the system boots correctly and securely. By obtaining the boot chip select information, the system can determine the correct boot path and avoid loading the wrong code, thereby preventing boot failure or potential security threats. In addition, the boot chip select information can also contain important configuration parameters about the boot process, such as boot mode (normal boot, recovery mode, etc.), encryption keys, and other security verification data. This helps to enhance the security of the system and ensure that only verified code can be executed. In some cases, the boot chip select information may also be used to implement multiple boot options, allowing users to select different operating systems or firmware versions as needed. Timely and accurate acquisition of boot chip select information is an important means to ensure system reliability and security, and is also the basis for implementing flexible boot strategies. In this way, developers can better control and optimize the system's boot process to meet the needs of different application scenarios.

[0072] External memory refers to external non-volatile memory connected to the chip. Normally, when the system is powered on or reset, the processor needs to start executing code from a predefined location, which is often located in the external memory. However, since these external memories are relatively slow to access, executing code directly from them may affect system performance. Therefore, after identifying the correct boot device through the boot chip select mechanism, the system will copy the boot code (usually the Bootloader) in the device to the internal RAM or cache area, so that the processor can execute code from these fast-access memories at a higher speed. This not only improves the boot speed, but also enhances the flexibility and configurability of the system, so that it can quickly adapt and work normally even in different application scenarios. In addition, such a design is also convenient for later software upgrades and maintenance, because only the data in the external memory needs to be updated without changing the hardware structure.

[0073] The embodiment of the present invention provides a method for starting a chip, the method comprising: obtaining pre-configured startup chip selection information after the chip is powered on; transferring a startup program of one of at least two external memories to the chip according to the startup chip selection information; and executing the startup program transferred to the chip. The embodiment of the present invention sets the startup chip selection information, transfers the startup program of the memory to the chip according to the startup chip selection information, so that the system-level chip is powered on and automatically switched to start without adding additional chip pins or requiring a dedicated software and firmware program.

[0074] Reference Figure 3 , showing a structural block diagram of another chip provided by an embodiment of the present invention;

[0075] In one embodiment, the chip includes a third internal memory 23, and the third internal memory 23 is used to store startup chip select information; the processor 20 is used to call the first startup program to read the startup chip select information from the third internal memory 23 after the chip is powered on.

[0076] The third internal memory 23 is a non-volatile memory inside the chip. In this mode, the internal memory stores the startup chip selection information, while the external memory does not store the startup chip selection information. Signals are transmitted through the system bus 24 inside the chip.

[0077] After the chip is powered on, obtaining the startup chip select information stored in the internal memory 23 is a key step to ensure that the system can be correctly initialized and started smoothly. This process is crucial to the stability and security of the system. When the chip is powered on for the first time, it is in an undefined state and needs to go through a series of preset steps to complete the initialization of hardware and software. The startup chip select information contains important data on how to select and configure various key components in the system (such as processors, memory and other peripherals). This information usually includes address mapping, device configuration parameters, and initial state settings, etc., which are essential for correctly identifying and activating various parts in the system.

[0078] In one embodiment, the at least two external memories 30 are used to store startup chip select information; the processor is used to determine the reading order for the at least two external memories 30 after the chip is powered on; read the startup chip select information from the external memories 30 one by one according to the reading order of the at least two external memories 30; determine whether the startup chip select information indicates to start the startup program based on the external memory corresponding to the startup chip select information; if the startup chip select information does not indicate to start the startup program based on the memory corresponding to the startup chip select information, then return to the step of reading the startup chip select information from the external memory one by one according to the reading order of the at least two external memories until it is determined that the startup chip select information indicates to start the startup program based on the memory corresponding to the startup chip select information.

[0079] The external memory is an external non-volatile memory 30. In this manner, each external memory stores startup chip selection information, and the internal non-volatile memory 23 is not required.

[0080] Different external memories 30 may store different startup configuration data, including but not limited to boot programs, operating system images, drivers and other necessary startup files. These data are crucial for system startup because they contain information on how to load the operating system and how to configure the hardware. Therefore, determining a clear reading order can ensure that the system accesses these key data in the correct logical order, thereby avoiding startup failures caused by reading errors or omissions. In addition, considering the limitations of hardware resources and performance optimization, a reasonable reading order can also reduce unnecessary waiting time and improve startup efficiency. If the system randomly attempts to access each memory, it may encounter a situation where it cannot respond immediately, such as a memory is busy with other operations or is not ready. By planning the reading order in advance, the access strategy can be optimized according to the characteristics and current status of each memory to ensure that the required information is obtained quickly and effectively.

[0081] By checking the boot chip select information, the system can identify which external memories are marked as bootable and understand the priority order between them. This helps the system try to load the bootloader from each specified memory in a predetermined order, thus avoiding blindly searching all possible storage devices and saving valuable boot time. Confirming the boot chip select information also helps improve security. If the boot chip select information is tampered with or damaged, the system may try to load data from the wrong location, resulting in boot failure or even security risks. Therefore, by verifying the validity and integrity of the boot chip select information, the system can prevent potential security threats and ensure that only authenticated bootloaders can be loaded and executed.

[0082] In the case of multiple external memories 30, if the currently checked memory does not have a valid boot program or boot configuration, the system can continue to try the next memory until a device that can be successfully booted is found. This ensures that even if a certain memory fails or has a configuration error, the system still has a chance to boot normally from other memories, thereby avoiding the startup failure of the entire system, improving fault tolerance, enhancing security, and simplifying the management process.

[0083] In one embodiment, the processor 20 is used to move the startup program of the external memory 30 corresponding to the startup chip select information to the second internal memory 22 when the startup chip select information indicates to start the startup program based on the external memory 30 corresponding to the startup chip select information.

[0084] First, moving the boot program from the external memory to the second internal memory 22 inside the chip can significantly improve execution efficiency. The access speed of the external memory is usually much slower than that of the internal memory. Once the boot program is loaded into the internal memory, the processor 30 can directly read and execute instructions from the internal memory, which greatly reduces data access delay and speeds up the boot process. Secondly, moving the boot program to the internal memory is also to meet the processor's need to execute code directly. Modern processor design requires that instructions must be located in a quickly accessible internal memory area so that they can be executed efficiently. If the boot program is still retained in the external memory, the processor needs to frequently access these instructions through a slower interface, which will seriously affect the response time and overall performance of the system. In addition, moving the boot program to the memory can also provide higher flexibility and security. In the memory, the boot program can be modified and updated as needed without affecting the original data in the external memory. At the same time, the data in the internal memory is volatile, which means that after the system is shut down, the data in the memory will be cleared to prevent unauthorized access. This is very important for protecting sensitive boot code and configuration information. Finally, this moving operation is part of the standard startup process, which ensures that the system is initialized in a predetermined manner. Once the boot program is successfully loaded into the internal memory, it can start to execute further boot processes, such as loading the operating system kernel, initializing hardware devices, and starting the user interface, etc. This ensures the consistency and reliability of the entire boot process and ensures that the system can reach a fully available state in the shortest time.

[0085] In one embodiment, the processor 20 is used to move the startup program of the first external memory to the second internal memory according to the reading order when the startup chip select information corresponding to the at least two external memories 30 does not indicate to start the startup program based on the external memory corresponding to the startup chip select information.

[0086] In one embodiment, a more intelligent selection algorithm can be introduced to determine the boot order instead of a simple fixed order. For example, the system can dynamically adjust the boot order based on the historical success rate, health status, or user preferences of each storage. This can be achieved by analyzing log files, hardware self-test results, and user configuration. In addition, detailed fault information can be recorded each time the boot fails, and diagnosis can be performed during subsequent boot processes. The system can self-repair based on this information or provide it to the administrator for troubleshooting. For example, if a storage frequently has problems, the system can mark the device and lower its priority.

[0087] A default startup mechanism is provided. Even if the startup chip select information of all external memories 30 does not clearly indicate the location of the startup program, the system can still try to load the startup program from the first memory in a preset order. This can prevent the system from falling into a state of being unable to start because the startup point cannot be found, thereby ensuring the availability of the system. In actual applications, there may be many reasons for incorrect or lost startup chip select information, such as configuration errors, hardware failures, or malicious tampering. By trying to start in a preset order, the system can automatically find alternatives when encountering these problems, thereby improving the robustness and reliability of the system. In addition, users or administrators do not need to develop detailed recovery plans for each possible startup failure, but can rely on this default startup process. Once the correct reading order is set, the system can automatically handle various abnormal situations encountered during the startup process, reducing the need for manual intervention. If the startup chip select information of all memories is damaged or untrustworthy, the system can still load the startup program from a predetermined, trusted memory. This can prevent malware from gaining control by tampering with the startup configuration, ensuring that the system starts running from a known safe state.

[0088] The embodiment of the present invention provides a method for starting a chip, the method comprising: obtaining pre-configured startup chip selection information after the chip is powered on; transferring a startup program of one of at least two external memories to the chip according to the startup chip selection information; and executing the startup program transferred to the chip. The embodiment of the present invention sets the startup chip selection information, transfers the startup program of the memory to the chip according to the startup chip selection information, so that the system-level chip is powered on and automatically switched to start without adding additional chip pins or requiring a dedicated software and firmware program.

[0089] like Figure 4 , showing a structural block diagram of an electronic device 40 provided in an embodiment of the present invention, including:

[0090] Processor 401, memory 402, and a computer program 4021 stored in memory 402 and capable of running on processor 401. When computer program 4021 is executed by processor 401, each process of the startup method embodiment of the above-mentioned chip is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0091] like Figure 5 , shows a structural block diagram of a computer-readable storage medium 50 provided in an embodiment of the present invention. A computer program 501 is stored on the computer-readable storage medium 50. When the computer program 501 is executed by the processor, the various processes of the above-mentioned chip startup method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0092] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0093] It should be understood by those skilled in the art that the embodiments of the present invention can provide methods or computer program products. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0094] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0097] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0098] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0099] The above is a detailed introduction to the startup method, chip, electronic device and storage medium of a chip provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A chip startup method, characterized in that: The chip is connected to at least two external memories, and the method comprises: After the chip is powered on, obtaining pre-configured startup chip selection information; According to the startup chip selection information, a startup program in one of the at least two external memories is transferred to the chip; Execute a boot process transferred to the chip.

2. The method according to claim 1, characterized in that The chip includes an internal memory, The internal memory stores startup chip selection information; After the chip is powered on, obtaining pre-configured startup chip selection information includes: After the chip is powered on, the startup chip selection information is read from the internal memory.

3. The method according to claim 1, characterized in that The at least two external memories store startup chip selection information; After the chip is powered on, obtaining pre-configured startup chip selection information includes: After the chip is powered on, determining a reading order for the at least two external memories; Reading the startup chip selection information from the external memories one by one according to the reading order of the at least two external memories; Determine whether the startup chip selection information indicates to start a startup program based on the external memory corresponding to the startup chip selection information; If the startup chip select information does not indicate startup based on the startup program of the external memory corresponding to the startup chip select information, then return to the step of reading the startup chip select information from the external memory one by one in the reading order of the at least two external memories until it is determined that the startup chip select information indicates startup based on the startup program of the external memory corresponding to the startup chip select information.

4. The method according to claim 3, characterized in that The boot program of one of the at least two external memories is transferred to the chip according to the boot chip selection information, include: When the startup chip select information indicates to start the chip based on the startup program of the external memory corresponding to the startup chip select information, the startup program of the external memory corresponding to the startup chip select information is transferred to the chip.

5. The method according to claim 3, characterized in that: The boot program of one of the at least two external memories is transferred to the chip according to the boot chip selection information, include: In the case where the startup chip selection information corresponding to the at least two external memories does not indicate to start the startup program based on the external memory corresponding to the startup chip selection information, according to the Read the order and transfer the boot program of the external memory which is first in the order to the chip.

6. A chip, characterized in that: The chip comprises: a processor, a first internal memory and a second internal memory; the chip is connected to at least two external memories; The processor is configured to read a first boot program in the first internal memory; call the first boot program to obtain pre-configured boot chip selection information; transfer the boot program in one of the at least two external memories to the second internal memory according to the boot chip selection information; and execute the boot program transferred to the chip; The first internal memory is used to store the first startup program; The second internal memory is used to store the startup program after transportation.

7. The chip according to claim 6, characterized in that: The chip includes a third internal memory, and the third internal memory is used to store startup chip selection information; The processor is used to call the first startup program to read the startup chip selection information from the third internal memory after the chip is powered on.

8. The chip according to claim 6, characterized in that: The at least two external memories are used to store startup chip selection information; The processor is used to determine a reading order for the at least two external memories after the chip is powered on; Reading the startup chip selection information from the external memories one by one according to the reading order of the at least two external memories; Determine whether the startup chip selection information indicates to start a startup program based on the external memory corresponding to the startup chip selection information; If the startup chip select information does not indicate startup based on the startup program of the memory corresponding to the startup chip select information, then return to the step of reading the startup chip select information from the external memories one by one in the reading order of the at least two external memories until it is determined that the startup chip select information indicates startup based on the startup program of the memory corresponding to the startup chip select information.

9. The chip according to claim 8, characterized in that: The processor is configured to transfer the startup program of the external memory corresponding to the startup chip select information to the second internal memory when the startup chip select information indicates startup based on the startup program of the external memory corresponding to the startup chip select information.

10. The chip according to claim 8, characterized in that: The processor is used for starting the chip selection information corresponding to the at least two external memories, When neither of them instructs to start the startup program based on the external memory corresponding to the startup chip select information, the startup program of the external memory with the first order is transferred to the second internal memory according to the reading order.

11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the startup method of the chip according to any one of claims 1 to 5 is implemented.

12. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for starting a chip according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Missile-borne DSP software secure start updating mode, implementation system thereof and system manufacturing method

    CN107193567A

  • Starting method and device of co-processing chip, storage medium and electronic device

    CN114661364A

  • Chip starting method and system, computer equipment, storage medium and chip

    CN115328560A

  • Firmware program starting method and system, storage medium and equipment

    CN115658157A

  • Chip starting method and device, computer equipment and storage medium

    CN116450244A