CN100485627C - Method for protecting system data without powerdown - Google Patents
Method for protecting system data without powerdown Download PDFInfo
- Publication number
- CN100485627C CN100485627C CNB2006101098002A CN200610109800A CN100485627C CN 100485627 C CN100485627 C CN 100485627C CN B2006101098002 A CNB2006101098002 A CN B2006101098002A CN 200610109800 A CN200610109800 A CN 200610109800A CN 100485627 C CN100485627 C CN 100485627C
- Authority
- CN
- China
- Prior art keywords
- program
- interblock
- data
- memory
- system data
- 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.)
- Active
Links
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The present invention discloses a system data saving method under uninterrupted power. After a warm start, with the application system program operating normally, system data are output reliably before the reboot. Applied to an embedded system using SDRAM, the method includes the following procedures: (a) a storage space in SDRAM is allocated as an information record area; (b) the system data which should be stored into the information record area by a system data operation system program is stored, the data in the information record area is cached and processed so that the system data can be written in physical memory; (c) a memory address range for the BOOT program and application system program of the system are configured to make sure that only the system data operating program of the application system program can write in the information record area; (d) after system resetting, when the application system program runs normally, the system data of the information record area is output.
Description
Technical field
The present invention relates to the embedded design field, particularly a kind ofly utilize the software and hardware combination, be implemented in the method for maintaining system data without switching off power supply.
Background technology
In embedded system, form with embedded hardware system and embedded software system basically.The operation duration of embedded system is the important indicator of system stability, even but the defective in some problem of environment, the design also can appear in the high again embedded system of reliability in actual motion, cause system reset.Embedded system generally belongs to unattended system, and occurring resetting just need provide effective means, can analyze from relevant information that the system of coming out belongs to which kind of resets, the state before the system reset how, and then further analyze, improve design.
The reason of system reset is varied, and the software address exceptional reset is arranged, and illegal command resets, manual reset, WATCHDOG overflow and reset, the hardware circuit exceptional reset, electric voltage exception resets and power-off restoration etc.Resetting of the overwhelming majority do not carried out under the powering-off state.Be identification and analyze reset circuit, need be at saved system status data under the powering-off state not.
In present embedded system, generally use synchronous DRAM (SDRAM), exist under the continuous electric situation in this, not refreshing in the short time can obliterated data yet.Thereby, can in SDRAM, mark off a reserved memory, do interblock, be used for the saved system status data.
Chinese patent application " method that keeps the Synchronous Dynamic Random Access Memory canned data " (application number 03146159.X) is that a kind of the outage preserves the method for data down, but because BOOT or bios program space are limited, function is also fairly simple, so can only export more original information, output means is also fairly simple and possibility is unreliable, generally only the system data before restarting is printed, can't preserve with serial ports or network interface.
Summary of the invention
Technical matters to be solved by this invention provides a kind of method of maintaining system data without switching off power supply, in real application systems not behind the power-off restarting, can be after the application system program run be normal, and the system data before output system is restarted reliably.
In order to solve the problems of the technologies described above, the invention provides a kind of method of maintaining system data without switching off power supply, be applied to use the embedded system of synchronous DRAM, described synchronous DRAM may further comprise the steps hereinafter to be referred as SDRAM:
(a) in SDRAM, divide a storage space as interblock;
(b) system data that will be needed to preserve by the system data running program in the application system program is stored in described interblock, and interblock is carried out the metadata cache processing of one of following method, makes system data can write in the physical memory;
The memory attribute of described interblock is configured to not carry out metadata cache, but makes the physical memory of the described interblock of write operation statement direct control in the program;
The memory attribute of described interblock is configured to carry out metadata cache, after described interblock writes data, described interblock is carried out refreshing of metadata cache, forcibly the data in the buffer memory are write in the physical memory;
(c) the BOOT program of the described system of configuration and the memory address range of application system program guarantee to have only the system data running program in the described application system program to carry out write operation to described interblock;
(d) after system restarts, after the normal operation of application system program, the system data of output information recording areas.
Further, said method also can have following characteristics: in the described step (a), described storage space as interblock is one section maximum physical memory of physical address addressing.
Further, said method also can have following characteristics: described step (c) further comprises:
(c1) memory address range of operating system management in the described BOOT program of configuration makes the operating system in the BOOT program not carry out write operation to described interblock;
(c2) memory address range of operating system management in the configuration application system program makes the operating system in the application system program not carry out write operation to high-end interblock.
Further, said method also can have following characteristics: in described step (c1) with (c2), the memory address range of described configuration operation system management is finished by the corresponding configuration program of rewriting operating system memory management in described BOOT program and the described application system program respectively.
Further, said method also can have following characteristics: described step (c1) also comprises: dispose other program outside the operating system in the described BOOT program, make it not carry out write operation to described interblock.
Further, said method also can have following characteristics: described step (c2) also comprises: dispose the program outside the operating system in the described application system program, guarantee to have only the system data running program in the described application system program to carry out write operation to described interblock.
Further, said method also can have following characteristics: in the described step (d), after the normal operation of system, the system data of described interblock is outputed to operation maintaining background or output device.
This method has proposed the software and hardware combination on the basis of abundant analysis of built-in system, be implemented in the method for maintaining system data without switching off power supply, is used for the system data output that the unmanned embedded system resets preceding, with identification and analysis reset circuit.After this method can be implemented in application system program run normally, the information before output is restarted reliably.Simultaneously this method also is to improve a reset important method of Testability Design of embedded system.
Embodiment
Present embodiment is by carrying out the division setting of interblock to the application system program of actual motion, makes real application systems not behind the power-off restarting, the system data before also can output system after the normal operation of system restarting.
The 3G system is made up of a plurality of embedded systems, is the example explanation with one of them single board system here.
In the present embodiment, this single board system has two programs: BOOT program and application system program.Wherein the BOOT program is carried out partially-initialized to single board system, and the operation of direct application system program, promptly common described BOOT version; The application system program then is the program of the real operation of single board system, is carrying all application and function, promptly usually said system's operation version.These two programs have all comprised VXWORKS operating system.
Concrete steps are as follows:
Step 110 is divided a storage space as interblock in SDRAM;
Divided the storage space of a most significant end in the present embodiment, i.e. the maximum physical memory of physical address addressing, the size of storage space is the 128K byte.
Step 120, the system data that will be needed to preserve by the system data running program in the application system program is stored in above-mentioned interblock, and the metadata cache that carries out of interblock is handled;
Interblock metadata cache (CACHE) is handled, one of available following two kinds of methods:
(1) after the division information recording areas, the memory attribute of this recording areas is configured to not carry out metadata cache, feasible recording areas hereto, but the physical memory of the write operation statement direct control recording areas in the program, rather than only operation CACHE generally.Through above-mentioned measure, after interblock writes data, can guarantee really writing information recording areas of data.
(2) in the ordinary course of things, carry out metadata cache and help to improve CPU efficient.Interblock is carried out general, general memory attribute configuration, promptly interblock is carried out metadata cache, after interblock writes data, interblock is carried out refreshing of metadata cache (only need once be refreshed, do not need periodic refreshing), forcibly the data among the CACHE are transferred in (promptly writing) physical memory, guarantee really writing information recording areas of data.
Modern CPU Dram system, generally form by high-speed cache CACHE and low speed main memory SDRAM, want data are write SDRAM, necessarily need to consider the disposal route of two kinds of above-mentioned buffer memorys, could guarantee that system data can really write the interblock among the SDRAM, promptly write physical memory really, rather than as the write operation statement in the program only be the operation CACHE.
Employing can guarantee to have in the physical memory " data that will write " with the processing that data write physical memory, and the transient state retention performance that SDRAM itself has is (promptly under powering-off state not, not refreshing in short time also not can obliterated data) can guarantee that the internal storage data among the SDRAM remains unchanged before and after restarting, therefore system not during power-off restarting the system data in the physical memory can not lose.
Step 130, the memory address range of configuration operation system management in the BOOT program makes the operating system in the BOOT program not carry out write operation to high-end interblock;
The memory address range of configuration operation system management is finished by the corresponding configuration program of rewriting operating system memory management in the BOOT program.
Simultaneously need also to guarantee that the other parts except that operating system are not carried out write operation to above-mentioned interblock in the BOOT program, the common fingerboard of described other parts supports the bag program.In general, the program of other parts can not operated the internal memory that memory management does not have configuration, but the situation according to reality has difference, such as these programs might not be to go to obtain the memory address section from the operating system memory management, and directly obtain an absolute memory address section, absolute memory address section like this may for fear of this point, therefore need the rewriting program at interblock.
Step 140, the memory address range of configuration operation system management in the application system program guarantees to have only the system data running program in the application system program to carry out write operation to the interblock that configures;
The memory address range of configuration operation system management is to finish by the corresponding configuration program of rewriting operating system memory management in the application system program.
Also need configuration to using the program beyond the operating system in the system program (this part program normally plate supports bag, drives), make it not carry out write operation, to guarantee the having only system data running program in the application system program to carry out write operation to the interblock that configures to described interblock.
Step 150, after system restarted, after the normal operation of application system program, the system data running program outputed to operation maintaining background or output device to the system data of interblock.
After the normal operation of application system program, can export reliably by various means and restart preceding system data, comprise the operation maintaining background that is sent to embedded system, and preserve that this point is particularly useful for unattended embedded system on the backstage.
Certainly, the present invention also can have other various embodiments, under the situation that does not deviate from spirit of the present invention and essence thereof, those of ordinary skill in the art are when making various corresponding changes and distortion according to the present invention, also can use above flow process such as being applied in all embedded systems of using SDRAM; The position of scope in physical address such as the divided information recording areas is not limited to the maximum physical memory of physical address addressing in the present embodiment.These corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.
Claims (7)
1, a kind of method of maintaining system data without switching off power supply is applied to use the embedded system of synchronous DRAM, and described synchronous DRAM may further comprise the steps hereinafter to be referred as SDRAM:
(a) in SDRAM, divide a storage space as interblock;
(b) system data that will be needed to preserve by the system data running program in the application system program is stored in described interblock, and interblock is carried out the metadata cache processing of one of following method, makes system data can write in the physical memory;
The memory attribute of described interblock is configured to not carry out metadata cache, but makes the physical memory of the described interblock of write operation statement direct control in the program;
The memory attribute of described interblock is configured to carry out metadata cache, after described interblock writes data, described interblock is carried out refreshing of metadata cache, forcibly the data in the buffer memory are write in the physical memory;
(c) the BOOT program of the described system of configuration and the memory address range of application system program guarantee to have only the system data running program in the described application system program to carry out write operation to described interblock;
(d) after system restarts, after the normal operation of application system program, the system data of output information recording areas.
2, the method for claim 1 is characterized in that, in the described step (a), described storage space as interblock is one section maximum physical memory of physical address addressing.
3, the method for claim 1 is characterized in that, described step (c) further comprises:
(c1) memory address range of operating system management in the described BOOT program of configuration makes the operating system in the BOOT program not carry out write operation to described interblock;
(c2) memory address range of operating system management in the configuration application system program makes the operating system in the application system program not carry out write operation to described interblock.
4, method as claimed in claim 3, it is characterized in that, in described step (c1) with (c2), the memory address range of described configuration operation system management is finished by the corresponding configuration program of rewriting operating system memory management in described BOOT program and the described application system program respectively.
5, method as claimed in claim 3 is characterized in that, described step (c1) also comprises: dispose other program outside the operating system in the described BOOT program, make it not carry out write operation to described interblock.
6, method as claimed in claim 3, it is characterized in that, described step (c2) also comprises: dispose the program outside the operating system in the described application system program, guarantee to have only the system data running program in the described application system program to carry out write operation to described interblock.
7, the method for claim 1 is characterized in that, in the described step (d), after the normal operation of system, the system data of described interblock is outputed to operation maintaining background or output device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101098002A CN100485627C (en) | 2006-08-11 | 2006-08-11 | Method for protecting system data without powerdown |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101098002A CN100485627C (en) | 2006-08-11 | 2006-08-11 | Method for protecting system data without powerdown |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101122874A CN101122874A (en) | 2008-02-13 |
CN100485627C true CN100485627C (en) | 2009-05-06 |
Family
ID=39085216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006101098002A Active CN100485627C (en) | 2006-08-11 | 2006-08-11 | Method for protecting system data without powerdown |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100485627C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104252365A (en) * | 2013-06-25 | 2014-12-31 | 上海博泰悦臻电子设备制造有限公司 | Quick start method of Android operating system |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105425997B (en) * | 2015-11-11 | 2019-02-05 | Oppo广东移动通信有限公司 | A kind of user terminal restart after interface display method and user terminal |
CN113672432A (en) * | 2020-05-15 | 2021-11-19 | 中兴通讯股份有限公司 | System restarting method, terminal and storage medium |
-
2006
- 2006-08-11 CN CNB2006101098002A patent/CN100485627C/en active Active
Non-Patent Citations (2)
Title |
---|
计算机随机存储器. 靳美.电子科技. 1999 |
计算机随机存储器. 靳美.电子科技. 1999 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104252365A (en) * | 2013-06-25 | 2014-12-31 | 上海博泰悦臻电子设备制造有限公司 | Quick start method of Android operating system |
Also Published As
Publication number | Publication date |
---|---|
CN101122874A (en) | 2008-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103577121B (en) | A kind of highly reliable linear file access method based on Nand Flash | |
US8892831B2 (en) | Memory subsystem hibernation | |
US9042197B2 (en) | Power fail protection and recovery using low power states in a data storage device/system | |
US7681004B2 (en) | Advanced dynamic disk memory module | |
US8621144B2 (en) | Accelerated resume from hibernation in a cached disk system | |
CN104461964B (en) | A kind of storage device | |
CN101551780B (en) | Television and data storage method and device thereof | |
CN101013351A (en) | Hard disk drive cache memory and playback device | |
CN105630405B (en) | A kind of storage system and the reading/writing method using the storage system | |
CN103577574A (en) | High-reliability linear file system based on nand flash | |
CN108959589B (en) | STT-MRAM-based method for accelerating log file saving and recovery of solid-state memory device | |
CN1936853B (en) | Data cut-off protection and repairing method of inlaid apparatus | |
CN101937344B (en) | Computer and method for quickly starting same | |
CN103543815A (en) | Information processing apparatus and information processing method | |
CN102024502A (en) | Flash device testing method and device as well as board and network equipment | |
CN111506351A (en) | Deep sleep method, wake-up method and sleep and wake-up method for system on chip | |
CN101901174B (en) | Method for enhancing reliability of program of multi-replica contrast mechanism based on code segment | |
CN100485627C (en) | Method for protecting system data without powerdown | |
CN103927145A (en) | System sleeping and awakening method and device based on hybrid memory | |
US20160188456A1 (en) | Nvram-aware data processing system | |
US20120047387A1 (en) | Cache control device and cache control method | |
CN101515259B (en) | Inserted device configuring data protecting method | |
CN104615383A (en) | Software operation method and device based on virtual disk | |
CN102521173B (en) | Method for automatically writing back data cached in volatile medium | |
CN102855162B (en) | A kind of data-updating method, data update system and memorizer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |