Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, below contrast accompanying drawing and combine embodiment, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
For technical scheme of the present invention is described, describe through specific embodiment below.
Fig. 2 shows the realization flow of the system start method that the embodiment of the invention provides, and specifically details are as follows:
In step S201, system power on get into one-level high pass assistant starting module QCSBL before, judge whether secondary high pass assistant starting module QCSBL normal, if judged result is " being ", execution in step S202 then, otherwise execution in step S203.
In the present embodiment, (Qualcomm secondary boot loader is that main QCSBL, secondary QCSBL are the backup of main QCSBL QCSBL) to said one-level high pass assistant starting module.Said one-level QCSBL is with in secondary QCSBL is stored in the different storage blocks of flash memory (Flash) respectively.
The start address 0xffff0000 of permanent storage (on-chip ROM) from the sheet of system begins to read main start-up loading module (Primary Boot Loader; PBL); Obtain configuration data (Configuration Data) through PBL, and search and load said QCSBL according to the positional information of QCSBL in the said configuration data.
In order to reduce the consumption of one-level QCSBL, strengthen protection to one-level QCSBL.Present embodiment is loading said QCSBL, before entering one-level QCSBL, judges whether secondary QCSBL is normal earlier, if normal, then moves said secondary QCSBL earlier.Wherein, the said storage block non-fault that normally comprises non-fault of QCSBL own and storage QCSBL.
In step S202, get into system start-up from said secondary QCSBL.
Concrete is, copies said secondary QCSBL to internal memory (RAM) from Flash, and according to the start address of this secondary of storage QCSBL in the internal memory, the secondary QCSBL from this start address begins to get into system start-up.
In step S203, upgrade said secondary QCSBL through moving said one-level QCSBL, the secondary QCSBL after upgrading gets into system start-up.
Further, in order effectively to upgrade said secondary QCSBL, the embodiment of the invention is judging that secondary high pass assistant starting module QCSBL whether before the normal step, also comprises:
Whether detect said secondary QCSBL backs up; If, then do not need to back up again, otherwise said secondary QCSBL backed up, and with the back-up storage of said secondary QCSBL to Flash.Wherein the backup of secondary QCSBL is a or two parts.
Need to prove that the read-write number of times of each storage block is limited, when read-write number of times when too much, storage block is damaged easily, therefore in order to guarantee the normal operation of secondary QCSBL, the backup of secondary QCSBL is at least portion.But for the umber that prevents to back up is too much wasted the storage space of system, the backup of secondary QCSBL is at most two parts.
In the present embodiment, saidly upgrade said secondary QCSBL and specifically comprise through moving said one-level QCSBL:
In the present embodiment, before judging that said secondary QCSBL is whether normal,
A, the said one-level QCSBL of operation judge whether the storage block of the said secondary QCSBL of storage is bad piece; If execution in step b, otherwise execution in step c;
In the present embodiment, the purpose of moving said one-level QCSBL is the refresh routine that starts secondary QCSBL, obtaining the memory location of secondary QCSBL, and judges according to said memory location whether the storage block of the said secondary QCSBL of storage is bad piece.
If b redistributes a storage block, copy the secondary QCSBL of said backup to redistribute storage block, to accomplish secondary QCSBL and upgrade, the size of this storage block is greater than or equal to the size of said bad storage block;
C, if not directly copies the secondary QCSBL of said backup to the storage block of said secondary QCSBL, to replace abnormal secondary QCSBL, accomplishes the renewal of secondary QCSBL.
In the present embodiment, said abnormal secondary QCSBL refers to the fault of secondary QCSBL itself, like virus infections etc.
In addition; Said secondary QCSBL after upgrade gets into system start-up and is specially: copy the secondary QCSBL after the said renewal to internal memory from Flash; According to the start address of this secondary of storage QCSBL in the internal memory, the secondary QCSBL from this start address begins to get into system start-up.
Pass through the embodiment of the invention; Can effectively reduce the consumption of one-level QCSBL (promptly main QCSBL); The serviceable life that prolongs one-level QCSBL is (if be a the serviceable life of existing main QCSBL; Then be at least a * a) serviceable life of the main QCSBL in the embodiment of the invention, improve the reliability and the security of system start-up.
Further, for further prolonging the serviceable life of one-level QCSBL, the embodiment of the invention also comprises:
When system powers on, start a counter, said counter is used for the number of run of first order calculation QCSBL; When the said one-level QCSBL of operation; Counter adds 1, and in system when said secondary QCSBL gets into system start-up, judge whether the count value of said counter reaches predetermined threshold value; If then upgrade said one-level QCSBL, the said counter of zero clearing simultaneously; Otherwise continue to get into system start-up from secondary QCSBL.Further, before upgrading said one-level QCSBL, the embodiment of the invention also comprises:
Whether detect said one-level QCSBL backs up; If, then do not need to back up again, otherwise said one-level QCSBL backed up, and with the back-up storage of said one-level QCSBL to Flash.Wherein the backup of one-level QCSBL is a or two parts.
Wherein, upgrading said one-level QCSBL specifically comprises:
Whether the storage block of judging the said one-level QCSBL of storage is bad piece;
If, redistribute a storage block, copy the one-level QCSBL of said backup to redistribute storage block, accomplish one-level QCSBL and upgrade;
If not, directly the one-level QCSBL of said backup is copied to the storage block of said one-level QCSBL,, accomplish the renewal of one-level QCSBL with the one-level QCSBL of storage before the replacement.
The embodiment of the invention can further prolong the serviceable life of one-level QCSBL through the dynamic regular one-level QCSBL that refreshes, and improves the reliability and the security of system start-up.
Fig. 3 shows the idiographic flow of the system start method that the embodiment of the invention provides, and process is following:
In step S301, Boot at first begins from ARM9, behind the electrification reset, begins to read and carry out PBL from the start address 0xffff0000 of on-chip ROM; The major function of PBL comprises access external memory and obtains configuration data and configure hardware etc.;
In step S302, PBL searches and loads said QCSBL according to the positional information of QCSBL in the configuration data, and at this moment PBL hands to QCSBL to the control of ARM9, and carries out QCSBL.Wherein the major function of QCSBL for load and carry out OEM assistant starting module (OEMSBL) and senior mobile customized software (Advanced Mobile Subscriber Software, AMSS);
In step S303, one-level QCSBL (main QCSBL) is preceding getting into, and judges whether secondary QCSBL (backup of main QCSBL) is normal; If normal execution in step S304, otherwise execution in step S305;
In step S304, get into system start-up from said secondary QCSBL;
In step S305, QCSBL upgrades secondary QCSBL through the operation one-level, and the counter that when operation one-level QCSBL, will start adds 1.Wherein, the detailed process of renewal repeats no more at this as stated;
In step S306, jump to the secondary QCSBL after the renewal, and forward step S304 to;
In step S307, secondary QCSBL judges whether the number of times of said counter reaches preset value (for example 20000 times) in the process of carrying out; If execution in step S308, otherwise execution in step S309;
In step S308, upgrade one-level QCSBL.Wherein, the detailed process of renewal repeats no more at this as stated;
In step S309, load and carry out OEMSBL;
In step S310, load and carry out AMSS, said AMSS comprises information such as all protocol stacks in communication facilities (for example mobile phone) the inside, operating system.
Need to prove that the implementation of ARM11 is identical with prior art among Fig. 3, repeats no more at this.
Those of ordinary skills it is also understood that; Realize that all or part of step in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be in being stored in a computer read/write memory medium; Described storage medium comprises ROM/RAM, disk, CD etc.
Fig. 4 shows the composition structure of the system starting device that the embodiment of the invention provides, and for the ease of explanation, only shows the part relevant with the embodiment of the invention.
This system starting device can be to run on the unit that hardware cell or software and hardware in each facility communication system combine.
This system starting device 4 comprises judging unit 41, first processing unit 42 and second processing unit 43, and its concrete function is following:
Judging unit 41 is used for before system powers on entering one-level high pass assistant starting module QCSBL, judging whether secondary high pass assistant starting module QCSBL is normal;
First processing unit 42 is used in said judging unit 41 judged results getting into system start-up from said secondary QCSBL when being;
Second processing unit 43 is used in said judging unit 41 judged results upgrading said secondary QCSBL through moving said one-level QCSBL for not the time, and the secondary QCSBL after upgrading gets into system start-up; Be specially through moving said one-level QCSBL and upgrade said secondary QCSBL; Copy the secondary QCSBL after the said renewal to internal memory from Flash; According to the start address of this secondary of storage QCSBL in the internal memory, the secondary QCSBL from this start address begins to get into system start-up.
Said one-level QCSBL is main QCSBL, and said secondary QCSBL is the backup of main QCSBL.
Further, said device 4 also comprises: whether detecting unit 44 and backup units 45, said detecting unit 44 are used for before whether said judgment unit judges secondary high pass assistant starting module QCSBL is normal, detects said secondary QCSBL and backing up;
Said backup units 45 is used in said detection result said secondary QCSBL being backed up for not the time.
Said second processing unit 43 specifically comprises:
Operation module 431 is used in said judgment unit judges result moving said one-level QCSBL for not the time;
Judge module 432 is used to judge whether the storage block of the said secondary QCSBL of storage is bad piece;
First processing module 433 is used in said judge module judged result redistributing a storage block when being, copies the secondary QCSBL of said backup to redistribute storage block, accomplishes secondary QCSBL and upgrades;
Second processing module 434 is used in said judgment unit judges result directly the secondary QCSBL of said backup being copied to the storage block of said secondary QCSBL for not the time, to replace abnormal secondary QCSBL, accomplishes the renewal of secondary QCSBL;
Start module 435, the secondary QCSBL after being used for upgrading from said first processing module or second processing module gets into system start-up.
Further, said device 4 also comprises:
Counter start unit 46 when being used for powering in system, starts a counter;
Said counter 47 is used for when the said one-level QCSBL of operation, and count value adds 1.
Further, said device 4 also comprises:
Count value judging unit 48 is used for judging when said secondary QCSBL gets into system start-up whether the count value of said counter 47 reaches predetermined threshold value;
Updating block 49 is used in said count value judging unit 48 judged results upgrading said one-level QCSBL when being, the said counter of zero clearing simultaneously.
Further, whether said detecting unit 44 also is used for before said updating block 49 upgrades said one-level QCSBL, detecting said one-level QCSBL and backing up;
Said backup units 45 also is used in said detecting unit 44 testing results said one-level QCSBL being backed up for not the time.
Said updating block 49 specifically comprises:
Judge module 491 is used in said count value judging unit 48 judged results when being, judges whether the storage block of the said one-level QCSBL of storage is bad piece;
First processing module 492 is used in said judge module 491 judged results redistributing a storage block when being, copies the one-level QCSBL of said backup to redistribute storage block, accomplishes one-level QCSBL and upgrades;
Second processing module 493 is used in said judge module 491 judged results when being, with the storage block that the one-level QCSBL of said backup copies said one-level QCSBL to, with the one-level QCSBL of storage before the replacement, accomplishes the renewal of one-level QCSBL;
Dump block 494 is used for after said first processing module 492 or second processing module 493 have been upgraded the said counter of zero clearing.
Further, said device comprises flash memory f ' lash410, and said flash memory 410 comprises different storage blocks, is used for storing respectively said one-level QCSBL and secondary QCSBL.
Further, said first processing unit 42 specifically is used for:
When being, copy said secondary QCSBL to internal memory from Flash in said judging unit 41 judged results, according to the start address of this secondary of storage QCSBL in the internal memory, the secondary QCSBL from this start address begins to get into system start-up.
In the present embodiment, said one-level QCSBL is with in secondary QCSBL is stored in the different storage blocks of flash memory Flash respectively.The said storage block non-fault that normally comprises non-fault of QCSBL own and storage QCSBL.
The system starting device that present embodiment provides can be used the system start method in aforementioned correspondence, and details repeat no more at this referring to the associated description of said system startup method.
One of ordinary skill in the art will appreciate that to each included unit of this system starting device embodiment, module are to divide according to function logic, but be not limited to above-mentioned division, as long as can realize function corresponding; In addition, the concrete title of each functional unit, module also just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In sum, the embodiment of the invention judges whether secondary QCSBL is normal earlier before system powers on entering one-level QCSBL; If normal, then get into system start-up, if undesired from said secondary QCSBL; Then upgrade said secondary QCSBL through moving said one-level QCSBL; Secondary QCSBL after upgrading gets into system start-up, through the embodiment of the invention, can effectively reduce the consumption of one-level QCSBL (promptly main QCSBL); Prolong the serviceable life of one-level QCSBL, improve the reliability and the security of system start-up.And through the dynamic regular one-level QCSBL that refreshes; The serviceable life that can further prolong one-level QCSBL is (if be a the serviceable life of existing main QCSBL; Then be at least a * a * a * a...) serviceable life of the main QCSBL in the embodiment of the invention; Improve the reliability and the security of system start-up greatly, and realize simply having stronger practical value.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.