CN110308952A - A kind of method of configuration inspection during starting of embedded operation system - Google Patents
A kind of method of configuration inspection during starting of embedded operation system Download PDFInfo
- Publication number
- CN110308952A CN110308952A CN201910583933.0A CN201910583933A CN110308952A CN 110308952 A CN110308952 A CN 110308952A CN 201910583933 A CN201910583933 A CN 201910583933A CN 110308952 A CN110308952 A CN 110308952A
- Authority
- CN
- China
- Prior art keywords
- self
- test
- chip microcontroller
- value
- inspection record
- 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
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/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present embodiments relate to a kind of methods of configuration inspection during starting of embedded operation system, which is characterized in that the described method includes: obtaining the first configuration switch byte, generates the first configuration switch;Carry out the first checking treatment;The first self-test configuration list is generated according to self-test inventory file;According to the first self-test configuration list, the first self-detection result inventory and highest Alert Level are generated;First self-detection result inventory is added to and is stored in local self-detection result file;When the value of highest Alert Level is security level, single-chip microcontroller executes starting up's processing.The method of the present invention activates/inactivates the self-test process flow in start-up course by setting configuration switch;The active self-test of periodization for realizing single-chip microcontroller by configuring self-test inventory file;The configuration self-test to each component is realized by the way that the inspection switch of self-inspection record is arranged;By realizing the adaptive protection after self-test to the identification of highest Alert Level.
Description
Technical field
The present invention relates to computer embedded software technology field more particularly to a kind of starting of embedded operation system processes
The method of middle configuration inspection.
Background technique
Singlechip equipment is widely used in Internet of Things, mobile payment and shared device.Ensure that equipment operates normally,
It is ensured that single-chip microcontroller working condition is normal.Single-chip microcontroller is during service operation if there is component unstable working condition
Or mistake, existing way only can add corresponding error logging in the machine for posterior maintenance personnel reference.Such mode
Although remaining status information, be a lack of it is comprehensive with it is predictable.But also upper layer device management network can not be determined
The facility information state that phase updates.
Summary of the invention
The purpose of the present invention is provided and is matched during a kind of starting of embedded operation system aiming at above-mentioned technological deficiency
The method for setting inspection can not only realize the sub-unit inspection of configurationization, can also send out to realize the active self-test of single-chip microcontroller
Reply processing is made according to set strategy in time when existing undesirable item.
To achieve the above object, the present invention provides a kind of sides of configuration inspection during starting of embedded operation system
Method, which comprises
The single-chip microcontroller obtains the first configuration switch byte, generates first according to local starting configuration file is stored in
Configuration switch;
The single-chip microcontroller carries out the first checking treatment to the first configuration switch;
After described first verifies successfully, the single-chip microcontroller obtains complete according to local self-test inventory file is stored in
The effective self-inspection record in portion generates the first self-test configuration list;
The single-chip microcontroller carries out certainly the software and hardware resources of the single-chip microcontroller according to the first self-test configuration list item by item
Inspection processing, generates the first self-detection result inventory and highest Alert Level;
The first self-detection result inventory is added to by the single-chip microcontroller to be stored in local self-detection result file;
When the value of the highest Alert Level is security level, the single-chip microcontroller executes starting up's processing.
Further, the single-chip microcontroller carries out the first checking treatment to the first configuration switch, specifically includes:
When the value of the first configuration switch is to open, described first is verified successfully.
Further, described after described first verifies successfully, the single-chip microcontroller is clear according to local self-test is stored in
Monofile obtains all effective self-inspection records, generates the first self-test configuration list, specifically include:
Step 31, after described first verifies successfully, the value that the single-chip microcontroller initializes the first self-inspection record index is
0, the first interim self-test configuration list of initialization is sky;
Step 32, the single-chip microcontroller obtains the self-test inventory text according to the local self-test inventory file is stored in
The record sum of part, generates the first self-inspection record sum;
Step 33, the value that the first self-inspection record index is arranged in the single-chip microcontroller is 1;
Step 34, the single-chip microcontroller obtains the first self-inspection record index self-test note according to the self-test inventory file
Byte is recorded, the first self-inspection record is generated;
Step 35, the single-chip microcontroller obtains first and checks switch byte, generate the first inspection according to first self-inspection record
Look into switch;
Step 36, judge that described first checks whether the value of switch is out, if described first checks that the value of switch is to open,
Then first self-inspection record is effective self-inspection record, goes to step 37;If described first checks that the value of switch is to close, institute
Stating the first self-inspection record is invalid self-inspection record, goes to step 38;
Step 37, the single-chip microcontroller extracts all bytes of the first self-inspection record according to first self-inspection record, right
The first interim self-test configuration list carries out record addition processing;
Step 38, the value that the first self-inspection record index is arranged in the single-chip microcontroller adds 1;
Step 39, judge whether the value of the first self-inspection record index is greater than the value of the first self-inspection record sum,
If the value of the first self-inspection record index is greater than the value of the first self-inspection record sum, then it represents that arrived the self-test
Inventory file tail, goes to step 40;If the value of the first self-inspection record index is no more than the first self-inspection record sum
Value, then continue to obtain next record of the self-test inventory file, go to step 34;
Step 40, the single-chip microcontroller extracts the first interim self-test and matches according to the described first interim self-test configuration list
All inventory bytes of inventory are set, the first self-test configuration list is generated.
Further, the single-chip microcontroller is according to the first self-test configuration list, to the software and hardware resources of the single-chip microcontroller
Self-test processing is carried out item by item, is generated the first self-detection result inventory and highest Alert Level, is specifically included:
Step 41, it is 0 that the single-chip microcontroller, which initializes the value of the second self-inspection record index, initializes the first interim self-detection result
Inventory is sky, and the value of the first interim highest Alert Level of initialization is 0;
Step 42, the single-chip microcontroller obtains the first self-test configuration list according to the first self-test configuration list
Record sum generates the second self-inspection record sum;
Step 43, the value that the second self-inspection record index is arranged in the single-chip microcontroller is 1;
Step 44, the single-chip microcontroller obtains the second self-inspection record index certainly according to the first self-test configuration list
Inspection record byte, generates the second self-inspection record;
Step 45, the single-chip microcontroller obtains the first self-test object byte according to second self-inspection record, generates first certainly
Examine object;
Step 46, the single-chip microcontroller obtains the first self-test project byte according to second self-inspection record, generates first certainly
Inspection project;
Step 47, the single-chip microcontroller obtains local system time, generates for the first self-test time;
Step 48, the single-chip microcontroller is according to the first self-test project, to the first self-test object of the single-chip microcontroller
Self-test processing is carried out, the first Alert Level of mark self-test effect is generated;
Step 49, the single-chip microcontroller carries out the described first interim highest Alert Level according to first Alert Level
Maximum value compares hand-off process, guarantees that the Alert Level value of the described first interim highest Alert Level record is at all points with this
The highest level value occurred in item self-test effect;
Step 50, the single-chip microcontroller is to the first self-test time, the first self-test object, the first self-test project
Spliced with first Alert Level, generates the first self-detection result record;
Step 51, the single-chip microcontroller is recorded according to first self-detection result, is extracted first self-detection result and is recorded institute
There is byte, record addition processing is carried out to the described first interim self-detection result inventory;
Step 52, the value that the second self-inspection record index is arranged in the single-chip microcontroller adds 1;
Step 53, judge whether the value of the second self-inspection record index is greater than the value of the second self-inspection record sum,
If the value of the second self-inspection record index is greater than the value of the second self-inspection record sum, then it represents that arrived described first
Self-test configuration list tail, goes to step 54;If the value of the second self-inspection record index is not more than second self-inspection record
The value of sum then continues next record for obtaining the first self-test configuration list, goes to step 44;
Step 54, the single-chip microcontroller extracts the first interim self-test knot according to the described first interim self-detection result inventory
All inventory bytes of fruit inventory generate the first self-detection result inventory;
Step 55, it is the described first interim highest Alert Level that the value of the highest Alert Level, which is arranged, in the single-chip microcontroller
Value.
Preferably, the step 47, the single-chip microcontroller obtain local system time, generate for the first self-test time, specific to wrap
It includes:
The single-chip microcontroller obtains local system time by the time format of " date Hour Minute Second ", generates first self-test
Time.
Preferably, the step 49, the single-chip microcontroller are alert to the described first interim highest according to first Alert Level
It reports rank to carry out maximum value and compares hand-off process, guarantee the Alert Level value of the described first interim highest Alert Level record with this
It is the highest level value occurred in all subitem self-test effects, specifically includes:
When the value of first Alert Level is greater than the value of the described first interim highest Alert Level, described first is faced
When highest Alert Level value be set as the value of first Alert Level, the described first interim highest Alert Level is guaranteed with this
The Alert Level value of record is the highest level value occurred in all subitem self-test effects.
Preferably, the step 50, the single-chip microcontroller is to the first self-test time, the first self-test object, described
First self-test project and first Alert Level are spliced, and are generated the first self-detection result record, are specifically included:
The single-chip microcontroller is by the first self-test time, the first self-test object, the first self-test project, described
The one assembled processing of Alert Level progress sequence, generates the first self-detection result record.
Further, the method also includes:
When the value of the highest Alert Level is primary alarm, then the single-chip microcontroller starting primary protection program is prevented
Shield;
When the value of the highest Alert Level is second-level alarm, then the single-chip microcontroller starting second level guard process is prevented
Shield;
When the value of the highest Alert Level is three-level alarm, then the single-chip microcontroller starting three-level guard process is prevented
Shield;
When the value of the highest Alert Level is level Four alarm, then the single-chip microcontroller starting level Four guard process is prevented
Shield.
Further, the method also includes:
When the starting configuration file is not set up, then the single-chip microcontroller does not execute configuration check process;
When the self-test inventory file is not set up, then the single-chip microcontroller does not execute configuration check process;
When the self-detection result file is not set up, then the single-chip microcontroller is completed to build the self-detection result file
Addition processing vertical and then according to the first self-detection result inventory completion to the self-detection result file.
Method provided by the invention is quoted, setting configuration can be switched in starting configuration file, to activate/inactivate starting
Self-test process flow in the process;The active self-test of periodization that can realize single-chip microcontroller by configuring self-test inventory file;
The configuration self-test to each component can be realized by the inspection switch of self-inspection record in setting self-test inventory file;It can lead to
Cross the identification of the value to highest Alert Level, the adaptive protection after Lai Shixian self-test.
Detailed description of the invention
Fig. 1 is self-test inventory file provided in an embodiment of the present invention and self-test configuration list schematic diagram;
Fig. 2 is self-detection result inventory provided in an embodiment of the present invention and self-detection result file schematic diagram;
Fig. 3 is the method work of configuration inspection during a kind of starting of embedded operation system that the embodiment of the present invention one provides
Make schematic diagram;
Fig. 4 is the method work of configuration inspection during a kind of starting of embedded operation system provided by Embodiment 2 of the present invention
Make schematic diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
The method of configuration inspection during a kind of starting of embedded operation system provided in an embodiment of the present invention, certainly by first
The self-inspection record of object, the first self-test project, the first inspection switch composition fixed format is examined, then is made of certainly a plurality of self-inspection record
Examine inventory file.One section of self-test process flow is added in the embodiment of the present invention in single-chip microcontroller Bootloader: being matched according to starting
Set the configuration switch of file, the configuration self-test process that activation/inactivation the method for the present invention provides;It is single into after configuration self-test process
The self-inspection record of self-test inventory file is examined successively in piece machine, is shown as effective self-test as game clock using the self-test switch of self-inspection record and remembers
Record obtains all effective records and generates the first self-test configuration list;Single-chip microcontroller is according to the first self-test configuration list, successively to inventory
The specified self-test object of middle self-inspection record carries out specified self-test item inspection, and generates the Alert Level of mark self-test effect;
After the completion of every self-test, the Alert Level for identifying self-test effect is compared single-chip microcontroller with highest Alert Level, works as tagging
When the value of the Alert Level of self-test effect is greater than the value of highest Alert Level, the value of highest Alert Level is revised as mark self-test
The value of the Alert Level of effect, guarantee to record in highest Alert Level with this was occurred most in process of self-test always
Big number of levels;After the completion of every self-test, single-chip microcontroller is alert by the+the first self-test of the first self-test time the+the first self-test of object project+the first
It reports rank to reformulate the first self-detection result record, the first self-detection result inventory is written;After completing all self-tests, single-chip microcontroller
By the first self-detection result inventory write-in self-detection result file in case host computer access queries;After completing all self-tests, monolithic
Machine checks highest Alert Level, is executed at corresponding level protective according to the value of highest Alert Level by the response policy of reservation
Manage program.
It is the embodiment of the present invention for the data structure for further illustrating self-test inventory file and self-test configuration list, such as Fig. 1
Shown in the self-test inventory file and self-test configuration list schematic diagram of offer: self-test inventory file text, it is always several certainly by self-inspection record
Inspection record composition, every self-inspection record is by self-test object, self-test project and checks that switch forms;The content of self-test configuration list is come
From in effective record of self-test inventory file, so, it is clear that the self-inspection record sum of self-test configuration list is less than or equal to self-test
The record sum of monofile;Self-test configuration list records total several inventory self-inspection records by inventory and forms, each inventory from
Inspection record is by self-test object and self-test item design.
It is the embodiment of the present invention for the data structure for further illustrating self-detection result inventory and self-detection result file, such as Fig. 2
Shown in the self-detection result inventory and self-detection result file schematic diagram of offer: the data knot of self-detection result file and self-detection result inventory
Structure is consistent, is made of the total several self-detection result records of self-detection result record;Every self-detection result record is by self-test time, self-test
Object, self-test project and the warning level composition for identifying self-test effect.
The embodiment of the present invention one, if Fig. 3 is a kind of starting of embedded operation system process that the embodiment of the present invention one provides
Shown in the method operation schematic diagram of middle configuration inspection, method the following steps are included:
Step 11, single-chip microcontroller obtains the first configuration switch byte according to local starting configuration file is stored in, and generates the
One configuration switch.
Step 12, single-chip microcontroller carries out the first checking treatment to the first configuration switch,
It specifically includes: when the value of the first configuration switch is to open, then first verifying successfully, single-chip microcontroller enters at configuration self-test
Manage process.
Step 13, after first verifies successfully, single-chip microcontroller obtains all according to local self-test inventory file is stored in
Effective self-inspection record generates the first self-test configuration list,
Specifically include: the value of step a1, single-chip microcontroller initialization the first self-inspection record index are 0, and initialization first is interim certainly
Examining configuration list is sky;
Step a2, single-chip microcontroller obtain the record sum of self-test inventory file according to local self-test inventory file is stored in,
Generate the first self-inspection record sum;
Step a3, it is 1 that the value that the first self-inspection record indexes, which is arranged, in single-chip microcontroller;
Step a4, single-chip microcontroller obtain the first self-inspection record index record byte according to self-test inventory file, generate first certainly
Inspection record;
Step a5, single-chip microcontroller obtain first and check switch byte, generate first and check switch according to the first self-inspection record;
Step a6 judges that first checks whether the value of switch is out, if first checks that the value of switch is to open, first certainly
Inspection is recorded as effective self-inspection record, goes to step a7;If first checks that the value of switch is to close, the first self-inspection record is invalid
Self-inspection record goes to step a8;
Step a7, single-chip microcontroller extract all bytes of the first self-inspection record, to the first interim self-test according to the first self-inspection record
Configuration list carries out record addition processing;
Step a8, single-chip microcontroller are arranged the value that the first self-inspection record indexes and add 1;
Step a9, judges whether the value of the first self-inspection record index is greater than the value of the first self-inspection record sum, if first
The value of self-inspection record index is greater than the value of the first self-inspection record sum, then it represents that has arrived self-test inventory file tail, has gone to step
a10;If the value of the first self-inspection record index is not more than the value of the first self-inspection record sum, continue to obtain self-test inventory file
Next record, go to step a4;
Step a10, single-chip microcontroller extract all of the first interim self-test configuration list according to the first interim self-test configuration list
Inventory byte generates the first self-test configuration list.
Step 14, single-chip microcontroller carries out at self-test the software and hardware resources of single-chip microcontroller according to the first self-test configuration list item by item
Reason generates the first self-detection result inventory and highest Alert Level,
Specifically include: the value of step b1, single-chip microcontroller initialization the second self-inspection record index are 0, and initialization first is interim certainly
Examining results list is sky, and the value of the first interim highest Alert Level of initialization is 0;
Step b2, single-chip microcontroller obtain the record sum of the first self-test configuration list, generate according to the first self-test configuration list
Second self-inspection record sum;
Step b3, it is 1 that the value that the second self-inspection record indexes, which is arranged, in single-chip microcontroller;
Step b4, single-chip microcontroller obtain the second self-inspection record index record byte according to the first self-test configuration list, generate the
Two self-inspection records;
Step b5, single-chip microcontroller obtain the first self-test object byte according to the second self-inspection record, generate the first self-test object;
Step b6, single-chip microcontroller obtain the first self-test project byte according to the second self-inspection record, generate the first self-test project;
Step b7, single-chip microcontroller obtain local system time, generate for the first self-test time;
Step b8, single-chip microcontroller carry out self-test processing according to the first self-test project, to the first self-test object of single-chip microcontroller, generate
Identify the first Alert Level of self-test effect;
Step b9, single-chip microcontroller carry out maximum value comparison to the first interim highest Alert Level and cut according to the first Alert Level
Processing is changed, guarantees that the Alert Level value of the first interim highest Alert Level record is that occur in all subitem self-test effects with this
The highest level value crossed;
Step b10, single-chip microcontroller is to the first self-test time, the first self-test object, the first self-test project and the first Alert Level
Spliced, generates the first self-detection result record;
Step b11, single-chip microcontroller are recorded according to the first self-detection result, are extracted the first self-detection result and are recorded all bytes, to the
One interim self-detection result inventory carries out record addition processing;
Step b12, single-chip microcontroller are arranged the value that the second self-inspection record indexes and add 1;
Step b13, judges whether the value of the second self-inspection record index is greater than the value of the second self-inspection record sum, if second
The value of self-inspection record index is greater than the value of the second self-inspection record sum, then it represents that the first self-test configuration list tail, goes to
Step b14;If the value of the second self-inspection record index is not more than the value of the second self-inspection record sum, continue to obtain the first self-test
Next record of configuration list, goes to step b4;
Step b14, single-chip microcontroller extract all of the first interim self-detection result inventory according to the first interim self-detection result inventory
Inventory byte generates the first self-detection result inventory;
Step b15, the value that highest Alert Level is arranged in single-chip microcontroller is the value of the first interim highest Alert Level.
Step 15, the first self-detection result inventory is added to and is stored in local self-detection result file by single-chip microcontroller.
Step 16, when the value of highest Alert Level is security level, single-chip microcontroller does not do any protective treatment, continues to be switched on
Booting sequence.
The embodiment of the present invention two, if Fig. 4 is a kind of starting of embedded operation system process provided by Embodiment 2 of the present invention
Shown in the method operation schematic diagram of middle configuration inspection, method the following steps are included:
Step 111, single-chip microcontroller obtains the first configuration switch byte, generates according to local starting configuration file is stored in
First configuration switch.
Step 112, judge whether the value of the first configuration switch is out, if the value of the first configuration switch is to open, monolithic
Machine enters configuration self-test process flow, goes to step 113;If the value of the first configuration switch is to close, single-chip microcontroller, which does not start, matches
Self-test process flow is set, step 119 is gone to.
Step 113, single-chip microcontroller obtains all effective self-inspection records, generates according to local self-test inventory file is stored in
First self-test configuration list,
Specifically include: the value of step C1, single-chip microcontroller initialization the first self-inspection record index are 0, and initialization first is interim certainly
Examining configuration list is sky;
Step C2, single-chip microcontroller obtain the record sum of self-test inventory file according to local self-test inventory file is stored in,
Generate the first self-inspection record sum;
Step C3, it is 1 that the value that the first self-inspection record indexes, which is arranged, in single-chip microcontroller;
Step C4, single-chip microcontroller obtain the first self-inspection record index record byte according to self-test inventory file, generate first certainly
Inspection record;
Step C5, single-chip microcontroller obtain first and check switch byte, generate first and check switch according to the first self-inspection record;
Step C6 judges that first checks whether the value of switch is out, if first checks that the value of switch is to open, first certainly
Inspection is recorded as effective self-inspection record, goes to step C7;If first checks that the value of switch is to close, the first self-inspection record is invalid
Self-inspection record goes to step C8;
Step C7, single-chip microcontroller extract all bytes of the first self-inspection record, to the first interim self-test according to the first self-inspection record
Configuration list carries out record addition processing;
Step C8, single-chip microcontroller are arranged the value that the first self-inspection record indexes and add 1;
Step C9, judges whether the value of the first self-inspection record index is greater than the value of the first self-inspection record sum, if first
The value of self-inspection record index is greater than the value of the first self-inspection record sum, then it represents that has arrived self-test inventory file tail, has gone to step
C10;If the value of the first self-inspection record index is not more than the value of the first self-inspection record sum, continue to obtain self-test inventory file
Next record, go to step C4;
Step C10, single-chip microcontroller extract all of the first interim self-test configuration list according to the first interim self-test configuration list
Inventory byte generates the first self-test configuration list.
Step 114, single-chip microcontroller carries out at self-test the software and hardware resources of single-chip microcontroller according to the first self-test configuration list item by item
Reason generates the first self-detection result inventory and highest Alert Level,
Specifically include: the value of step D1, single-chip microcontroller initialization the second self-inspection record index are 0, and initialization first is interim certainly
Examining results list is sky, and the value of the first interim highest Alert Level of initialization is 0;
Step D2, single-chip microcontroller obtain the record sum of the first self-test configuration list, generate according to the first self-test configuration list
Second self-inspection record sum;
Step D3, it is 1 that the value that the second self-inspection record indexes, which is arranged, in single-chip microcontroller;
Step D4, single-chip microcontroller obtain the second self-inspection record index record byte according to the first self-test configuration list, generate the
Two self-inspection records;
Step D5, single-chip microcontroller obtain the first self-test object byte according to the second self-inspection record, generate the first self-test object;
Step D6, single-chip microcontroller obtain the first self-test project byte according to the second self-inspection record, generate the first self-test project;
Step D7, single-chip microcontroller obtain local system time, generate for the first self-test time;
Step D8, single-chip microcontroller carry out self-test processing according to the first self-test project, to the first self-test object of single-chip microcontroller, generate
Identify the first Alert Level of self-test effect;
Step D9, single-chip microcontroller carry out maximum value comparison to the first interim highest Alert Level and cut according to the first Alert Level
Processing is changed, guarantees that the Alert Level value of the first interim highest Alert Level record is that occur in all subitem self-test effects with this
The highest level value crossed;
Step D10, single-chip microcontroller is to the first self-test time, the first self-test object, the first self-test project and the first Alert Level
Spliced, generates the first self-detection result record;
Step D11, single-chip microcontroller are recorded according to the first self-detection result, are extracted the first self-detection result and are recorded all bytes, to the
One interim self-detection result inventory carries out record addition processing;
Step D12, single-chip microcontroller are arranged the value that the second self-inspection record indexes and add 1;
Step D13, judges whether the value of the second self-inspection record index is greater than the value of the second self-inspection record sum, if second
The value of self-inspection record index is greater than the value of the second self-inspection record sum, then it represents that the first self-test configuration list tail, goes to
Step D14;If the value of the second self-inspection record index is not more than the value of the second self-inspection record sum, continue to obtain the first self-test
Next record of configuration list, goes to step D4;
Step D14, single-chip microcontroller extract all of the first interim self-detection result inventory according to the first interim self-detection result inventory
Inventory byte generates the first self-detection result inventory;
Step D15, the value that highest Alert Level is arranged in single-chip microcontroller is the value of the first interim highest Alert Level.
Step 115, the first self-detection result inventory is added to and is stored in local self-detection result file by single-chip microcontroller.
Step 116, whether the value for judging highest Alert Level is security level, if the value of highest Alert Level is safety
Rank, then single-chip microcontroller does not do the subsequent starting up's process of any protective treatment continuation, goes to step 119;If highest alarm grade
Other value is not security level, then enters self-test guard process and execute process flow, go to step 117.
Step 117, whether the value for judging highest Alert Level is registered one/bis-/tri-/level Four alarm, if highest
The value of Alert Level belongs to registered one/bis-/tri-/level Four alert range, then starts corresponding with the alarm of one/bis-/tri-/level Four
One/bis-/tri-/level Four guard process, goes to step 118;If the value of highest Alert Level is not belonging to registered one/bis-/tri-/
Level Four alert range, then it represents that unregistered Alert Level occurs in self-detection result, goes to step 410.
Step 118, start one/bis-/tri-/level Four guard process corresponding with highest Alert Level.
Step 119, configuration self-test process terminates, and executes subsequent starting up's process.
Step 410, single-chip microcontroller is according to the unregistered Alert Level of acquisition, into configuration self-test abnormality processing process.Cause
The reason of such mistake occurs, mainly has: leakage registration occurring when registration Alert Level;Or the current self-test appearance of single-chip microcontroller is different
Often.
Method provided by the invention is quoted, setting configuration can be switched in starting configuration file, to activate/inactivate starting
Self-test process flow in the process;The active self-test of periodization that can realize single-chip microcontroller by configuring self-test inventory file;
The configuration self-test to each component can be realized by the inspection switch of self-inspection record in setting self-test inventory file;It can lead to
Cross the identification of the value to highest Alert Level, the adaptive protection after Lai Shixian self-test.
Professional should further appreciate that, described in conjunction with the examples disclosed in the embodiments of the present disclosure
Unit and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, hard in order to clearly demonstrate
The interchangeability of part and software generally describes each exemplary composition and step according to function in the above description.
These functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.
Professional technician can use different methods to achieve the described function each specific application, but this realization
It should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can be executed with hardware, processor
The combination of software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only memory
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In any other form of storage medium well known to interior.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include
Within protection scope of the present invention.
Claims (9)
1. a kind of method of configuration inspection during starting of embedded operation system, which is characterized in that the described method includes:
Single-chip microcontroller obtains the first configuration switch byte, generates the first configuration switch according to local starting configuration file is stored in;
The single-chip microcontroller carries out the first checking treatment to the first configuration switch;
After described first verifies successfully, according to local self-test inventory file is stored in, obtain all has the single-chip microcontroller
Self-inspection record is imitated, the first self-test configuration list is generated;
The single-chip microcontroller carries out at self-test the software and hardware resources of the single-chip microcontroller according to the first self-test configuration list item by item
Reason generates the first self-detection result inventory and highest Alert Level;
The first self-detection result inventory is added to by the single-chip microcontroller to be stored in local self-detection result file;
When the value of the highest Alert Level is security level, the single-chip microcontroller executes starting up's processing.
2. method according to claim 1, which is characterized in that the single-chip microcontroller carries out the first school to the first configuration switch
Processing is tested, is specifically included:
When the value of the first configuration switch is to open, described first is verified successfully.
3. method according to claim 1, which is characterized in that described after described first verifies successfully, the single-chip microcontroller
According to local self-test inventory file is stored in, all effective self-inspection records are obtained, generate the first self-test configuration list, it is specific to wrap
It includes:
Step 31, after described first verifies successfully, the value that the single-chip microcontroller initializes the first self-inspection record index is 0, just
The interim self-test configuration list of beginningization first is sky;
Step 32, the single-chip microcontroller obtains the self-test inventory file according to the local self-test inventory file is stored in
Record sum generates the first self-inspection record sum;
Step 33, the value that the first self-inspection record index is arranged in the single-chip microcontroller is 1;
Step 34, the single-chip microcontroller obtains first self-inspection record and indexes self-inspection record word according to the self-test inventory file
Section generates the first self-inspection record;
Step 35, the single-chip microcontroller obtains first and checks switch byte according to first self-inspection record, generates the first inspection and opens
It closes;
Step 36, judge that described first checks whether the value of switch is out, if described first checks that the value of switch is to open, institute
Stating the first self-inspection record is effective self-inspection record, goes to step 37;If described first checks that the value of switch is to close, described the
One self-inspection record is invalid self-inspection record, goes to step 38;
Step 37, the single-chip microcontroller extracts all bytes of the first self-inspection record, to described according to first self-inspection record
First interim self-test configuration list carries out record addition processing;
Step 38, the value that the first self-inspection record index is arranged in the single-chip microcontroller adds 1;
Step 39, judge whether the value of the first self-inspection record index is greater than the value of the first self-inspection record sum, if
The value of the first self-inspection record index is greater than the value of the first self-inspection record sum, then it represents that has arrived the self-test inventory
End-of-file goes to step 40;If the value of the first self-inspection record index is not more than the value of the first self-inspection record sum,
Next for then continuing to obtain the self-test inventory file records, and goes to step 34;
Step 40, it is clear to extract the described first interim self-test configuration according to the described first interim self-test configuration list for the single-chip microcontroller
Single all inventory bytes generate the first self-test configuration list.
4. method according to claim 1, which is characterized in that the single-chip microcontroller is right according to the first self-test configuration list
The software and hardware resources of the single-chip microcontroller carry out self-test processing item by item, generate the first self-detection result inventory and highest Alert Level, tool
Body includes:
Step 41, it is 0 that the single-chip microcontroller, which initializes the value of the second self-inspection record index, initializes the first interim self-detection result inventory
For sky, the value for initializing the first interim highest Alert Level is 0;
Step 42, the single-chip microcontroller obtains the record of the first self-test configuration list according to the first self-test configuration list
Sum generates the second self-inspection record sum;
Step 43, the value that the second self-inspection record index is arranged in the single-chip microcontroller is 1;
Step 44, the single-chip microcontroller obtains the second self-inspection record index self-test note according to the first self-test configuration list
Byte is recorded, the second self-inspection record is generated;
Step 45, the single-chip microcontroller obtains the first self-test object byte according to second self-inspection record, generates the first self-test pair
As;
Step 46, the single-chip microcontroller obtains the first self-test project byte according to second self-inspection record, generates the first self-test item
Mesh;
Step 47, the single-chip microcontroller obtains local system time, generates for the first self-test time;
Step 48, the single-chip microcontroller carries out the first self-test object of the single-chip microcontroller according to the first self-test project
Self-test processing, generates the first Alert Level of mark self-test effect;
Step 49, the single-chip microcontroller carries out the described first interim highest Alert Level maximum according to first Alert Level
Value compares hand-off process, guarantees that the Alert Level value of the described first interim highest Alert Level record is itemized certainly all with this
The highest level value occurred in inspection effect;
Step 50, the single-chip microcontroller is to the first self-test time, the first self-test object, the first self-test project and institute
It states the first Alert Level to be spliced, generates the first self-detection result record;
Step 51, the single-chip microcontroller is recorded according to first self-detection result, is extracted first self-detection result and is recorded all words
Section carries out record addition processing to the described first interim self-detection result inventory;
Step 52, the value that the second self-inspection record index is arranged in the single-chip microcontroller adds 1;
Step 53, judge whether the value of the second self-inspection record index is greater than the value of the second self-inspection record sum, if
The value of the second self-inspection record index is greater than the value of the second self-inspection record sum, then it represents that has arrived first self-test
Configuration list tail, goes to step 54;If the value of the second self-inspection record index is no more than the second self-inspection record sum
Value, then continue to obtain next record of the first self-test configuration list, go to step 44;
Step 54, it is clear to extract the first interim self-detection result according to the described first interim self-detection result inventory for the single-chip microcontroller
Single all inventory bytes generate the first self-detection result inventory;
Step 55, the value that the value of the highest Alert Level is the described first interim highest Alert Level is arranged in the single-chip microcontroller.
5. method according to claim 4, which is characterized in that the step 47, the single-chip microcontroller obtain local system time,
It generated for the first self-test time, specifically includes:
The single-chip microcontroller obtains local system time by the time format of " date Hour Minute Second ", when generating first self-test
Between.
6. method according to claim 4, which is characterized in that the step 49, the single-chip microcontroller is according to first alarm
Rank carries out maximum value to the described first interim highest Alert Level and compares hand-off process, with this guarantee described first it is interim most
The Alert Level value of high Alert Level record is the highest level value occurred in all subitem self-test effects, is specifically included:
When the value of first Alert Level is greater than the value of the described first interim highest Alert Level, temporarily most by described first
The value of high Alert Level is set as the value of first Alert Level, guarantees the described first interim highest Alert Level record with this
Alert Level value be the highest level value that occurred in all subitem self-test effects.
7. method according to claim 4, which is characterized in that the step 50, when the single-chip microcontroller is to first self-test
Between, the first self-test object, the first self-test project and first Alert Level spliced, generate the first self-test knot
Fruit record, specifically includes:
The single-chip microcontroller warns the first self-test time, the first self-test object, the first self-test project, described first
The assembled processing of rank progress sequence is reported, the first self-detection result record is generated.
8. method according to claim 1, which is characterized in that the method also includes:
When the value of the highest Alert Level is primary alarm, then the single-chip microcontroller starting primary protection program is protected;
When the value of the highest Alert Level is second-level alarm, then the single-chip microcontroller starting second level guard process is protected;
When the value of the highest Alert Level is three-level alarm, then the single-chip microcontroller starting three-level guard process is protected;
When the value of the highest Alert Level is level Four alarm, then the single-chip microcontroller starting level Four guard process is protected.
9. method according to claim 1, which is characterized in that the method also includes:
When the starting configuration file is not set up, then the single-chip microcontroller does not execute configuration check process;
When the self-test inventory file is not set up, then the single-chip microcontroller does not execute configuration check process;
When the self-detection result file is not set up, then the single-chip microcontroller is completed to establish it to the self-detection result file
Afterwards, the addition to the self-detection result file is completed further according to the first self-detection result inventory to handle.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910583933.0A CN110308952B (en) | 2019-06-28 | 2019-06-28 | Method for checking configuration in starting process of embedded operating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910583933.0A CN110308952B (en) | 2019-06-28 | 2019-06-28 | Method for checking configuration in starting process of embedded operating system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110308952A true CN110308952A (en) | 2019-10-08 |
CN110308952B CN110308952B (en) | 2022-04-15 |
Family
ID=68078764
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910583933.0A Active CN110308952B (en) | 2019-06-28 | 2019-06-28 | Method for checking configuration in starting process of embedded operating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110308952B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968351A (en) * | 2012-12-13 | 2013-03-13 | 中国航空无线电电子研究所 | External control method for BIT parameters |
CN103134104A (en) * | 2011-11-29 | 2013-06-05 | 德昌电机(深圳)有限公司 | Self-checking method of heating device |
CN104166610A (en) * | 2014-07-24 | 2014-11-26 | 深圳天珑无线科技有限公司 | Mobile terminal detection method and detection system |
CN205001162U (en) * | 2015-07-20 | 2016-01-27 | 湖南华振供水设备有限公司 | A intelligent water supply expert system of listing and indexing for water supply equipment |
US20160335071A1 (en) * | 2014-01-22 | 2016-11-17 | Hewlett Packard Development Company, L.P. | System firmware configuration data |
CN109032873A (en) * | 2018-08-15 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of server delivery detection method and device |
CN109669826A (en) * | 2018-12-07 | 2019-04-23 | 天津津航计算技术研究所 | A kind of embedded system power on and off automatization test system |
CN109783295A (en) * | 2017-11-10 | 2019-05-21 | 中国电子科技集团公司第四十一研究所 | Test macro self-test method for producing software and device based on configuration |
-
2019
- 2019-06-28 CN CN201910583933.0A patent/CN110308952B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103134104A (en) * | 2011-11-29 | 2013-06-05 | 德昌电机(深圳)有限公司 | Self-checking method of heating device |
CN102968351A (en) * | 2012-12-13 | 2013-03-13 | 中国航空无线电电子研究所 | External control method for BIT parameters |
US20160335071A1 (en) * | 2014-01-22 | 2016-11-17 | Hewlett Packard Development Company, L.P. | System firmware configuration data |
CN104166610A (en) * | 2014-07-24 | 2014-11-26 | 深圳天珑无线科技有限公司 | Mobile terminal detection method and detection system |
CN205001162U (en) * | 2015-07-20 | 2016-01-27 | 湖南华振供水设备有限公司 | A intelligent water supply expert system of listing and indexing for water supply equipment |
CN109783295A (en) * | 2017-11-10 | 2019-05-21 | 中国电子科技集团公司第四十一研究所 | Test macro self-test method for producing software and device based on configuration |
CN109032873A (en) * | 2018-08-15 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of server delivery detection method and device |
CN109669826A (en) * | 2018-12-07 | 2019-04-23 | 天津津航计算技术研究所 | A kind of embedded system power on and off automatization test system |
Also Published As
Publication number | Publication date |
---|---|
CN110308952B (en) | 2022-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8214905B1 (en) | System and method for dynamically allocating computing resources for processing security information | |
CN104598579B (en) | A kind of automatic question-answering method and system | |
EP3716116A1 (en) | Test scenario generation device, test scenario generation method and test scenario generation program | |
US8209758B1 (en) | System and method for classifying users of antivirus software based on their level of expertise in the field of computer security | |
US6980992B1 (en) | Tree pattern system and method for multiple virus signature recognition | |
US10686825B2 (en) | Multiple presentation fidelity-level based quantitative cyber risk decision support system | |
CN109784043A (en) | Attack restoring method, device, electronic equipment and storage medium | |
US11765196B2 (en) | Attack scenario simulation device, attack scenario generation system, and attack scenario generation method | |
CN109753790A (en) | A kind of landing page monitoring method and system | |
CN107563198B (en) | Host virus prevention and control system and method for industrial control system | |
CN108073703A (en) | A kind of comment information acquisition methods, device, equipment and storage medium | |
US20230252158A1 (en) | System and method for dynamically updating existing threat models based on newly identified active threats | |
US20220201016A1 (en) | Detecting malicious threats via autostart execution point analysis | |
CN110308952A (en) | A kind of method of configuration inspection during starting of embedded operation system | |
EP2584488B1 (en) | System and method for detecting computer security threats based on verdicts of computer users | |
CN107329746B (en) | Chip configuration information processing method and device | |
CN116112296B (en) | Intelligent video conference data protection management method, system and storage medium thereof | |
CA2516380A1 (en) | Risk management | |
CN108304699A (en) | A kind of method and device that security software is protected | |
JP7220095B2 (en) | Security design planning support device | |
CN106572083A (en) | Log processing method and system | |
CN106502813A (en) | A kind of server hard disc monitoring method and device | |
CN115208601A (en) | Method and system for actively defending malicious scanning | |
Fung et al. | Electronic information security documentation | |
JP2005025523A (en) | Information security management supporting system |
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 | ||
CB02 | Change of applicant information |
Address after: 100080, Beijing, Suzhou Street, Haidian District No. 20, building 2, on the north side of the four floor Applicant after: Zhaoxun Hengda Technology Co., Ltd Address before: 100080, Beijing, Suzhou Street, Haidian District No. 20, building 2, on the north side of the four floor Applicant before: MEGAHUNT MICROELECTRONIC TECH. (BEIJING) Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |