CN104156234A - Multi-core processor starting and bootloader big-little endian mode adapting method device - Google Patents

Multi-core processor starting and bootloader big-little endian mode adapting method device Download PDF

Info

Publication number
CN104156234A
CN104156234A CN201410351558.4A CN201410351558A CN104156234A CN 104156234 A CN104156234 A CN 104156234A CN 201410351558 A CN201410351558 A CN 201410351558A CN 104156234 A CN104156234 A CN 104156234A
Authority
CN
China
Prior art keywords
core
operating system
little endian
endian mode
large little
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201410351558.4A
Other languages
Chinese (zh)
Other versions
CN104156234B (en
Inventor
刘健平
黄韶宇
刘小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410351558.4A priority Critical patent/CN104156234B/en
Publication of CN104156234A publication Critical patent/CN104156234A/en
Application granted granted Critical
Publication of CN104156234B publication Critical patent/CN104156234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

An embodiment of the invention provides a multi-core processor starting and bootloader big-little endian mode adapting method device, relates to the field of integrated circuits and aims to solve the problem that processors in different specifications cannot run the same operation system, to the certain extent and improve the operation system compatibility. The method is applied to computing nodes comprising the multi-core processor and storage and includes that a main core stores the guide program of auxiliary cores to the continuous storage space of the storage after the first address; the first address of the storage is mapped to the 0 address of a bus; the main core recovers at least one auxiliary core to allow a program counter PC pointer of the auxiliary core to point to the 0 address of the bus, and the auxiliary core accesses to the first address of the storage mapped by the 0 address of the bus through the bus, reads the auxiliary core guide program stored after the first address of the storage in the storage and executes the auxiliary core guide program; the auxiliary cores skip to the code segment of the operation system, and the auxiliary core initialization is completed.

Description

Start method and the device of polycaryon processor, the large small end mode adaptive of bootloader
Technical field
The present invention relates to integrated circuit fields, relate in particular to the method and the device that start polycaryon processor, the large small end mode adaptive of bootloader.
Background technology
Operating system and hardware are tight alternately, and chip, single plate hardware that each product uses are widely different.In built-in field, ardware model number, the bootloader of processor traditionally (are translated into start-up loading device, bootloader is the first paragraph code that embedded system is carried out after powering up, after it completes the initialization of processor and related hardware, again operating system mirror image is loaded into the space that then jumps to operating system place in internal memory, operation starts the operating system) version and operating system version correspondence one by one, the processor of each model (single core processor or polycaryon processor) all needs to use the operating system supporting with it.After operating system scale-of-two normalizing, operating system that can same version supports the processor of different model, the bootloader of different editions.
At present, the multinucleation of processor has become main flow, and polycaryon processor is made up of from core a main core and at least one.The start-up course of polycaryon processor is roughly divided into following five steps:
The first step, main core starts, and the bootloader in nonvolatile memory is copied in internal memory and moved.
Second step, main core jumps to operating system from bootloader, and the instruction in executive operating system completes the initialization of main core and the required hardware of operating system, and by the fixed address A of the storage address write bus internal memory from core boot; Fixed address A is for depositing the address at internal memory from the Article 1 instruction of core boot.
The 3rd step, main core, to send internuclear interrupt message from core, wakes up from core, and waits for complete from core initialization.
The 4th step,, obtains the storage address internal memory from core boot, and then from internal memory, reads from core boot by the fixed address A of bus from core, and carries out from core boot.
The 5th step, jumps to the code segment of operating system, complete from core initialization, and notify main core this complete from core initialization.
State in realization in the process of polycaryon processor startup, inventor finds that in prior art, at least there are the following problems: the bus space layout difference of the polycaryon processor of the different model under the polycaryon processor of the different model under same architecture and different framework, make the interior addressing range difference existing in bus space, cause the address from core setup code of storing in bus access internal memory with fixed address A is different accordingly.Meanwhile, because fixed address A is by hard coded write operation system, finally make the processor of different model need to use the operating system of different editions, operating system cannot complete scale-of-two normalizing.
Summary of the invention
Embodiments of the invention provide the method and the device that start polycaryon processor, the large small end mode adaptive of bootloader, cannot use the problem of the operating system of identical version to solve to a certain extent the processor of different model, improve the compatibility of operating system.
Embodiments of the invention adopt following technical scheme:
First aspect, the embodiment of the present invention provides a kind of method that starts polycaryon processor, be applied to the computing node that comprises polycaryon processor and internal memory, wherein said polycaryon processor is by internal memory described in bus access, described polycaryon processor comprises main core and at least one is from core, described main core is carried out start-up loading device bootloader, and described method comprises: described main core is by the continuous storage space being stored to from core boot after the first address of described internal memory; Wherein, the first address of described internal memory is mapped to 0 address of described bus; Described main core reset described at least one from core from core, so that described 0 address from bus described in the programmable counter PC pointed of core, described from core by the first address of the described internal memory of 0 address mapping of bus described in described bus access, read store after the first address of internal memory described in described internal memory described from core boot and carry out described from core boot; The described code segment that jumps to operating system from core, completes from core initialization.
In conjunction with first aspect, in the possible implementation of the first of first aspect,, also comprise before the continuous storage space be stored to the first address of described internal memory from core boot after at described main core: described main core adds dormancy instruction described from core boot, described dormancy instruction be used for making described from core in dormant state, described main core reset described at least one from core from core, so that described 0 address from bus described in the programmable counter PC pointed of core, the first address of the described described internal memory shining upon by 0 address of bus described in described bus access from core, read store after the first address of internal memory described in described internal memory described from core boot and carry out described from core boot, comprise: described main core resets described from core for the first time, described 0 address from bus described in the PC pointed of core, the first address of the described described internal memory shining upon by 0 address of bus described in described bus access from core, read and carry out described described dormancy instruction from core boot, described main core resets described from core for the second time, described 0 address from bus described in the PC pointed of core, described from core by the first address of the described internal memory of 0 address mapping of bus described in described bus access, read and carry out described from core boot the program except dormancy instruction, wherein, the described number of resets from core is twice.
In conjunction with the possible implementation of the first of first aspect or first aspect, in the possible implementation of the second of first aspect, the described code segment that jumps to operating system from core, complete from core initialization, comprise: the described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system is identical, the described code segment that jumps to operating system from core, completes from core initialization.
In conjunction with the possible implementation of first or the second of first aspect or first aspect, in the third possible implementation of first aspect, after described main core is carried out start-up loading device bootloader, described main core, by before the continuous storage space being stored to from core boot after the first address of described internal memory, also comprises: described main core obtains the large little endian mode of the described main core arranging in bootloader; Described main core obtains the required large little endian mode of operating system; The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, the large little endian mode of the described main core of described main core change, makes the large little endian mode of the described main core after the change large little endian mode required with described operating system identical; The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, also comprise: all parameters that described bootloader is passed to described operating system by described main core are carried out large little endian mode conversion, make described bootloader after conversion pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprise: describedly obtain from core the described large little endian mode from core arranging bootloader, describedly obtain the required large little endian mode of operating system from core, the described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, described from the large little endian mode from core core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical, the described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, and the required parameter of described main core that described bootloader is passed to operating system by described main core is carried out in the situation of large little endian mode conversion, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
In conjunction with the possible implementation of first or the second of first aspect or first aspect, in the 5th kind of possible implementation of first aspect, after described main core is carried out start-up loading device bootloader, described main core is by before the continuous storage space being stored to from core boot after the first address of described internal memory, also comprise: described main core obtains described bootloader and pass to all parameters of described operating system, wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number; In the situation that described the first Magic number changes, the large little endian mode of the described main core of described main core change, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system; Or described main core obtains described bootloader and pass to the required parameter of described main core of described operating system, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number; In the situation that described the second Magic number changes, the large little endian mode of the described main core of described main core change, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
In conjunction with the 5th kind of possible implementation of first aspect, in the 6th kind of possible implementation of first aspect, describedly obtain described bootloader from core and pass to the described from the required parameter of core of described operating system, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the 3rd Magic number; Determine that from core described the 3rd Magic number changes in the situation that, described from the described large little endian mode from core of core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical; Determine that from core described the 3rd Magic number changes described, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
In conjunction with first to the 6th any possible implementation of first aspect or first aspect, in the 7th kind of possible implementation of first aspect, described main core reset described at least one from core from before core, also comprise: described main core obtains the described state from core; Determine describedly from core during in state of activation when described main core, it is twice from the number of resets of core that described main core arranges described; When described main core determine described from core in dormant state or not when starting state, described main core arranges the described number of resets from core for once.
Second aspect, the embodiment of the present invention provides a kind of method that starts polycaryon processor, be applied to the computing node that comprises polycaryon processor, internal memory and nonvolatile memory, wherein said polycaryon processor is by internal memory and described nonvolatile memory described in bus access, described polycaryon processor comprises main core and at least one is from core, described method comprises: described main core is from from core configuration-direct, or obtains the configuration address from core from described nonvolatile memory; Wherein, be describedly arranged at start-up loading device bootloader from core configuration-direct; Described main core will be stored to from core boot the continuous storage space afterwards of configuration address described in described internal memory; Described main core sends internuclear interrupt message to described from core, make described from core by configuration address described in described bus access, read store after configuration address described in described internal memory described from core boot and carry out described from core boot; The described code segment that jumps to operating system from core, completes from core initialization.
In conjunction with second aspect, in the possible implementation of the first of second aspect, the described code segment that jumps to operating system from core, complete from core initialization, comprise: the described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system is identical, the described code segment that jumps to operating system from core, completes from core initialization.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the possible implementation of the second of second aspect, at described main core from from core configuration-direct, or obtain after the configuration address of core from described nonvolatile memory, described main core, by be stored to the continuous storage space afterwards of configuration address described in described internal memory from core boot before, also comprises: described main core obtains the large little endian mode of the described main core arranging in bootloader; Described main core obtains the required large little endian mode of operating system; The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, the large little endian mode of the described main core of described main core change, makes the large little endian mode of the described main core after the change large little endian mode required with described operating system identical; The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, also comprise: all parameters that described bootloader is passed to described operating system by described main core are carried out large little endian mode conversion, make described bootloader after conversion pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
In conjunction with the possible implementation of the second of second aspect, in the third possible implementation of second aspect, described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprise: describedly obtain from core the described large little endian mode from core arranging bootloader, describedly obtain the required large little endian mode of operating system from core, the described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, described from the large little endian mode from core core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical, the described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, and the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out in the situation of large little endian mode conversion, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the 4th kind of possible implementation of second aspect, at described main core from from core configuration-direct, or obtain after the configuration address of core from described nonvolatile memory, described main core is by before being stored to the continuous storage space afterwards of configuration address described in described internal memory from core boot, also comprise: described main core obtains described bootloader and pass to all parameters of described operating system, wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number, in the situation that described the first Magic number changes, the large little endian mode of the described main core of described main core change, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical, wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system, or described main core obtains described bootloader and pass to the required parameter of described main core of described operating system, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number, in the situation that described the second Magic number changes, the large little endian mode of the described main core of described main core change, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprise: describedly obtain described bootloader from core and pass to the described from the required parameter of core of described operating system, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the 3rd Magic number; Determine that from core described the 3rd Magic number changes in the situation that, described from the described large little endian mode from core of core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical; Determine that from core described the 3rd Magic number changes described, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
In conjunction with first to the 5th any possible implementation of second aspect or second aspect, in the 6th kind of possible implementation of second aspect, obtain describedly before the configuration address of core at described main core from nonvolatile memory, also comprise: described main core obtains the described configuration address from core from described from core configuration-direct; The described configuration address from core is stored to described nonvolatile memory by described main core.
The third aspect, the embodiment of the present invention provides a kind of bootloader method of large small end mode adaptive, is applied to processor, and described method comprises: obtain the large little endian mode when pronucleus arranging in start-up loading device bootloader; Obtain the required large little endian mode of operating system; If the described large little endian mode when pronucleus arranging in the described bootloader large little endian mode required from described operating system is different, the described large little endian mode when pronucleus of change, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
Fourth aspect, the embodiment of the present invention provides a kind of bootloader method of large small end mode adaptive, is applied to processor, and described method comprises: the parameter of obtaining start-up loading device bootloader and pass to operating system, wherein, the stem of described parameter is added with Magic number; If described Magic number changes, change is when the large little endian mode of pronucleus, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
The 5th aspect, the embodiment of the present invention provides a kind of computing node, comprise polycaryon processor and internal memory, wherein said polycaryon processor is by internal memory described in bus access, described polycaryon processor comprises main core and at least one is from core, described main core is used for carrying out start-up loading device bootloader, comprising: described main core, for by the continuous storage space being stored to from core boot after the first address of described internal memory; Wherein, the first address of described internal memory is mapped to 0 address of described bus; Described main core, also for reset at least one from core from core, so that described 0 address from bus described in the programmable counter PC pointed of core; Described from core, for the first address of the described internal memory of the 0 address mapping by bus described in described bus access, read store after the first address of internal memory described in described internal memory described from core boot and carry out described from core boot; Described from core, also, for jumping to the code segment of operating system, complete from core initialization.
In conjunction with the 5th aspect, in the possible implementation of the first aspect the 5th, described main core, also for adding dormancy instruction described from core boot; Described dormancy instruction be used for making described from core in dormant state; Described main core, described from core specifically for resetting for the first time, described 0 address from bus described in the PC pointed of core; Described from core, specifically for the first address of the described internal memory of the 0 address mapping by bus described in described bus access, read and carry out described described dormancy instruction from core boot; Described main core, described from core specifically for resetting for the second time, described 0 address from bus described in the PC pointed of core; Described from core, specifically for the first address of the described internal memory of the 0 address mapping by bus described in described bus access, read and carry out described from core boot the program except dormancy instruction; Wherein, the described number of resets from core is twice.
In conjunction with the possible implementation of the first of the 5th aspect or the 5th aspect, in the possible implementation of the second aspect the 5th, described from core, identical specifically for the described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system, jump to the code segment of operating system, complete from core initialization.
In conjunction with the possible implementation of first or the second of the 5th aspect or the 5th aspect, in the third the possible implementation aspect the 5th, described main core, also for obtaining the large little endian mode of the described main core that bootloader arranges; Described main core, also for obtaining the required large little endian mode of operating system; Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, change the large little endian mode of described main core, make the large little endian mode of described main core after the change large little endian mode required with described operating system identical; Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, the all parameters that described bootloader passed to described operating system are carried out large little endian mode conversion, make the large little endian mode of described all parameters after the conversion large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
In conjunction with the third possible implementation of the 5th aspect, in the 4th kind of possible implementation aspect the 5th, described from core, the described large little endian mode from core also arranging for obtaining bootloader, described from core, also for obtaining the required large little endian mode of operating system, described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical, described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, and the required parameter of described main core that described bootloader is passed to operating system by described main core is carried out in the situation of large little endian mode conversion, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the operating system large little endian mode required with described operating system identical.
In conjunction with the possible implementation of first or the second of the 5th aspect or the 5th aspect, in the 5th kind of possible implementation aspect the 5th, described main core, also pass to all parameters of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number; Described main core, also in the situation that described the first Magic number changes, change the large little endian mode of described main core, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system; Or described main core, also passes to the required parameter of described main core of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number; Described main core, also in the situation that described the second Magic number changes, change the large little endian mode of described main core, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
In conjunction with the 5th kind of possible implementation of the 5th aspect, in the 6th kind of possible implementation aspect the 5th, described from core, also pass to the described from the required parameter of core of described operating system for obtaining described bootloader, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the stem of parameter described in the 3rd Magic number and is added with Magic number; Described from core, also for described determine that from core described the 3rd Magic number changes in the situation that, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical; Described from core, also for changing at described the 3rd Magic number, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
In conjunction with first to the 6th any possible implementation of the 5th aspect or the 5th aspect, in the 7th kind of possible implementation aspect the 5th, described main core, also for obtaining the described state from core; Described main core, also for determine described from core when the state of activation, it is twice from the number of resets of core that described main core arranges described; Described main core, also for determine described from core in dormant state or not when starting state, described main core arranges the described number of resets from core for once.
The 6th aspect, the embodiment of the present invention provides a kind of computing node, comprise polycaryon processor, internal memory and nonvolatile memory, wherein said polycaryon processor is by internal memory and described nonvolatile memory described in bus access, described polycaryon processor comprises main core and at least one is from core, comprise: described main core for from from core configuration-direct, or obtains the described configuration address from core from described nonvolatile memory; Wherein, be describedly arranged at described start-up loading device bootloader from core configuration-direct; Described main core, also for being stored to the continuous storage space after configuration address described in described internal memory from core boot; Described main core, also for to send internuclear interrupt message from core; Described from core, for by configuration address described in described bus access, read store after configuration address described in described internal memory described described from core boot from core boot execution; Described from core, also, for jumping to the code segment of operating system, complete from core initialization.
In conjunction with the 6th aspect, in the possible implementation of the first aspect the 6th, described from core, identical specifically for the described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system, the described code segment that jumps to operating system from core, completes from core initialization.
In conjunction with the possible implementation of the first of the 6th aspect or the 6th aspect, in the possible implementation of the second aspect the 6th, described main core, also for obtaining the large little endian mode of the described main core that bootloader arranges; Described main core, also for obtaining the required large little endian mode of operating system; Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, change the large little endian mode of described main core, make the large little endian mode of described main core after the change large little endian mode required with described operating system identical; Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, the all parameters that described bootloader passed to described operating system are carried out large little endian mode conversion, make the large little endian mode of described all parameters after the conversion large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
In conjunction with the possible implementation of the second of the 6th aspect, in the third the possible implementation aspect the 6th, described from core, the described large little endian mode from core also arranging for obtaining bootloader, described from core, also for obtaining the required large little endian mode of operating system, described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical, described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, and the required parameter of described main core that described bootloader is passed to operating system by described main core is carried out in the situation of large little endian mode conversion, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the operating system large little endian mode required with described operating system identical.
In conjunction with the possible implementation of the first of the 6th aspect or the 6th aspect, in the 4th kind of possible implementation aspect the 6th, described main core, also pass to all parameters of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number; Described main core, also in the situation that described the first Magic number changes, change the large little endian mode of described main core, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system; Or described main core, also passes to the required parameter of described main core of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number; Described main core, also in the situation that described the second Magic number changes, the large little endian mode of the described main core of described main core change, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
In conjunction with the 4th kind of possible implementation of the 6th aspect, in the 5th kind of possible implementation aspect the 6th, described from core, also pass to the described from the required parameter of core of described operating system for obtaining described bootloader, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the 3rd Magic number; Described from core, also for described determine that from core described the 3rd Magic number changes in the situation that, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical; Described from core, also for changing at described the 3rd Magic number, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the operating system large little endian mode required with described operating system identical.
In conjunction with first to the 5th any possible implementation of the 6th aspect or the 6th aspect, in the 6th kind of possible implementation aspect the 6th, described main core, also for obtaining the described configuration address from core from described from core configuration-direct; Described main core, also for being stored to described nonvolatile memory by the described configuration address from core.
The 7th aspect, the embodiment of the present invention provides a kind of bootloader device of large small end mode adaptive, comprising: acquiring unit, the large little endian mode when pronucleus arranging for obtaining start-up loading device bootloader; Described acquiring unit, also for obtaining the required large little endian mode of operating system; Processing unit, described when the large little endian mode of the pronucleus large little endian mode required from described operating system is different for what arrange at described bootloader, the described large little endian mode when pronucleus of change, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
Eight aspect, the embodiment of the present invention provides a kind of bootloader device of large small end mode adaptive, comprising: acquiring unit, passes to the parameter of operating system for obtaining start-up loading device bootloader, wherein, the stem of described parameter is added with Magic number; Processing unit, for in the situation that described Magic number changes, change is when the large little endian mode of pronucleus, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
The embodiment of the present invention provides the method and the device that start polycaryon processor, the large small end mode adaptive of bootloader, main core initiating hardware mapping, the first address of internal memory is mapped to 0 address of bus, and by the storage space afterwards continuous first address that is stored to internal memory from core boot; Main core resets from core, to make 0 address of PC (Program Counter, programmable counter) the pointed bus from core, from core is reset, carries out from core boot from the first address of internal memory corresponding to 0 address of bus; Execute from core boot from core, jump to the code segment of operating system, complete from core initialization, and notify described in described main core and complete from core initialization.Like this, the polycaryon processor that utilizes every kind of model is in the characteristic from 0 address of the PC pointed bus of core from core is reset, set up the mapping relations of 0 address of bus and the first address of internal memory, and by the continuous storage space being stored in from core boot the first address of internal memory, make from core is reset can by the first address of internal memory corresponding to 0 address of bus read in internal memory, store from core boot, and carry out described from core boot, thereby just need in bus, not set for storing the fixed address A at the storage address of internal memory from core boot, realize the solution coupling of fixed address A between the bootloader of polycaryon processor and operating system, do not need to arrange according to each model polycaryon processor the operating system of coupling, make the polycaryon processor of different editions model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improve the compatibility of operating system.
Brief description of the drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The operating system scale-of-two normalizing schematic diagram that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 is a kind of scene that all embodiment of the present invention are suitable for;
Fig. 3 is the another kind of scene that all embodiment of the present invention are suitable for;
A kind of schematic flow sheet that starts polycaryon processor that Fig. 4 provides for the embodiment of the present invention;
The another kind that Fig. 5 provides for the embodiment of the present invention starts the schematic flow sheet of polycaryon processor;
Fig. 6 is the schematic diagram that in prior art, processor core supports large small end scene;
The another kind that Fig. 7 provides for the embodiment of the present invention starts the schematic flow sheet of polycaryon processor;
The another kind that Fig. 8 provides for the embodiment of the present invention starts the schematic flow sheet of polycaryon processor;
The schematic flow sheet of the large small end mode adaptive of another kind of bootloader that Fig. 9 provides for the embodiment of the present invention;
The schematic flow sheet of the large small end mode adaptive of another kind of bootloader that Figure 10 provides for the embodiment of the present invention;
The structural representation of a kind of computing node that Figure 11 provides for the embodiment of the present invention;
The structural representation of the another kind of computing node that Figure 12 provides for the embodiment of the present invention;
The structural representation of the device of the large small end mode adaptive of a kind of bootloader that Figure 13 provides for the embodiment of the present invention;
The structural representation of the device of the large small end mode adaptive of another kind of bootloader that Figure 14 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Polycaryon processor (English: Multi-core processor), is also multimicroprocessor core, is that two or more core is contained in to the scheme in a single IC for both (IC).These cores are divided into a main core and at least one from core, and each is endorsed with independent operating programmed instruction respectively, utilize the ability of parallel computation, and travelling speed that can faster procedure, provides multiple task ability.In polycaryon processor, have bus, polycaryon processor is by the external devices of the polycaryon processors such as bus access internal memory or nonvolatile memory.
Operating system (English; Operating System, is called for short OS) be that operating system is hardware management and software resource, controls other programs and move, provide the set of the software of operation interface for user.
Bootloader is one section of program moving before operating system, be used for initiating hardware equipment, set up memory headroom mapping graph, thereby take the hardware environment of operating system to a proper states, to be ready to correct environment for final call operation system kernel.
Mapping relations between the front and back operating system of operating system scale-of-two normalizing and bootloader, processor as shown in Figure 1.Wherein, Fig. 1 left side represents before operating system scale-of-two normalizing, the mapping relations between operating system, bootloader, processor hardware; Fig. 1 right side represents after operating system scale-of-two normalizing, the mapping relations between operating system, bootloader, processor hardware.The scene of operating system scale-of-two normalizing has two kinds: the first scene, as shown in Figure 2, when product up-gradation hardware, while changing processor, only the version of bootloader is replaced by the version corresponding with processor, and do not need to upgrade the version of operating system; The second scene, as shown in Figure 3, in the time that bootloader corresponding to processor upgrades, does not need to upgrade the version of operating system, uses same operating system just can support new bootloader.The all embodiment of the present invention are all applicable to above two kinds of scenes.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, is applied to the computing node that comprises polycaryon processor and internal memory, and wherein polycaryon processor is by bus access internal memory, and this polycaryon processor comprises main core and at least one is from core.
It should be noted that, the embodiment of the present invention has only been described a start-up course from core.If this polycaryon processor comprises multiple from the situation of core, main core first performs step 401-402, completes from the configuration of core boot, then makes successively each perform step 403-404 from core, to complete all startups from core, this polycaryon processor just completes startup like this.
As shown in Figure 4, the method comprises:
401, main core is carried out bootloader.
Concrete, first this polycaryon processor powers on, and each core needs to judge that this core is main core or from core; Then judging is in the situation of main core, completes the initialization to the required hardware of main core; Follow the control desk that main core enters bootloader, judge whether automatic start up system, in the situation that determining automatic start up system, jumping to step 402 starts to start the operating system, the in the situation that of definite not automatic start up system, in the control desk endless loop of bootloader, send to start and jump to step 402 after the order of kernel and start to start the operating system until receive user.
402, main core is by the continuous storage space being stored to from core boot after the first address of internal memory.
Wherein, the first address of described internal memory is mapped to 0 address of described bus.
It should be noted that, the first address of internal memory is the address in internal memory, and the address of bus 0 is the address in bus, between the two unfixing mapping relations.In order not set in bus for depositing the fixed address A at the storage address of internal memory from core boot, need to make the first address of internal memory be mapped to 0 address of bus at this, and utilize main core to reset from core, the characteristic of 0 address of PC pointed bus from core is reset, by in storage space continuous from core boot is stored to the first address of internal memory, can get from core boot with the first address that makes the internal memory shining upon by 0 address of bus.
It should be noted that, before execution step 402, need to ensure that the first address of internal memory and 0 address of bus exist mapping relations.Polycaryon processor is provided with a specific register, and after main core powers on, the default value of register is 1, and main core jumps to reading out data in nonvolatile memory; In the time that the value of register changes 0 into, main core reading out data from internal memory.Certainly for the processor of the multinuclear in different model, the state of this register also may arrange conversely, and default value is 0, jumps to nonvolatile memory; Value is 1 o'clock, jumps to internal memory.In the present embodiment, the first address of internal memory is mapped to the process of 0 address of bus, this register is set exactly so that enough processes of reading out data from internal memory of winner's nuclear energy.
Nonvolatile memory in the embodiment of the present invention, for example Norflash (a kind of flash memory) or ROM (Read Only Memory, ROM (read-only memory)), internal memory in the embodiment of the present invention is for example DDR (Double Data Rate, Double Data Rate synchronous DRAM), SRAM (Static Random Access Memory, static RAM).Polycaryon processor in the embodiment of the present invention, for example, the polycaryon processor of the reduced instruction frameworks such as MIPS (Microprocessor without Interlocked Piped Stages, without the microprocessor of inner interlocked pipelining-stage), ARM (English: Acorn RISC Machine).
It should be noted that, comprise multiple from core in the situation that at polycaryon processor, all sharing from core boot from core, that is to say, each from core being reset, all can be identical from core boot to reading in storage space continuous after the first address of internal memory corresponding to 0 address of bus.
It should be noted that, the deposit order of data in storer is divided into large end pattern and little endian mode.Large end pattern (Big-Endian) is exactly the low address end that upper byte is emitted on internal memory, and low byte is emitted on the high address end of internal memory.Little endian mode (Little-Endian) is exactly the low address end that low byte is emitted on internal memory, and upper byte is emitted on the high address end of internal memory.Large little endian mode when the large little endian mode of processor core must be with data storage is identical, the reading out data that ability is correct.The large little endian mode of the main core that the bootloader of the present embodiment default storage the arranges large little endian mode required with operating system is identical, so do not need to consider that whether whether required with the operating system large little endian mode of the large little endian mode of the main core arranging in bootloader is identical
The rear direct execution step 402 of execution of step 401.
403, main core reset at least one from core from core, to make PC (the Program Counter from core, programmable counter) 0 address of pointed bus, be reset from core, the first address of the internal memory of the 0 address mapping by described bus access bus, read store after the first address of internal memory described in internal memory from core boot and carry out from core boot.
It should be noted that, the present embodiment is mainly to reset from core at main core by all polycaryon processors, from the characteristic of 0 address of the PC pointed bus of core, the first address of internal memory is mapped to 0 address place of bus, and by storage space continuous from core boot is stored to the first address of internal memory, do not need, for each model polycaryon processor, the operating system of coupling is set, thereby realize the scale-of-two normalizing of operating system.
Concrete, reset and will wake up from core from the mode of core by main core, 0 address of the PC pointed bus being resetted by main core from core, according to the mapping relations of the first address of 0 address of bus and internal memory, the first address of the internal memory of the 0 address mapping by bus access bus, read and carry out after the first address that is stored in internal memory from core boot.
It should be noted that, main core only resets one from core at every turn, and the PC pointer from core being reset can point to 0 address of bus, and what be reset is waken up by main core from core, brings into operation.
Do not limit main checking from core herein and reset several times, main endorsing can be to carrying out twice reset from core, also may be only to once resetting from core.
404, execute from core boot from core, jump to the code segment of operating system, complete from core initialization.
Concrete, comprise from the initialized step of core: from core L1cache, MMU (Memory Management Unit, memory management unit), other the initialization such as TLB (Translation Lookaside Buffer, bypass conversion buffered or page table buffering); All core online (reaching the standard grade); Should add from core the dispatching zone of this polycaryon processor.
The large little endian mode from core that the bootloader of the present embodiment default storage the arranges large little endian mode required with operating system is identical, so do not need to consider that whether whether required with the operating system large little endian mode of the large little endian mode from core that arranges in bootloader is identical, the rear direct execution step 404 of execution of step 403.
It should be noted that, in the processor of the enough definite place of main nuclear energy, one is total several from core, and a startup mark can be set in shared drive.Main core resets one from core, be reset from core initialization completes, can change the startup mark shared drive from core, to notify main core to start complete from core.Meanwhile, the startup mark in main core meeting poll shared drive, judges according to starting mark whether this starts complete from core; In the case of starting being modified of identifying, reinitialize and start mark, start to start next from core.
From core initialization completes, in the situation that also having other not start from core, continue execution step 403-404, other are carried out to initialization from core; When at least one each from core all completes from core initialization from core, the polycaryon processor of the embodiment of the present invention completes startup.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, in the case of 0 address of the first address mapping bus of internal memory, by the continuous storage space being stored to from core boot after the first address of internal memory; Main core resets from core, to make from 0 address of the PC pointed bus of core, from core is reset, the first address of the internal memory shining upon by 0 address of described bus access bus, read store after the first address of internal memory described in internal memory from core boot, and carry out from core boot; Execute from core boot from core, jump to the code segment of operating system, complete from core initialization.Like this, the polycaryon processor that utilizes every kind of model being resetted by main core from core from the characteristic of 0 address of the PC pointed bus of core, set up the mapping relations of 0 address of bus and the first address of internal memory, and by the continuous storage space being stored in from core boot the first address of internal memory, make from core is reset can by the first address of internal memory corresponding to 0 address of bus read in internal memory, store from core boot, and carry out described from core boot, thereby just need in bus, not set for storing the fixed address A at the storage address of internal memory from core boot, realize the solution coupling of fixed address A between the bootloader of polycaryon processor and operating system, do not need to arrange according to each model polycaryon processor the operating system of coupling, make the polycaryon processor of different editions model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improve the compatibility of operating system.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, is applied to the computing node that comprises polycaryon processor and internal memory, and wherein this polycaryon processor is by bus access internal memory, and this polycaryon processor comprises main core and at least one is from core.
It should be noted that, the embodiment of the present invention has only been described a start-up course from core.If this polycaryon processor comprises multiple from the situation of core, main core first performs step 501-511, completes from the configuration of core boot, then makes successively each perform step 512-523 from core, to complete all startups from core, this polycaryon processor just completes startup like this.
As shown in Figure 5, the method comprises:
501, main core is carried out bootloader.
Concrete, can refer step 401, do not repeat them here.
502, main core adding dormancy instruction from core boot.
Wherein, dormancy instruction is used for making from core in dormant state.
Now, from core boot, not only have startup originally this from the required program of core, also has dormancy instruction, accordingly, main core need to be set from core number of resets, is to carry out the dormancy instruction from core boot or carry out from core boot, to start this relative program from core from core according to determining from core number of resets after core is reset.
It should be noted that, the dormancy instruction from core boot is an assembly instruction, while carrying out this instruction, rests on this instruction from core, waits for and is interrupted or waits for that main core reset should be from core.
It should be noted that, if from core in dormant state, meet entry condition from core so,, from core is reset, be bound to point to 0 address of bus from the PC pointer of core.
In prior art, industry starts flow process from core large small end scene is supported to situation as shown in Figure 6, the large little endian mode of bootloader must be consistent with the large little endian mode of operating system, can only start with the bootloader of little endian mode the operating system of little endian mode, the bootloader of large end pattern starts the operating system of large end pattern, can cause so same operating system can not use the different bootloader of little endian modes greatly, cannot realize the scale-of-two normalizing of operating system completely.Step 503-506 in the present embodiment and step 507-510 are two kinds of methods that make the large little endian mode of the main core arranging in bootloader and the large little endian mode compatibility of operating system, so only need to perform step any in 503-506 or step 507-510.
503, main core obtains the large little endian mode of the main core arranging in bootloader.
Concrete, main core reads the status register of main core, and the large small end pattern information of storing from status register is determined the large little endian mode of the main core arranging in bootloader.
It should be noted that, due to bootloader in the time writing and operating system be separated from each other, so having that the required large little endian mode of the large little endian mode of the main core arranging in bootloader and operating system is unmatched may, for same operating system can be used different bootloader, namely realize the scale-of-two normalizing of multicore processor operating system, so the large little endian mode of main core need to be adjusted.
It should be noted that, the large little endian mode of the main core arranging in bootloader is identical with the large little endian mode of bootloader, because the large little endian mode of bootloader is fixed, and the required large little endian mode of operating system is also fixed, and the large little endian mode of main core can change, so need to be whether consistent by judging the large little endian mode of the main core arranging in the bootloader large little endian mode required with operating system, judge whether to change the large little endian mode of main core.
504, main core obtains the required large little endian mode of operating system.
Concrete, main core passes through the instruction of data access mode read operation system code section, and according to the coding rule of machine code, judges whether the instruction of reading system code segment is reversed, thereby determines the required large little endian mode of operating system.
The large little endian mode of the main core 505, arranging in the bootloader large little endian mode required from operating system is different, main core is changed the large little endian mode of main core, makes the large little endian mode of main core after the change large little endian mode required with operating system identical.
The large little endian mode of the main core 506, arranging in the bootloader large little endian mode required from operating system is different, all parameters that bootloader is passed to operating system by main core are carried out large little endian mode conversion, make bootloader after conversion pass to the large little endian mode of all parameters of the operating system large little endian mode required with operating system identical; Or, the required parameter of main core that bootloader is passed to operating system by main core is carried out large little endian mode conversion, makes bootloader after conversion pass to the large little endian mode of the required parameter of the main core of the operating system large little endian mode required with operating system identical.
Wherein, all parameters that bootloader passes to operating system comprise: bootloader pass to the required parameter of the main core of operating system and bootloader pass to operating system from the required parameter of core.
It should be noted that, consistent because bootloader passes to the large little endian mode of main core and the large little endian mode of bootloader that arrange in the large little endian mode of parameter of operating system and bootloader.So the large little endian mode of the main core arranging in the bootloader large little endian mode required with operating system is not identical, namely, it is not identical that bootloader passes to the large little endian mode of parameter of the operating system large little endian mode required with operating system, now, the large little endian mode that bootloader need to be passed to the parameter of operating system is changed, operating system make the large little endian mode of parameter after the conversion large little endian mode required with described operating system identical, so that can correctly read this parameter.
It should be noted that, the parameter that main core is now changed has two kinds of situations: the first situation, all parameters that bootloader is passed to operating system by main core are all carried out large little endian mode conversion, now, the parameter that main consideration convey changes comprises: bootloader pass to the required parameter of the main core of operating system and bootloader pass to operating system from the required parameter of core; The second situation, the required parameter of main core that main core passes to operating system at this by bootloader is carried out large little endian mode conversion, in this case, from core in the time jumping to operating system, just determine whether by bootloader pass to operating system from core need parameter carry out large little endian mode conversion.
It should be noted that, the parameter that bootloader passes to operating system comprises the size of internal memory, the information such as serial ports transfer rate.
It should be noted that, the large little endian mode of the main core the arranging large little endian mode required with operating system is identical, do not perform step 505-506 in bootloader, directly perform step 511.
It should be noted that, the parameter of obtaining according to main core is all parameters that bootloader passes to operating system, or bootloader passes to the required parameter of main core in all parameters of operating system, performs step respectively 507-508 or step 509-510.
507, main core obtains bootloader and passes to all parameters of operating system.
Wherein, the stem that bootloader passes to all parameters of operating system is added with the first Magic number.All parameters that bootloader passes to operating system comprise: bootloader pass to the required parameter of the main core of operating system and bootloader pass to operating system from the required parameter of core.
The first Magic number is predefined by the frequency of occurrences low and more peculiar numeral or alphabetical combination.Whether the first Magic number is identical for judging the large little endian mode of the main core that bootloader the arranges large little endian mode required with operating system.
Now, all parameters required operating system are once all passed to operating system by bootloader.The parameter that bootloader passes to operating system comprises the size of internal memory, the information such as serial ports transfer rate.
508, in the situation that the first Magic number changes, main core is changed the large little endian mode of main core, and all parameters that bootloader passes to operating system are carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the main core after change pass to the large little endian mode of all parameters of the operating system large little endian mode required with described operating system identical.
Concrete, main core is by the first Magic number getting and pre-stored the first Magic number comparison, when the first Magic number obtaining different from the first pre-stored Magic number, just illustrate that the large little endian mode of the main core large little endian mode required from operating system is different, main core is changed the large little endian mode of main core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion.
It should be noted that, in the situation that the first Magic number does not change, do not perform step 508, directly perform step 511.
509, main core obtains bootloader and passes to the required parameter of described main core of operating system.
Wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number.
The second Magic number is also predefined by the frequency of occurrences low and more peculiar numeral or alphabetical combination, but the second Magic number is different from the first Magic number.
510, in the situation that the second Magic number changes, main core is changed the large little endian mode of main core, and the required parameter of main core that bootloader passes to operating system is carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the main core of the operating system large little endian mode required with operating system identical.
Concrete, main core is by the second Magic number getting and pre-stored the second Magic number comparison, when the second Magic number obtaining different from the second pre-stored Magic number, just illustrate that the large little endian mode of the main core large little endian mode required from operating system is different, main core is changed the large little endian mode of main core, and the required parameter of main core that bootloader passes to operating system is carried out to large little endian mode conversion.
It should be noted that, in the situation that the second Magic number does not change, do not perform step 510, directly perform step 511.
511, main core is by the continuous storage space being stored to from core boot after the first address of internal memory.
Wherein, the first address of internal memory is mapped to 0 address of bus.
Concrete, can refer step 402, do not repeat them here.
512, main core obtains the state from core.
It should be noted that, main core need to be determined the state from core, and then determines once resetting from core or twice reset.
513, main core determines that from core main core setting is twice from the number of resets of core when the state of activation.
It should be noted that, if from core in state of activation, so may from the related hardware of core meet start required condition from core, so need to be to carrying out twice reset from core.Main core resets from core for the first time, is to carry out the dormancy instruction from core boot in order to make from core, enters dormant state, that is to say it is in order to configure related hardware, starts required condition to make to meet from core; Main core resets from core for the second time, is to carry out boot and start from the required program of core from core in order to make, and completes the startup from core.
It should be noted that, main core will be stored in fixing bus address from the number of resets of core, from core is reset, from fixing bus address, read the number of resets of self, carry out the dormancy instruction from core boot or from core boot, start this relative program from core to judge.
514, main core is determined from core in dormant state or not when starting state, main core setting from the number of resets of core for once.
It should be noted that, if from core in dormant state or starting state not, meet and start required condition from core from the related hardware of core so, so only need to be to once resetting and just can complete the startup from core from core.
515, main core resets from core, so that from 0 address of the PC pointed bus of core, be reset from core, the first address of the internal memory shining upon by 0 address of described bus access bus, reads also carrying out from core boot from core boot of storing after internal memory first address in internal memory.
Concrete, step 515 can be decomposed into following three steps:
Step 1: main core resets from core, is reset from core, from 0 address of the PC pointed bus of core, and obtains the number of resets from core.
It should be noted that, the value of the number of resets from core of obtaining from core may be once, is likely also twice.
Concrete, at main core, by be stored to the fixed address of bus from the number of resets of core, the process of obtaining self number of resets from core is exactly to read the process of the value of storing this fixed address from core to bus fixed address.
It should be noted that, need to judge and jump to memory headroom first address corresponding to bus space 0 address according to number of resets from core, be to carry out from core boot, to start the program from core, or carry out the dormancy instruction from core boot.
Step 2, in the case of being twice from the number of resets of core, the first address of the internal memory shining upon by bus access bus space 0 address from core, read and carry out the dormancy instruction from core boot, wait in the lump from core and again being resetted by main core subtracting from the number of resets of core.
It should be noted that, in the situation that need to carrying out twice reset from core is definite, step 1 and step 2 make to complete for the first time and reset from core, become dormant state from core from state of activation, namely configure related hardware and met the condition starting from core, and wait for that main core resets for the second time, start to complete from core.
It should be noted that, in entering dormant state from core, main core can subtract one by the number of resets from core, to make from core in the time resetting for the second time, the number of resets of judging is for once, thereby carry out the program except dormancy instruction from core boot, instead of carry out the dormancy instruction from core boot.
It should be noted that, from core enters dormant state, wait for and being resetted by main core for the second time, in the situation that being resetted by main core for the second time from core, jump to step 1.
Step 3: in the case of from the number of resets of core be once, by the first address of the internal memory of 0 address mapping of bus access bus, read and carry out the program except dormancy instruction from core boot from core, complete the startup from core.
It should be noted that, check carry out twice reset from core in the situation that main, execution step order is: step 1, step 2, step 1, step 3; Check once reset from core in the situation that main, execution step order is: step 1, step 3.
To it should be noted that, in order improving from the robustness of core boot, to avoid program to be tampered, can be at the Magic number that adds foremost the digital or letter composition that some frequencies of occurrences are low and more peculiar from core boot.Before reading the boot of self from core, judge from the Magic number of core boot whether identical with the predefined Magic number from core boot of system, judge storage from core boot whether through distorting.In the case of from the Magic number of core boot is identical with the predefined Magic number from core boot of system, just read from core boot from core, carry out the dormancy instruction from core boot or carry out other programs except dormancy instruction from core boot; In the case of from the Magic number of core boot is not identical with the predefined Magic number from core boot of system, illustrate from core boot through distorting, can not obtain from core correct in core boot, so should start unsuccessfully from core, now need not carry out following in steps.
In prior art, industry starts flow process from core large small end scene is supported to situation as shown in Figure 6, the large little endian mode of bootloader must be consistent with the large little endian mode of operating system, can only start with the bootloader of little endian mode the operating system of little endian mode, the bootloader of large end pattern starts the operating system of large end pattern, can cause so same operating system can not use the different bootloader of little endian modes greatly, cannot realize the scale-of-two normalizing of operating system completely.Step 516-519 in the present embodiment and step 520-522 make two kinds of methods from the large little endian mode of core and the large little endian mode compatibility of operating system of arranging in bootloader, so only need to perform step any in 516-519 or step 520-522.
It should be noted that, the deposit order of data in storer is divided into large end pattern and little endian mode.Large end pattern (Big-Endian) is exactly the low address end that upper byte is emitted on internal memory, and low byte is emitted on the high address end of internal memory.Little endian mode (Little-Endian) is exactly the low address end that low byte is emitted on internal memory, and upper byte is emitted on the high address end of internal memory.Large little endian mode when the large little endian mode of processor core must be with data storage is identical, the reading out data that ability is correct.
516, execute from core boot from core, obtain from core the large little endian mode from core arranging bootloader.
Concrete, reading this status register from core from core, the large small end pattern information of storing from status register, determines the large little endian mode from core arranging in bootloader.
It should be noted that, due to bootloader in the time writing and operating system be separated from each other, so having that the required large little endian mode of the large little endian mode from core that arranges in bootloader and operating system is unmatched may, for same operating system can be used different bootloader, namely realize the scale-of-two normalizing of multicore processor operating system, so the large little endian mode from core need to be adjusted, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion.
It should be noted that, what in bootloader, arrange is identical with the large little endian mode of bootloader from the large little endian mode of core, because the large little endian mode of bootloader is fixed, and the required large little endian mode of operating system is also fixed, and can change from the large little endian mode of core, so need to be whether consistent by judging the large little endian mode from core that arranges in the bootloader large little endian mode required with operating system, judge whether to need the large little endian mode of change from core.
517, obtain the required large little endian mode of operating system from core.
Concrete, pass through the instruction of data access mode read operation system code section from core, and according to the coding rule of machine code, judge whether the instruction of reading system code segment is reversed, thereby determine the required large little endian mode of operating system.
If the large little endian mode from core arranging in the 518 bootloader large little endian mode required from operating system is different, the large little endian mode from core change from core, makes the large little endian mode from core after the change large little endian mode required with operating system identical.
It should be noted that, because it is identical with the large little endian mode from core arranging in bootloader that bootloader passes to the large little endian mode of the parameter of operating system, so in the case of from the large little endian mode of the core large little endian mode required with operating system is not identical, large little endian mode from core need to be changed, make the large little endian mode required with described operating system of the large little endian mode from core after change identical, so that operating system can improved reference cell trimming algorithms for accurate read operation system.
519, the large little endian mode from core that arranges in the bootloader large little endian mode required from operating system is different, and the required parameter of main core that bootloader is passed to operating system by main core is carried out in the situation of large little endian mode conversion, what from core, bootloader is passed to operating system carries out large little endian mode conversion from the required parameter of core, makes bootloader after conversion pass to the large little endian mode from the required parameter of core of the operating system large little endian mode required with operating system identical.
It should be noted that, the required parameter of main core that only bootloader is passed to operating system at main core is carried out large little endian mode conversion, instead of all parameters that bootloader passes to operating system are carried out in the situation of large little endian mode conversion, bootloader passes in the parameter of operating system from the required parameter of core also through large little endian mode conversion.So in the case of from the large little endian mode of the core large little endian mode required from operating system is different, further also just bootloader passes to carrying out the conversion of large little endian mode from the required parameter of core to make bootloader conversion pass to the large little endian mode from the required parameter of core of the operating system large little endian mode required with operating system identical of operating system.
It should be noted that, the all parameters that bootloader passed to operating system at main core are carried out large little endian mode conversion, bootloader passes in the parameter of operating system from the required parameter of core through large little endian mode conversion, the large little endian mode required with operating system is identical, so in such cases, do not perform step 519.
It should be noted that, in the case of determining from the large little endian mode of the core large little endian mode required with operating system is identical from core, do not perform step 518-519, directly perform step 523.
520, from core obtain bootloader pass to operating system from the required parameter of core.
Wherein, the stem from the required parameter of core that bootloader passes to operating system is added with the 3rd Magic number.
It should be noted that, the 3rd Magic number is also predefined by the frequency of occurrences low and more peculiar numeral or alphabetical combination, but the second Magic number is all different from the first Magic number and the second Magic number.
It should be noted that, the large little endian mode of the 3rd Magic number is identical with the large little endian mode from core arranging in bootloader.If the 3rd Magic number reading from core is correct, identical with the large little endian mode from core arranging in bootloader with regard to the large little endian mode of description operation system; If it is not the Magic number of the parameter reading according to operating system is incorrect, identical with the large little endian mode from core arranging in bootloader with regard to the large little endian mode of description operation system.
521,, in the situation that determining that from core the 3rd Magic number changes, the large little endian mode from core change from core, makes the large little endian mode from core after the change large little endian mode required with operating system identical.
Concrete, from core by the 3rd Magic number getting and pre-stored the 3rd Magic number comparison, when the 3rd Magic number obtaining different from the 3rd pre-stored Magic number, just explanation is different from the large little endian mode of the core large little endian mode required from operating system, the large little endian mode from core change from core.
522, determining that from core the 3rd Magic number changes, and main core obtains in the situation that bootloader passes to the required parameter of the main core of described operating system, what from core, bootloader is passed to operating system carries out large little endian mode conversion from the required parameter of core, makes bootloader after conversion pass to the large little endian mode from the required parameter of core of the operating system large little endian mode required with operating system identical.
It should be noted that, the required parameter of main core that only bootloader is passed to operating system at main core is carried out large little endian mode conversion, instead of all parameters that bootloader passes to operating system are carried out in the situation of large little endian mode conversion, bootloader passes in the parameter of operating system from the required parameter of core also through large little endian mode conversion.So in the case of from the large little endian mode of the core large little endian mode required from operating system is different, further also bootloader will be passed to carrying out the conversion of large little endian mode from the required parameter of core to make bootloader conversion pass to the large little endian mode from the required parameter of core of the operating system large little endian mode required with operating system identical of operating system.
It should be noted that, the all parameters that bootloader passed to operating system at main core are carried out large little endian mode conversion, bootloader passes in the parameter of operating system from the required parameter of core through large little endian mode conversion, the large little endian mode required with operating system is identical, so in such cases, do not perform step 522.
It should be noted that, in the situation that the 3rd Magic number does not change, do not perform step 521-522, directly perform step 523.
523, jump to the code segment of operating system, complete from core initialization.
Concrete, can refer step 404, do not repeat them here.
It should be noted that, perform step at 523 o'clock, can ensure from the large little endian mode of the core large little endian mode required with operating system identical.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, and main core adding dormancy instruction from core boot; Whether the large little endian mode that judges the large little endian mode of the main core arranging in the bootloader main core required with operating system is identical, not identical in the situation that, changes the large little endian mode of main core; 0 address that is mapped to bus at the first address of internal memory, by the storage space afterwards continuous first address that is stored to internal memory from core boot; Main core obtains the state from core, according to setting from core number of resets from nuclear state; Main checking from core carried out once or twice reset, so that from 0 address of the PC pointed bus of core, the first address of the internal memory shining upon by 0 address of described bus access bus from core, reads and carry out from core boot; Execute from core boot from core, judge that whether the large little endian mode from core that arranges in the bootloader large little endian mode from core required with operating system be identical, in the situation that both are not identical, change is from the large little endian mode of core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion; Finally jump to the code segment of operating system, complete from core initialization.Like this, the polycaryon processor that utilizes every kind of model is in the characteristic from 0 address of the PC pointed bus of core from core is reset, exist mapping relations in 0 address of bus and the first address of internal memory, by in the continuous storage space being stored in from core boot the first address of internal memory, make from core is reset can by the first address of internal memory corresponding to 0 address of bus read in internal memory, store from core boot, and carry out described from core boot, thereby just need in bus, not set for storing the fixed address A at the storage address of internal memory from core boot, realize the solution coupling of fixed address A between the bootloader of polycaryon processor and operating system, do not need to arrange according to each model polycaryon processor the operating system of coupling, make the polycaryon processor of different editions model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improve the compatibility of operating system.And in the present embodiment, consider from core the situation in state of activation, after reset, can not meet from core entry condition, so now to carrying out twice reset from core, main core resets and makes to meet entry condition from core from core for the first time, main core resets and makes successfully to start from core for the second time, thereby has further ensured the successful startup from core.Simultaneously, in the present embodiment, whether change main core or the large little endian mode from core according to the main core arranging in bootloader or from the large little endian mode of core and the required large small end mode decision of operating system, make polycaryon processor use the bootloader that same operating system can compatible different large little endian modes, further reduce the constraint of multicore processor operating system scale-of-two normalizing, improved the compatibility of operating system.Finally, the present invention has removed the use constraint of two operating system scale-of-two normalizings, make the operating system of same version can run on more bootloader and processor, the very big efficiency that improves exploitation, tests, safeguards, the cost of minimizing exploitation simultaneously, test, maintenance.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, be applied to the computing node that comprises polycaryon processor, internal memory and nonvolatile memory, wherein polycaryon processor is by bus access internal memory and nonvolatile memory, and this polycaryon processor comprises main core and at least one is from core.
It should be noted that, the embodiment of the present invention has only been described a start-up course from core.If this polycaryon processor comprises multiple from the situation of core, main core first performs step 701-702, completes from the configuration of core boot, then makes successively each perform step 703-704 from core, to complete all startups from core, this polycaryon processor just completes startup like this.
As shown in Figure 7, the method comprises:
701, main core is from from core configuration-direct, or from nonvolatile memory, obtains the configuration address from core.
Wherein, be arranged at bootloader from core configuration-direct.
It should be noted that, nonvolatile memory is for storing the configuration address from core obtaining from core configuration-direct from bootloader.An address internal memory from the configuration address of core.
It should be noted that, the present embodiment has increased from core configuration-direct in bootloader, makes dynamically can join from core jump address.Meanwhile, the operation interface of bootloader provides the possibility of man-machine interaction, and user can configure from core jump address in the operation interface of bootloader.
It should be noted that, if start for the first time this polycaryon processor, so main core is by obtaining from core configuration address from core configuration-direct in bootloader, and should be stored in nonvolatile memory from core configuration address, to make from core, being waken up by main core, can to get this configuration address from nonvolatile memory; If not start for the first time this polycaryon processor, so main core just can from nonvolatile memory obtain stored from core configuration address.
702, main core is by the continuous storage space being stored to from core boot after configuration address internal memory.
It should be noted that, main core, by being stored to from core boot internal memory in storage space continuous from core configuration address, reads from core boot to make to jump to the configuration address from core in internal memory from core is waken up.
703, main core, to send internuclear interrupt message from core, makes to pass through described bus access configuration address from core, reads also carrying out from core boot from core boot of storing after configuration address in internal memory.
Concrete, receive internuclear interrupt message from core, from nonvolatile memory, obtain from core configuration address from core, jump to from core configuration address, and by store in should storage space continuous from core configuration address in bus access internal memory from core boot.
It should be noted that, main core is identical to the method that sends internuclear interruption from core with main core prior art to send the method for internuclear interruption from core, does not repeat them here.
It should be noted that, main core wakes up from core to send internuclear interruption from core, to make starting startup from core.
704, execute from core boot from core, jump to the code segment of operating system, complete from core initialization.
Comprise from the initialized step of core: from core L1cache, MMU (Memory Management Unit, memory management unit), other the initialization such as TLB (Translation Lookaside Buffer, bypass conversion buffered or page table buffering); All core online (reaching the standard grade); Should add from core the dispatching zone of this polycaryon processor.
It should be noted that, it should be noted that, the deposit order of data in storer is divided into large end pattern and little endian mode.Large end pattern (Big-Endian) is exactly the low address end that upper byte is emitted on internal memory, and low byte is emitted on the high address end of internal memory.Little endian mode (Little-Endian) is exactly the low address end that low byte is emitted on internal memory, and upper byte is emitted on the high address end of internal memory.Large little endian mode when the large little endian mode of processor core must be with data storage is identical, the reading out data that ability is correct.The large little endian mode from core that the bootloader of the present embodiment default storage the arranges large little endian mode required with operating system is identical, so do not need to consider that whether whether required with the operating system large little endian mode of the large little endian mode from core that arranges in bootloader is identical, the rear direct execution step 704 of execution of step 703.
From core initialization completes, in the situation that also having other not start from core, continue execution step 703-704, other are carried out to initialization from core; When at least one each from core all completes from core initialization from core, the polycaryon processor of the embodiment of the present invention completes startup.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, main core from obtaining from core configuration address from core configuration-direct or from nonvolatile memory, and will be stored to from core boot internal memory in storage space continuous from core configuration address, then to send internuclear interruption from core, wake up from core, start from core from configuration address to carry out from core boot, execute from core boot from core, jump to the code segment of operating system, complete from core initialization.Like this for different polycaryon processors, user can arrange from core configuration address flexibly according to the processor of different model, from the memory address of core boot, and the coupling that need not correspondence is set remove fixed address A between the bootloader of polycaryon processor and operating system according to the processor of different model, make the polycaryon processor of different model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improved the compatibility of operating system.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, method is applied to the computing node that comprises polycaryon processor, internal memory and storer, wherein polycaryon processor is by bus access internal memory and nonvolatile memory, and polycaryon processor comprises main core and at least one is from core.
It should be noted that, the embodiment of the present invention has only been described a start-up course from core.If this polycaryon processor comprises multiple from the situation of core, main core first performs step 801-812, completes from the configuration of core boot, then makes successively each perform step 813-821 from core, to complete all startups from core, this polycaryon processor just completes startup like this.
As shown in Figure 8, the method comprises:
801, main core is from obtaining the configuration address from core from core configuration-direct.
It should be noted that, in the time starting for the first time this polycaryon processor or user and want to change the memory address from core boot, main core need to obtain from core configuration address from the operation interface of bootloader.
802, the configuration address from core is stored to nonvolatile memory by main core.
It should be noted that, main core obtains from core configuration address from the operation interface of bootloader, need to be stored in nonvolatile memory from core configuration address, with make after start-up course in need not all reconfigure each time this from core configuration address, but directly from nonvolatile memory, obtain from core configuration address.
803, main core is from from core configuration-direct, or from nonvolatile memory, obtains the configuration address from core.
Wherein, wherein, be arranged at bootloader from core configuration-direct, for the configuration address from core is set.Nonvolatile memory for store from obtain from core configuration-direct from core configuration address.An address internal memory from core configuration address.
Concrete, can refer step 701, do not repeat them here.
In prior art, industry starts flow process from core large small end scene is supported to situation as shown in Figure 6, the large little endian mode of bootloader must be consistent with the large little endian mode of operating system, can only start with the bootloader of little endian mode the operating system of little endian mode, the bootloader of large end pattern starts the operating system of large end pattern, can cause so same operating system can not use the different bootloader of little endian modes greatly, cannot realize the scale-of-two normalizing of operating system completely.Step 804-807 in the present embodiment and step 808-811 are two kinds of methods that make the large little endian mode of the main core arranging in bootloader and the large little endian mode compatibility of operating system, so only need to perform step any in 804-807 or step 808-811.
804, main core obtains the large little endian mode of the main core arranging in bootloader.
Concrete, can refer step 503, do not repeat them here.
805, main core obtains the required large little endian mode of operating system.
Concrete, can refer step 504, do not repeat them here.
The large little endian mode of the main core 806, arranging in the bootloader large little endian mode required from operating system is different, the large little endian mode of the described main core of main core change, makes the large little endian mode of the described main core after the change large little endian mode required with described operating system identical.
The large little endian mode of the main core 807, arranging in the bootloader large little endian mode required from operating system is different, all parameters that bootloader is passed to operating system by main core are carried out large little endian mode conversion, make bootloader after conversion pass to the large little endian mode of all parameters of the operating system large little endian mode required with operating system identical; Or, the required parameter of main core that bootloader is passed to operating system by main core is carried out large little endian mode conversion, makes bootloader after conversion pass to the large little endian mode of the required parameter of the main core of the operating system large little endian mode required with operating system identical.
Wherein, all parameters that bootloader passes to operating system comprise: bootloader pass to the required parameter of the main core of operating system and bootloader pass to operating system from the required parameter of core.
Concrete, can refer step 506, do not repeat them here.
It should be noted that, the large little endian mode of the main core the arranging large little endian mode required with operating system is identical, do not perform step 806-807 in bootloader, directly perform step 812.
It should be noted that, the parameter of obtaining according to main core is all parameters that bootloader passes to operating system, or bootloader passes to the required parameter of main core in all parameters of operating system, performs step respectively 808-809 or step 810-811.
808, main core obtains bootloader and passes to all parameters of operating system.
Wherein, the stem that bootloader passes to all parameters of operating system is added with the first Magic number.
Concrete, can refer step 507, do not repeat them here.
809, in the situation that the first Magic number changes, main core is changed the large little endian mode of main core, and all parameters that bootloader passes to operating system are carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the main core after change pass to the large little endian mode of all parameters of the operating system large little endian mode required with operating system identical.
Wherein, all parameters that bootloader passes to operating system comprise: bootloader pass to the required parameter of the main core of operating system and bootloader pass to operating system from the required parameter of core.
Concrete, can refer step 508, do not repeat them here.
It should be noted that, in the situation that the first Magic number does not change, do not perform step 809, directly perform step 812.
810, main core obtains bootloader and passes to the required parameter of described main core of operating system.
Wherein, the stem that bootloader passes to the required parameter of the main core of operating system is added with the second Magic number.
Concrete, can refer step 509, do not repeat them here.
811, in the situation that the second Magic number changes, main core is changed the large little endian mode of main core, and the required parameter of described main core that bootloader passes to operating system is carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the main core after change pass to the large little endian mode of the required parameter of the main core of the operating system large little endian mode required with operating system identical.
Concrete, can refer step 510, do not repeat them here.
It should be noted that, in the situation that the second Magic number does not change, do not perform step 811, directly perform step 812.
812, main core is by the continuous storage space being stored to from core boot after configuration address internal memory.
Concrete, can refer step 702, do not repeat them here.
813, main core, to send internuclear interrupt message from core, makes to pass through bus access configuration address from core, reads also carrying out from core boot from core boot of storing after configuration address in internal memory.
Concrete, can refer step 703, do not repeat them here.
In prior art, industry starts flow process from core large small end scene is supported to situation as shown in Figure 6, the large little endian mode of bootloader must be consistent with the large little endian mode of operating system, can only start with the bootloader of little endian mode the operating system of little endian mode, the bootloader of large end pattern starts the operating system of large end pattern, can cause so same operating system can not use the different bootloader of little endian modes greatly, cannot realize the scale-of-two normalizing of operating system completely.Step 814-817 in the present embodiment and step 818-820 make two kinds of methods from the large little endian mode of core and the large little endian mode compatibility of operating system of arranging in bootloader, so only need to perform step any in 814-817 or step 818-820.
814, execute from core boot from core, obtain from core the described large little endian mode from core arranging bootloader.
Concrete, can refer step 516, do not repeat them here.
815, obtain the required large little endian mode of operating system from core.
Concrete, can refer step 517, do not repeat them here.
What 816, in bootloader, arrange is described from the large little endian mode of the core large little endian mode required from operating system is different, large little endian mode from core change from core, makes the large little endian mode from core after the change large little endian mode required with operating system identical.
Concrete, can refer step 518, do not repeat them here.
817, the large little endian mode from core that arranges in the bootloader large little endian mode required from operating system is different, and the required parameter of main core that bootloader is passed to operating system by main core is carried out in the situation of large little endian mode conversion, what from core, bootloader is passed to operating system carries out large little endian mode conversion from the required parameter of core, makes bootloader after conversion pass to the large little endian mode from the required parameter of core of the operating system large little endian mode required with operating system identical.
Concrete, can refer step 519, do not repeat them here.
It should be noted that, the all parameters that bootloader passed to operating system at main core are carried out large little endian mode conversion, bootloader passes in the parameter of operating system from the required parameter of core through large little endian mode conversion, the large little endian mode required with operating system is identical, so in such cases, do not perform step 817.
It should be noted that, in the case of determining from the large little endian mode of the core large little endian mode required with operating system is identical from core, do not perform step 816-817, directly perform step 821.
818, from core obtain bootloader pass to operating system from the required parameter of core.
Wherein, the stem from the required parameter of core that bootloader passes to operating system is added with the 3rd Magic number.
Concrete, can refer step 520, do not repeat them here.
819,, in the situation that determining that from core the 3rd Magic number changes, the large little endian mode from core change from core, makes the large little endian mode from core after the change large little endian mode required with operating system identical.
Concrete, can refer step 521, do not repeat them here.
820, determining that from core the 3rd Magic number changes, and main core obtains in the situation that bootloader passes to the required parameter of the main core of operating system, what from core, described bootloader is passed to operating system carries out large little endian mode conversion from the required parameter of core, makes bootloader after conversion pass to the large little endian mode from the required parameter of core of the operating system large little endian mode required with operating system identical.
Concrete, can refer step 522, do not repeat them here.
It should be noted that, the all parameters that bootloader passed to operating system at main core are carried out large little endian mode conversion, bootloader passes in the parameter of operating system from the required parameter of core through large little endian mode conversion, the large little endian mode required with operating system is identical, so in such cases, do not perform step 820.
It should be noted that, in the situation that the 3rd Magic number does not change, do not perform step 819-820, directly perform step 821.
821, jump to the code segment of operating system from core, complete from core initialization.
From core initialization completes, in the situation that also having other not start from core, continue execution step 813-821, other are carried out to initialization from core; All started from core in the situation that, complete the startup of this polycaryon processor all.
It should be noted that, perform step at 821 o'clock, can ensure from the large little endian mode of the core large little endian mode required with operating system identical.
The embodiment of the present invention provides a kind of method that starts polycaryon processor, user configured from core configuration address by obtaining from core configuration-direct of newly-increased bootloader; Whether the large little endian mode that judges the large little endian mode of the main core arranging in the bootloader main core required with operating system is identical, not identical in the situation that, change the large little endian mode of main core, make the large little endian mode of the large little endian mode of main core after the change main core required with operating system identical; To deposit to storage space continuous from core configuration address from core boot, then wake up from core, put address from caryogamy and read from core boot according to user configured from core, execute from core boot from core, judge that whether the large little endian mode from core that arranges in the bootloader large little endian mode from core required with operating system be identical, not identical in the situation that, change is from the large little endian mode of core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion; Finally jump to the code segment of operating system, complete from core initialization.Like this, user can arrange from core configuration address according to the processor of different model flexibly according to the processor user of each model, from the memory address of core boot, and the coupling that need not correspondence is set remove fixed address A between the bootloader of polycaryon processor and operating system according to the processor of different model, make the polycaryon processor of different model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improve the compatibility of operating system.Simultaneously, in the present embodiment, whether change main core or the large little endian mode from core according to the main core arranging in bootloader or from the large little endian mode of core and the required large small end mode decision of operating system, make polycaryon processor use the bootloader that same operating system can compatible different large little endian modes, further reduce the constraint of multicore processor operating system scale-of-two normalizing, improved the compatibility of operating system.Finally, the present invention has removed the use constraint of two operating system scale-of-two normalizings, make the operating system of same version can run on more bootloader and processor, the very big efficiency that improves exploitation, tests, safeguards, the cost of minimizing exploitation simultaneously, test, maintenance.
The embodiment of the present invention also provides a kind of bootloader method of large small end mode adaptive, and this processor comprises at least one kernel.
The present embodiment is not only applicable to the startup of polycaryon processor, is equally applicable to the startup of single core processor.
In prior art, industry starts flow process from core large small end scene is supported to situation as shown in Figure 6, the large little endian mode of bootloader must be consistent with the large little endian mode of operating system, can only start with the bootloader of little endian mode the operating system of little endian mode, the bootloader of large end pattern starts the operating system of large end pattern, can cause so same operating system can not use the different bootloader of little endian modes greatly, cannot realize the scale-of-two normalizing of operating system completely.It in the present embodiment, is a kind of method that makes the large little endian mode of bootloader and the large little endian mode compatibility of operating system.
As shown in Figure 9, comprising:
901, carry out bootloader.
It should be noted that, in the situation that processor is polycaryon processor, the main core in polycaryon processor is carried out bootloader, completes the initialization of main core and the required hardware of operating system.In the situation that processor is single core processor, this monokaryon is carried out bootloader, completes the initialization of self and the required hardware of operating system.
It should be noted that, in the situation that processor is polycaryon processor, after main core executes bootloader, execution step 902-905, then wakes up successively from core, and after core is carried out the boot of self, execution step 902-905, completes the startup of self.In the situation that processor is polycaryon processor, after this monokaryon executes bootloader, perform step successively 902-905, complete the startup of this processor.
902, obtain the large little endian mode when pronucleus arranging in bootloader.
Concrete, when pronucleus (current core) obtains the large little endian mode of the processor arranging in bootloader, can refer step 503 in main core obtain the large little endian mode of the main core arranging in bootloader, do not repeat them here.
It should be noted that, describedly refer to the core of current operation when pronucleus.It can be main core in polycaryon processor or from core that herein current endorsed, and may be also the monokaryon in single core processor.
903, obtain the required large little endian mode of operating system.
Concrete, when pronucleus obtains the required large little endian mode of operating system, can refer step 504 in main core obtain the required large little endian mode of operating system, do not repeat them here.
If in 904 bootloader, arrange when the large little endian mode of the pronucleus large little endian mode required from operating system different, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, make large little endian mode after the large little endian mode when pronucleus after change and parameter the are changed large little endian mode required with operating system identical.
Concrete, when the large little endian mode of pronucleus change oneself, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, in can refer step 505-506, main core be changed the large little endian mode of main core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, do not repeat them here.
It should be noted that, in bootloader, arrange when the large little endian mode of the pronucleus large little endian mode required with operating system is identical, do not perform step 904, directly perform step 905.
905, the code segment that jumps to operating system, completes initialization.
It should be noted that, in polycaryon processor from core execution of step 905, also need other that do not start to carry out initialization from core, until all complete from core initialization, this polycaryon processor starts complete so.After the monokaryon execution of step 905 of single core processor, just complete the startup of this single core processor.
The embodiment of the present invention provides a kind of bootloader method of large small end mode adaptive, obtain large little endian mode and the required large little endian mode of operating system when the pronucleus that in bootloader, arrange, if in bootloader, arrange when the large little endian mode of the pronucleus large little endian mode required from operating system different, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion.Like this, can whether change the large little endian mode when pronucleus when the large little endian mode of pronucleus and the required large small end mode decision of operating system according to what arrange in bootloader, make to use the bootloader that same operating system can compatible different large little endian modes, reduce the constraint of operating system scale-of-two normalizing, improved the compatibility of operating system.
The embodiment of the present invention also provides a kind of bootloader method of large small end mode adaptive, and this processor comprises at least one kernel.
The present embodiment is not only applicable to the startup of polycaryon processor, is equally applicable to the startup of single core processor.
In prior art, industry starts flow process from core large small end scene is supported to situation as shown in Figure 6, the large little endian mode of bootloader must be consistent with the large little endian mode of operating system, can only start with the bootloader of little endian mode the operating system of little endian mode, the bootloader of large end pattern starts the operating system of large end pattern, can cause so same operating system can not use the different bootloader of little endian modes greatly, cannot realize the scale-of-two normalizing of operating system completely.It in the present embodiment, is a kind of method that makes the large little endian mode of bootloader and the large little endian mode compatibility of operating system.
As shown in figure 10, comprising:
1001, carry out bootloader.
Concrete, can refer step 901, do not repeat them here.
It should be noted that, in the situation that processor is polycaryon processor, after main core executes bootloader, execution step 1002-1004, then wakes up successively from core, after core is carried out the boot of self, execution step 1002-1004, completes the startup of self.In the situation that processor is polycaryon processor, after this monokaryon executes bootloader, perform step successively 1002-1004, complete the startup of this processor.
1002, obtain bootloader and pass to the parameter of operating system.
Wherein, the stem of described parameter is added with Magic number.
Concrete, obtain bootloader and pass to the parameter of operating system from core or monokaryon, can refer step 507 in main core obtain bootloader and pass to all parameters of operating system, do not repeat them here.
If 1003 Magic numbers change, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, make large little endian mode after the large little endian mode when pronucleus after change and parameter the are changed large little endian mode required with operating system identical.
Concrete, when the large little endian mode of pronucleus change oneself, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, in can refer step 508, main core be changed the large little endian mode of main core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, do not repeat them here.
It should be noted that, in the situation that Magic number does not change, do not perform step 1003, directly perform step 1004.
1004, the instruction in executive operating system, completes startup.
It should be noted that, in polycaryon processor from core execution of step 1004, also needed other all from core initialization, this polycaryon processor starts complete so.After the monokaryon execution of step 1004 of single core processor, just complete the startup of this single core processor.
The embodiment of the present invention provides a kind of bootloader method of large small end mode adaptive, obtain the parameter that bootloader passes to operating system, if the Magic number of parameter changes, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion.Like this, can whether change the large little endian mode when pronucleus when the large little endian mode of pronucleus and the required large small end mode decision of operating system according to what arrange in bootloader, make to use the bootloader that same operating system can compatible different large little endian modes, reduce the constraint of operating system scale-of-two normalizing, improved the compatibility of operating system.
As shown in figure 11, the embodiment of the present invention provides a kind of structural representation of computing node.Shown in Figure 11, this computing node comprises: polycaryon processor 1101 and internal memory 1102, and wherein polycaryon processor 1101 is by bus access internal memory 1102, and in the present embodiment, this polycaryon processor 1101 comprises: main core 11011 and from core 11012.Wherein, can be one or more from the quantity of core 11012, in Figure 11, illustrate from core with one, but the embodiment of the present invention is not limited to this.
Main core 11011, for by the continuous storage space being stored to from core boot after the first address of internal memory; Wherein, the first address of internal memory is mapped to 0 address of bus.
Main core 11011, also for resetting from core 11012, so that from 0 address of the programmable counter PC pointed bus of core 11012.
From core 11012, for the first address of the internal memory of the 0 address mapping by described bus access bus, read store after the first address of internal memory in described internal memory 1102 from core boot and carry out from core boot.
From core 11012, also for jumping to the code segment of operating system, complete from core 11012 initialization.
Concrete, from core 11012, identical specifically for the large little endian mode from core 11012 that arranges in the bootloader large little endian mode required with operating system, jump to the code segment of operating system, complete from core initialization.
Further, main core 11011, also for obtaining from the state of core 11012.
Main core 11011, also for determining that from core 11012 it is twice that main core 11011 arranges from the number of resets of core 11012 when the state of activation.
Main core 11011, also for determining from core 11012 in dormant state or not when starting state, arranges from the number of resets of core 11012 as once.
Further, main core 11011, also for adding dormancy instruction from core 11012 boot; Dormancy instruction is used for making from core 11012 in dormant state.
Now, main core 11011, specifically for resetting for the first time from core 11012, from 0 address of the PC pointed bus of core 11012; From core 11012, specifically for passing through the first address of the internal memory shining upon 0 address of bus access bus, read and carry out the dormancy instruction from core boot; Main core 11011, specifically for resetting for the second time from core 11012, from 0 address of the PC pointed bus of core 11012; From core 11012, specifically for passing through the first address of the internal memory shining upon 0 address of bus access bus, read and carry out the program except dormancy instruction from core boot; Wherein, the described number of resets from core is twice.
Further, main core 11011, also for obtaining the large little endian mode of the main core 11011 that bootloader arranges.
Main core 11011, also for obtaining the required large little endian mode of operating system.
Main core 11011, also different for the large little endian mode of the main core 11011 that arranges at the bootloader large little endian mode required from operating system, change the large little endian mode of main core 11011, make the large little endian mode of main core 11011 after the change large little endian mode required with operating system identical.
Main core 11011, also different for the large little endian mode of the main core 11011 that arranges at the bootloader large little endian mode required from operating system, the all parameters that bootloader passed to operating system are carried out large little endian mode conversion, make the large little endian mode of described all parameters after the conversion large little endian mode required with described operating system identical; Or, the required parameter of main core 11011 that bootloader is passed to operating system is carried out large little endian mode conversion, makes bootloader after conversion pass to the large little endian mode of the required parameter of the main core 11011 of the operating system large little endian mode required with operating system identical; Wherein, all parameters that bootloader passes to operating system comprise: bootloader pass to the required parameter of the main core 11011 of operating system and bootloader pass to operating system from the required parameter of core 11012.
From core 11012, the large little endian mode from core 11012 also arranging for obtaining bootloader;
From core 11012, also for obtaining the required large little endian mode of operating system;
From core 11012, also in the case of determining that from core 11012 the large little endian mode from core 11012 that bootloader the arranges large little endian mode required from operating system is different, change is from the large little endian mode of core 11012, makes the large little endian mode from core 11012 after the change large little endian mode required with operating system identical.
From core 11012, also different for the large little endian mode from core 11012 that arranges at the bootloader large little endian mode required from operating system, and the required parameter of main core 11011 that bootloader is passed to operating system by main core 11011 is carried out in the situation of large little endian mode conversion, what bootloader was passed to operating system carries out large little endian mode conversion from the required parameter of core 11012, makes bootloader after conversion pass to the large little endian mode from the required parameter of core 11012 of the operating system large little endian mode required with operating system identical.
Further, main core 11011, also passes to all parameters of operating system for obtaining bootloader; Wherein, the stem that bootloader passes to all parameters of operating system is added with the first Magic number.
Main core 11011, also in the situation that the first Magic number changes, change the large little endian mode of main core 11011, and all parameters that bootloader passes to operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the main core 11011 after change pass to the large little endian mode of all parameters of the operating system large little endian mode required with operating system identical; Wherein, all parameters that bootloader passes to operating system comprise: required parameter and the bootloader of main core 11011 that bootloader passes to operating system passes to the described from the required parameter of core 110112 of operating system.
Or main core 11011, also passes to the required parameter of main core 11011 of operating system for obtaining bootloader; Wherein, the stem that bootloader passes to the required parameter of the main core 11011 of operating system is added with the second Magic number.
Main core 11011, also in the situation that the second Magic number changes, change the large little endian mode of main core 11011, and the required parameter of main core 11011 that bootloader passes to operating system is carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the main core 11011 after change pass to the large little endian mode of the required parameter of the main core 11011 of the operating system large little endian mode required with operating system identical.
From core 11012, also for obtain bootloader pass to operating system from the required parameter of core 11012; Wherein, the stem that the stem from the required parameter of core 11012 that bootloader passes to operating system is added with the 3rd Magic number parameter is added with Magic number.
From core 11012, also in the situation that determining that from core 11012 the 3rd Magic number changes, change is from the large little endian mode of core 11012, makes the large little endian mode from core 11012 after the change large little endian mode required with operating system identical.
From core 11012, also for changing at the 3rd Magic number, and main core 11011 obtains in the situation that bootloader passes to the required parameter of the main core 11011 of operating system, what bootloader was passed to operating system carries out large little endian mode conversion from the required parameter of core 11012, makes bootloader after conversion pass to the large little endian mode from the required parameter of core 11012 of the operating system large little endian mode required with operating system identical.
The embodiment of the present invention provides a kind of computing node, and main core adding dormancy instruction from core boot; Whether the large little endian mode that judges the large little endian mode of the main core arranging in the bootloader main core required with operating system is identical, not identical in the situation that, change the large little endian mode of main core, make the large little endian mode of the large little endian mode of main core after the change main core required with operating system identical; 0 address that is mapped to bus at the first address of internal memory, by the storage space afterwards continuous first address that is stored to internal memory from core boot; Main core obtains the state from core, according to setting from core number of resets from nuclear state; Main checking from core carried out once or twice reset, so that from 0 address of the PC pointed bus of core, the first address of the internal memory of the 0 address mapping from core from bus is initial to be read and carry out from core boot; Execute from core boot from core, judge that whether the large little endian mode from core that arranges in the bootloader large little endian mode from core required with operating system be identical, in the situation that both are not identical, change is from the large little endian mode of core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion; Finally jump to the code segment of operating system, complete from core initialization.Like this, the polycaryon processor that utilizes every kind of model is in the characteristic from 0 address of the PC pointed bus of core from core is reset, set up the mapping relations of 0 address of bus and the first address of internal memory, and by the continuous storage space being stored in from core boot the first address of internal memory, make from core is reset can by the first address of internal memory corresponding to 0 address of bus read in internal memory, store from core boot, and carry out described from core boot, thereby just need in bus, not set for storing the fixed address A at the storage address of internal memory from core boot, realize the solution coupling of fixed address A between the bootloader of polycaryon processor and operating system, do not need to arrange according to each model polycaryon processor the operating system of coupling, make the polycaryon processor of different editions model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improve the compatibility of operating system.And in the present embodiment, consider from core the situation in state of activation, after reset, can not meet from core entry condition, so now to carrying out twice reset from core, main core resets and makes to meet entry condition from core from core for the first time, main core resets and makes successfully to start from core for the second time, thereby has further ensured the successful startup from core.Simultaneously, in the present embodiment, whether change main core or the large little endian mode from core according to the main core arranging in bootloader or from the large little endian mode of core and the required large small end mode decision of operating system, make polycaryon processor use the bootloader that same operating system can compatible different large little endian modes, further reduce the constraint of multicore processor operating system scale-of-two normalizing, improved the compatibility of operating system.Finally, the present invention has removed the use constraint of two operating system scale-of-two normalizings, make the operating system of same version can run on more bootloader and processor, the very big efficiency that improves exploitation, tests, safeguards, the cost of minimizing exploitation simultaneously, test, maintenance.
As shown in figure 12, the embodiment of the present invention provides a kind of structural representation of computing node.Shown in Figure 12, this computing node comprises: polycaryon processor 1201, internal memory 1202 and nonvolatile memory 1203, wherein polycaryon processor 1201 is by bus access internal memory 1202 and nonvolatile memory 1203, in the present embodiment, this polycaryon processor 1201 comprises: main core 12011 and from core 12012 wherein, can be one or more from the quantity of core 12012, in Figure 12, illustrate from core with one, but the embodiment of the present invention is not limited to this.
Main core 12011 for from from core configuration-direct, or obtains from the configuration address of core 12012 from nonvolatile memory 1203; Wherein, be arranged at bootloader from core configuration-direct.
Main core 12011, also for being stored to from core boot internal memory 1202 configuration addresss continuous storage space afterwards.
Main core 12011, also for to sending internuclear interrupt message from core 12012.
From core 12012, for by bus access configuration address, read also carrying out from core boot from core boot of storing after configuration address in internal memory 1202.
From core 12012, also for jumping to the code segment of operating system, complete from core 12012 initialization.
Concrete, from core 12012, identical specifically for the large little endian mode from core 12012 that arranges in the bootloader large little endian mode required with operating system, jump to the code segment of operating system from core 12012, complete from core initialization.
Further, main core 12011, also for from obtaining from the configuration address of core 12012 from core configuration-direct.
Main core 12011, also for being stored to nonvolatile memory 1203 from the configuration address of core 12012.
Further, described main core 12011, also for obtaining the large little endian mode of the described main core 12011 that bootloader arranges.
Described main core 12011, also for obtaining the required large little endian mode of operating system.
Described main core 12011, also different for the large little endian mode of the described main core 12011 that arranges at the described bootloader large little endian mode required from described operating system, change the large little endian mode of described main core 12011, make the large little endian mode of described main core 12011 after the change large little endian mode required with described operating system identical.
Described main core 12011, also different for the large little endian mode of the described main core 12011 that arranges at the described bootloader large little endian mode required from described operating system, the all parameters that described bootloader passed to described operating system are carried out large little endian mode conversion, make the large little endian mode of described all parameters after the conversion large little endian mode required with described operating system identical; Or, the required parameter of described main core 12011 that described bootloader is passed to described operating system is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core 12011 of the described operating system large little endian mode required with described operating system identical.
Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core 12011 that described bootloader passes to operating system passes to the described from the required parameter of core 12012 of operating system.
Described from core 12012, also to arrange for the obtaining bootloader described large little endian mode from core 12012.
Described from core 12012, also for obtaining the required large little endian mode of operating system.
Described from core 12012, also different for the described large little endian mode from core 12012 that arranges at the described bootloader large little endian mode required from described operating system, the described large little endian mode from core 12012 of change, makes the described large little endian mode from core 12012 after the change large little endian mode required with described operating system identical.
Described from core 12012, also different for the described large little endian mode from core 12012 that arranges at the described bootloader large little endian mode required from described operating system, and the required parameter of described main core 12011 that described bootloader is passed to operating system by described main core 12011 is carried out in the situation of large little endian mode conversion, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core 12012, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core 12012 of the operating system large little endian mode required with described operating system identical.
Further, main core 12011, also passes to all parameters of operating system for obtaining bootloader; Wherein, the stem that bootloader passes to all parameters of operating system is added with the first Magic number.
Main core 12011, also in the situation that the first Magic number changes, change the large little endian mode of main core 12011, and all parameters that bootloader passes to operating system are carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the main core 12011 after change pass to the large little endian mode of all parameters of the operating system large little endian mode required with operating system identical; Wherein, all parameters that bootloader passes to operating system comprise: bootloader pass to the required parameter of the main core 12011 of operating system and bootloader pass to operating system from the required parameter of core 12012.
Or main core 12011, also passes to the required parameter of main core 12011 of operating system for obtaining bootloader, wherein, the stem that bootloader passes to the required parameter of the main core 12011 of operating system is added with the second Magic number.
Main core 12011, also in the situation that the second Magic number changes, main core 12011 is changed the large little endian mode of main core 12011, and the required parameter of main core 12011 that bootloader passes to operating system is carried out to large little endian mode conversion, make bootloader after large little endian mode and the conversion of the main core 12011 after change pass to the large little endian mode of the required parameter of the main core 12011 of the operating system large little endian mode required with operating system identical.
From core 12012, also for obtain bootloader pass to operating system from the required parameter of core 12012; Wherein, the stem from the required parameter of core 12012 that bootloader passes to operating system is added with the 3rd Magic number.
From core 12012, also in the situation that determining that from core 12012 the 3rd Magic number changes, change is from the large little endian mode of core 12012, makes the large little endian mode from core 12012 after the change large little endian mode required with operating system identical.
From core 12012, also for changing at the 3rd Magic number, and main core 12011 obtains in the situation that bootloader passes to the required parameter of the main core 12011 of operating system, what bootloader was passed to operating system carries out large little endian mode conversion from the required parameter of core 12012, makes bootloader after conversion pass to the large little endian mode from the required parameter of core 12012 of the operating system large little endian mode required with operating system identical.
The embodiment of the present invention provides a kind of computing node, user configured from core configuration address by obtaining from core configuration-direct of newly-increased bootloader; Whether the large little endian mode that judges the large little endian mode of the main core arranging in the bootloader main core required with operating system is identical, not identical in the situation that, change the large little endian mode of main core, make the large little endian mode of the large little endian mode of main core after the change main core required with operating system identical; To deposit to storage space continuous from core configuration address from core boot, then wake up from core, put address from caryogamy and read from core boot according to user configured from core, execute from core boot from core, judge that whether the large little endian mode from core that arranges in the bootloader large little endian mode from core required with operating system be identical, not identical in the situation that, change is from the large little endian mode of core, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion; Finally jump to the code segment of operating system, complete from core initialization.Like this, user can arrange from core configuration address according to the processor of different model flexibly according to the processor user of each model, from the memory address of core boot, and the coupling that need not correspondence is set remove fixed address A between the bootloader of polycaryon processor and operating system according to the processor of different model, make the polycaryon processor of different model can use identical operating system, finally complete the scale-of-two normalizing of multicore processor operating system, improve the compatibility of operating system.Simultaneously, in the present embodiment, whether change main core or the large little endian mode from core according to the main core arranging in bootloader or from the large little endian mode of core and the required large small end mode decision of operating system, make polycaryon processor use the bootloader that same operating system can compatible different large little endian modes, further reduce the constraint of multicore processor operating system scale-of-two normalizing, improved the compatibility of operating system.Finally, the present invention has removed the use constraint of two operating system scale-of-two normalizings, make the operating system of same version can run on more bootloader and processor, the very big efficiency that improves exploitation, tests, safeguards, the cost of minimizing exploitation simultaneously, test, maintenance.
As shown in figure 13, the embodiment of the present invention provides the structural representation of the device of the large small end mode adaptive of a kind of bootloader, and shown in Figure 13, this device comprises: acquiring unit 1301 and processing unit 1302.
Acquiring unit 1301, the large little endian mode when pronucleus arranging for obtaining bootloader.
Acquiring unit 1301, also for obtaining the required large little endian mode of operating system.
Processing unit 1302, for arrange at bootloader when the large little endian mode of the pronucleus large little endian mode required from operating system is different, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, make the large little endian mode when pronucleus after change and change after the large little endian mode of the parameter large little endian mode required with operating system identical.
The embodiment of the present invention provides a kind of bootloader device of large small end mode adaptive, acquiring unit obtains large little endian mode and the required large little endian mode of operating system when the pronucleus that in bootloader, arrange, processing unit in bootloader, arrange when the large little endian mode of the pronucleus large little endian mode required from operating system is different, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion.Like this, can whether change the large little endian mode when pronucleus when the large little endian mode of pronucleus and the required large small end mode decision of operating system according to what arrange in bootloader, make to use the bootloader that same operating system can compatible different large little endian modes, reduce the constraint of operating system scale-of-two normalizing, improved the compatibility of operating system.
As shown in figure 14, the embodiment of the present invention provides the structural representation of the device of the large small end mode adaptive of a kind of bootloader, and shown in Figure 14, this device comprises: acquiring unit 1401 and processing unit 1402.
Acquiring unit 1401, passes to the parameter of operating system for obtaining bootloader, wherein, the stem of parameter is added with Magic number.
Processing unit 1402, for in the situation that Magic number changes, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion, make the large little endian mode when pronucleus after change and change after the large little endian mode of the parameter large little endian mode required with operating system identical.
The embodiment of the present invention provides a kind of bootloader device of large small end mode adaptive, acquiring unit obtains bootloader and passes to the parameter of operating system, processing unit is in the case of the Magic number of parameter changes, change is when the large little endian mode of pronucleus, and the parameter that bootloader passes to operating system is carried out to large little endian mode conversion.Like this, can whether change the large little endian mode when pronucleus when the large little endian mode of pronucleus and the required large small end mode decision of operating system according to what arrange in bootloader, make to use the bootloader that same operating system can compatible different large little endian modes, reduce the constraint of operating system scale-of-two normalizing, improved the compatibility of operating system.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, when actual realization, can have other dividing mode, for example multiple unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in multiple network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit comprises, also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that also can adopt hardware to add SFU software functional unit realizes.
The integrated unit that the above-mentioned form with SFU software functional unit realizes, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) or be included in processor in computer equipment and carry out the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, be called for short ROM), the various media that can be program code stored such as random access memory (Random Access Memory, be called for short RAM), magnetic disc or CD.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these amendments or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (34)

