WO2012119380A1 - Code implementing method, system and device for reset vector - Google Patents

Code implementing method, system and device for reset vector Download PDF

Info

Publication number
WO2012119380A1
WO2012119380A1 PCT/CN2011/078181 CN2011078181W WO2012119380A1 WO 2012119380 A1 WO2012119380 A1 WO 2012119380A1 CN 2011078181 W CN2011078181 W CN 2011078181W WO 2012119380 A1 WO2012119380 A1 WO 2012119380A1
Authority
WO
WIPO (PCT)
Prior art keywords
core
reset vector
processing branch
chip
variable value
Prior art date
Application number
PCT/CN2011/078181
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 华为技术有限公司
Priority to CN201180001478.0A priority Critical patent/CN102326145B/en
Priority to PCT/CN2011/078181 priority patent/WO2012119380A1/en
Publication of WO2012119380A1 publication Critical patent/WO2012119380A1/en

Links

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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • 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/4403Processor initialisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Advance Control (AREA)
  • Multi Processors (AREA)

Abstract

A code implementing method, system and device for a reset vector, applied to the technical field of electronics. The code implementing method for a reset vector includes: when the current core needs to enter a corresponding processing branch, invoking a jump instruction in a reset vector shared by a plurality of cores, with the jump instruction including jmp (processing branch ingress) for indicating that a jump register serves as a processing branch ingress, and the logic addresses of the on-chip private memories corresponding to the plurality of cores being identical; reading a global variable value in the on-chip private memory of the current core, with the global variable value being used for indicating the address of the processing branch ingress corresponding to the current core; and using the read global variable value as the content of the processing branch ingress in the jump instruction, and jumping to the corresponding processing branch ingress in the off-chip shared memory. Therefore, the code implementation process for the reset vector is performed.

Description

