CN111459711A - Memory recovery method and system - Google Patents

Memory recovery method and system Download PDF

Info

Publication number
CN111459711A
CN111459711A CN202010247449.3A CN202010247449A CN111459711A CN 111459711 A CN111459711 A CN 111459711A CN 202010247449 A CN202010247449 A CN 202010247449A CN 111459711 A CN111459711 A CN 111459711A
Authority
CN
China
Prior art keywords
data
memory
reset
register
recovered
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.)
Pending
Application number
CN202010247449.3A
Other languages
Chinese (zh)
Inventor
罗雄豹
刘勇刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202010247449.3A priority Critical patent/CN111459711A/en
Publication of CN111459711A publication Critical patent/CN111459711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1012Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using codes or arrangements adapted for a specific type of error
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering

Abstract

The invention discloses a memory recovery method and a system, which relate to the technical field of communication, and the method comprises the following steps: responding to the reset signal, and judging the type of the current reset operation; when the reset operation is a hot reset, configuring a register and setting a preset memory area in the register to be in a frozen state; copying data to be recovered to a preset memory area; and performing data recovery and ECC updating according to the data to be recovered, and starting the memory. According to the invention, the data needing to be recovered is copied and set to be in a frozen state through the configuration register, so that the memory data is prevented from being lost, and the normal operation of the system after reset is further ensured.

Description

Memory recovery method and system
Technical Field
The invention relates to the technical field of communication, in particular to a memory recovery method and a memory recovery system.
Background
After the memory is reset, the startup software initializes the memory and refreshes the data in the memory, and if part of useful information is stored in the memory before the hot reset, the related data will be lost after the hot reset.
Therefore, the problem existing in the existing device is that after the system is reset, the data stored in the physical memory chip cannot be used by the operating system, so that useful data, such as system diagnosis data, cannot be used continuously, and system fault diagnosis is not facilitated.
Therefore, a new memory recovery method is urgently needed to solve the above problems and meet the technical requirements.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a memory recovery method and a memory recovery system, which can be used for setting data to be recovered into a frozen state and recovering the data by configuring a register, thereby avoiding the loss of memory data.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
in a first aspect, the present invention discloses a memory recovery method, including the following steps:
responding to the reset signal, and judging the type of the current reset operation;
when the reset operation is a hot reset, configuring a register and setting a preset memory area in the register to be in a frozen state;
copying data to be recovered to the preset memory area;
and performing data recovery and ECC updating according to the data to be recovered, and starting a memory.
On the basis of the technical scheme, the method further comprises the following steps: when the reset operation is cold reset, configuring a register and setting all memory areas in the register to be in a frozen state;
copying data to be recovered into the register;
and after resetting is completed, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
On the basis of the technical scheme, the method further comprises the following steps:
and after the memory is started, setting a data reading address corresponding to the data to be recovered as a data storage address of the preset storage area.
On the basis of the technical scheme, the method further comprises the following steps:
setting the stored data within the ECC to a frozen state when the reset operation is a hot reset.
On the basis of the technical scheme, the data to be recovered at least comprises data required by system operation.
In a second aspect, the present invention further discloses a memory recovery system, which includes:
a reset judging unit for judging the type of the current reset operation in response to a reset signal;
the register configuration unit is used for configuring a register and setting a preset memory area in the register to be in a frozen state when the reset operation is a hot reset;
the data storage unit is used for copying data to be recovered to the preset memory area;
and the data recovery unit is used for performing data recovery and updating ECC according to the data to be recovered and starting the memory.
On the basis of the above technical solution, the system further includes: and the register configuration unit is also used for configuring a register and setting all memory areas in the register to be in a frozen state when the reset operation is cold reset.
On the basis of the above technical solution, the system further includes:
and the address setting unit is used for setting a data reading address corresponding to the data to be recovered as a data storage address of the preset storage area after the memory is started.
On the basis of the above technical solution, the register configuration unit is further configured to set the storage data in the ECC to a frozen state when the reset operation is a hot reset.
On the basis of the technical scheme, the data to be recovered at least comprises data required by system operation.
Compared with the prior art, the invention has the advantages that:
according to the invention, the data needing to be recovered is copied and set to be in a frozen state through the configuration register, so that the memory data is prevented from being lost, and the normal operation of the system after reset is further ensured.
Drawings
Fig. 1 is a flowchart illustrating steps of a memory recovery method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a step of an inter-cooling reset process in a memory recovery method according to an embodiment of the present invention;
fig. 3 is a block diagram of a memory recovery system according to a second embodiment of the present invention;
in the figure: 1. a reset judgment unit; 2. a register configuration unit; 3. a data storage unit; 4. a data recovery unit; 5. an address setting unit.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
The embodiment of the invention provides a memory recovery method and system, which can be used for setting data to be recovered to be in a frozen state and recovering the data through a configuration register, so that the memory data is prevented from being lost, and the system can be ensured to normally operate after being reset.
In order to achieve the technical effects, the general idea of the application is as follows:
a memory recovery method, the method comprising:
s1, responding to the reset signal and judging the type of the current reset operation;
s2, when the reset operation is a hot reset, configuring a register and setting a preset memory area in the register to be in a frozen state;
s3, copying the data to be recovered to a preset memory area;
and S4, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Example one
Referring to fig. 1 and 2, embodiment 1 of the present invention provides a memory recovery method, including the following steps:
s1, responding to the reset signal and judging the type of the current reset operation;
s2, when the reset operation is a hot reset, configuring a register and setting a preset memory area in the register to be in a frozen state;
s3, copying the data to be recovered to a preset memory area;
and S4, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
In the embodiment of the invention, firstly, a reset signal is received, the reset signal is responded, and the type of the reset operation corresponding to the reset signal is judged, namely hot reset or cold reset;
furthermore, when the reset operation is a hot reset, a register is configured and a predetermined memory area in the register is set to a frozen state,
it should be noted that the frozen state means that, in the subsequent reset operation, the data in the preset memory region in the frozen state is not lost and still stored in the preset memory region;
then copying the data to be restored, which needs to be backed up and avoids being lost in the reset work, to a preset memory area for storage, wherein at the moment, the preset memory area is already in a frozen state, so that the data to be restored cannot be lost in the subsequent reset work;
and finally, resetting, after the resetting is finished, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
According to the embodiment of the invention, the data to be recovered is set to be in the frozen state and is recovered through the configuration register, so that the memory data is prevented from being lost, and the normal operation of the system after the reset is ensured.
In another implementation manner of the embodiment of the present invention, the method further includes a cold reset processing flow, where the cold reset processing flow includes the following steps:
a1, when the reset operation is cold reset, configuring a register and setting all memory areas in the register to be in a frozen state;
a2, copying the data to be recovered into a register;
and A3, after the resetting is finished, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
It should be noted that, in a normal case, after a cold reset, data in the memory is lost, so at this time, all memory areas in the configured register need to be set to a frozen state, and then the data to be recovered needs to be copied into the register.
In another implementation manner of the embodiment of the present invention, the method further includes the following steps:
after the memory is started, setting a data reading address corresponding to the data to be recovered as a data storage address of a preset storage area;
the data reading address and the data storage address are set to be consistent, and data recovery after reset can be facilitated.
In another implementation manner of the embodiment of the present invention, the method further includes the following steps:
when the reset operation is a hot reset, the stored data within the ECC is set to a frozen state.
In another implementation manner in the embodiment of the present invention, the data to be recovered at least includes data required by system operation;
therefore, after the system is reset, the previous work can be ensured to be carried out smoothly.
It should be noted that, in the register according to the embodiment of the present invention, during actual operation, the register may be configured by the memory controller, and then the register selects a section of address as the preset memory area.
Based on the same inventive concept, the present application provides embodiments of a memory recovery system corresponding to the embodiments, which are detailed in the second embodiment
Example two
Referring to fig. 3, an embodiment of the present invention provides a memory recovery system, including:
a reset judgment unit 1 for judging the type of the current reset operation in response to a reset signal;
a register configuration unit 2, configured to configure a register and set a preset memory area in the register to a frozen state when the reset operation is a hot reset;
the data storage unit 3 is used for copying the data to be recovered to a preset memory area;
and the data recovery unit 4 is used for performing data recovery and updating ECC according to the data to be recovered, and starting the memory.
In the embodiment of the invention, firstly, a reset signal is received, the reset signal is responded, and the type of the reset operation corresponding to the reset signal is judged, namely hot reset or cold reset;
furthermore, when the reset operation is a hot reset, a register is configured and a predetermined memory area in the register is set to a frozen state,
it should be noted that the frozen state means that, in the subsequent reset operation, the data in the preset memory region in the frozen state is not lost and still stored in the preset memory region;
then copying the data to be restored, which needs to be backed up and avoids being lost in the reset work, to a preset memory area for storage, wherein at the moment, the preset memory area is already in a frozen state, so that the data to be restored cannot be lost in the subsequent reset work;
and finally, resetting, after the resetting is finished, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
According to the embodiment of the invention, the data to be recovered is set to be in the frozen state and is recovered through the configuration register, so that the memory data is prevented from being lost, and the normal operation of the system after the reset is ensured.
In another implementation manner of the embodiment of the present invention, the register configuration unit 4 is further configured to configure a register and set all memory areas in the register to be in a frozen state when the reset operation is a cold reset.
It should be noted that, in a normal case, after a cold reset, data in the memory is lost, so at this time, all memory areas in the configured register need to be set to a frozen state, and then the data to be recovered needs to be copied into the register.
In another implementation manner of the embodiment of the present invention, the system further includes: and the address setting unit 5 is configured to set a data reading address corresponding to the data to be recovered as a data storage address of the preset storage area after the memory is started.
In another implementation manner in the embodiment of the present invention, the register configuration unit 2 is further configured to set the stored data in the ECC to the frozen state when the reset operation is a hot reset.
In another implementation manner in the embodiment of the present invention, the data to be recovered at least includes data required for system operation.
It should be noted that, in the register according to the embodiment of the present invention, during actual operation, the register may be configured by the memory controller, and then the register selects a section of address as the preset memory area.
Based on the same inventive concept, the present application provides an embodiment of a storage medium corresponding to the embodiment described in the third embodiment
EXAMPLE III
A third embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out all or part of the method steps of the first embodiment.
The present invention can implement all or part of the flow in the first embodiment, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Based on the same inventive concept, the application provides an embodiment of a corresponding device, and the detailed description is given in the fourth embodiment
Example four
The fourth embodiment of the present invention further provides an apparatus, which includes a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the first embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), servers and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method of memory recovery, the method comprising:
responding to the reset signal, and judging the type of the current reset operation;
when the reset operation is a hot reset, configuring a register and setting a preset memory area in the register to be in a frozen state;
copying data to be recovered to the preset memory area;
and performing data recovery and ECC updating according to the data to be recovered, and starting a memory.
2. The method of claim 1, further comprising the steps of:
when the reset operation is cold reset, configuring a register and setting all memory areas in the register to be in a frozen state;
copying data to be recovered into the register;
and after resetting is completed, performing data recovery and ECC updating according to the data to be recovered, and starting the memory.
3. The method of claim 1, further comprising the steps of:
and after the memory is started, setting a data reading address corresponding to the data to be recovered as a data storage address of the preset storage area.
4. The method of claim 1, further comprising the steps of:
setting the stored data within the ECC to a frozen state when the reset operation is a hot reset.
5. The method of claim 1, wherein:
the data to be recovered at least comprises data required by system operation.
6. A memory recovery system, the system comprising:
a reset judging unit for judging the type of the current reset operation in response to a reset signal;
the register configuration unit is used for configuring a register and setting a preset memory area in the register to be in a frozen state when the reset operation is a hot reset;
the data storage unit is used for copying data to be recovered to the preset memory area;
and the data recovery unit is used for performing data recovery and updating ECC according to the data to be recovered and starting the memory.
7. The system of claim 6, wherein:
and the register configuration unit is also used for configuring a register and setting all memory areas in the register to be in a frozen state when the reset operation is cold reset.
8. The system of claim 6, wherein the system further comprises:
and the address setting unit is used for setting a data reading address corresponding to the data to be recovered as a data storage address of the preset storage area after the memory is started.
9. The system of claim 6, wherein:
the register configuration unit is further configured to set the stored data within the ECC to a frozen state when the reset operation is a hot reset.
10. The system of claim 6, wherein:
the data to be recovered at least comprises data required by system operation.
CN202010247449.3A 2020-03-31 2020-03-31 Memory recovery method and system Pending CN111459711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247449.3A CN111459711A (en) 2020-03-31 2020-03-31 Memory recovery method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247449.3A CN111459711A (en) 2020-03-31 2020-03-31 Memory recovery method and system

Publications (1)

Publication Number Publication Date
CN111459711A true CN111459711A (en) 2020-07-28

Family

ID=71680978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247449.3A Pending CN111459711A (en) 2020-03-31 2020-03-31 Memory recovery method and system

Country Status (1)

Country Link
CN (1) CN111459711A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636934A (en) * 2020-12-29 2021-04-09 北京东土军悦科技有限公司 Switch resetting method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770106A (en) * 2004-11-04 2006-05-10 华为技术有限公司 Reset information saving method for communication equipment
CN101369238A (en) * 2008-09-02 2009-02-18 苏州大学 Exception monitoring and reset processing method for USB equipment
CN103207799A (en) * 2013-04-23 2013-07-17 中国科学院微电子研究所 Method, device and system for closing down and starting up computer system
CN103914325A (en) * 2014-04-02 2014-07-09 中国科学院微电子研究所 Shutdown method, booting method, shutdown system and booting system for Linux system on basis of hybrid memories
CN107315598A (en) * 2016-04-26 2017-11-03 中国科学院微电子研究所 A kind of system recovery method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770106A (en) * 2004-11-04 2006-05-10 华为技术有限公司 Reset information saving method for communication equipment
CN101369238A (en) * 2008-09-02 2009-02-18 苏州大学 Exception monitoring and reset processing method for USB equipment
CN103207799A (en) * 2013-04-23 2013-07-17 中国科学院微电子研究所 Method, device and system for closing down and starting up computer system
CN103914325A (en) * 2014-04-02 2014-07-09 中国科学院微电子研究所 Shutdown method, booting method, shutdown system and booting system for Linux system on basis of hybrid memories
CN107315598A (en) * 2016-04-26 2017-11-03 中国科学院微电子研究所 A kind of system recovery method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电工天下: ""冷复位与热复位的区别详解"", 《HTTPS://WWW.DGJS123.COM/PLC_JICHU/5866.HTM》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636934A (en) * 2020-12-29 2021-04-09 北京东土军悦科技有限公司 Switch resetting method and device, computer equipment and storage medium
CN112636934B (en) * 2020-12-29 2022-06-24 北京东土军悦科技有限公司 Switch resetting method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109408262B (en) Service data processing method and related equipment
CN103677870A (en) System upgrading method and system upgraded by means of method
CN112579356B (en) Fault processing method and server
CN112328343A (en) Vehicle Android system exception handling method and system and storage medium
CN112306368B (en) Method and device for expanding user data partition by EMMC (enhanced multi-media card)
CN111459711A (en) Memory recovery method and system
CN111191161B (en) Page display method, storage medium, electronic device and system
CN113760611B (en) System site switching method and device, electronic equipment and storage medium
CN116991622A (en) Recovery method and system for starting failure of trusted DCS controller system
CN111522598A (en) Method and device for recording restart information of embedded equipment
CN108881367B (en) Service request processing method, device and equipment
CN114546537B (en) Starting sequence deployment method and related device for multiple operating systems
CN110941516A (en) Operating system restoration method, device, equipment and storage medium
CN106201612B (en) A kind of information processing method and electronic equipment
CN106293620B (en) The method of parameter in intel detection of platform Flash Rom
CN111158783B (en) Environment variable modification method, device and equipment and readable storage medium
CN110610060A (en) Product modeling method of open expandable information, computer device and computer readable storage medium
CN111221547A (en) Client updating progress monitoring method, storage medium, electronic device and system
CN111221542B (en) Method, device, system, equipment and medium for generating and installing system mirror image
CN113741928B (en) Firmware upgrading method and system of logic device based on I2C
CN106919472B (en) Method and device for snapshot backup of data
CN109213474B (en) Flash-based universal shell setting method, storage medium, electronic equipment and system
CN114968297A (en) OTA (over the air) upgrading method, electronic equipment and chip system
CN111414162B (en) Data processing method, device and equipment thereof
CN116319276A (en) Management method and device of server

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200728