1. one kind starts the method for polycaryon processor, it is characterized in that, be applied to the computing node that comprises polycaryon processor and internal memory, wherein said polycaryon processor is by internal memory described in bus access, described polycaryon processor comprises main core and at least one is from core, described main core is carried out start-up loading device bootloader, and described method comprises:
Described main core is by the continuous storage space being stored to from core boot after the first address of described internal memory; Wherein, the first address of described internal memory is mapped to 0 address of described bus;
Described main core reset described at least one from core from core, so that described 0 address from bus described in the programmable counter PC pointed of core, described from core by the first address of the described internal memory of 0 address mapping of bus described in described bus access, read store after the first address of internal memory described in described internal memory described from core boot and carry out described from core boot;
The described code segment that jumps to operating system from core, completes from core initialization.
2. method according to claim 1, it is characterized in that,, also comprise before the continuous storage space be stored to the first address of described internal memory from core boot after at described main core: described main core adds dormancy instruction described from core boot; Described dormancy instruction be used for making described from core in dormant state;
Described main core reset described at least one from core from core, so that described 0 address from bus described in the programmable counter PC pointed of core, the first address of the described described internal memory shining upon by 0 address of bus described in described bus access from core, read store after the first address of internal memory described in described internal memory described from core boot and carry out describedly from core boot, comprising:
Described main core resets described from core for the first time, described 0 address from bus described in the PC pointed of core, the first address of the described described internal memory shining upon by 0 address of bus described in described bus access from core, reads and carries out described described dormancy instruction from core boot; Described main core resets described from core for the second time, described 0 address from bus described in the PC pointed of core, described from core by the first address of the described internal memory of 0 address mapping of bus described in described bus access, read and carry out described from core boot the program except dormancy instruction; Wherein, the described number of resets from core is twice.
3. method according to claim 1 and 2, is characterized in that, the described code segment that jumps to operating system from core, completes from core initialization, comprising:
The described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system is identical, the described code segment that jumps to operating system from core, completes from core initialization.
4. according to the method described in claim 1-3 any one, it is characterized in that, after described main core is carried out start-up loading device bootloader, described main core, by before the continuous storage space being stored to from core boot after the first address of described internal memory, also comprises:
Described main core obtains the large little endian mode of the described main core arranging in bootloader;
Described main core obtains the required large little endian mode of described operating system;
The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, the large little endian mode of the described main core of described main core change, makes the large little endian mode of the described main core after the change large little endian mode required with described operating system identical;
The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, also comprise: all parameters that described bootloader is passed to described operating system by described main core are carried out large little endian mode conversion, make described bootloader after conversion pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical;
Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
5. method according to claim 4, is characterized in that,
Described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprise:
Describedly obtain from core the described large little endian mode from core arranging bootloader;
Describedly obtain the required large little endian mode of described operating system from core;
The described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, described from the large little endian mode from core core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical;
The described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, and the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out in the situation of large little endian mode conversion, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
6. according to the method described in claim 1-3 any one, it is characterized in that, after described main core is carried out start-up loading device bootloader, described main core, by before the continuous storage space being stored to from core boot after the first address of described internal memory, also comprises:
Described main core obtains described bootloader and passes to all parameters of described operating system, and wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number;
In the situation that described the first Magic number changes, the large little endian mode of the described main core of described main core change, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system;
Or described main core obtains described bootloader and pass to the required parameter of described main core of described operating system, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number;
In the situation that described the second Magic number changes, the large little endian mode of the described main core of described main core change, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
7. method according to claim 6, is characterized in that, described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprises:
Describedly obtain described bootloader from core and pass to the described from the required parameter of core of described operating system, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the 3rd Magic number;
Determine that from core described the 3rd Magic number changes in the situation that, described from the described large little endian mode from core of core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical;
Determine that from core described the 3rd Magic number changes described, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
8. according to the method described in claim 1-7 any one, it is characterized in that, described main core reset described at least one from core from before core, also comprise:
Described main core obtains the described state from core;
Determine describedly from core during in state of activation when described main core, it is twice from the number of resets of core that described main core arranges described;
When described main core determine described from core in dormant state or not when starting state, described main core arranges the described number of resets from core for once.
9. one kind starts the method for polycaryon processor, it is characterized in that, be applied to the computing node that comprises polycaryon processor, internal memory and nonvolatile memory, wherein said polycaryon processor is by internal memory and described nonvolatile memory described in bus access, described polycaryon processor comprises main core and at least one from core, and described method comprises:
Described main core is from from core configuration-direct, or obtains the configuration address from core from described nonvolatile memory; Wherein, be describedly arranged at start-up loading device bootloader from core configuration-direct;
Described main core will be stored to from core boot the continuous storage space afterwards of configuration address described in described internal memory;
Described main core sends internuclear interrupt message to described from core, make described from core by configuration address described in described bus access, read store after configuration address described in described internal memory described from core boot and carry out described from core boot;
The described code segment that jumps to operating system from core, completes from core initialization.
10. method according to claim 9, is characterized in that, the described code segment that jumps to operating system from core, completes from core initialization, comprising:
The described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system is identical, the described code segment that jumps to operating system from core, completes from core initialization.
11. according to the method described in claim 9 or 10, it is characterized in that, at described main core from from core configuration-direct, or obtain after the configuration address of core from described nonvolatile memory, described main core, by be stored to the continuous storage space afterwards of configuration address described in described internal memory from core boot before, also comprises:
Described main core obtains the large little endian mode of the described main core arranging in bootloader;
Described main core obtains the required large little endian mode of operating system;
The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, the large little endian mode of the described main core of described main core change, makes the large little endian mode of the described main core after the change large little endian mode required with described operating system identical;
The large little endian mode of the described main core arranging in the described bootloader large little endian mode required from described operating system is different, also comprise: all parameters that described bootloader is passed to described operating system by described main core are carried out large little endian mode conversion, make described bootloader after conversion pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical;
Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
12. methods according to claim 11, is characterized in that, described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprise:
Describedly obtain from core the described large little endian mode from core arranging bootloader;
Describedly obtain the required large little endian mode of operating system from core;
The described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, described from the large little endian mode from core core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical;
The described large little endian mode from core that arranges in the described bootloader large little endian mode required from described operating system is different, and the required parameter of described main core that described bootloader is passed to described operating system by described main core is carried out in the situation of large little endian mode conversion, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
13. according to the method described in claim 9 or 10, it is characterized in that, at described main core from from core configuration-direct, or obtain after the configuration address of core from described nonvolatile memory, described main core, by be stored to the continuous storage space afterwards of configuration address described in described internal memory from core boot before, also comprises:
Described main core obtains described bootloader and passes to all parameters of described operating system, and wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number;
In the situation that described the first Magic number changes, the large little endian mode of the described main core of described main core change, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system;
Or described main core obtains described bootloader and pass to the required parameter of described main core of described operating system, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number;
In the situation that described the second Magic number changes, the large little endian mode of the described main core of described main core change, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
14. methods according to claim 13, is characterized in that, described described after core boot from core execution, before the described code segment that jumps to operating system from core, also comprise:
Describedly obtain described bootloader from core and pass to the described from the required parameter of core of described operating system, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the 3rd Magic number;
Determine that from core described the 3rd Magic number changes in the situation that, described from the described large little endian mode from core of core change described, make the described large little endian mode from core after the change large little endian mode required with described operating system identical;
Determine that from core described the 3rd Magic number changes described, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, also comprise: describedly from core, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
15. according to the method described in claim 9-14 any one, it is characterized in that, obtains describedly before the configuration address of core at described main core from nonvolatile memory, also comprises:
Described main core obtains the described configuration address from core from described from core configuration-direct;
The described configuration address from core is stored to described nonvolatile memory by described main core.
The method of 16. 1 kinds of large small end mode adaptives of bootloader, is applied to processor, it is characterized in that, described method comprises:
Obtain the large little endian mode when pronucleus arranging in start-up loading device bootloader;
Obtain the required large little endian mode of operating system;
If the described large little endian mode when pronucleus arranging in the described bootloader large little endian mode required from described operating system is different, the described large little endian mode when pronucleus of change, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
The method of 17. 1 kinds of large small end mode adaptives of bootloader, is applied to processor, it is characterized in that, described method comprises:
Obtain the parameter that start-up loading device bootloader passes to operating system, wherein, the stem of described parameter is added with Magic number;
If described Magic number changes, change is when the large little endian mode of pronucleus, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
18. 1 kinds of computing nodes, is characterized in that, comprise polycaryon processor and internal memory, wherein said polycaryon processor is by internal memory described in bus access, described polycaryon processor comprises main core and at least one from core, and described main core is used for carrying out start-up loading device bootloader, comprising:
Described main core, for by the continuous storage space being stored to from core boot after the first address of described internal memory; Wherein, the first address of described internal memory is mapped to 0 address of described bus;
Described main core, also for reset at least one from core from core, so that described 0 address from bus described in the programmable counter PC pointed of core;
Described from core, for the first address of the described internal memory of the 0 address mapping by bus described in described bus access, read store after the first address of internal memory described in described internal memory described from core boot and carry out described from core boot;
Described from core, also, for jumping to the code segment of operating system, complete from core initialization.
19. computing nodes according to claim 18, is characterized in that,
Described main core, also for adding dormancy instruction described from core boot; Described dormancy instruction be used for making described from core in dormant state;
Described main core, described from core specifically for resetting for the first time, described 0 address from bus described in the PC pointed of core;
Described from core, specifically for the first address of the described internal memory of the 0 address mapping by bus described in described bus access, read and carry out described described dormancy instruction from core boot;
Described main core, described from core specifically for resetting for the second time, described 0 address from bus described in the PC pointed of core;
Described from core, specifically for the first address of the described internal memory of the 0 address mapping by bus described in described bus access, read and carry out described from core boot the program except dormancy instruction;
Wherein, the described number of resets from core is twice.
20. according to the computing node described in claim 18 or 19, it is characterized in that,
Described from core, identical specifically for the described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system, jump to the code segment of operating system, complete from core initialization.
21. according to the computing node described in claim 18-20 any one, it is characterized in that,
Described main core, also for obtaining the large little endian mode of the described main core that bootloader arranges;
Described main core, also for obtaining the required large little endian mode of operating system;
Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, change the large little endian mode of described main core, make the large little endian mode of described main core after the change large little endian mode required with described operating system identical;
Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, the all parameters that described bootloader passed to described operating system are carried out large little endian mode conversion, make the large little endian mode of described all parameters after the conversion large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical;
Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
22. computing nodes according to claim 21, is characterized in that,
Described from core, also to arrange for the obtaining bootloader described large little endian mode from core;
Described from core, also for obtaining the required large little endian mode of operating system;
Described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical;
Described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, and the required parameter of described main core that described bootloader is passed to operating system by described main core is carried out in the situation of large little endian mode conversion, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the operating system large little endian mode required with described operating system identical.
23. according to the computing node described in claim 18-20 any one, it is characterized in that,
Described main core, also passes to all parameters of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number;
Described main core, also in the situation that described the first Magic number changes, change the large little endian mode of described main core, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system;
Or described main core, also passes to the required parameter of described main core of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number;
Described main core, also in the situation that described the second Magic number changes, change the large little endian mode of described main core, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
24. computing nodes according to claim 23, is characterized in that,
Described from core, also pass to the described from the required parameter of core of described operating system for obtaining described bootloader, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the stem of parameter described in the 3rd Magic number and is added with Magic number;
Described from core, also for described determine that from core described the 3rd Magic number changes in the situation that, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical;
Described from core, also for changing at described the 3rd Magic number, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the described operating system large little endian mode required with described operating system identical.
25. according to the computing node described in claim 18-24 any one, it is characterized in that,
Described main core, also for obtaining the described state from core;
Described main core, also for determine described from core when the state of activation, it is twice from the number of resets of core that described main core arranges described;
Described main core, also for determine described from core in dormant state or not when starting state, described main core arranges the described number of resets from core for once.
26. 1 kinds of computing nodes, it is characterized in that, comprise polycaryon processor, internal memory and nonvolatile memory, wherein said polycaryon processor is by internal memory and described nonvolatile memory described in bus access, described polycaryon processor comprises main core and at least one from core, comprising:
Described main core for from from core configuration-direct, or obtains the described configuration address from core from described nonvolatile memory; Wherein, be describedly arranged at described start-up loading device bootloader from core configuration-direct;
Described main core, also for being stored to the continuous storage space after configuration address described in described internal memory from core boot;
Described main core, also for to send internuclear interrupt message from core;
Described from core, for by configuration address described in described bus access, read store after configuration address described in described internal memory described described from core boot from core boot execution;
Described from core, also, for jumping to the code segment of operating system, complete from core initialization.
27. computing nodes according to claim 26, is characterized in that,
Described from core, identical specifically for the described large little endian mode from core that arranges in the described bootloader large little endian mode required with described operating system, the described code segment that jumps to operating system from core, completes from core initialization.
28. according to the computing node described in claim 26 or 27, it is characterized in that,
Described main core, also for obtaining the large little endian mode of the described main core that bootloader arranges;
Described main core, also for obtaining the required large little endian mode of operating system;
Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, change the large little endian mode of described main core, make the large little endian mode of described main core after the change large little endian mode required with described operating system identical;
Described main core, also different for the large little endian mode of the described main core that arranges at the described bootloader large little endian mode required from described operating system, the all parameters that described bootloader passed to described operating system are carried out large little endian mode conversion, make the large little endian mode of described all parameters after the conversion large little endian mode required with described operating system identical; Or, the required parameter of described main core that described bootloader is passed to described operating system is carried out large little endian mode conversion, makes described bootloader after conversion pass to the large little endian mode of the required parameter of the described main core of the described operating system large little endian mode required with described operating system identical;
Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system.
29. computing nodes according to claim 28, is characterized in that,
Described from core, also to arrange for the obtaining bootloader described large little endian mode from core;
Described from core, also for obtaining the required large little endian mode of operating system;
Described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical;
Described from core, also different for the described large little endian mode from core that arranges at the described bootloader large little endian mode required from described operating system, and the required parameter of described main core that described bootloader is passed to operating system by described main core is carried out in the situation of large little endian mode conversion, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the operating system large little endian mode required with described operating system identical.
30. according to the computing node described in claim 26 or 27, it is characterized in that,
Described main core, also passes to all parameters of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to all parameters of described operating system is added with the first Magic number;
Described main core, also in the situation that described the first Magic number changes, change the large little endian mode of described main core, and all parameters that described bootloader passes to described operating system are carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of all parameters of the described operating system large little endian mode required with described operating system identical; Wherein, all parameters that described bootloader passes to described operating system comprise: required parameter and the described bootloader of described main core that described bootloader passes to operating system passes to the described from the required parameter of core of operating system;
Or described main core, also passes to the required parameter of described main core of described operating system for obtaining described bootloader, wherein, the stem that described bootloader passes to the required parameter of the described main core of described operating system is added with the second Magic number;
Described main core, also in the situation that described the second Magic number changes, the large little endian mode of the described main core of described main core change, and the required parameter of described main core that described bootloader passes to described operating system is carried out to large little endian mode conversion, make described bootloader after large little endian mode and the conversion of the described main core after change pass to the large little endian mode of the required parameter of the described main core of the operating system large little endian mode required with described operating system identical.
31. computing nodes according to claim 30, is characterized in that,
Described from core, also pass to the described from the required parameter of core of described operating system for obtaining described bootloader, wherein, the described stem from the required parameter of core that described bootloader passes to described operating system is added with the 3rd Magic number;
Described from core, also for described determine that from core described the 3rd Magic number changes in the situation that, the described large little endian mode from core of change, makes the described large little endian mode from core after the change large little endian mode required with described operating system identical;
Described from core, also for changing at described the 3rd Magic number, and described main core obtains in the situation that described bootloader passes to the required parameter of the described main core of described operating system, described bootloader is passed to the described of described operating system and carry out large little endian mode conversion from the required parameter of core, make described bootloader after conversion pass to the described large little endian mode from the required parameter of core of the operating system large little endian mode required with described operating system identical.
32. according to the computing node described in claim 26-31 any one, it is characterized in that,
Described main core, also for obtaining the described configuration address from core from described from core configuration-direct;
Described main core, also for being stored to described nonvolatile memory by the described configuration address from core.
The device of 33. 1 kinds of large small end mode adaptives of bootloader, is characterized in that, comprising:
Acquiring unit, the large little endian mode when pronucleus arranging for obtaining start-up loading device bootloader;
Described acquiring unit, also for obtaining the required large little endian mode of operating system;
Processing unit, described when the large little endian mode of the pronucleus large little endian mode required from described operating system is different for what arrange at described bootloader, the described large little endian mode when pronucleus of change, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
The device of 34. 1 kinds of large small end mode adaptives of bootloader, is characterized in that, comprising:
Acquiring unit, passes to the parameter of operating system for obtaining start-up loading device bootloader, wherein, the stem of described parameter is added with Magic number;
Processing unit, for in the situation that described Magic number changes, change is when the large little endian mode of pronucleus, and the parameter that described bootloader passes to described operating system is carried out to large little endian mode conversion, make the described large little endian mode when pronucleus after change and change after the large little endian mode of the described parameter large little endian mode required with described operating system identical.
CN201410351558.4A 2014-07-22 2014-07-22 Start the method and device of multi-core processor, the big small end mode adaptives of bootloader Active CN104156234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410351558.4A CN104156234B (en) 2014-07-22 2014-07-22 Start the method and device of multi-core processor, the big small end mode adaptives of bootloader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410351558.4A CN104156234B (en) 2014-07-22 2014-07-22 Start the method and device of multi-core processor, the big small end mode adaptives of bootloader