一种复位向量的代码实现方法、 系统及设备  Code implementation method, system and device for reset vector
技术领域 Technical field
本发明涉及电子技术领域,特别涉及一种复位向量的代码实现方法、 系统 及设备。  The present invention relates to the field of electronic technologies, and in particular, to a code implementation method, system and device for a reset vector.
背景技术 Background technique
一般在处理系统中都包括处理器比如数字信号处理器 (Digital Signal Processor, DSP ), 或中央处理器( Central Processing Unit, CPU )等, 和内存, 其中处理器可以是单核处理器, 也可以是多核处理器。处理系统在进入业务层 进行业务处理的过程中, 都需要先通过底层操作来启动, 即将可执行文件 ( Image文件)中的代码加载到内存中, 由处理器调用执行内存中加载的代码 逐步完成内核硬件资源、 BSS ( Block Started by Symbol段、 libc库等的初始化, 并最终调用 Image文件中的主(main )函数从而进入业务层进行业务处理。 其 中在 Image文件中包括实现某些功能的代码,处理器调用执行内存中的代码即 为代码的实现过程。  Generally, the processing system includes a processor such as a digital signal processor (DSP), or a central processing unit (CPU), and the like, and the processor may be a single core processor, or It is a multi-core processor. When the processing system enters the business layer for business processing, it needs to be started by the underlying operation, and the code in the executable file (Image file) is loaded into the memory, and the code loaded by the processor to execute the execution in the memory is gradually completed. Kernel hardware resources, BSS (Block Started by Symbol section, libc library, etc. initialization, and finally call the main (main) function in the Image file to enter the business layer for business processing. In the Image file includes code to achieve some functions The processor calls the execution of the code in memory as the implementation of the code.
对于包括单个核的处理器,内存中包括一个用于上电或复位启动的复位向 量(reset vector ), 在该处理器进入业务层前, 需要将 Image文件的部分代码 加载到复位向量,该单核处理器调用执行复位向量中加载的代码从而进入业务 层。  For a processor that includes a single core, the memory includes a reset vector for power-on or reset-initiation. Before the processor enters the service layer, part of the code of the Image file needs to be loaded into the reset vector. The core processor calls the code loaded in the reset vector to enter the business layer.
而对于包括多个核的处理器, 其内存分为两种类型, 即各个核(core )的 片外共享内存, 比如二级内存(L2 ), 和每个核对应的片内私有内存, 比如一 级内存(Ll )。 一种情况下, 在每个核的片内私有内存中可以包括一个对应的 复位向量, 可以加载每个核对应的 Image文件中的特定代码, 则每个核可以分 别从对应片内私有内存中的复位向量启动从而进入业务层; 另一种情况下,在 片外共享内存中可以包括至少一个复位向量,加载多个核对应的 Image文件中 的共享代码,则各个核都可以从片外共享内存中的复位向量启动从而进入业务 层, 且各个核需要通过调用复位向量的代码, 来进入各自的处理分支, 现有一 种方案是:  For a processor that includes multiple cores, the memory is divided into two types, namely, off-chip shared memory of each core, such as secondary memory (L2), and on-chip private memory corresponding to each core, such as Primary memory (Ll). In one case, a corresponding reset vector may be included in the on-chip private memory of each core, and a specific code in the image file corresponding to each core may be loaded, and each core may be separately from the corresponding on-chip private memory. The reset vector is started to enter the service layer; in another case, at least one reset vector may be included in the off-chip shared memory, and the shared code in the image file corresponding to multiple cores is loaded, and each core can be shared from off-chip. The reset vector in memory is started to enter the service layer, and each core needs to enter the respective processing branches by calling the code of the reset vector. The existing scheme is:
在各个核调用执行共享的复位向量代码的过程中,如果当前核需要进入对 应的处理分支时, 核(即处理器中的一个处理单元)会从硬件寄存器中读取当 前核的标识( ID ) ,调用复位向量中跳转指令即 jmp(当前核的标识对应的 Image 文件分支入口名), 并跳转到对应的 Image文件分支入口地址, 这样就实现了 当前核跳转到对应的处理分支。 During the execution of the shared reset vector code by each core call, if the current core needs to enter the corresponding processing branch, the core (ie, one processing unit in the processor) will read from the hardware register. The identifier of the pre-core (ID), the jump instruction in the reset vector is called jmp (the image file branch entry name corresponding to the current core identifier), and jumps to the corresponding image file branch entry address, thus realizing the current nuclear jump. Go to the corresponding processing branch.
而现有技术中复位向量中代码的实现是与业务布局直接绑定的,比如在业 务场景 1中, CPU1对应执行 Image 1 ,而在业务场景 2中 CPU1对应执行 Image 0, 如果发生业务场景的切换时, 需要对复位向量中跳转指令进行修改, 即由 原来的 jmp ( Image 1 )修改为 jmp ( Image 0 ), 这样各个核在对共享的复位向 量处理后, 才能跳转到正确的处理分支; 且底层还需要发布新的 Lib库给业务 层。 这样在业务场景发生变化时, 需要对复位向量中代码进行修改, 并重新加 载到处理系统的内存中进入业务层, 操作比较复杂。  In the prior art, the implementation of the code in the reset vector is directly bound to the service layout. For example, in service scenario 1, CPU1 executes Image1, and in service scenario 2, CPU1 executes Image0, if a business scenario occurs. When switching, you need to modify the jump instruction in the reset vector, that is, the original jmp ( Image 1 ) is modified to jmp ( Image 0 ), so that each core can be jumped to the correct processing after processing the shared reset vector. Branch; and the underlying layer also needs to release a new Lib library to the business layer. In this way, when the service scenario changes, the code in the reset vector needs to be modified and reloaded into the memory of the processing system to enter the service layer, which is complicated.
发明内容 Summary of the invention
本发明实施例提供一种复位向量的代码实现方法、 系统及设备, 实现了多 核处理器的多个核共享的复位向量中代码的实现与业务布局的无关,从而简化 业务场景发生变化时复位向量中代码的实现过程。  The embodiment of the invention provides a code implementation method, system and device for a reset vector, which realizes that the implementation of the code in the reset vector shared by multiple cores of the multi-core processor is independent of the service layout, thereby simplifying the reset vector when the service scene changes. The implementation process of the code.
本发明实施例提供一种复位向量的代码实现方法, 包括:  Embodiments of the present invention provide a code implementation method for a reset vector, including:
当前核需要进入对应的处理分支时,调用多个核共享的复位向量中的跳转 指令, 所述跳转指令包括 jmp (处理分支入口), 用于指示跳转的寄存器为处 理分支入口, 所述多个核对应的片内私有内存的逻辑地址相同;  When the current core needs to enter the corresponding processing branch, the jump instruction in the reset vector of the multiple cores is called, and the jump instruction includes jmp (processing branch entry), and the register for indicating the jump is the processing branch entry. The logical addresses of the on-chip private memory corresponding to the plurality of cores are the same;
读取所述当前核的片内私有内存中的全局变量值,所述全局变量值用来指 示所述当前核对应的处理分支入口地址;  Reading a global variable value in the on-chip private memory of the current core, where the global variable value is used to indicate a processing branch entry address corresponding to the current core;
将所述读取的全局变量值作为所述跳转指令中处理分支入口的内容,跳转 到片外共享内存中对应的处理分支入口  The read global variable value is used as the processing branch entry in the jump instruction, and jumps to the corresponding processing branch entry in the off-chip shared memory.
本发明实施例提供一种处理器核, 其特征在于, 包括:  The embodiment of the invention provides a processor core, which includes:
函数调用单元, 用于当前核需要进入对应的处理分支时, 调用多个核共享 的复位向量中的跳转指令, 所述跳转指令包括 jmp (处理分支入口), 用于指 示跳转的寄存器为处理分支入口,所述多个核对应的片内私有内存的逻辑地址 相同;  a function calling unit, configured to invoke a jump instruction in a reset vector of a plurality of cores when the current core needs to enter a corresponding processing branch, where the jump instruction includes jmp (processing branch entry), a register for indicating a jump To process the branch entry, the logical addresses of the on-chip private memory corresponding to the multiple cores are the same;
变量读取单元, 用于读取所述当前核的片内私有内存中的全局变量值, 所 述全局变量值用来指示所述当前核对应的处理分支入口地址; 跳转单元,用于将所述变量读取单元读取的全局变量值作为所述跳转指令 中处理分支入口的内容, 跳转到片外共享内存中对应的处理分支入口。 a variable reading unit, configured to read a global variable value in the on-chip private memory of the current core, where the global variable value is used to indicate a processing branch entry address corresponding to the current core; And a jump unit, configured to use the global variable value read by the variable reading unit as the processing branch entry in the jump instruction, and jump to a corresponding processing branch entry in the off-chip shared memory.
本发明实施例提供一种多核处理器, 包括: 多个核, 各个核对应的片内私 有内存, 和片外共享内存;  An embodiment of the present invention provides a multi-core processor, including: multiple cores, on-chip private memory corresponding to each core, and off-chip shared memory;
所述核, 用于当前核需要进入对应的处理分支时, 调用多个核共享的复位 向量中的跳转指令, 所述跳转指令包括 jmp (处理分支入口), 用于指示跳转 的寄存器为处理分支入口, 所述多个核对应的片内私有内存的逻辑地址相同; 读取所述当前核的片内私有内存中的全局变量值,所述全局变量值用来指示所 述当前核对应的处理分支入口地址;将所述读取的全局变量值作为所述跳转指 令中处理分支入口的内容, 跳转到片外共享内存中对应的处理分支入口;  The core, when the current core needs to enter a corresponding processing branch, invokes a jump instruction in a reset vector shared by multiple cores, where the jump instruction includes jmp (processing branch entry), a register for indicating a jump In order to process the branch entry, the logical addresses of the on-chip private memory corresponding to the multiple cores are the same; the global variable value in the on-chip private memory of the current core is read, and the global variable value is used to indicate the current core Corresponding processing branch entry address; using the read global variable value as the processing branch entry in the jump instruction, and jumping to a corresponding processing branch entry in the off-chip shared memory;
所述片内私有内存, 用于储存对应核的全局变量值;  The on-chip private memory is used to store a global variable value of the corresponding core;
所述片外共享内存, 用于加载所述多个核共享的复位向量,及各个核的处 理分支。  The off-chip shared memory is used to load a reset vector shared by the plurality of cores, and a processing branch of each core.
本发明实施例还提供一种处理系统, 包括上述多核处理器。  The embodiment of the invention further provides a processing system, including the multi-core processor described above.
本发明实施例提供一种计算机系统,包括外部接口、芯片共享内存和总线, 其特征在于, 所述计算机系统还包括上述多核处理器。  Embodiments of the present invention provide a computer system including an external interface, a chip shared memory, and a bus, wherein the computer system further includes the multi-core processor.
本发明实施例中对于多核处理器中多个核共享复位向量时,在复位向量的 代码实现过程中, 各个核调用复位向量中的跳转指令,且读取对应片内私有内 存中的全局变量值,将读取的全局变量值作为跳转指令中跳转的寄存器中的内 容, 从而实现当前核跳转到对应的处理分支入口。  In the embodiment of the present invention, when a reset vector is shared by multiple cores in a multi-core processor, in the code implementation process of the reset vector, each core calls a jump instruction in the reset vector, and reads a global variable in the corresponding on-chip private memory. The value, the global variable value to be read is used as the content of the jump register in the jump instruction, so that the current core jumps to the corresponding processing branch entry.
由于多个核对应的片内私有内存的逻辑地址相同,则复位向量中读取全局 对于多个核来说跳转指令中跳转的寄存器相同,则复位向量中跳转到各个核的 处理分支入口的代码也不会随着核的改变而改变。 因此,如果业务场景发生改 变时, 就不需要对复位向量的代码进行修改,但是需要更新相应核的片内私有 内存中储存的全局变量值。实现了多核处理器中多个核中共享的复位向量中代 码的实现与业务布局的无关,从而简化业务场景发生变化时复位向量中代码的 实现过程。  Since the logical addresses of the on-chip private memory corresponding to the multiple cores are the same, the global read in the reset vector is the same for the jumps in the jump instruction for the multiple cores, and the processing branches in the reset vector jump to the respective cores. The code for the entry will not change as the core changes. Therefore, if the business scenario changes, there is no need to modify the code of the reset vector, but the global variable value stored in the on-chip private memory of the corresponding core needs to be updated. The realization of the code in the reset vector shared by multiple cores in the multi-core processor is independent of the service layout, thereby simplifying the implementation process of the code in the reset vector when the service scene changes.
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1是本发明实施例提供的多核处理器的结构示意图;  1 is a schematic structural diagram of a multi-core processor according to an embodiment of the present invention;
图 2是本发明方法实施例提供的一种复位向量的代码实现方法的流程图; 图 3是本发明实施例提供的可执行文件加载到内存中的结构示意图; 图 4是本发明实施例提供的两个核共享一个复位向量时,在各个核从片外 共享内存启动的过程中, 复位向量的代码实现示意图;  2 is a flowchart of a code implementation method of a reset vector according to an embodiment of the present invention; FIG. 3 is a schematic structural diagram of loading an executable file into a memory according to an embodiment of the present invention; When two cores share a reset vector, the code implementation of the reset vector is implemented during the startup of each core from the off-chip shared memory;
图 5是本发明实施例提供的一种处理器核的结构示意图;  5 is a schematic structural diagram of a processor core according to an embodiment of the present invention;
图 6是本发明实施例提供的另一种处理器核的结构示意图;  6 is a schematic structural diagram of another processor core according to an embodiment of the present invention;
图 7是本发明实施例提供的一种多核处理器的结构示意图;  7 is a schematic structural diagram of a multi-core processor according to an embodiment of the present invention;
图 8是本发明一个具体实施例中处理系统的芯片的结构示意图;  8 is a schematic structural diagram of a chip of a processing system in an embodiment of the present invention;
图 9是本发明实施例提供的一种计算机系统的结构示意图。  FIG. 9 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
具体实施方式 detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
本发明实施例提供的一种复位向量的代码实现方法, 适用于多核处理器 中, 多个核共享一个复位向量的情况。  A code implementation method for a reset vector provided by an embodiment of the present invention is applicable to a case where multiple cores share a reset vector in a multi-core processor.
参考图 1所示,对于一个多核处理器来说, 包括内存和多个核即多个处理 单元,其中处理器中的核可以是 CPU,也可以是 DSP,还可以是 CPU和 DSP, 还可以其它的核, 图 1中以两个 CPU和两个 DSP为例说明; 而内存可以分为 两种类型, 即各个核分别对应的片内私有内存(比如 L1 ), 及各个核共享的片 外共享内存 (比如 L2 )。  Referring to FIG. 1 , for a multi-core processor, a memory and a plurality of cores, that is, multiple processing units, wherein the core in the processor may be a CPU, a DSP, a CPU, and a DSP may also be used. The other cores are illustrated by two CPUs and two DSPs in Figure 1. The memory can be divided into two types, namely, the on-chip private memory corresponding to each core (such as L1), and the off-chip shared by each core. Shared memory (such as L2).
在本发明实施例中,在片外共享内存中包括至少一个复位向量, 图 1中以 两个复位向量为例说明, 即两个 CPU共享的第一复位向量和两个 DSP共享的 第二复位向量。在这些共享的复位向量中, 可以加载多个核对应的 Image文件 中的共享代码,则各个核都可以从片外共享内存中的复位向量启动从而进入业 务层, 且各个核需要通过调用复位向量的代码, 来进入各自的处理分支, 具体 地: In the embodiment of the present invention, at least one reset vector is included in the off-chip shared memory. In FIG. 1, two reset vectors are taken as an example, that is, a first reset vector shared by two CPUs and a second reset shared by two DSPs. vector. In these shared reset vectors, you can load image files corresponding to multiple cores. In the shared code, each core can be started from the reset vector in the off-chip shared memory to enter the service layer, and each core needs to enter the respective processing branches by calling the code of the reset vector, specifically:
各个核可以通过本发明的复位向量的代码实现方法,从而进入各自的处理 分支, 方法流程图如图 2所示, 包括:  Each core can be implemented by the code implementation method of the reset vector of the present invention, thereby entering the respective processing branches. The method flow chart is as shown in FIG. 2, and includes:
步骤 101 , 当前核需要进入对应的处理分支时, 调用多个核共享的复位向 量中的跳转指令, 该跳转指令包括 jmp (处理分支入口)。  Step 101: When the current core needs to enter the corresponding processing branch, call a jump instruction in the reset vector of the multiple cores, where the jump instruction includes jmp (processing branch entry).
可以理解, 参考图 3所示, 在处理系统上电启动前, 各个核需要先将对应 的 Image文件的代码分别加载到片内私有内存和片外共享内存中, 具体地,将 Image文件中的片内私有内存(以 L1为例 ) 的内容加载(即储存 )到对应核 的片内私有内存中 (如图 3中用黑点填充的部分), 包括全局变量的值, 其中 全局变量可以记为 Image文件进程( Image Dispatch ), 而该全局变量的值用来 指示对应核对应的处理分支入口地址;将 Image文件中片外共享内存的内容加 载到片外共享内存中, 包括各个核对应处理分支的代码和数据; 将 Image文件 中复位向量的代码(如图 3中斜线填充的部分)加载到片外共享内存中的复位 向量处。  It can be understood that, as shown in FIG. 3, before the processing system is powered on, each core needs to first load the code of the corresponding Image file into the on-chip private memory and the off-chip shared memory, specifically, the image file. The content of the on-chip private memory (in the case of L1 is loaded) is loaded into the on-chip private memory of the corresponding core (as shown in Figure 3 with black dots), including the value of the global variable, where the global variable can be recorded. The image file process (Image Dispatch), and the value of the global variable is used to indicate the processing branch entry address corresponding to the corresponding core; the content of the off-chip shared memory in the Image file is loaded into the off-chip shared memory, including the corresponding processing of each core. Branch code and data; Load the code of the reset vector in the Image file (the portion filled with the slash in Figure 3) into the reset vector in the off-chip shared memory.
在加载完 Image文件的代码后,各个核都从片外共享内存中的复位向量处 启动 (即复位向量的代码实现过程), 具体地, 每个核会调用执行复位向量中 加载的代码逐步完成内核硬件资源、 BSS段、 libc库等的初始化, 并最终调用 main函数从而进入业务层进行业务处理。  After loading the code of the Image file, each core is started from the reset vector in the off-chip shared memory (ie, the code implementation process of the reset vector). Specifically, each core will call the code loaded in the execution reset vector to be completed step by step. Kernel hardware resources, BSS segments, libc libraries, etc. are initialized, and finally the main function is called to enter the business layer for business processing.
在上述进入业务层的过程中,各个核需要通过调用复位向量的代码来进入 各自的处理分支。对于其中一个核来说,如果当前核需要进入对应的处理分支 时, 需要通过调用复位向量中的跳转指令, 并执行该跳转指令从而进入处理分 支。 该跳转指令包括 jmp ( X ) , 其中 X表示跳转的寄存器, 在本发明实施例中 跳转的寄存器为处理分支入口, 可以记为 Image 文件进程的入口 (Image Dispatch Entry ), 则本实施例中跳转指令用来指示跳转的寄存器为处理分支入 口。 对于共享复位向量的多个核来说, 跳转指令中跳转的寄存器 X是相同的, 则多个核跳转到对应处理分支的跳转指令的二进制编码相同。  In the above process of entering the service layer, each core needs to enter the respective processing branches by calling the code of the reset vector. For one of the cores, if the current core needs to enter the corresponding processing branch, it needs to call the jump instruction in the reset vector and execute the jump instruction to enter the processing branch. The jump instruction includes jmp ( X ), where X represents a jump register, and in the embodiment of the present invention, the jump register is a processing branch entry, which can be recorded as an image file process entry (Image Dispatch Entry), then the implementation In the example, the jump instruction is used to indicate that the jump register is the processing branch entry. For multiple cores sharing a reset vector, the register X of the jump in the jump instruction is the same, and the binary code of the jump instruction of the multiple cores to the corresponding processing branch is the same.
步骤 102, 读取当前核的片内私有内存中的全局变量值, 该全局变量值用 来指示当前核对应的处理分支入口地址。 Step 102: Read a global variable value in the on-chip private memory of the current core, where the global variable value is used. Indicates the processing branch entry address corresponding to the current core.
可以理解, 本发明实施例中,各个核的片内私有内存中加载的全局变量的 逻辑地址是相同的,但是全局变量值却是不同的。各个核在进行上述的加载过 程前, 对片内私有内存和 L2的访问都是釆用链接技术, 通过链接脚本直接链 接到相应的空间,而多个核在访问对应的片内私有内存时釆用逻辑地址是相同 的。 则对于多个核来说, 在实现读取全局变量值的过程中, 复位向量的代码段 是相同的。  It can be understood that, in the embodiment of the present invention, the logical addresses of global variables loaded in the on-chip private memory of each core are the same, but the global variable values are different. Before each core performs the above loading process, the access to the on-chip private memory and L2 is a link technology, which is directly linked to the corresponding space through the link script, and multiple cores access the corresponding on-chip private memory. The logical address is the same. For multiple cores, the code segment of the reset vector is the same during the process of reading the global variable value.
步骤 103 , 将步骤 102中读取的全局变量值作为跳转指令中处理分支入口 的内容, 跳转到片外共享内存中对应的处理分支入口。  Step 103: The global variable value read in step 102 is used as the processing branch entry in the jump instruction, and jumps to the corresponding processing branch entry in the off-chip shared memory.
核在执行跳转指令时,会将读取的全局变量值作为跳转指令中跳转的寄存 器即处理分支入口的内容, 具体地,核会将步骤 102中读取的全局变量值读到 跳转指令中跳转的寄存器即处理分支入口中, 即 jmp ( X ) 的 X中, 并根据该 跳转的寄存器 X中的具体内容实施跳转,从而实现当前核跳转到对应的处理分 支入口。  When the core executes the jump instruction, the read global variable value is used as the jump register in the jump instruction, that is, the content of the branch entry is processed. Specifically, the core reads the value of the global variable read in step 102 to the jump. The register that jumps in the instruction is processed in the branch entry, that is, the X in jmp ( X ), and the jump is implemented according to the specific content in the jump register X, thereby realizing the current core jump to the corresponding processing branch entry. .
可见, 本发明实施例中在多核处理器中多个核共享复位向量时, 在复位向 量的代码实现过程中,各个核调用复位向量中的跳转指令,且读取对应片内私 有内存中的全局变量值,将读取的全局变量值作为跳转指令中跳转的寄存器中 的内容, 从而实现各个核跳转到对应的处理分支入口。  It can be seen that, in the embodiment of the present invention, when multiple cores share a reset vector in the multi-core processor, in the code implementation process of the reset vector, each core calls a jump instruction in the reset vector, and reads the corresponding in-chip private memory. The global variable value is used as the content of the jump register in the jump instruction, so that each core jumps to the corresponding processing branch entry.
由于多个核对应的片内私有内存的逻辑地址相同,则复位向量中读取全局 变量值的代码是不会随着各个核对应处理分支入口地址的改变而发生改变;且 对于多个核来说跳转指令中跳转的寄存器相同,则复位向量中跳转到各个核的 处理分支入口的代码也不会随着核的改变而改变。 因此,如果业务场景发生改 变时,比如在业务场景 1中 , CPU1对应执行 Image 1 ,而在业务场景 2中 CPU2 对应执行 Image 1 , 当从业务场景 1切换到业务场景 2时, 在复位向量中读取 全局变量值和跳转的代码段都不会变化, 就不需要对复位向量的代码进行修 改,但是需要更新相应核的片内私有内存中储存的全局变量值。 实现了多核处 理器中多个核共享的复位向量中代码的实现与业务布局的无关,从而简化业务 场景发生变化时复位向量中代码的实现过程。  Since the logical addresses of the on-chip private memory corresponding to the multiple cores are the same, the code for reading the global variable value in the reset vector does not change with the change of the branch entry address of each core corresponding processing branch; and for multiple cores If the jump register in the jump instruction is the same, the code in the reset vector that jumps to the processing branch entry of each core will not change with the change of the core. Therefore, if the business scenario changes, such as in business scenario 1, CPU1 executes Image1, and in business scenario 2, CPU2 executes Image1, and when switching from service scenario 1 to business scenario 2, in the reset vector. The code segment for reading the global variable value and the jump does not change, and there is no need to modify the code of the reset vector, but it is necessary to update the value of the global variable stored in the on-chip private memory of the corresponding core. The implementation of the code in the reset vector shared by multiple cores in the multi-core processor is independent of the service layout, thereby simplifying the implementation process of the code in the reset vector when the service scene changes.
需要说明的是, 多个核从片外共享内存中复位向量处的启动可以同时执 行, 也可以顺序执行, 上述步骤 101到 103只是其中一个核启动的过程中, 复 位向量的代码实现方法。且在执行上述步骤之前, 需要将各个核对应的处理分 支入口地址分别储存为各个核的片内私有内存中的全局变量值。 It should be noted that multiple cores can be simultaneously activated from the reset vector in the off-chip shared memory. The lines may also be sequentially executed. The above steps 101 to 103 are only the code implementation methods of the reset vector in the process of one of the core starts. Before performing the above steps, the processing branch entry addresses corresponding to the cores are respectively stored as global variable values in the on-chip private memory of each core.
参考图 4所示为两个核 0和 1共享一个复位向量时, 在各个核从 L2层启 动的过程中, 复位向量的代码实现示意图, 其中各个核都分别从各自的片内私 有内存中读取全局变量值,以该值作为各个核的处理分支入口地址并跳转到处 理分支入口。且在复位向量中, 这两个核 0和 1对于读取各自片内私有内存中 全局变量值, 及跳转到处理分支入口的代码段是相同的。 本发明实施例提供一种处理器核,该处理器核可以是 CPU,也可以是 DSP, 其结构示意图如图 5所示, 包括:  Referring to FIG. 4, when two cores 0 and 1 share a reset vector, in the process of starting each core from the L2 layer, a code implementation diagram of the reset vector is obtained, in which each core is read from its own on-chip private memory. Take the value of the global variable, use this value as the processing branch entry address of each core and jump to the processing branch entry. And in the reset vector, the two cores 0 and 1 are identical for reading the global variable values in the respective on-chip private memory and jumping to the code segment of the processing branch entry. The embodiment of the invention provides a processor core, which may be a CPU or a DSP. The schematic diagram of the structure is as shown in FIG. 5, and includes:
函数调用单元 10, 用于当前核需要进入对应的处理分支时, 调用多个核 共享的复位向量中的跳转指令, 所述跳转指令包括 jmp (处理分支入口), 用 于指示跳转的寄存器为处理分支入口,所述多个核对应的片内私有内存的逻辑 地址相同;  The function invoking unit 10 is configured to invoke a jump instruction in a reset vector of the plurality of cores when the current core needs to enter the corresponding processing branch, where the jump instruction includes jmp (processing branch entry), and is used to indicate the jump The register is a processing branch entry, and the logical addresses of the on-chip private memory corresponding to the multiple cores are the same;
变量读取单元 11 , 用于读取所述当前核的片内私有内存中的全局变量值, 所述全局变量值用来指示所述当前核对应的处理分支入口地址;  The variable reading unit 11 is configured to read a global variable value in the on-chip private memory of the current core, where the global variable value is used to indicate a processing branch entry address corresponding to the current core;
跳转单元 12, 用于将所述变量读取单元 10读取的全局变量值作为所述函 数调用单元 11调用的跳转指令中处理分支入口的内容, 跳转到片外共享内存 中对应的处理分支入口。  The jump unit 12 is configured to use the global variable value read by the variable reading unit 10 as the processing branch entry in the jump instruction called by the function calling unit 11 to jump to the corresponding content in the off-chip shared memory. Process branch entries.
具体地,跳转单元 12会将变量读取单元 11读取的全局变量值读到跳转指 令中跳转的寄存器中, 即处理分支入口中, 并根据该跳转的寄存器中的具体内 容实施跳转, 从而实现当前核跳转到对应的处理分支入口。  Specifically, the jump unit 12 reads the value of the global variable read by the variable reading unit 11 into the jump register in the jump instruction, that is, processes the branch entry, and implements according to the specific content in the jump register. Jump, thereby implementing the current core jump to the corresponding processing branch entry.
需要说明的是,共享复位向量的多个核对应片内私有内存中储存的全局变 量逻辑地址相同, 不同的是该全局变量的具体取值; 且多个核在执行复位向量 的跳转指令时, 调用的跳转指令的二进制编码相同。  It should be noted that the multiple cores sharing the reset vector have the same global logical address stored in the private memory of the slice, and the difference is the specific value of the global variable; and multiple cores execute the jump instruction of the reset vector. The binary code of the jump instruction called is the same.
可见, 本发明实施例的处理器核与其它处理器核共享复位向量时,在复位 向量的代码实现过程中, 各个核的函数调用单元 10调用复位向量中的跳转指 令, 且变量读取单元 11读取对应片内私有内存中的全局变量值, 跳转单元 12 将读取的全局变量值作为跳转指令中跳转的寄存器中的内容,从而实现核跳转 到对应的处理分支入口。 It can be seen that, when the processor core of the embodiment of the present invention shares the reset vector with other processor cores, in the code implementation process of the reset vector, the function calling unit 10 of each core calls the jump instruction in the reset vector, and the variable reading unit 11 reads the value of the global variable in the private memory corresponding to the slice, and the jump unit 12 uses the value of the global variable read as the content of the jump register in the jump instruction, thereby implementing the core jump Go to the corresponding processing branch entry.
由于多个核对应的片内私有内存的逻辑地址相同,则复位向量中读取全局 变量值的代码是不会随着各个核的处理分支入口的改变而发生改变;且对于多 个核来说跳转指令中跳转的寄存器是相同的,则复位向量中跳转到各个核的处 理分支入口的代码也不会随着核的改变而改变。 因此,如果业务场景发生改变 时, 复位向量中读取全局变量值和跳转的代码段都不会变化, 就不需要对复位 向量的代码进行修改。实现了多核处理器的多个核共享的复位向量中代码的实 现与业务布局的无关,从而简化业务场景发生变化时复位向量中代码的实现过 程。  Since the logical addresses of the on-chip private memory corresponding to the multiple cores are the same, the code for reading the global variable value in the reset vector does not change with the change of the processing branch entry of each core; and for multiple cores The registers that jump in the jump instruction are the same, and the code in the reset vector that jumps to the processing branch entry of each core does not change as the core changes. Therefore, if the business scenario changes, the code segment that reads the global variable value and the jump in the reset vector does not change, and the code of the reset vector does not need to be modified. The implementation of the code in the reset vector of multiple cores shared by the multi-core processor is independent of the service layout, thereby simplifying the implementation process of the code in the reset vector when the service scene changes.
参考如图 6所示, 在其他具体的处理器核实施例中, 处理器核除了包括如 图 5所示的结构外, 还可以包括: 地址储存单元 13和变量值更新单元 14, 其 中:  Referring to FIG. 6, in other specific processor core embodiments, the processor core includes, in addition to the structure shown in FIG. 5, an address storage unit 13 and a variable value updating unit 14, wherein:
地址储存单元 13 , 用于将所述当前核对应的处理分支入口地址储存为所 述当前核的片内私有内存中的全局变量值;  The address storage unit 13 is configured to store the processing branch entry address corresponding to the current core as a global variable value in the on-chip private memory of the current core;
变量值更新单元 14, 用于更新所述当前核的片内私有内存中储存的全局 变量值。  The variable value updating unit 14 is configured to update the global variable value stored in the on-chip private memory of the current core.
本实施例中的地址储存单元 13可以将该核的片内私有内存中的全局变量 值储存为该核对应的处理分支入口地址; 如果业务场景发生改变, 比如在业务 场景 1中, CPU1对应执行 Image 1 , 而在业务场景 2中 CPU2对应执行 Image 1 , 当从业务场景 1切换到业务场景 2时, 可以由变量值更新单元 14更新该核 的片内私有内存中储存的全局变量值。 本实施例提供一种多核处理器, 可以为 CPU或 DSP, 结构示意图如图 7 所示, 包括多个核 20、 各个核对应的片内私有内存 21 , 和片外共享内存 22。 其中:  The address storage unit 13 in this embodiment may store the global variable value in the on-chip private memory of the core as the processing branch entry address corresponding to the core; if the service scenario changes, for example, in the service scenario 1, the CPU 1 executes correspondingly. Image 1 , and in the business scenario 2, the CPU 2 executes Image 1 correspondingly. When switching from the business scenario 1 to the business scenario 2, the variable value updating unit 14 may update the global variable value stored in the on-chip private memory of the core. The embodiment provides a multi-core processor, which may be a CPU or a DSP. The schematic diagram of the structure is as shown in FIG. 7, and includes a plurality of cores 20, on-chip private memory 21 corresponding to each core, and off-chip shared memory 22. among them:
所述核 20, 用于当前核需要进入对应的处理分支时, 调用多个核共享的 复位向量中的跳转指令, 所述跳转指令包括 jmp (处理分支入口), 用于指示 跳转的寄存器为处理分支入口,所述多个核对应的片内私有内存的逻辑地址相 同;; 读取所述当前核的片内私有内存中的全局变量值, 所述全局变量值用来 指示所述当前核对应的处理分支入口地址;将所述读取的全局变量值作为所述 跳转指令中处理分支入口的内容, 跳转到片外共享内存中对应的处理分支入 口; The core 20 is configured to invoke a jump instruction in a reset vector shared by multiple cores when the current core needs to enter a corresponding processing branch, where the jump instruction includes jmp (processing branch entry), and is used to indicate a jump. The register is a processing branch entry, and the logical addresses of the on-chip private memory corresponding to the plurality of cores are the same;; reading a global variable value in the on-chip private memory of the current core, the global variable value is used to indicate the Processing branch entry address corresponding to the current core; using the read global variable value as the The jump instruction processes the contents of the branch entry, and jumps to the corresponding processing branch entry in the off-chip shared memory;
所述片内私有内存 21 (图 7中以 L1为例说明 ), 用于储存对应核的全局 变量值;  The on-chip private memory 21 (illustrated by L1 in FIG. 7) is used to store the global variable value of the corresponding core;
所述片外共享内存 22 (图 7中以 L2为例说明 ), 用于加载所述多个核共 享的复位向量代码, 及各个核的处理分支。  The off-chip shared memory 22 (illustrated by L2 in FIG. 7) is used to load the reset vector code of the plurality of core shares, and the processing branches of the cores.
可以理解,本实施例中核 20的结构与图 5或 6所示的处理器核结构类似, 且核 20在从片外共享内存中启动的过程中, 复位向量的代码实现方法如图 2 所示的流程图, 在此不进行赞述。  It can be understood that the structure of the core 20 in this embodiment is similar to the processor core structure shown in FIG. 5 or 6, and in the process of starting the core 20 from the off-chip shared memory, the code implementation method of the reset vector is as shown in FIG. 2 . The flow chart is not mentioned here.
需要说明的是, 本实施例的多核处理器中, 多个核 20、 各个核对应的片 内私有内存 21和片外共享内存 22可以集成到一个芯片上。 本发明实施例还提供一种处理系统,该处理系统中可以包括至少一个如图 7所示的多核处理器。  It should be noted that, in the multi-core processor of the embodiment, the plurality of cores 20, the on-chip private memory 21 corresponding to each core, and the off-chip shared memory 22 may be integrated on one chip. The embodiment of the present invention further provides a processing system, which may include at least one multi-core processor as shown in FIG.
本实施例的处理系统中的多核处理器可以为 CPU, 也可以为 DSP; 还可 以包括 CPU和数字信号处理器 DSP,在这种情况下, 多个 CPU可以共享第一 复位向量, 多个 DSP可以共享第二复位向量。 这里所说的第一复位向量和第 二复位向量并不代表顺序关系, 而是说明复位向量的不同。 则多个中央处理器 CPU共享第一复位向量, 和 /或多个数字信号处理器 DSP共享第二复位向量。  The multi-core processor in the processing system of this embodiment may be a CPU or a DSP; and may further include a CPU and a digital signal processor DSP. In this case, multiple CPUs may share the first reset vector, multiple DSPs. The second reset vector can be shared. The first reset vector and the second reset vector referred to herein do not represent a sequential relationship, but rather illustrate the difference in the reset vector. The plurality of CPUs share the first reset vector and/or the plurality of digital signal processors DSP share the second reset vector.
参考图 8所示, 在一个具体的实施例中, 在一个处理系统的芯片中包括: 2个簇(Cluster ) 即 CPU簇和 DSP簇, 其中: 对于每个簇即为一个多核处理 器, 包括 4个核, 每个核有对应的片内私有内存如 L1 , 且 4个核共享一个片 外共享内存即 L2。 在该芯片中还可以包括芯片上所有多核处理器的片外共享 内存即三级内存( L3 )和双倍速率存储器( Double Data Rate, DDR )。  Referring to FIG. 8, in a specific embodiment, a chip of a processing system includes: 2 clusters, that is, a CPU cluster and a DSP cluster, wherein: for each cluster, a multi-core processor includes 4 cores, each core has a corresponding on-chip private memory such as L1, and 4 cores share an off-chip shared memory, that is, L2. The chip can also include off-chip shared memory of all multi-core processors on the chip, namely three-level memory (L3) and double data rate (DDR).
在该芯片中 DSP和 CPU的结构都可以如图 5或图 6所示, 在此不进行赞 述。 本发明实施例还提供一种计算机系统, 是一种具体应用中的处理系统, 结 构示意图如图 9所示,包括:外部接口(interfaces )30、芯片共享内存( memory ) 32比如 DDR、 总线 ( bus ) 31和多核处理器 33。  The structure of the DSP and the CPU in the chip can be as shown in Fig. 5 or Fig. 6, and will not be mentioned here. The embodiment of the present invention further provides a computer system, which is a processing system in a specific application. The schematic diagram of the structure is as shown in FIG. 9, including: external interfaces (interfaces) 30, chip shared memory (memory) 32 such as DDR, bus ( Bus) 31 and multi-core processor 33.
其中总线 31是用来连接计算机系统中的所有硬件;而外部接口 30连接在 总线 31 上, 用来连接计算机系统的外部设备; 芯片共享内存 32连接在总线 31 上, 是计算机系统中所有处理器核的共享内存; 多核处理器的结构可以如 图 5或 6所示, 在此不进行赞述。 Wherein the bus 31 is used to connect all the hardware in the computer system; and the external interface 30 is connected to On the bus 31, an external device for connecting to the computer system; the chip shared memory 32 is connected to the bus 31, which is a shared memory of all the processor cores in the computer system; the structure of the multi-core processor can be as shown in FIG. 5 or 6, This is not a comment.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。  A person skilled in the art may understand that all or part of the various steps of the foregoing embodiments may be completed by a program instructing related hardware. The program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, disk or CD, etc.
以上对本发明实施例所提供的复位向量的代码实现方法、 系统及装置, 进 述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员,依据本发明的思想, 在具体实施方式及应用范围 上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。  The code implementation method, system and device for the reset vector provided by the embodiment of the present invention are described above. The description of the above embodiment is only for helping to understand the method and core idea of the present invention; meanwhile, it is for those skilled in the art. The present invention is not limited by the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种复位向量的代码实现方法, 其特征在于, 包括:  A code implementation method for a reset vector, comprising:
当前核需要进入对应的处理分支时,调用多个核共享的复位向量中的跳转 指令, 所述跳转指令包括 jmp (处理分支入口), 用于指示跳转的寄存器为处 理分支入口; 所述多个核对应的片内私有内存的逻辑地址相同;  When the current core needs to enter the corresponding processing branch, the jump instruction in the reset vector of the multiple cores is called, and the jump instruction includes jmp (processing branch entry), and the register for indicating the jump is the processing branch entry; The logical addresses of the on-chip private memory corresponding to the plurality of cores are the same;
读取所述当前核的片内私有内存中的全局变量值,所述全局变量值用来指 示所述当前核对应的处理分支入口地址;  Reading a global variable value in the on-chip private memory of the current core, where the global variable value is used to indicate a processing branch entry address corresponding to the current core;
将所述读取的全局变量值作为所述跳转指令中处理分支入口的内容,跳转 到片外共享内存中对应的处理分支入口。  The read global variable value is used as the processing branch entry in the jump instruction, and jumps to the corresponding processing branch entry in the off-chip shared memory.
2、 如权利要求 1所述的方法, 其特征在于, 所述读取所述当前核的片内 私有内存中的全局变量值之前包括:  2. The method according to claim 1, wherein the reading the global variable value in the on-chip private memory of the current core comprises:
将所述当前核对应的处理分支入口地址储存为所述当前核的片内私有内 存中的全局变量值。  The processing branch entry address corresponding to the current core is stored as a global variable value in the on-chip private memory of the current core.
3、 如权利要求 1或 2所述的方法, 其特征在于, 还包括:  3. The method according to claim 1 or 2, further comprising:
更新所述当前核的片内私有内存中储存的全局变量值。  Updating the global variable value stored in the on-chip private memory of the current core.
4、 如权利要求 1至 3任一项所述的方法, 其特征在于, 所述核包括: 中 央处理器 CPU, 和 /或数字信号处理器 DSP;  The method according to any one of claims 1 to 3, wherein the core comprises: a central processor CPU, and/or a digital signal processor DSP;
所述复位向量包括第一复位向量, 和 /或第二复位向量;  The reset vector includes a first reset vector, and/or a second reset vector;
则多个中央处理器 CPU共享第一复位向量, 和 /或多个数字信号处理器 DSP共享第二复位向量。  The plurality of CPUs share the first reset vector and/or the plurality of digital signal processors DSP share the second reset vector.
5、 一种处理器核, 其特征在于, 包括:  5. A processor core, comprising:
函数调用单元, 用于当前核需要进入对应的处理分支时, 调用多个核共享 的复位向量中的跳转指令, 所述跳转指令包括 jmp (处理分支入口), 用于指 示跳转的寄存器为处理分支入口,所述多个核对应的片内私有内存的逻辑地址 相同;  a function calling unit, configured to invoke a jump instruction in a reset vector of a plurality of cores when the current core needs to enter a corresponding processing branch, where the jump instruction includes jmp (processing branch entry), a register for indicating a jump To process the branch entry, the logical addresses of the on-chip private memory corresponding to the multiple cores are the same;
变量读取单元, 用于读取所述当前核的片内私有内存中的全局变量值, 所 述全局变量值用来指示所述当前核对应的处理分支入口地址;  a variable reading unit, configured to read a global variable value in the on-chip private memory of the current core, where the global variable value is used to indicate a processing branch entry address corresponding to the current core;
跳转单元,用于将所述变量读取单元读取的全局变量值作为所述跳转指令 中处理分支入口的内容, 跳转到片外共享内存中对应的处理分支入口。 And a jump unit, configured to use the global variable value read by the variable reading unit as the processing branch entry in the jump instruction, and jump to a corresponding processing branch entry in the off-chip shared memory.
6、 如权利要求 5所述的处理器核, 其特征在于, 还包括: The processor core of claim 5, further comprising:
地址储存单元,用于将所述当前核对应的处理分支入口地址储存为所述当 前核的片内私有内存中的全局变量值。  The address storage unit is configured to store the processing branch entry address corresponding to the current core as a global variable value in the on-chip private memory of the current core.
7、 如权利要求 5或 6所述的处理器核, 其特征在于, 还包括:  The processor core according to claim 5 or 6, further comprising:
变量值更新单元,用于更新所述当前核的片内私有内存中储存的全局变量 值。  And a variable value updating unit, configured to update a global variable value stored in the on-chip private memory of the current core.
8、 一种多核处理器, 其特征在于, 包括: 多个核, 各个核对应的片内私 有内存, 和片外共享内存;  8. A multi-core processor, comprising: a plurality of cores, on-chip private memory corresponding to each core, and off-chip shared memory;
所述核, 用于当前核需要进入对应的处理分支时, 调用多个核共享的复位 向量中的跳转指令, 所述跳转指令包括 jmp (处理分支入口), 用于指示跳转 的寄存器为处理分支入口, 所述多个核对应的片内私有内存的逻辑地址相同; 读取所述当前核的片内私有内存中的全局变量值,所述全局变量值用来指示所 述当前核对应的处理分支入口地址;将所述读取的全局变量值作为所述跳转指 令中处理分支入口的内容, 跳转到片外共享内存中对应的处理分支入口;  The core, when the current core needs to enter a corresponding processing branch, invokes a jump instruction in a reset vector shared by multiple cores, where the jump instruction includes jmp (processing branch entry), a register for indicating a jump In order to process the branch entry, the logical addresses of the on-chip private memory corresponding to the multiple cores are the same; the global variable value in the on-chip private memory of the current core is read, and the global variable value is used to indicate the current core Corresponding processing branch entry address; using the read global variable value as the processing branch entry in the jump instruction, and jumping to a corresponding processing branch entry in the off-chip shared memory;
所述片内私有内存, 用于储存对应核的全局变量值;  The on-chip private memory is used to store a global variable value of the corresponding core;
所述片外共享内存, 用于加载所述多个核共享的复位向量,及各个核的处 理分支。  The off-chip shared memory is used to load a reset vector shared by the plurality of cores, and a processing branch of each core.
9、 如权利要求 8所述的多核处理器, 其特征在于, 所述核如权利要求 5 到 7任一项所述的处理器核。  The multi-core processor according to claim 8, wherein the core is the processor core according to any one of claims 5 to 7.
10、 如权利要求 8或 9所述的多核处理器, 其特征在于, 所述核为: 中央 处理器 CPU, 或数字信号处理器 DSP。  The multi-core processor according to claim 8 or 9, wherein the core is: a central processing unit CPU, or a digital signal processor DSP.
11、 一种处理系统, 其特征在于, 包括至少一个如权利要求 8或 9所述的 多核处理器。  A processing system, comprising at least one multi-core processor according to claim 8 or 9.
12、 如权利要求 11所述的处理系统, 其特征在于, 所述多核处理器为中 央处理器 CPU, 和 /或数字信号处理器 DSP;  The processing system according to claim 11, wherein the multi-core processor is a central processor CPU, and/or a digital signal processor DSP;
所述复位向量包括第一复位向量, 和 /或第二复位向量;  The reset vector includes a first reset vector, and/or a second reset vector;
则多个中央处理器 CPU共享第一复位向量, 和 /或多个数字信号处理器 DSP共享第二复位向量。  The plurality of CPUs share the first reset vector and/or the plurality of digital signal processors DSP share the second reset vector.
13、一种计算机系统, 包括外部接口、芯片共享内存和总线,其特征在于, 所述计算机系统还包括如权利要求 8或 9所述的多核处理器。 13. A computer system comprising an external interface, a chip shared memory, and a bus, wherein The computer system also includes the multi-core processor of claim 8 or 9.
PCT/CN2011/078181 2011-08-10 2011-08-10 Code implementing method, system and device for reset vector WO2012119380A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201180001478.0A CN102326145B (en) 2011-08-10 2011-08-10 Reset vector code realization method, system and apparatus
PCT/CN2011/078181 WO2012119380A1 (en) 2011-08-10 2011-08-10 Code implementing method, system and device for reset vector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/078181 WO2012119380A1 (en) 2011-08-10 2011-08-10 Code implementing method, system and device for reset vector

Publications (1)

Publication Number Publication Date
WO2012119380A1 true WO2012119380A1 (en) 2012-09-13

Family

ID=45453085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/078181 WO2012119380A1 (en) 2011-08-10 2011-08-10 Code implementing method, system and device for reset vector

Country Status (2)

Country Link
CN (1) CN102326145B (en)
WO (1) WO2012119380A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930638B (en) * 2020-10-16 2020-12-29 中国人民解放军国防科技大学 DSP chip mixed operation and storage detection method in satellite-borne receiver
CN115114192A (en) * 2021-03-23 2022-09-27 北京灵汐科技有限公司 Memory interface, functional core, many-core system and memory data access method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4698750A (en) * 1984-12-27 1987-10-06 Motorola, Inc. Security for integrated circuit microcomputer with EEPROM
WO2006026484A2 (en) * 2004-08-31 2006-03-09 Ivivity, Inc Independent hardware based code locator
US7290127B2 (en) * 2001-12-26 2007-10-30 Intel Corporation System and method of remotely initializing a local processor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004192052A (en) * 2002-12-06 2004-07-08 Matsushita Electric Ind Co Ltd Software processing method and software processing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4698750A (en) * 1984-12-27 1987-10-06 Motorola, Inc. Security for integrated circuit microcomputer with EEPROM
US7290127B2 (en) * 2001-12-26 2007-10-30 Intel Corporation System and method of remotely initializing a local processor
WO2006026484A2 (en) * 2004-08-31 2006-03-09 Ivivity, Inc Independent hardware based code locator

Also Published As

Publication number Publication date
CN102326145A (en) 2012-01-18
CN102326145B (en) 2014-01-01

Similar Documents

Publication Publication Date Title
JP4950438B2 (en) VEX-virtual extension framework
US10747883B2 (en) Collated multi-image check in system-on-chips
US20100211769A1 (en) Concurrent Execution of a Smartphone Operating System and a Desktop Operating System
JP2005322242A (en) Provision of direct access from virtual environment to hardware
WO2018099292A1 (en) Process management method and apparatus
US10802875B2 (en) Multithread framework for use in pre-boot environment of a system-on-chip
CN107025135B (en) Application process management method, device and medium in Docker container
TWI514263B (en) Boot strap processor assignment for a multi-core processing unit
US20180217945A1 (en) Method and device of information protection for micro control unit chip
US10394571B2 (en) Passing data from a host-based utility to a service processor
KR20140101412A (en) Isa bridging with callback
CN112698888A (en) Application modularization, component calling and component initialization method and device
US9158550B2 (en) Caching based operating system installation
US8499142B1 (en) UEFI boot loader for loading non-UEFI compliant operating systems
US20100017588A1 (en) System, method, and computer program product for providing an extended capability to a system
US9535772B2 (en) Creating a communication channel between different privilege levels using wait-for-event instruction in systems operable at multiple levels hierarchical privilege levels
WO2012119380A1 (en) Code implementing method, system and device for reset vector
CN116541336A (en) Software running method of multi-core chip and coprocessor
US20120005464A1 (en) Start up processing method, information processing apparatus, and computer-readable storage medium storing program
WO2015184902A1 (en) Concurrent processing method for intelligent split-screen and corresponding intelligent terminal
US11526358B2 (en) Deterministic execution replay for multicore systems
JP2010003151A (en) Data processing apparatus
CN112130900B (en) User information management method, system, equipment and medium for BMC
US20210232405A1 (en) Circuit and register to prevent executable code access
US9086895B1 (en) Controlling hardware driver selection

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180001478.0

Country of ref document: CN

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

Ref document number: 11860158

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: 11860158

Country of ref document: EP

Kind code of ref document: A1