WO2022161101A1 - Uboot startup method and apparatus for multi-core system on chip, and device and storage medium - Google Patents

Uboot startup method and apparatus for multi-core system on chip, and device and storage medium Download PDF

Info

Publication number
WO2022161101A1
WO2022161101A1 PCT/CN2021/143252 CN2021143252W WO2022161101A1 WO 2022161101 A1 WO2022161101 A1 WO 2022161101A1 CN 2021143252 W CN2021143252 W CN 2021143252W WO 2022161101 A1 WO2022161101 A1 WO 2022161101A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
uboot
branch
cpu
chip
Prior art date
Application number
PCT/CN2021/143252
Other languages
French (fr)
Chinese (zh)
Inventor
刘刚
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2022161101A1 publication Critical patent/WO2022161101A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4405Initialisation of multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system

Definitions

  • the present application belongs to the field of computer technology, and in particular, relates to a uboot startup method, apparatus, device and storage medium of a multi-core system-on-chip.
  • SoC System on Chip
  • uboot Universal boot Loader
  • uboot startup is performed by only one CPU.
  • other CPUs are in an idle state when uboot is executed.
  • the existing uboot execution process is as follows: After the system is powered on, CPU0 reads instructions and data from the non-volatile flash memory (nor flash), while CPU1 is idle at this time.
  • the uboot program is very large, and it takes a long time for the SoC system to execute the uboot startup.
  • a uboot startup method of a multi-core system-on-a-chip comprising:
  • the step of dividing the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers includes:
  • the uboot program is divided into a first branch program and a second branch program, wherein the first branch program is used for driver matching, and the second branch program is used to initialize the memory and store the existence in the non-volatile flash memory
  • the uboot program is migrated to the initialized memory;
  • the first branch program and the second branch program are respectively stored in the first storage area and the second storage area of the nonvolatile flash memory.
  • the step of using each CPU to match a corresponding branch program from the non-volatile flash memory according to the ID number and execute it includes:
  • the ID number of each CPU is matched with the first preset ID number and the second preset ID number respectively;
  • the CPU corresponding to the first preset ID number is denoted as the main CPU, and the CPU corresponding to the second preset ID number is denoted as the slave CPU;
  • the second branch program of the second storage area of the nonvolatile flash memory is read and executed by the slave CPU.
  • the method further includes:
  • the slave CPU In response to the slave CPU completing the execution of the second branch program, the slave CPU sends a notification to the master CPU;
  • the master CPU In response to the master CPU receiving the notification sent by the slave CPU, the master CPU jumps to the memory, and reads and executes the subsequent steps of the first branch program from the memory according to the offset address. instruction.
  • the step of confirming that the multi-core system-on-a-chip completes the uboot startup in response to the multiple CPUs executing and completing the corresponding branch program includes:
  • the method further includes:
  • the multiple CPUs and timers are reset and the process returns to the step of acquiring the ID numbers of the multiple CPUs.
  • the method further includes:
  • a uboot boot device of a multi-core system-on-chip comprising:
  • the ID number acquisition module is used to acquire the ID numbers of multiple CPUs when the system is powered on;
  • the program division module is used to divide the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers;
  • a matching module for using each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it;
  • the startup completion confirmation unit is used to confirm that the multi-core on-chip system completes the uboot startup when the corresponding branch programs are executed by multiple CPUs.
  • a computer device comprising:
  • the memory stores a computer program that can run on the processor, and when the processor executes the program, the processor executes the aforementioned uboot startup method of the multi-core system-on-a-chip.
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, executes the aforementioned uboot startup method of the multi-core system-on-a-chip.
  • the above-mentioned uboot startup method of a multi-core system-on-a-chip obtains the ID numbers of multiple CPUs after the system is powered on, and divides the uboot program stored in the non-volatile flash memory into multiple branch programs according to the multiple ID numbers, and then Use each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it. Finally, when multiple CPUs execute the corresponding branch program, it is confirmed that the multi-core on-chip system has completed the uboot startup, realizing the parallel execution of multiple CPUs. uboot improves the CPU resource utilization of the multi-core SoC and effectively shortens the execution time of the uboot program.
  • the present application also provides a uboot boot device of a multi-core system-on-chip, a computer device, and a computer-readable storage medium, which can also achieve the above technical effects, which are not repeated here.
  • FIG. 1 is a schematic flowchart of a uboot startup method of a multi-core system-on-a-chip provided by an embodiment of the present application;
  • FIG. 2 provides a schematic structural diagram of a uboot boot device of a multi-core system-on-chip according to another embodiment of the present application
  • FIG. 3 is an internal structural diagram of a computer device in another embodiment of the present application.
  • the present application provides a uboot startup method of a multi-core system-on-a-chip, and the method includes the following steps:
  • the multi-core system-on-a-chip refers to the SoC system including two or more CPUs.
  • the ID of the CPU refers to the serial number of the CPU.
  • Each CPU also has a unique ID number, that is, the CPUID.
  • the CPUID is used when the CPU is manufactured. Put into the CPU by the manufacturer, the CPUID is unchanged for life.
  • the number of divided branch programs is multiple, for example, the ID numbers of two CPUs are obtained, the uboot program is divided into two parts to form two branch programs, and one branch program corresponds to the ID number of one CPU.
  • the above-mentioned uboot startup method of a multi-core system-on-a-chip obtains the ID numbers of multiple CPUs after the system is powered on, and divides the uboot program stored in the non-volatile flash memory into multiple branch programs according to the multiple ID numbers, and then Use each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it. Finally, when multiple CPUs execute the corresponding branch program, it is confirmed that the multi-core on-chip system has completed the uboot startup, realizing the parallel execution of multiple CPUs. uboot improves the CPU resource utilization of the multi-core SoC and effectively shortens the execution time of the uboot program.
  • step S200 specifically includes:
  • S210 Divide the uboot program into a first branch program and a second branch program, wherein the first branch program is used for driver matching, and the second branch program is used to initialize the memory and store the memory in a non-volatile The uboot program in the flash memory is migrated to the initialized memory;
  • S220 Store the first branch program and the second branch program in a first storage area and a second storage area of the non-volatile flash memory, respectively.
  • step S300 specifically includes:
  • the CPU corresponding to the first preset ID number is denoted as the main CPU, and the CPU corresponding to the second preset ID number is denoted as the slave CPU;
  • the following takes a SoC system including four CPUs as an example for description. It is assumed that the four CPUs are denoted as CPU0, CPU1, CPU2, and CPU3, respectively, and the ID numbers of CPU0 and CPU1 are used in advance to store the data stored in
  • the uboot program in the non-volatile flash memory is divided into a first branch program and a second branch program, wherein CPU0 corresponds to the first branch program, that is, CPU0 performs the task of driving matching, and CPU1 corresponds to the second branch program, that is, CPU1 executes the program.
  • the ID numbers of CPU0, CPU1, CPU2, and CPU3 are read.
  • CPU0 If the ID number of CPU0 is read, then CPU0 reads the first ID number stored in the non-volatile flash memory at this time. The instructions and data of the branch program are processed for driver matching. If the ID number of the CPU1 is read, then the CPU1 reads the instructions and data of the second branch program from the non-volatile flash memory and executes the code from the flash memory. Migration processing to memory.
  • CPU2 and CPU3 since the IDs of CPU2 and CPU3 are not assigned branch programs, CPU2 and CPU3 enter the waiting state; finally, after CPU1 completes the code migration, it notifies CPU0 to make CPU0 execute from non-volatile flash memory (nor flash) Jump to memory (Double Data Rate synchronous dynamic random access memory, referred to as DDR), complete uboot execution, and wait for kernal to start.
  • non-volatile flash memory non-volatile flash memory (nor flash) Jump to memory (Double Data Rate synchronous dynamic random access memory, referred to as DDR)
  • DDR Double Data Rate synchronous dynamic random access memory
  • step S400 specifically includes the following sub-steps:
  • the method further includes:
  • CPU1 completes the migration of the uboot program from the non-volatile flash memory to the memory, it notifies CPU0. Since CPU0 is performing driver matching at this time, there is no Before receiving the notification to complete the migration, CPU0 will sequentially fetch the instructions, data, etc. of the first branch program from the flash memory. After receiving the notification of completing the migration, the CPU will record the offset address of the next instruction to be fetched through the register. , after which the CPU0 no longer fetches instructions from the non-volatile flash memory but fetches instructions from the memory until the first branch program is completely completed.
  • the method of the present application further includes:
  • step S610 in response to the failure to start the uboot of the multi-core system-on-chip, reset the multiple CPUs and timers and return to the step of acquiring the ID numbers of the multiple CPUs.
  • the method of the present application also includes:
  • the above-mentioned uboot startup method of a multi-core system-on-chip if and only when the first branch program and the second branch program are executed, uboot is successfully started, and in any case, the system is allowed to try to start uboot again, and in order to prevent multi-core
  • the waste of CPU resources of the on-chip system, repeated execution of invalid uboot startup, can also automatically alarm the abnormal situation, which is convenient for operation and maintenance personnel to find and maintain in time, and allows automatic restart in the event of an error within a certain limit, which realizes automatic Start uboot several times to ensure that the uboot of the multi-core SoC can be started normally.
  • the present application further provides a uboot boot device 70 for a core system on a chip, the device includes:
  • the ID number acquisition module 71 is used to acquire the ID numbers of multiple CPUs when the system is powered on;
  • the program dividing module 72 is used for dividing the uboot program stored in the non-volatile flash memory into a plurality of branch programs according to a plurality of ID numbers;
  • Matching module 73 for utilizing each CPU to match corresponding branch program and execute respectively from described non-volatile flash memory according to ID number;
  • the startup completion confirmation unit 74 is used to confirm that the multi-core system-on-a-chip completes the uboot startup when the corresponding branch programs are all executed by the multiple CPUs.
  • Each module in the uboot boot device of the multi-core system-on-chip can be implemented in whole or in part by software, hardware and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, and the computer device may be a server.
  • the computer device includes a processor, memory, a network interface, and a database connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the nonvolatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer device is used to store data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Road (Synchlink) DRAM
  • SLDRAM synchronous chain Road (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed are a uboot startup method and apparatus for a multi-core system on chip, and a device and a storage medium. The method comprises: acquiring ID numbers of a plurality of CPUs in response to a system being powered on; according to the plurality of ID numbers, dividing a uboot program stored in a nor flash into a plurality of branch programs; using each CPU to respectively match a corresponding branch program from the nor flash according to the ID numbers and execute the branch program; and in response to the plurality of CPUs all completing the execution of the corresponding branch programs, confirming that a multi-core system on chip completes uboot startup. By means of the solution of the present application, each CPU is used to match a corresponding branch program from a nor flash according to an ID number and executes the branch program, thereby implementing the parallel execution of a uboot by a plurality of CPUs, improving the CPU resource utilization rate of a multi-core system on chip, and effectively shortening the execution time of a uboot program.

Description

多核片上系统的uboot启动方法、装置、设备及存储介质Uboot startup method, device, device and storage medium of multi-core system-on-chip
本申请要求在2021年01月29日提交中国专利局、申请号为202110123712.2、发明名称为“多核片上系统的uboot启动方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on January 29, 2021 with the application number 202110123712.2 and the invention titled "Uboot startup method, device, device and storage medium for multi-core system-on-a-chip", the entire contents of which are Incorporated herein by reference.
技术领域technical field
本申请属于计算机技术领域,尤其涉及一种多核片上系统的uboot启动方法、装置、设备及存储介质。The present application belongs to the field of computer technology, and in particular, relates to a uboot startup method, apparatus, device and storage medium of a multi-core system-on-chip.
背景技术Background technique
片上系统(System on Chip,简称SoC)是一个有专用目标的集成电路,其中包含完整系统并有嵌入软件的全部内容。近些年来,随着多核SoC片上系统在数据中心、手持设备等领域的广泛应用。uboot(Universal boot Loader)是SoC芯片中用于嵌入式系统的引导加载程序,是用来引导启动内核的,因而是SoC片上系统正常运行必不可少的步骤,并且SoC系统的uboot启动时间越来越受到关注。A System on Chip (SoC) is an integrated circuit with a special purpose, which contains a complete system and has all the contents of embedded software. In recent years, with the wide application of multi-core SoC system-on-chip in data centers, handheld devices and other fields. uboot (Universal boot Loader) is a boot loader for embedded systems in SoC chips. It is used to boot the kernel, so it is an essential step for the normal operation of the SoC system, and the uboot startup time of the SoC system is getting more and more more attention.
目前,在SoC系统技术中uboot启动仅由一个CPU执行,对于多核的SoC系统,在uboot执行时其他的CPU处于闲置状态。举例来说,假设某一SoC系统包括CPU0和CPU1,现有uboot执行过程如下:系统上电后,CPU0从非易失性闪存(nor flash)中读取指令、数据,而此时CPU1处于闲置状态;此外,由于现有uboot中集成了很多接口的驱动,因而uboot程序很大,进而导致SoC系统执行uboot启动需要很长时间。Currently, in the SoC system technology, uboot startup is performed by only one CPU. For a multi-core SoC system, other CPUs are in an idle state when uboot is executed. For example, assuming that a SoC system includes CPU0 and CPU1, the existing uboot execution process is as follows: After the system is powered on, CPU0 reads instructions and data from the non-volatile flash memory (nor flash), while CPU1 is idle at this time. In addition, since many interface drivers are integrated in the existing uboot, the uboot program is very large, and it takes a long time for the SoC system to execute the uboot startup.
发明内容SUMMARY OF THE INVENTION
有鉴于此,有必要针对以上技术问题提供能够缩短片上系统uboot启动时间的一种多核片上系统的uboot启动方法、装置、设备及存储介质。In view of this, it is necessary to provide a uboot startup method, device, device and storage medium of a multi-core system-on-chip which can shorten the uboot startup time of the system-on-chip to solve the above technical problems.
根据本申请的第一方面,提供了一种多核片上系统的uboot启动方法,所述方法包括:According to a first aspect of the present application, a uboot startup method of a multi-core system-on-a-chip is provided, the method comprising:
响应于系统上电,则获取多个CPU的ID号;In response to the system being powered on, the ID numbers of multiple CPUs are obtained;
根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序;Divide the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers;
利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行;Utilize each CPU to match and execute the corresponding branch program from the non-volatile flash memory according to the ID number;
响应于多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动。In response to the multiple CPUs executing the corresponding branch programs, it is confirmed that the multi-core system-on-a-chip completes the uboot startup.
在其中一个实施例中,所述根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序的步骤包括:In one of the embodiments, the step of dividing the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers includes:
将uboot程序划分为第一分支程序和第二分支程序,其中,所述第一分支程序用于驱动匹配,所述第二分支程序用于对内存进行初始化以及将存在存储在非易失闪存中的uboot程序迁移至初始化后的内存中;The uboot program is divided into a first branch program and a second branch program, wherein the first branch program is used for driver matching, and the second branch program is used to initialize the memory and store the existence in the non-volatile flash memory The uboot program is migrated to the initialized memory;
将所述第一分支程序和所述第二分支程序分别存储在所述非易失闪存的第一存储区域和第二存储区域。The first branch program and the second branch program are respectively stored in the first storage area and the second storage area of the nonvolatile flash memory.
在其中一个实施例中,所述利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行的步骤包括:In one of the embodiments, the step of using each CPU to match a corresponding branch program from the non-volatile flash memory according to the ID number and execute it includes:
将每一CPU的ID号分别与第一预设ID号和第二预设ID号进行匹配;The ID number of each CPU is matched with the first preset ID number and the second preset ID number respectively;
将与第一预设ID号对应的CPU记作主CPU,将与第二预设ID号对应的CPU记作从CPU;The CPU corresponding to the first preset ID number is denoted as the main CPU, and the CPU corresponding to the second preset ID number is denoted as the slave CPU;
利用所述主CPU读取并执行所述非易失闪存的第一存储区域的第一分支程序;Utilize the main CPU to read and execute the first branch program of the first storage area of the non-volatile flash memory;
利用所述从CPU读取并执行所述非易失闪存的第二存储区域的第二分 支程序。The second branch program of the second storage area of the nonvolatile flash memory is read and executed by the slave CPU.
在其中一个实施例中,所述方法还包括:In one embodiment, the method further includes:
获取所述主CPU待读取指令的偏移地址;Obtain the offset address of the instruction to be read by the main CPU;
响应于所述从CPU完成执行所述第二分支程序,则所述从CPU向所述主CPU发送通知;In response to the slave CPU completing the execution of the second branch program, the slave CPU sends a notification to the master CPU;
响应于所述主CPU接收到所述从CPU发送的通知,则所述主CPU跳转至内存,并根据所述偏移地址从所述内存中读取并执行所述第一分支程序的后续指令。In response to the master CPU receiving the notification sent by the slave CPU, the master CPU jumps to the memory, and reads and executes the subsequent steps of the first branch program from the memory according to the offset address. instruction.
在其中一个实施例中,所述响应于多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动的步骤包括:In one embodiment, the step of confirming that the multi-core system-on-a-chip completes the uboot startup in response to the multiple CPUs executing and completing the corresponding branch program includes:
分别检测所述第一分支程序和所述第二分支程序是否执行完成;Detecting whether the first branch program and the second branch program are executed respectively;
响应于所述第一分支程序和所述第二分支程序均执行完成,则确认多核片上系统完成uboot启动;In response to the completion of execution of both the first branch program and the second branch program, confirming that the multi-core system-on-a-chip completes uboot startup;
响应于预设时间内所述第一分支程序和/或所述第二分支程序未完成执行,则确认多核片上系统uboot启动失败。In response to the fact that the first branch program and/or the second branch program has not been executed within a preset time, it is determined that the multi-core system-on-a-chip uboot fails to start.
在其中一个实施例中,所述方法还包括:In one embodiment, the method further includes:
响应于多核片上系统uboot启动失败,则对多个CPU及计时器进行复位并返回至获取多个CPU的ID号的步骤。In response to the failure to start the uboot of the multi-core system-on-chip, the multiple CPUs and timers are reset and the process returns to the step of acquiring the ID numbers of the multiple CPUs.
在其中一个实施例中,所述方法还包括:In one embodiment, the method further includes:
对多核片上系统uboot启动失败的次数进行统计;Count the number of times the uboot failed to start the multi-core SoC;
响应于启动失败的次数超过预设值,则确认非易失闪存中uboot程序故障并发出告警。In response to the number of startup failures exceeding the preset value, the failure of the uboot program in the non-volatile flash memory is confirmed and an alarm is issued.
根据本申请的第二方面,提供了一种多核片上系统的uboot启动装置,所述装置包括:According to a second aspect of the present application, a uboot boot device of a multi-core system-on-chip is provided, the device comprising:
ID号获取模块,用于在系统上电时,则获取多个CPU的ID号;The ID number acquisition module is used to acquire the ID numbers of multiple CPUs when the system is powered on;
程序划分模块,用于根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序;The program division module is used to divide the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers;
匹配模块,用于利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行;a matching module, for using each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it;
启动完成确认单元,用在多个CPU均执行完成对应的分支程序时,则确认多核片上系统完成uboot启动。The startup completion confirmation unit is used to confirm that the multi-core on-chip system completes the uboot startup when the corresponding branch programs are executed by multiple CPUs.
根据本申请的第三方面,还提供了一种计算机设备,该计算机设备包括:According to a third aspect of the present application, a computer device is also provided, the computer device comprising:
至少一个处理器;以及at least one processor; and
存储器,存储器存储有可在处理器上运行的计算机程序,处理器执行程序时执行前述的多核片上系统的uboot启动方法。The memory stores a computer program that can run on the processor, and when the processor executes the program, the processor executes the aforementioned uboot startup method of the multi-core system-on-a-chip.
根据本申请的第四方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时执行前述的多核片上系统的uboot启动方法。According to a fourth aspect of the present application, a computer-readable storage medium is also provided, where the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, executes the aforementioned uboot startup method of the multi-core system-on-a-chip.
上述一种多核片上系统的uboot启动方法,通过在系统上电后获取多个CPU的ID号,并根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序,进而利用每一CPU根据ID号从非易失闪存中匹配对应的分支程序并执行,最后当多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动,实现了多个CPU并行执行uboot,提高了多核片上系统的CPU资源利用率,有效的缩短了uboot程序执行的时间。The above-mentioned uboot startup method of a multi-core system-on-a-chip obtains the ID numbers of multiple CPUs after the system is powered on, and divides the uboot program stored in the non-volatile flash memory into multiple branch programs according to the multiple ID numbers, and then Use each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it. Finally, when multiple CPUs execute the corresponding branch program, it is confirmed that the multi-core on-chip system has completed the uboot startup, realizing the parallel execution of multiple CPUs. uboot improves the CPU resource utilization of the multi-core SoC and effectively shortens the execution time of the uboot program.
此外,本申请还提供了一种多核片上系统的uboot启动装置、一种计算机设备和一种计算机可读存储介质,同样能实现上述技术效果,这里不再赘述。In addition, the present application also provides a uboot boot device of a multi-core system-on-chip, a computer device, and a computer-readable storage medium, which can also achieve the above technical effects, which are not repeated here.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other embodiments can also be obtained according to these drawings without creative efforts.
图1为本申请一个实施例提供的一种多核片上系统的uboot启动方法的流程示意图;1 is a schematic flowchart of a uboot startup method of a multi-core system-on-a-chip provided by an embodiment of the present application;
图2为本申请另一个实施例提供一种多核片上系统的uboot启动装置的结构示意图;FIG. 2 provides a schematic structural diagram of a uboot boot device of a multi-core system-on-chip according to another embodiment of the present application;
图3为本申请另一个实施例中计算机设备的内部结构图。FIG. 3 is an internal structural diagram of a computer device in another embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请实施例进一步详细说明。In order to make the objectives, technical solutions and advantages of the present application clearer, the following describes the embodiments of the present application in detail with reference to the accompanying drawings and specific embodiments.
需要说明的是,本申请实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本申请实施例的限定,后续实施例对此不再一一说明。It should be noted that all expressions using "first" and "second" in the embodiments of the present application are for the purpose of distinguishing two entities with the same name but not the same or non-identical parameters. It can be seen that "first" and "second" It is only for the convenience of expression and should not be construed as a limitation on the embodiments of the present application, and subsequent embodiments will not describe them one by one.
在一个实施例中,请参照图1所示,本申请提供了一种多核片上系统的uboot启动方法,所述方法包括以下步骤:In one embodiment, please refer to FIG. 1 , the present application provides a uboot startup method of a multi-core system-on-a-chip, and the method includes the following steps:
S100,响应于系统上电,则获取多个CPU的ID号;S100, in response to the system being powered on, acquiring ID numbers of multiple CPUs;
其中,多核片上系统是指SoC系统包括两个或者两个以上的CPU,CPU的ID是指CPU序列号,每个CPU也都有一个独一无二的ID号即CPUID,CPUID是在制造CPU的时候,由厂家置入到CPU内部的,CPUID是终身不变的。Among them, the multi-core system-on-a-chip refers to the SoC system including two or more CPUs. The ID of the CPU refers to the serial number of the CPU. Each CPU also has a unique ID number, that is, the CPUID. The CPUID is used when the CPU is manufactured. Put into the CPU by the manufacturer, the CPUID is unchanged for life.
S200,根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序;S200, dividing the uboot program stored in the nonvolatile flash memory into a plurality of branch programs according to the plurality of ID numbers;
其中,划分的分支程序的个数为多个,例如获取到两个CPU的ID号,将uboot程序划分成两部分形成两个分支程序,一个分支程序对应一个CPU 的ID号。The number of divided branch programs is multiple, for example, the ID numbers of two CPUs are obtained, the uboot program is divided into two parts to form two branch programs, and one branch program corresponds to the ID number of one CPU.
S300,利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行;S300, utilize each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it;
S400,响应于多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动。S400 , confirming that the multi-core system-on-a-chip completes the uboot startup in response to the multiple CPUs executing the corresponding branch programs.
上述一种多核片上系统的uboot启动方法,通过在系统上电后获取多个CPU的ID号,并根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序,进而利用每一CPU根据ID号从非易失闪存中匹配对应的分支程序并执行,最后当多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动,实现了多个CPU并行执行uboot,提高了多核片上系统的CPU资源利用率,有效的缩短了uboot程序执行的时间。The above-mentioned uboot startup method of a multi-core system-on-a-chip obtains the ID numbers of multiple CPUs after the system is powered on, and divides the uboot program stored in the non-volatile flash memory into multiple branch programs according to the multiple ID numbers, and then Use each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it. Finally, when multiple CPUs execute the corresponding branch program, it is confirmed that the multi-core on-chip system has completed the uboot startup, realizing the parallel execution of multiple CPUs. uboot improves the CPU resource utilization of the multi-core SoC and effectively shortens the execution time of the uboot program.
在又一个实施例中,前述步骤S200具体包括:In yet another embodiment, the foregoing step S200 specifically includes:
S210,将uboot程序划分为第一分支程序和第二分支程序,其中,所述第一分支程序用于驱动匹配,所述第二分支程序用于对内存进行初始化以及将存在存储在非易失闪存中的uboot程序迁移至初始化后的内存中;S210: Divide the uboot program into a first branch program and a second branch program, wherein the first branch program is used for driver matching, and the second branch program is used to initialize the memory and store the memory in a non-volatile The uboot program in the flash memory is migrated to the initialized memory;
S220,将所述第一分支程序和所述第二分支程序分别存储在所述非易失闪存的第一存储区域和第二存储区域。S220: Store the first branch program and the second branch program in a first storage area and a second storage area of the non-volatile flash memory, respectively.
在又一个实施例中,前述步骤S300具体包括:In yet another embodiment, the foregoing step S300 specifically includes:
S310,将每一CPU的ID号分别与第一预设ID号和第二预设ID号进行匹配;S310, the ID number of each CPU is matched with the first preset ID number and the second preset ID number respectively;
S320,将与第一预设ID号对应的CPU记作主CPU,将与第二预设ID号对应的CPU记作从CPU;S320, the CPU corresponding to the first preset ID number is denoted as the main CPU, and the CPU corresponding to the second preset ID number is denoted as the slave CPU;
S330,利用所述主CPU读取并执行所述非易失闪存的第一存储区域的第一分支程序;S330, using the main CPU to read and execute the first branch program of the first storage area of the nonvolatile flash memory;
S340,利用所述从CPU读取并执行所述非易失闪存的第二存储区域的第二分支程序。S340, using the slave CPU to read and execute the second branch program of the second storage area of the non-volatile flash memory.
为了便于理解本申请的技术方案,下面以包含四个CPU的SoC系统为例进行说明,假设四个CPU分别记作CPU0、CPU1、CPU2、CPU3,预先使用CPU0、CPU1的ID号将存在存储在非易失闪存中的uboot程序分为第一分支程序和第二分支程序,其中CPU0对应对第一分支程序,即CPU0执行驱动匹配的任务,而CPU1对应对第二分支程序,即CPU1执行程序代码的迁移任务,当系统上电后读取到CPU0、CPU1、CPU2、CPU3的ID号,假如读取到的CPU0的ID号,则此时CPU0从存储在非易失闪存中读取第一分支程序的指令和数据并进行驱动匹配的处理,假如读取到的CPU1的ID号,则此时CPU1从存储在非易失闪存中读取第二分支程序的指令和数据并进行代码从闪存到内存的迁移处理。需要说明的是,由于CPU2、CPU3的ID并没有分配分支程序,因而CPU2、CPU3进入等待状态;最后CPU1在完成代码迁移后,通知CPU0,使CPU0的执行从非易失性闪存(nor flash)跳转到内存(Double Data Rate双倍速率同步动态随机存储器,简称DDR),完成uboot执行,等待kernal启动。In order to facilitate the understanding of the technical solution of the present application, the following takes a SoC system including four CPUs as an example for description. It is assumed that the four CPUs are denoted as CPU0, CPU1, CPU2, and CPU3, respectively, and the ID numbers of CPU0 and CPU1 are used in advance to store the data stored in The uboot program in the non-volatile flash memory is divided into a first branch program and a second branch program, wherein CPU0 corresponds to the first branch program, that is, CPU0 performs the task of driving matching, and CPU1 corresponds to the second branch program, that is, CPU1 executes the program. For the code migration task, when the system is powered on, the ID numbers of CPU0, CPU1, CPU2, and CPU3 are read. If the ID number of CPU0 is read, then CPU0 reads the first ID number stored in the non-volatile flash memory at this time. The instructions and data of the branch program are processed for driver matching. If the ID number of the CPU1 is read, then the CPU1 reads the instructions and data of the second branch program from the non-volatile flash memory and executes the code from the flash memory. Migration processing to memory. It should be noted that since the IDs of CPU2 and CPU3 are not assigned branch programs, CPU2 and CPU3 enter the waiting state; finally, after CPU1 completes the code migration, it notifies CPU0 to make CPU0 execute from non-volatile flash memory (nor flash) Jump to memory (Double Data Rate synchronous dynamic random access memory, referred to as DDR), complete uboot execution, and wait for kernal to start.
在又一个实施例中,在前述实施例的基础上步骤S400具体包括以下子步骤:In yet another embodiment, on the basis of the foregoing embodiment, step S400 specifically includes the following sub-steps:
S410,分别检测所述第一分支程序和所述第二分支程序是否执行完成;S410, respectively detecting whether the execution of the first branch program and the second branch program is completed;
S420,响应于所述第一分支程序和所述第二分支程序均执行完成,则确认多核片上系统完成uboot启动;S420, in response to the completion of execution of both the first branch program and the second branch program, confirm that the multi-core system-on-a-chip completes uboot startup;
S430,响应于预设时间内所述第一分支程序和/或所述第二分支程序未完成执行,则确认多核片上系统uboot启动失败。S430, in response to the fact that the first branch program and/or the second branch program has not been executed within a preset time, confirm that the multi-core system-on-a-chip uboot fails to start.
在又一个实施例中,为保证uboot程序的正常执行,所述方法还包括:In yet another embodiment, in order to ensure the normal execution of the uboot program, the method further includes:
S510,获取所述主CPU待读取指令的偏移地址;S510, obtain the offset address of the instruction to be read by the main CPU;
S520,响应于所述从CPU完成执行所述第二分支程序,则所述从CPU向所述主CPU发送通知;S520, in response to the slave CPU completing executing the second branch program, the slave CPU sends a notification to the master CPU;
S530,响应于所述主CPU接收到所述从CPU发送的通知,则所述主CPU跳转至内存,并根据所述偏移地址从所述内存中读取并执行所述第一 分支程序的后续指令。S530, in response to the master CPU receiving the notification sent by the slave CPU, the master CPU jumps to the memory, reads and executes the first branch program from the memory according to the offset address subsequent instructions.
具体地,下面继续以包含四个CPU的SoC系统为例进行说明,CPU1完成将uboot程序从非易失性闪存中迁移到内存后,则通知CPU0,由于此时CPU0正在进行驱动匹配,在没有接收到完成迁移的通知前,CPU0会依次从闪存中取第一分支程序的指令、数据等等,当收到完成迁移的通知后,由于CPU会通过寄存器记录下一待取指令的偏移地址,此后CPU0不再从非易失性闪存中取指令而是从内存中取指令直至第一分支程序全部完成。Specifically, the following continues to take a SoC system including four CPUs as an example. After CPU1 completes the migration of the uboot program from the non-volatile flash memory to the memory, it notifies CPU0. Since CPU0 is performing driver matching at this time, there is no Before receiving the notification to complete the migration, CPU0 will sequentially fetch the instructions, data, etc. of the first branch program from the flash memory. After receiving the notification of completing the migration, the CPU will record the offset address of the next instruction to be fetched through the register. , after which the CPU0 no longer fetches instructions from the non-volatile flash memory but fetches instructions from the memory until the first branch program is completely completed.
在又一个实施例中,本申请方法还包括:In yet another embodiment, the method of the present application further includes:
步骤S610,响应于多核片上系统uboot启动失败,则对多个CPU及计时器进行复位并返回至获取多个CPU的ID号的步骤。In step S610, in response to the failure to start the uboot of the multi-core system-on-chip, reset the multiple CPUs and timers and return to the step of acquiring the ID numbers of the multiple CPUs.
可选地,本申请的方法还包括:Optionally, the method of the present application also includes:
S620,对多核片上系统uboot启动失败的次数进行统计;S620, count the number of times that the uboot fails to start the multi-core SoC;
S630,响应于启动失败的次数超过预设值,则确认非易失闪存中uboot程序故障并发出告警。S630, in response to the number of startup failures exceeding a preset value, confirm the failure of the uboot program in the non-volatile flash memory and issue an alarm.
上述一种多核片上系统的uboot启动方法,当且仅当第一分支程序和第二分支程序都执行完成时uboot才成功启动,当任何一种情形下允许系统再次尝试启动uboot,并且为了防止多核片上系统CPU资源的浪费反复的执行无效的uboot启动还能够自动的对异常情形进行报警,便于运维人员及时发现并维护,并且在一定限度内允许错误情形下自动的重新启动,实现了自动的多次启动uboot,尽可能保证多核片上系统的uboot能够正常启动。The above-mentioned uboot startup method of a multi-core system-on-chip, if and only when the first branch program and the second branch program are executed, uboot is successfully started, and in any case, the system is allowed to try to start uboot again, and in order to prevent multi-core The waste of CPU resources of the on-chip system, repeated execution of invalid uboot startup, can also automatically alarm the abnormal situation, which is convenient for operation and maintenance personnel to find and maintain in time, and allows automatic restart in the event of an error within a certain limit, which realizes automatic Start uboot several times to ensure that the uboot of the multi-core SoC can be started normally.
在又一个实施例中,请参照图2所示,本申请还提供了一种核片上系统的uboot启动装置70,所述装置包括:In yet another embodiment, please refer to FIG. 2 , the present application further provides a uboot boot device 70 for a core system on a chip, the device includes:
ID号获取模块71,用于在系统上电时,则获取多个CPU的ID号;The ID number acquisition module 71 is used to acquire the ID numbers of multiple CPUs when the system is powered on;
程序划分模块72,用于根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序;The program dividing module 72 is used for dividing the uboot program stored in the non-volatile flash memory into a plurality of branch programs according to a plurality of ID numbers;
匹配模块73,用于利用每一CPU根据ID号分别从所述非易失闪存中 匹配对应的分支程序并执行; Matching module 73, for utilizing each CPU to match corresponding branch program and execute respectively from described non-volatile flash memory according to ID number;
启动完成确认单元74,用在多个CPU均执行完成对应的分支程序时,则确认多核片上系统完成uboot启动。The startup completion confirmation unit 74 is used to confirm that the multi-core system-on-a-chip completes the uboot startup when the corresponding branch programs are all executed by the multiple CPUs.
需要说明的是,关于多核片上系统的uboot启动装置的具体限定可以参见上文中对多核片上系统的uboot启动方法的限定,在此不再赘述。上述多核片上系统的uboot启动装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。It should be noted that, for the specific limitation of the uboot startup device of the multi-core system-on-a-chip, reference may be made to the limitation of the uboot startup method of the multi-core system-on-a-chip above, which will not be repeated here. Each module in the uboot boot device of the multi-core system-on-chip can be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
根据本申请的另一方面,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图请参照图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时实现以上所述的多核片上系统的uboot启动方法。According to another aspect of the present application, a computer device is provided, and the computer device may be a server. Please refer to FIG. 3 for an internal structure diagram of the computer device. The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned uboot startup method of the multi-core system-on-a-chip is realized.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双 数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, all It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

  1. 一种多核片上系统的uboot启动方法,其特征在于,所述方法包括:A uboot startup method of a multi-core system-on-a-chip, characterized in that the method comprises:
    响应于系统上电,则获取多个CPU的ID号;In response to the system being powered on, the ID numbers of multiple CPUs are obtained;
    根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序;Divide the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers;
    利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行;Utilize each CPU to match and execute the corresponding branch program from the non-volatile flash memory according to the ID number;
    响应于多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动。In response to the multiple CPUs executing the corresponding branch programs, it is confirmed that the multi-core system-on-a-chip completes the uboot startup.
  2. 根据权利要求1所述的方法,其特征在于,所述根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序的步骤包括:The method according to claim 1, wherein the step of dividing the uboot program stored in the non-volatile flash memory into a plurality of branch programs according to a plurality of ID numbers comprises:
    将uboot程序划分为第一分支程序和第二分支程序,其中,所述第一分支程序用于驱动匹配,所述第二分支程序用于对内存进行初始化以及将存储在非易失闪存中的uboot程序迁移至初始化后的内存中;The uboot program is divided into a first branch program and a second branch program, wherein the first branch program is used for driver matching, and the second branch program is used to initialize the memory and store the data stored in the non-volatile flash memory. The uboot program is migrated to the initialized memory;
    将所述第一分支程序和所述第二分支程序分别存储在所述非易失闪存的第一存储区域和第二存储区域。The first branch program and the second branch program are respectively stored in the first storage area and the second storage area of the nonvolatile flash memory.
  3. 根据权利要求2所述的方法,其特征在于,所述利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行的步骤包括:The method according to claim 2, wherein the step of using each CPU to match and execute a corresponding branch program from the non-volatile flash memory according to the ID number comprises:
    将每一CPU的ID号分别与第一预设ID号和第二预设ID号进行匹配;The ID number of each CPU is matched with the first preset ID number and the second preset ID number respectively;
    将与第一预设ID号对应的CPU记作主CPU,将与第二预设ID号对应的CPU记作从CPU;The CPU corresponding to the first preset ID number is denoted as the main CPU, and the CPU corresponding to the second preset ID number is denoted as the slave CPU;
    利用所述主CPU读取并执行所述非易失闪存的第一存储区域的第一分支程序;Utilize the main CPU to read and execute the first branch program of the first storage area of the non-volatile flash memory;
    利用所述从CPU读取并执行所述非易失闪存的第二存储区域的第二分支程序。The second branch program of the second storage area of the non-volatile flash memory is read and executed by the slave CPU.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    获取所述主CPU待读取指令的偏移地址;Obtain the offset address of the instruction to be read by the main CPU;
    响应于所述从CPU完成执行所述第二分支程序,则所述从CPU向所述主CPU发送通知;In response to the slave CPU completing the execution of the second branch program, the slave CPU sends a notification to the master CPU;
    响应于所述主CPU接收到所述从CPU发送的通知,则所述主CPU跳转至内存,并根据所述偏移地址从所述内存中读取并执行所述第一分支程序的后续指令。In response to the master CPU receiving the notification sent by the slave CPU, the master CPU jumps to the memory, and reads and executes the subsequent steps of the first branch program from the memory according to the offset address. instruction.
  5. 根据权利要求2所述的方法,其特征在于,所述响应于多个CPU均执行完成对应的分支程序,则确认多核片上系统完成uboot启动的步骤包括:The method according to claim 2, wherein the step of confirming that the multi-core system-on-a-chip completes the uboot startup in response to the execution of the corresponding branch programs by the multiple CPUs comprises:
    分别检测所述第一分支程序和所述第二分支程序是否执行完成;Detecting whether the first branch program and the second branch program are executed respectively;
    响应于所述第一分支程序和所述第二分支程序均执行完成,则确认多核片上系统完成uboot启动;In response to the completion of execution of both the first branch program and the second branch program, confirming that the multi-core system-on-a-chip completes uboot startup;
    响应于预设时间内所述第一分支程序和/或所述第二分支程序未完成执行,则确认多核片上系统uboot启动失败。In response to the fact that the first branch program and/or the second branch program has not been executed within a preset time, it is determined that the multi-core system-on-a-chip uboot fails to start.
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, wherein the method further comprises:
    响应于多核片上系统uboot启动失败,则对所述多个CPU及计时器进行复位并返回至获取多个CPU的ID号的步骤。In response to the failure to start the uboot of the multi-core system-on-chip, the multiple CPUs and timers are reset and the process returns to the step of acquiring the ID numbers of the multiple CPUs.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    对多核片上系统uboot启动失败的次数进行统计;Count the number of times the uboot failed to start the multi-core SoC;
    响应于启动失败的次数超过预设值,则确认非易失闪存中uboot程序故障并发出告警。In response to the number of startup failures exceeding the preset value, the failure of the uboot program in the non-volatile flash memory is confirmed and an alarm is issued.
  8. 一种多核片上系统的uboot启动装置,其特征在于,所述装置包括:A uboot boot device for a multi-core system-on-a-chip, characterized in that the device comprises:
    ID号获取模块,用于在系统上电时,则获取多个CPU的ID号;The ID number acquisition module is used to acquire the ID numbers of multiple CPUs when the system is powered on;
    程序划分模块,用于根据多个ID号将存储在非易失闪存中的uboot程序划分为多个分支程序;The program division module is used to divide the uboot program stored in the non-volatile flash memory into multiple branch programs according to multiple ID numbers;
    匹配模块,用于利用每一CPU根据ID号分别从所述非易失闪存中匹配对应的分支程序并执行;a matching module, for using each CPU to match the corresponding branch program from the non-volatile flash memory according to the ID number and execute it;
    启动完成确认单元,用在多个CPU均执行完成对应的分支程序时,则确认多核片上系统完成uboot启动。The startup completion confirmation unit is used to confirm that the multi-core on-chip system completes the uboot startup when the corresponding branch programs are executed by multiple CPUs.
  9. 一种计算机设备,其特征在于,包括:A computer equipment, characterized in that, comprising:
    至少一个处理器;以及at least one processor; and
    存储器,所述存储器存储有可在所述处理器中运行的计算机程序,所述处理器执行所述程序时执行权利要求1至7任意一项所述的方法。a memory, where the memory stores a computer program executable in the processor, and the processor executes the method according to any one of claims 1 to 7 when the processor executes the program.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时执行权利要求1至7任意一项所述的方法。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the method of any one of claims 1 to 7 is executed.
PCT/CN2021/143252 2021-01-29 2021-12-30 Uboot startup method and apparatus for multi-core system on chip, and device and storage medium WO2022161101A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110123712.2A CN112799729A (en) 2021-01-29 2021-01-29 Uboot starting method, device, equipment and storage medium of multi-core system on chip
CN202110123712.2 2021-01-29

Publications (1)

Publication Number Publication Date
WO2022161101A1 true WO2022161101A1 (en) 2022-08-04

Family

ID=75812711

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143252 WO2022161101A1 (en) 2021-01-29 2021-12-30 Uboot startup method and apparatus for multi-core system on chip, and device and storage medium

Country Status (2)

Country Link
CN (1) CN112799729A (en)
WO (1) WO2022161101A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799729A (en) * 2021-01-29 2021-05-14 苏州浪潮智能科技有限公司 Uboot starting method, device, equipment and storage medium of multi-core system on chip
CN115220990B (en) * 2021-12-09 2024-04-19 广州汽车集团股份有限公司 Multi-core system program flow monitoring method, device, equipment and storage medium
CN114489821B (en) * 2022-01-25 2024-06-07 中电科申泰信息科技有限公司 First-stage starting method of multi-core processor based on U-Boot

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336185B1 (en) * 1998-09-24 2002-01-01 Phoenix Technologies Ltd. Use of other processors during BIOS boot sequence to minimize boot time
JP2009175904A (en) * 2008-01-23 2009-08-06 Alpine Electronics Inc Multiprocessor processing system
CN105190550A (en) * 2013-03-15 2015-12-23 华为技术有限公司 Booting method for computer system with multiple central processing units
CN106325903A (en) * 2015-06-25 2017-01-11 中兴通讯股份有限公司 A start processing method and device
CN110557682A (en) * 2019-09-26 2019-12-10 四川长虹电器股份有限公司 Intelligent television quick starting method based on dual-core starting and dual-core intelligent television
CN112799729A (en) * 2021-01-29 2021-05-14 苏州浪潮智能科技有限公司 Uboot starting method, device, equipment and storage medium of multi-core system on chip

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336185B1 (en) * 1998-09-24 2002-01-01 Phoenix Technologies Ltd. Use of other processors during BIOS boot sequence to minimize boot time
JP2009175904A (en) * 2008-01-23 2009-08-06 Alpine Electronics Inc Multiprocessor processing system
CN105190550A (en) * 2013-03-15 2015-12-23 华为技术有限公司 Booting method for computer system with multiple central processing units
CN106325903A (en) * 2015-06-25 2017-01-11 中兴通讯股份有限公司 A start processing method and device
CN110557682A (en) * 2019-09-26 2019-12-10 四川长虹电器股份有限公司 Intelligent television quick starting method based on dual-core starting and dual-core intelligent television
CN112799729A (en) * 2021-01-29 2021-05-14 苏州浪潮智能科技有限公司 Uboot starting method, device, equipment and storage medium of multi-core system on chip

Also Published As

Publication number Publication date
CN112799729A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
WO2022161101A1 (en) Uboot startup method and apparatus for multi-core system on chip, and device and storage medium
US10585755B2 (en) Electronic apparatus and method for restarting a central processing unit (CPU) in response to detecting an abnormality
RU2437144C2 (en) Method to eliminate exception condition in one of nuclei of multinuclear system
US10802875B2 (en) Multithread framework for use in pre-boot environment of a system-on-chip
WO2015042925A1 (en) Server control method and server control device
WO2016206514A1 (en) Startup processing method and device
US6963970B2 (en) System and method for executing a fast reset of a computer system
CN114817105A (en) Method and device for device enumeration, computer device and storage medium
CN116266150A (en) Service recovery method, data processing unit and related equipment
US10824493B2 (en) Disambiguation of error logging during system reset
CN116521209B (en) Upgrading method and device of operating system, storage medium and electronic equipment
CN116627702A (en) Method and device for restarting virtual machine in downtime
US11500648B2 (en) Method for fast booting processors in a multi-processor architecture
JP2004302731A (en) Information processor and method for trouble diagnosis
US8176303B2 (en) Multiprocessor communication device and methods thereof
US11586536B1 (en) Remote configuration of multi-mode DIMMs through a baseboard management controller
US11204704B1 (en) Updating multi-mode DIMM inventory data maintained by a baseboard management controller
US7673125B2 (en) Resetting multiple cells within a partition of a multiple partition computer system
TWI554876B (en) Method for processing node replacement and server system using the same
JP4853620B2 (en) Multiprocessor system and initial startup method and program
CN116991637B (en) Operation control method and device of embedded system, electronic equipment and storage medium
CN114189305B (en) Time synchronization method, device, equipment and readable storage medium
JPS58181160A (en) Controlling system of emergency operation
CN113377566B (en) UEFI-based server starting method, device and storage medium
JP2785992B2 (en) Server program management processing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21922689

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21922689

Country of ref document: EP

Kind code of ref document: A1