Publications (2)

Publication Number Publication Date
CN104156234A true CN104156234A (en) 2014-11-19
CN104156234B CN104156234B (en) 2018-07-31

Family

ID=51881741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410351558.4A Active CN104156234B (en) 2014-07-22 2014-07-22 Start the method and device of multi-core processor, the big small end mode adaptives of bootloader

Country Status (1)

Country Link
CN (1) CN104156234B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105785824A (en) * 2016-04-12 2016-07-20 上海斐讯数据通信技术有限公司 Method and system for transmitting memory size parameters to Linux core
CN106648758A (en) * 2016-11-30 2017-05-10 中国电子科技集团公司第五十八研究所 Multi-core processor BOOT starting system and method
CN107544815A (en) * 2016-06-28 2018-01-05 中兴通讯股份有限公司 A kind of startup method and device of multicomputer system
CN108334413A (en) * 2017-12-22 2018-07-27 天津麒麟信息技术有限公司 Information transmitting methods between a kind of firmware and operating system based on platform of soaring
CN108595212A (en) * 2018-03-30 2018-09-28 上海康斐信息技术有限公司 A kind of method and wireless router of quick startup wireless router
CN110520839A (en) * 2018-03-28 2019-11-29 深圳市大疆创新科技有限公司 Storage medium space application method, apparatus and unmanned plane in System on Chip/SoC
CN112905522A (en) * 2021-02-22 2021-06-04 深圳市显控科技股份有限公司 Multi-core shared starting system, control method thereof and storage medium
CN114090097A (en) * 2020-06-30 2022-02-25 中国航发商用航空发动机有限责任公司 Engine control system and control software starting method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567187A (en) * 2003-06-11 2005-01-19 华为技术有限公司 Data processing system and method
CN1963759A (en) * 2006-12-01 2007-05-16 北京中星微电子有限公司 Guide method and system of coprocessor
CN101464807A (en) * 2009-01-08 2009-06-24 杭州华三通信技术有限公司 Application program loading method and device
CN101533355A (en) * 2009-04-15 2009-09-16 杭州华三通信技术有限公司 Method for starting multioperation system and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567187A (en) * 2003-06-11 2005-01-19 华为技术有限公司 Data processing system and method
CN1963759A (en) * 2006-12-01 2007-05-16 北京中星微电子有限公司 Guide method and system of coprocessor
CN101464807A (en) * 2009-01-08 2009-06-24 杭州华三通信技术有限公司 Application program loading method and device
CN101533355A (en) * 2009-04-15 2009-09-16 杭州华三通信技术有限公司 Method for starting multioperation system and device thereof

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105785824A (en) * 2016-04-12 2016-07-20 上海斐讯数据通信技术有限公司 Method and system for transmitting memory size parameters to Linux core
CN105785824B (en) * 2016-04-12 2020-02-11 上海斐讯数据通信技术有限公司 Method and system for transmitting memory size parameters to Linux kernel
CN107544815A (en) * 2016-06-28 2018-01-05 中兴通讯股份有限公司 A kind of startup method and device of multicomputer system
CN106648758A (en) * 2016-11-30 2017-05-10 中国电子科技集团公司第五十八研究所 Multi-core processor BOOT starting system and method
CN108334413A (en) * 2017-12-22 2018-07-27 天津麒麟信息技术有限公司 Information transmitting methods between a kind of firmware and operating system based on platform of soaring
CN110520839A (en) * 2018-03-28 2019-11-29 深圳市大疆创新科技有限公司 Storage medium space application method, apparatus and unmanned plane in System on Chip/SoC
CN108595212A (en) * 2018-03-30 2018-09-28 上海康斐信息技术有限公司 A kind of method and wireless router of quick startup wireless router
CN114090097A (en) * 2020-06-30 2022-02-25 中国航发商用航空发动机有限责任公司 Engine control system and control software starting method
CN112905522A (en) * 2021-02-22 2021-06-04 深圳市显控科技股份有限公司 Multi-core shared starting system, control method thereof and storage medium

Also Published As

Publication number Publication date
CN104156234B (en) 2018-07-31

Similar Documents

Publication Publication Date Title
CN104156234A (en) Multi-core processor starting and bootloader big-little endian mode adapting method device
CN103207797B (en) Capsule type custom-made updating method based on unified extensible firmware interface firmware system
US9558016B2 (en) Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product
US9135126B2 (en) Multi-core re-initialization failure control system
US8484631B2 (en) Supporting hardware configuration changes in a UEFI firmware component
CN105930186B (en) The method for loading software of multi -CPU and software loading apparatus based on multi -CPU
US9916165B2 (en) Systems and methods to optimize boot for information handling system comprising persistent memory
CN101573687B (en) Reconfiguring a secure system
CN114580344B (en) Test excitation generation method, verification system and related equipment
CN106293807A (en) A kind of Flash chip based on DSP guides loading method
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
US9870301B2 (en) High-speed debug port using standard platform connectivity
US10866881B1 (en) Firmware debug trace capture
CN114222975A (en) Data preservation using memory aperture flush sequence
CN105229616A (en) The pattern of tracking processing apparatus in instruction tracing system
US10996876B2 (en) Systems and methods for dynamically modifying memory namespace allocation based on memory attributes and application requirements
US9250919B1 (en) Multiple firmware image support in a single memory device
US9772835B1 (en) Modification of program code for execution in a multi-tenant or distributed computing environment
CN108694052B (en) Firmware upgrading method, firmware upgrading device and firmware upgrading system
US20140095859A1 (en) Apparatus and method for managing register information in a processing system
CN105630530A (en) Multilevel boot method and system of digital signal processor
US20150161062A1 (en) Method, device and computer program for dynamic control of memory access distances in a numa type system
CN102591669B (en) Modularized computer firmware and realizing method thereof
CN115629795A (en) Configuration method and device of executable file and electronic equipment
US10866922B1 (en) Firmware debug trace capture using serial peripheral interface

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant