CN114064134A - Self-guiding method and system suitable for embedded SPARC (spatial Power control processor) architecture processor - Google Patents
Self-guiding method and system suitable for embedded SPARC (spatial Power control processor) architecture processor Download PDFInfo
- Publication number
- CN114064134A CN114064134A CN202111339610.0A CN202111339610A CN114064134A CN 114064134 A CN114064134 A CN 114064134A CN 202111339610 A CN202111339610 A CN 202111339610A CN 114064134 A CN114064134 A CN 114064134A
- Authority
- CN
- China
- Prior art keywords
- operating system
- address
- processor
- mirror image
- sparc
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000009191 jumping Effects 0.000 claims abstract description 22
- 238000012856 packing Methods 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 25
- 238000010586 diagram Methods 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4403—Processor initialisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a self-guiding method and a system suitable for an embedded SPARC (spatial filter context) architecture processor, which comprise the following steps: step S1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script; step S2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; and enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a boot process.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a self-booting method and a self-booting system suitable for an embedded SPARC (spatial Power control) architecture processor.
Background
SPARC is one of the RISC microprocessor architectures that are commonly used in on-board computer systems. The stability and reliability of the performance of the processor in the satellite-borne computer system play an important role in the stability and reliability of the whole system, and the complex space environment determines the resource limitation of the satellite-borne computer system. Different from ARM, MIPS, X86 and other hot door architectures in the embedded field, SPARC does not form a mature and reliable bootstrap program, on one hand, because the resources of a common spaceborne are limited, no excessive peripheral equipment is provided, and no complex bootstrap program is needed, on the other hand, SPARC is generally used on a spaceborne, the use range is limited, and the software ecology is not as good as that of a CPU of a mainstream architecture. At present, the boot mode of the SPARC processor is relatively original, each CPU core is started by using a boot file, the address space and the resources of the CPU are initialized, a general boot program is not formed, and extra workload is brought to an application development engineer. To achieve optimal performance with limited resources, the operating system programs need to be executed in memory, and thus the boot program still needs to initialize hardware devices and create a mapping of memory space in order to prepare the correct software and hardware environment for the operating system kernel. Therefore, a simplified, convenient and low-cost quick bootstrap program needs to be designed for the SPARC processor in the on-board computer system so as to facilitate maintenance and development.
Patent document CN102707952A (application number: CN201210151037.5) discloses a parallel programming method based on user descriptions on an embedded heterogeneous multi-core processor. The method comprises the following steps: a user carries out description of a heterogeneous multi-core processor platform and tasks, parallel mode setting, primitive task creation and registration, task relation graph (DAG) generation and static allocation of the primitive tasks in the heterogeneous multi-core processor through a graphical interface configuration guide, and the characteristics of the processor platform, the parallel requirements and task assignment are expressed in a configuration file form (XML). And then embedding the elementary tasks after the configuration files are analyzed in parallel into the task tags of the heterogeneous multi-core framework codes, constructing a corresponding serial source program, and finally generating executable codes on the heterogeneous multi-core processor by calling a serial compiling tool.
Disclosure of Invention
In view of the defects in the prior art, the present invention provides a bootstrap method and system suitable for an embedded SPARC architecture processor.
The invention provides a self-booting method suitable for an embedded SPARC (processor over coax) architecture processor, which comprises the following steps:
step S1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script;
step S2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; and enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a boot process.
Preferably, the compiling execution address of the boot loader is the starting address of Nor flash; and the execution address of the operating system program is the address of the SRAM.
Preferably, the image parameter is automatically generated according to the operating system program information in the compiling process and is stored in the fixed offset address of the image through a link script.
Preferably, the boot loader is relatively independent of the operating system program, compiled to embed the preset segment in the front of the image.
Preferably, the initialization memory and memory controller employs:
step S2.1: closing the debugging function of the CPU, initializing the SPARC architecture, the IU register and the local register, and configuring a config register of the processor;
step S2.2: initializing a window register, setting a DSU function, and enabling exception handling and floating point functions; clearing the interrupt mark and reconfiguring the processor config register again;
step S2.3: initializing a floating-point register, disabling the 1-level cache and the 2-level cache, and initializing a controller of a memory;
step S2.4: initializing pin multiplexing and baud rate of a serial port, and enabling receiving and sending;
step S2.5: initializing a DDR2 controller, and configuring a register of a DDR2PHY until the DDR2 is initialized;
step S2.6: setting sp pointer to SRAM memory address, and jumping to c language environment.
Preferably, the operating system program is written into the address corresponding to the SRAM from the Nor flash by adopting the following steps:
step S2.7: the SPARC processor main core reads mirror image parameters from a specified address of a system mirror image, wherein the mirror image parameters comprise a compiling address of an operating system code and the size of an operating system code space;
step S2.8: checking whether the read mirror image parameters are valid information;
step S2.9: when the acquired mirror image parameter is effective information, reading a mirror image of an operating system program from a mirror image fixed offset address, and writing the mirror image into an SRAM address space corresponding to a compiling address of the operating system;
step S2.10: the main core of the SPARC processor enables other cores to be opened, so that the other cores start to run;
step S2.11: and jumping into the SRAM address space where the compiling address of the operating system is located by the main core of the SPARC processor, and starting to run the operating system code.
The invention provides a bootstrap system suitable for an embedded SPARC (spatial processor core) architecture processor, which comprises:
module M1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script;
module M2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; and enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a boot process.
Preferably, the compiling execution address of the boot loader is the starting address of Nor flash; the execution address of the operating system program is the address of the SRAM;
the mirror image parameters are automatically generated according to the program information of the operating system in the compiling process and are stored in the fixed offset address of the mirror image through the link script;
the boot loader is relatively independent of the operating system program and is compiled to embed the preset segment in the front of the image.
Preferably, the initialization memory and memory controller employs:
module M2.1: closing the debugging function of the CPU, initializing the SPARC architecture, the IU register and the local register, and configuring a config register of the processor;
module M2.2: initializing a window register, setting a DSU function, and enabling exception handling and floating point functions; clearing the interrupt mark and reconfiguring the processor config register again;
module M2.3: initializing a floating-point register, disabling the 1-level cache and the 2-level cache, and initializing a controller of a memory;
module M2.4: initializing pin multiplexing and baud rate of a serial port, and enabling receiving and sending;
module M2.5: initializing a DDR2 controller, and configuring a register of a DDR2PHY until the DDR2 is initialized;
module M2.6: setting sp pointer to SRAM memory address, and jumping to c language environment.
Preferably, the operating system program is written into the address corresponding to the SRAM from the Nor flash by adopting the following steps:
module M2.7: the SPARC processor main core reads mirror image parameters from a specified address of a system mirror image, wherein the mirror image parameters comprise a compiling address of an operating system code and the size of an operating system code space;
module M2.8: checking whether the read mirror image parameters are valid information;
module M2.9: when the acquired mirror image parameter is effective information, reading a mirror image of an operating system program from a mirror image fixed offset address, and writing the mirror image into an SRAM address space corresponding to a compiling address of the operating system;
module M2.10: the main core of the SPARC processor enables other cores to be opened, so that the other cores start to run;
module M2.11: and jumping into the SRAM address space where the compiling address of the operating system is located by the main core of the SPARC processor, and starting to run the operating system code.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention realizes the self-guiding method of the SPARC framework processor, supplements the deficiency of the prior art and meets the prior requirement;
2. the bootstrap program realized by the invention has the advantage of low requirement on the storage space, and the storage space occupied by the bootstrap program is about 150KB and is far less than the requirement that the storage space of a main stream bootstrap program (uboot and the like) is more than 1M. In addition, the method has the characteristics of convenience in maintenance, downloading and curing and the like;
3. the invention has easy portability, tailorability and high flexibility, and is suitable for most embedded real-time operating systems to realize quick guidance;
4. the self-contained boot loader in the mirror image occupies a small amount of storage, about 150KB of storage space, so that self-booting of the embedded multi-core processor is realized, the embedded multi-core processor is automatically packaged with the operating system program during compiling, and developers do not need to sense the self-booting program;
5. the invention can be solidified to flash after downloading once, thereby avoiding the complexity of separate maintenance and separate downloading of most boot programs and an operating system;
6. the method is suitable for the multi-core processor with limited resources to realize rapid guidance with convenience and low cost.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a block diagram of a compiled mirror composition of the present invention.
FIG. 2 is a diagram of a bootstrap system suitable for an embedded SPARC architecture processor.
FIG. 3 is a flow chart of the boot process of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
Example 1
The invention provides a self-booting method suitable for an embedded SPARC (processor over coax) architecture processor, which comprises the following steps:
step S1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script;
step S2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; and enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a boot process.
Specifically, the compiling execution address of the boot loader is the starting address of the Nor flash; and the execution address of the operating system program is the address of the SRAM.
Specifically, the image parameters are automatically generated according to the operating system program information in the compiling process and are stored in the fixed offset address of the image through the link script.
Specifically, the boot loader is relatively independent of the operating system program, is compiled to be embedded in the front of the image in a preset segment, and the boot program acquires information of the operating system program through the image parameters.
Specifically, the initialization memory and memory controller employs:
step S2.1: closing the debugging function of the CPU, initializing the SPARC architecture, the IU register and the local register, and configuring a config register of the processor;
step S2.2: initializing a window register, setting a DSU function, and enabling exception handling and floating point functions; clearing the interrupt mark and reconfiguring the processor config register again;
step S2.3: initializing a floating-point register, disabling the 1-level cache and the 2-level cache, and initializing a controller of a memory;
step S2.4: initializing pin multiplexing and baud rate of a serial port, and enabling receiving and sending;
step S2.5: initializing a DDR2 controller, and configuring a register of a DDR2PHY until the DDR2 is initialized;
step S2.6: setting sp pointer to SRAM memory address, and jumping to c language environment.
Specifically, an operating system program is written into an address corresponding to the SRAM from the Nor flash, and the following steps are adopted:
step S2.7: the SPARC processor main core reads image information from a specified offset of 0x80000 of an image, wherein the image information comprises a compiling address of an operating system code and the size of an operating system code space;
step S2.8: checking whether the read mirror image parameters are valid information;
step S2.9: when the acquired mirror image parameter is effective information, reading a mirror image of an operating system program from a mirror image fixed offset address, and writing the mirror image into an SRAM address space corresponding to a compiling address of the operating system;
step S2.10: the main core of the SPARC processor enables other cores to be opened, so that the other cores start to run;
step S2.11: and jumping into the SRAM address space where the compiling address of the operating system is located by the main core of the SPARC processor, and starting to run the operating system code.
Specifically, the other cores except the main core of the processor are guided to start, and the process is as follows:
step S2.12: after other cores are awakened by the main core, a boot loader is executed from the address 0x00000000, the CPU debugging function is closed, the SPARC architecture IU register and the local register are initialized, and the processor config register is configured.
Step S2.13: the window registers are then initialized, the DSU functions are set, and then exception handling and floating point functions are enabled. The interrupt flag is then cleared, and the processor config register is again configured.
Step S2.14: the floating point registers are initialized and the level 1 and level 2 caches are disabled.
Step S2.15: and setting an sp pointer of each core, wherein the reserved size of each core stack space is 4K Byte.
Step S2.16: and jumping other cores of the processor into the SRAM address space where the compiling address of the operating system is located, and starting to run the operating system code.
According to the present invention, a bootstrap system suitable for an embedded SPARC architecture processor is provided, as shown in fig. 2, including:
module M1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script;
module M2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a booting process;
the SPARC processor is connected with the Nor flash of the nonvolatile memory through a system bus.
Specifically, the compiling execution address of the boot loader is the starting address of the Nor flash; and the execution address of the operating system program is the address of the SRAM.
Specifically, the image parameters are automatically generated according to the operating system program information in the compiling process and are stored in the fixed offset address of the image through the link script.
Specifically, the boot loader is relatively independent of the operating system program, is compiled to be embedded in the front of the image in a preset segment, and the boot program acquires information of the operating system program through the image parameters.
Specifically, the initialization memory and memory controller employs:
module M2.1: closing the debugging function of the CPU, initializing the SPARC architecture, the IU register and the local register, and configuring a config register of the processor;
module M2.2: initializing a window register, setting a DSU function, and enabling exception handling and floating point functions; clearing the interrupt mark and reconfiguring the processor config register again;
module M2.3: initializing a floating-point register, disabling the 1-level cache and the 2-level cache, and initializing a controller of a memory;
module M2.4: initializing pin multiplexing and baud rate of a serial port, and enabling receiving and sending;
module M2.5: initializing a DDR2 controller, and configuring a register of a DDR2PHY until the DDR2 is initialized;
module M2.6: setting sp pointer to SRAM memory address, and jumping to c language environment.
Specifically, an operating system program is written into an address corresponding to the SRAM from the Nor flash, and the following steps are adopted:
module M2.7: the SPARC processor main core reads image information from a specified offset of 0x80000 of an image, wherein the image information comprises a compiling address of an operating system code and the size of an operating system code space;
module M2.8: checking whether the read mirror image parameters are valid information;
module M2.9: when the acquired mirror image parameter is effective information, reading a mirror image of an operating system program from a mirror image fixed offset address, and writing the mirror image into an SRAM address space corresponding to a compiling address of the operating system;
module M2.10: the main core of the SPARC processor enables other cores to be opened, so that the other cores start to run;
module M2.11: and jumping into the SRAM address space where the compiling address of the operating system is located by the main core of the SPARC processor, and starting to run the operating system code.
Specifically, the other cores except the main core of the processor are guided to start, and the process is as follows:
module M2.12: after other cores are awakened by the main core, a boot loader is executed from the address 0x00000000, the CPU debugging function is closed, the SPARC architecture IU register and the local register are initialized, and the processor config register is configured.
Module M2.13: the window registers are then initialized, the DSU functions are set, and then exception handling and floating point functions are enabled. The interrupt flag is then cleared, and the processor config register is again configured.
Module M2.14: the floating point registers are initialized and the level 1 and level 2 caches are disabled.
Module M2.15: and setting an sp pointer of each core, wherein the reserved size of each core stack space is 4K Byte.
Module M2.16: and jumping other cores of the processor into the SRAM address space where the compiling address of the operating system is located, and starting to run the operating system code.
Example 2
Example 2 is a preferred example of example 1
The compiled mirror structure diagram is shown in fig. 1.
The image consists of 3 parts, a boot loader, image parameters and an operating system program. The compiled address of the boot loader starts at 0x00000000, and the address space actually stored in the Nor flash is also 0x00000000 from the CPU perspective, so that the execution of the boot loader is actually executed in the flash. The compiling of the bootstrap program is separated from the operating system, the bootstrap program is relatively independent after the compiling is completed, and the compiled bootstrap program is packed to the forefront of the mirror image when the operating system program is compiled. The mirror image parameter automatically generates an array according to the mirror image size generated by compiling the mirror image of the operating system, the initial address and other parameters, and then the mirror image parameter array is placed in the mirror image space with the mirror image offset of 0x0007F000-0x0007FFFF through the link script. After the code of the operating system is compiled, the mirror image is placed at the offset 0x00080000 through a chain pin book, the compiling address of the operating system is the address of the SRAM, the operating system determines the compiling address, and finally 3 parts are packed into one mirror image, and the structure is shown in FIG. 1.
The start-up procedure is shown in the start-up flow chart of fig. 3.
The compiled image is fixed to the Nor flash at the starting address 0x00000000, and the processor core is started first after power-on, that is, the CPU0 is started first. The initialization of the core, config and floating point registers begins after startup. Then initializing a debugging serial port, initializing DDR2, setting an sp pointer to enter a C environment, acquiring parameters of an image from an address space of the image offset 0x0007F000-0x0007FFFF and checking the legality, wherein the parameters of the image comprise parameters such as a compiling address, a size and the like of an operating system image; after acquiring the mirror image information, starting to read the mirror image of the operating system from the mirror image fixed offset address 0x00080000 and writing the mirror image of the operating system into an address corresponding to the SRAM; at this time, the CPU0 enables both the CPUs 1-3 to be turned on, and then the CPU0 jumps to the operating system code corresponding to the SRAM to give control to the operating system. CPU1-CPU3 is also turned on, starting from address 0x00000000, and then 3 CPUs initialize the corresponding core, config, and floating point registers, respectively. And then setting a stack pointer sp of each CPU and entering a c environment, then respectively acquiring information of an operating system image by each CPU to obtain a starting address of the operating system in the SRAM, then jumping in a corresponding address, and giving control right to the operating system, so as to guide and finish the starting of the multi-core processor.
Taking the guidance of the multi-core processor S698PM of the SPARC architecture as an example, the system enters an embedded real-time operating system to complete the guidance of the system. The compilation of the boot program and the program of the operating system is first completed and a three-part image is formed. After the image is obtained, the image is burned to the 0x00000000 address of the Nor flash, and then the board card of the multi-core processor S698PM is powered on and started. After starting, the main core completes initialization, then the operating system image is carried to the SRAM from the flash, then multi-core is enabled, the main core and other cores give control right to the operating system, and finally S698PM multi-core processor entering the embedded real-time operating system is completed.
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the device and the modules thereof provided by the present invention can be considered as a hardware component, and the modules included in the system, the device and the modules thereof for implementing various programs can also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (10)
1. A bootstrap method for an embedded SPARC architecture processor, comprising:
step S1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script;
step S2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; and enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a boot process.
2. The bootstrap method for an embedded SPARC architecture processor as recited in claim 1, wherein the compiling execution address of the bootstrap loader is a start address of Nor flash; and the execution address of the operating system program is the address of the SRAM.
3. The bootstrap method for embedded SPARC architecture processor as recited in claim 1, wherein the image parameters are automatically generated during compilation process according to operating system program information and stored in fixed offset address of the image through a linking script.
4. The bootstrap method for an embedded SPARC architecture processor as recited in claim 1, wherein the bootstrap loader is relatively independent of the operating system program, compiled to be embedded in a preset segment in front of the mirror.
5. The bootstrap method for embedded SPARC architecture processor as recited in claim 1, wherein said initialization memory and memory controller employs:
step S2.1: closing the debugging function of the CPU, initializing the SPARC architecture, the IU register and the local register, and configuring a config register of the processor;
step S2.2: initializing a window register, setting a DSU function, and enabling exception handling and floating point functions; clearing the interrupt mark and reconfiguring the processor config register again;
step S2.3: initializing a floating-point register, disabling the 1-level cache and the 2-level cache, and initializing a controller of a memory;
step S2.4: initializing pin multiplexing and baud rate of a serial port, and enabling receiving and sending;
step S2.5: initializing a DDR2 controller, and configuring a register of a DDR2PHY until the DDR2 is initialized;
step S2.6: setting sp pointer to SRAM memory address, and jumping to c language environment.
6. The bootstrap method for embedded SPARC architecture processor as recited in claim 1, wherein writing the operating system program from Nor flash to the address corresponding to SRAM employs:
step S2.7: the SPARC processor main core reads mirror image parameters from a specified address of a system mirror image, wherein the mirror image parameters comprise a compiling address of an operating system code and the size of an operating system code space;
step S2.8: checking whether the read mirror image parameters are valid information;
step S2.9: when the acquired mirror image parameter is effective information, reading a mirror image of an operating system program from a mirror image fixed offset address, and writing the mirror image into an SRAM address space corresponding to a compiling address of the operating system;
step S2.10: the main core of the SPARC processor enables other cores to be opened, so that the other cores start to run;
step S2.11: and jumping into the SRAM address space where the compiling address of the operating system is located by the main core of the SPARC processor, and starting to run the operating system code.
7. A bootstrap system for an embedded SPARC architecture processor, comprising:
module M1: packing the boot loader, the mirror image parameters and the operating system program into a system mirror image of the SPARC processor through the link script;
module M2: the SPARC processor main core is started from the Nor flash initial address, executes a boot loader, initializes the memory and the memory controller, obtains information of an operating system program through the mirror image parameters by the boot loader, and writes the operating system program into an address corresponding to the SRAM from the Nor flash; and enabling the main core of the SPARC processor to open other cores, so that the other cores start to run, jumping the main core and the other cores into addresses corresponding to the SRAM, running an operating system program, and finishing a boot process.
8. The bootstrap system for an embedded SPARC architecture processor as recited in claim 7, wherein the compilation execution address of the boot loader is a start address of Nor flash; the execution address of the operating system program is the address of the SRAM;
the mirror image parameters are automatically generated according to the program information of the operating system in the compiling process and are stored in the fixed offset address of the mirror image through the link script;
the boot loader is relatively independent of the operating system program and is compiled to embed the preset segment in the front of the image.
9. The bootstrap system for embedded SPARC architecture processor as recited in claim 7, wherein said initialization memory and memory controller employs:
module M2.1: closing the debugging function of the CPU, initializing the SPARC architecture, the IU register and the local register, and configuring a config register of the processor;
module M2.2: initializing a window register, setting a DSU function, and enabling exception handling and floating point functions; clearing the interrupt mark and reconfiguring the processor config register again;
module M2.3: initializing a floating-point register, disabling the 1-level cache and the 2-level cache, and initializing a controller of a memory;
module M2.4: initializing pin multiplexing and baud rate of a serial port, and enabling receiving and sending;
module M2.5: initializing a DDR2 controller, and configuring a register of a DDR2PHY until the DDR2 is initialized;
module M2.6: setting sp pointer to SRAM memory address, and jumping to c language environment.
10. The bootstrap system for embedded SPARC architecture processor as recited in claim 7, wherein the writing of the operating system program from Nor flash to the address corresponding to SRAM employs:
module M2.7: the SPARC processor main core reads mirror image parameters from a specified address of a system mirror image, wherein the mirror image parameters comprise a compiling address of an operating system code and the size of an operating system code space;
module M2.8: checking whether the read mirror image parameters are valid information;
module M2.9: when the acquired mirror image parameter is effective information, reading a mirror image of an operating system program from a mirror image fixed offset address, and writing the mirror image into an SRAM address space corresponding to a compiling address of the operating system;
module M2.10: the main core of the SPARC processor enables other cores to be opened, so that the other cores start to run;
module M2.11: and jumping into the SRAM address space where the compiling address of the operating system is located by the main core of the SPARC processor, and starting to run the operating system code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111339610.0A CN114064134B (en) | 2021-11-12 | 2021-11-12 | Self-booting method and system suitable for embedded SPARC architecture processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111339610.0A CN114064134B (en) | 2021-11-12 | 2021-11-12 | Self-booting method and system suitable for embedded SPARC architecture processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114064134A true CN114064134A (en) | 2022-02-18 |
CN114064134B CN114064134B (en) | 2024-02-06 |
Family
ID=80275414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111339610.0A Active CN114064134B (en) | 2021-11-12 | 2021-11-12 | Self-booting method and system suitable for embedded SPARC architecture processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114064134B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102455923A (en) * | 2010-10-27 | 2012-05-16 | 北京南车时代信息技术有限公司 | Method and device for processing human-machine interface startup data of engineering machinery vehicle |
CN106295318A (en) * | 2015-06-05 | 2017-01-04 | 北京壹人壹本信息科技有限公司 | A kind of system start-up bootstrap technique and device |
CN106407156A (en) * | 2016-09-23 | 2017-02-15 | 深圳震有科技股份有限公司 | A method and a system for BOOTROM guiding multi-core CPU boot |
CN106775855A (en) * | 2016-12-07 | 2017-05-31 | 北京时代民芯科技有限公司 | A kind of flash programmings method based on eclipse, plug-in unit and system |
CN109213531A (en) * | 2018-09-01 | 2019-01-15 | 哈尔滨工程大学 | A kind of multi-core DSP based on EMIF16 powers on the simplification implementation method of self-starting |
CN109460262A (en) * | 2018-11-15 | 2019-03-12 | 深圳市网心科技有限公司 | Verify method, system, Android device and the medium of main system image legitimacy |
CN110704113A (en) * | 2019-09-04 | 2020-01-17 | 苏州浪潮智能科技有限公司 | Starting method and system based on FPGA platform and development board device |
-
2021
- 2021-11-12 CN CN202111339610.0A patent/CN114064134B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102455923A (en) * | 2010-10-27 | 2012-05-16 | 北京南车时代信息技术有限公司 | Method and device for processing human-machine interface startup data of engineering machinery vehicle |
CN106295318A (en) * | 2015-06-05 | 2017-01-04 | 北京壹人壹本信息科技有限公司 | A kind of system start-up bootstrap technique and device |
CN106407156A (en) * | 2016-09-23 | 2017-02-15 | 深圳震有科技股份有限公司 | A method and a system for BOOTROM guiding multi-core CPU boot |
CN106775855A (en) * | 2016-12-07 | 2017-05-31 | 北京时代民芯科技有限公司 | A kind of flash programmings method based on eclipse, plug-in unit and system |
CN109213531A (en) * | 2018-09-01 | 2019-01-15 | 哈尔滨工程大学 | A kind of multi-core DSP based on EMIF16 powers on the simplification implementation method of self-starting |
CN109460262A (en) * | 2018-11-15 | 2019-03-12 | 深圳市网心科技有限公司 | Verify method, system, Android device and the medium of main system image legitimacy |
CN110704113A (en) * | 2019-09-04 | 2020-01-17 | 苏州浪潮智能科技有限公司 | Starting method and system based on FPGA platform and development board device |
Also Published As
Publication number | Publication date |
---|---|
CN114064134B (en) | 2024-02-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3491519B1 (en) | Optimized uefi reboot process | |
CN101344899B (en) | Simulation test method and system of on-chip system | |
KR101623892B1 (en) | Distributed multi-core memory initialization | |
US5615331A (en) | System and method for debugging a computing system | |
US9858084B2 (en) | Copying of power-on reset sequencer descriptor from nonvolatile memory to random access memory | |
US6643800B1 (en) | Method and apparatus for testing microarchitectural features by using tests written in microcode | |
CN114064134A (en) | Self-guiding method and system suitable for embedded SPARC (spatial Power control processor) architecture processor | |
US9934045B1 (en) | Embedded system boot from a storage device | |
Bertolotti et al. | Embedded software development: the open-source approach | |
CN116610368B (en) | Configurable chip starting guiding method, system and medium | |
Gu et al. | Power on and bootloader | |
Ye | Embedded programming with Android: bringing up an Android system from scratch | |
CN109582370A (en) | A kind of starting method and device of NOR FLASH embedded device | |
Gediya et al. | Open-Source Software | |
Kurikka | Testing embedded software in a simulated environment | |
Raza | Specializing a general-purpose operating system | |
Nurmi | BootROM Development for a Novel Multiprocessor System-on-Chip | |
Kumar et al. | Porting and BSP Customization of Linux on ARM Platform | |
Filipović et al. | PYNQ Environment on Versal Devices | |
CN115562922A (en) | Simulation system of RISCV processor system and process program loading method | |
Naia | Real-Time Linux and Hardware Accelerated Systems on QEMU | |
Patil | Improving the use of scheduling features on SoC GPUs | |
González Muñoz | Improving the BeagleBone board with embedded Ubuntu, enhanced GPMC driver and Python for communication and graphical prototypes | |
CN117149536A (en) | Test method and system for processor system level design | |
Vij et al. | DEVICE DRIVER SYNTHESIS. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |