CN102270160A - Data writing-in method and computer system - Google Patents

Data writing-in method and computer system Download PDF

Info

Publication number
CN102270160A
CN102270160A CN2010101905008A CN201010190500A CN102270160A CN 102270160 A CN102270160 A CN 102270160A CN 2010101905008 A CN2010101905008 A CN 2010101905008A CN 201010190500 A CN201010190500 A CN 201010190500A CN 102270160 A CN102270160 A CN 102270160A
Authority
CN
China
Prior art keywords
data
storage device
confirmation
write
processing unit
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
Application number
CN2010101905008A
Other languages
Chinese (zh)
Other versions
CN102270160B (en
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.)
Wistron Corp
Original Assignee
Wistron Corp
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 Wistron Corp filed Critical Wistron Corp
Priority to CN201010190500.8A priority Critical patent/CN102270160B/en
Publication of CN102270160A publication Critical patent/CN102270160A/en
Application granted granted Critical
Publication of CN102270160B publication Critical patent/CN102270160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a data writing-in method which is used for a memory device. The method comprises the following steps of: sending out confirmation information by utilizing the memory device according to a data writing-in request from a processing unit; sending out data writing-in information related to the confirmation information by utilizing the processing unit according to the confirmation information; and executing a data writing-in program by utilizing the memory device according to the data writing-in information.

Description

Method for writing data and computer system
Technical field
The present invention is meant a kind of method for writing data and computer system, refers to a kind of method for writing data and computer system of avoiding unexpected mistake writing events especially.
Background technology
Storage arrangement is an ingredient indispensable in the electronic product, is mainly used to provide store digital data and program, carries out so that processor access to be provided.When moving towards informationization, multimedization, networking and mobile gradually, also produced great variation for the demand of storage arrangement along with electronic product now.In general, storage arrangement can be divided into write-once type and rewritable type storer.The storer of write-once type, for example (Read Only Memory ROM), promptly can't change after being written into data ROM (read-only memory), only allows to read and can't write other data again.The storer of tool repetitive read-write characteristic, flash memory (Flash Memory) for example, the original data that store of can erasing write new data again, upgrade storage data so repeatedly.
Yet; though the storer of rewritable can provide excellent ease of use; relatively; also thus increased many may risks of error occurring; therefore; in order to prevent that data stored in the storage arrangement from being deleted or writing with having no way of unexpected data arbitrarily, known technology can use software or hardware design that the measure of storage arrangement one write protection (write protection) is provided usually, to reduce the chance that data are destroyed.For instance; during a write protection; setting by software also utilizes instruction manipulation to come the control store apparatus to suspend to carry out any data and writes or the erase operation for use of block; to prevent that mistake from writing or the generation of the incident of erasing by mistake; in other words; when storage arrangement need not carry out the related data write-in program, guarantee that by the setting of software the stored data of storage arrangement the risk that any mistake is write can not take place.In addition; known technology also provides storage arrangement to carry out relevant write protection mechanism by the mode of other hardware design; for example utilize embedded controller via control general input and output (GPIO) pin; directly storage arrangement is carried out the restriction of write-in program, make storage arrangement during write protection, can avoid being write by mistake or erasing data.
Yet; known to software or the designed write protection mechanism of hardware; only Xiao Ji prevention memory device places the opportunity that need not carry out data write operation (be write protection during) unlikely generation mistake to write; but but can't take precautions against when allowing data to write; the influence that storage arrangement is caused by external factor may, and make stored data produce unexpected change.For instance, when power supply unlatching or turn-off transient, when power supply is unstable or control signal when unstable, all might cause data stored in the storer to be destroyed, that is to say, during data write, because aforesaid external factor has caused mistake to write or the mistake situation of part in the storage arrangement or total data of erasing, and then makes the stored data become incorrect or imperfect, generation can't expected result.Even, if stored data are system datas relevant with computer system operation in the storer, for example, an one Basic Input or Output System (BIOS) sign indicating number (BIOS code) or an embedded controller sign indicating number (EC code), to be nonvolatil infringement then because of the miss data of writing or losing, and also can't utilize again the mode of start to be saved, finally cause the whole computer system can't normal operation.
Please refer to Fig. 1, Fig. 1 is the synoptic diagram of a known data write protection and data write operation.(time point C is to time point D) is respectively during the write protection during supposing during the X (time point A is to time point B) and Z; and (time point B is to time point C) is during data write during the Y; that is to say; memory device places during the X with during the Z and is set to write protect state, and can carry out any data program that writes or erase during Y.If in during Y, after power supply is pulled out, because capacity effect is facilitated the phenomenon of electric source disturbance, and in producing a false signal S to storage arrangement (for example in time point C '), make storage arrangement take for a data write signal, and write this data in unexpected, thus, the situation that storage arrangement will be write because of aforementioned mistake, and influenced the Integrity And Reliability of stored data.Therefore, how allowing the storage arrangement can be when carrying out the relative program that data write, not disturbed by external force and realize safety and correct data write-in program, and guarantee stored safety of data, be one of problem of needing badly solution.
Summary of the invention
Therefore, the present invention mainly is to provide a kind of method for writing data and computer system, in order to guarantee stored safety of data.
The present invention discloses a kind of method for writing data, is used for a storage device, includes: utilize this storage device, write request according to data that come from a processing unit, send out a confirmation; Utilize this processing unit,, send out a data writing information that is relevant to this confirmation according to this confirmation; And utilize this storage device, according to the data writing information, carry out a data write-in program.
The present invention also discloses a kind of computer system, includes: a processing unit; And a storage device, be coupled to this processing unit; Wherein receive data that come from this processing unit and write request in this storage device, and after sending out a confirmation according to this, this processing unit is sent out a data writing information according to this confirmation, this storage device is carried out a data write-in program again according to this data writing information.
Description of drawings
Fig. 1 is the synoptic diagram of given data write protection and data write operation.
Fig. 2 is the synoptic diagram of the embodiment of the invention one computer system.
Fig. 3 is the synoptic diagram of a flow process of the embodiment of the invention.
[main element label declaration]
20 computer systems, 202 processing units
204 storage elements, 30 flow processs
302,304,306,308 steps
Embodiment
The not influence of the unexpected external force factor of reason of storage device in order to ensure computer system, and the situation that generation data mistake is write, the present invention utilize storage device carry out that data write or the program of the data movement that concerns such as erase before, necessary elder generation mechanism through safety certification, in order to do carrying out corresponding data movement program, effectively avoiding the generation write of mistake, and then promote the Integrity And Reliability of stored data.
Please refer to Fig. 2, Fig. 2 is the synoptic diagram of the embodiment of the invention one computer system 20.Computer system 20 includes a processing unit 202 and a storage element 204.Storage element 204 is used for storage data, but processing unit 202 data in the access storage element 204 then.In the present embodiment, storage element 204 can be a flash memory device, yet this only is the usefulness as the example explanation, is not restriction of the present invention.In computer system 20, when data must be stored to storage element 204, processing unit 202 can be during data write, control storage element 204 by dependent instruction and carry out the data write-in programs, with data storing to storage element 204.Be noted that, in the present embodiment, storage element 204 is except carrying out data write-in program or other the relevant data movement program according to dependent instruction, storage element 204 further can be before carrying out the data write-in program, send out relevant confirmation to corresponding treating apparatus, be used as the basis of characterization of safety certification, and can compare in the information that corresponding treating apparatus responds whether have the affirmation information that has transmitted, write the validity of request with verification msg.
About how in computer system 20, data being write to the function mode of storage element 204, can reduce data and write flow process 30, as shown in Figure 3, data write flow process 30 and comprise following steps:
Step 300: beginning.
Step 302: storage device 204 writes request Req_W according to the data that come from processing unit 202, sends out confirmation ID.
Step 304: processing unit 202 is sent out the data writing information ID_R that is relevant to confirmation ID according to confirmation ID.
Step 306: storage device 204 is carried out the data write-in program according to data writing information ID_R.
Step 308: finish.
Below further above-mentioned steps being done one describes in detail, at first, in step 302, when desire with data storing during to storage device 204, processing unit 202 can send data earlier and write request Req_W to storage device 204, wherein, data write request Req_W and can include and carry out instruction that data write and/or the data of desiring to write, but not as limit.Storage device 204 in receive data write the request Req_W after, just can write request Req_W according to data, send out corresponding confirmation ID to processing unit 202, it has received the request that data write to inform processing unit 202 by confirmation ID.Therefore, confirmation ID will can be used as the basis of characterization that storage device 204 is carried out the preceding safety certification of data write-in program.That is to say, confirmation ID is added in the information of response by processing unit 202, when storage device 204 in the response information in compare out have confirmation ID really after, the expression data write request Req_W and really desire the request instruction that carries out for processing unit 202, and storage device 204 can carry out corresponding operation according to this.
In step 304, after receiving the affirmation Information ID that comes from storage device 204 in processing unit 202, processing unit 202 can return data writing information ID_R according to this to storage device 204, and wherein, data writing information ID_R includes data at least and writes request Req_W and confirmation ID.In other words, processing unit 202 by data writing information ID_R make storage device 204 reaffirm data received in step 302 write request Req_W really processing unit 202 transmitted.
Then, in step 306, whether the information that storage device 204 is comprised in can judgment data writing information ID_R comprises the data that original processing unit 202 sent out writes the affirmation Information ID that storage device 204 is sent out in request Req_W and the previous step.When storage device 204 is judged data writing information ID_R and is included data really and write request Req_W and confirmation ID, just can begin to carry out the data write-in program, data are write to the purpose of storage device 204 with realization processing unit 202 desires.Similarly, judge data writing information ID_R when storage device 204 and there is no when including data and writing request Req_W and confirmation ID, storage device 204 is just ended the operation of being correlated with, and does not carry out the data write-in program.Specifically, if storage device 204 is inspected the content among the data writing information ID_R, and when judging data writing information ID_R and only including confirmation ID, represent that it may be that unexpected incident takes place computer system 20 that original received data write request Req_W, cause storage device 204 to receive wrong input request signal (for example the power supply instability causes the variation of signal, makes storage arrangement think a normal data request signal by mistake).In other words, must wait until when storage device 204 is judged data writing information ID_R and included data really and write request Req_W and confirmation ID, just can write and ask Req_W to carry out corresponding data write-in program according to data.Therefore; in the time of during storage device 204 is in data and writes (when not being subjected to the restriction of write operation of write protection mechanism); in case storage device 204 receives data and writes request Req_W; just can guarantee that data write the request that writes that request Req_W is really sent for processing unit 202 by each step that data write flow process 30; but not the mistake that other external factor caused indication; thus, can effectively prevent because of artificial or the mistake writing events that unexpected factor caused.
Therefore, compared to known technology may be during the data that allow write operation write (data for example shown in Figure 1 write during Y), be subjected to the mistake that artificial careless mistake or unexpected factor cause and write incident, after the present invention writes the correctness of request in checking, beginning is carried out corresponding write-in program, can guarantee the operation that the unlikely generation mistake of data writes.In other words, the present invention is outside data write protection mechanism, and the mistake that provides the second pipe protection mechanism to avoid unexpected factor to cause during data write is write incident and taken place.
Be noted that computer system shown in Figure 2 20 is one embodiment of the invention, those skilled in the art work as can do different variations or modification according to this, and is not limited thereto.In the present embodiment, computer system 20 can be notebook computer, personal computer, embedded system etc., but not as limit.Processing unit 202 can be anyly to need access to be stored in the data in the storage element 204 and produce and write instruction and give the device of storage element 204, for example central processing unit, embedded controller, microprocessor etc.Storage element 204 can be the memory storage of any rewritable, for example a flash memory.In addition, the mentioned data write-in program of the present invention is not only to terminate in the data write-in program that is carried out in the storage arrangement 202, and the mentioned data write-in program of the present invention comprises the running program of data movement in all storage devices 204 that concern, for instance, data write-in program or the data program of erasing.
In sum; the present invention is carrying out data write-in program or data when erasing program; must be after checking writes the correctness of request; beginning is carried out corresponding write-in program; thus; can guarantee the operation that the unlikely generation mistake of data writes, and can effectively reduce the incident that extra mistake is write or mistake is erased, and then significantly promote the effect of write protection.
The above only is preferred embodiment of the present invention, and all equalizations of being done according to claim scope of the present invention change and modify, and all should belong to covering scope of the present invention.

Claims (10)

1. a method for writing data is used for a storage device, includes:
Utilize this storage device, write request, send out a confirmation according to data that come from a processing unit;
Utilize this processing unit,, send out a data writing information that is relevant to this confirmation according to this confirmation; And
Utilize this storage device,, carry out a data write-in program according to the data writing information.
2. method for writing data according to claim 1 wherein utilizes this storage device, writes request according to these data that come from this processing unit, and the step of sending out this confirmation includes:
Utilize this storage device, receive these data that come from this processing unit and write request; And
Utilize this storage device, write request, send out this confirmation according to these data.
3. method for writing data according to claim 1, wherein this data writing information includes these data that this confirmation that this storage device transmits and this processing unit transmit and writes request.
4. method for writing data according to claim 3 wherein utilizes this storage device, and according to this data writing information that is relevant to this confirmation, the step of carrying out this data write-in program includes:
Utilize this storage device, confirm whether this confirmation that this data writing information is comprised meets this confirmation of originally being sent out;
In confirming that the result when meeting, according to this data writing information, carries out this data write-in program; And
In confirming that the result when not meeting, stops executable operations.
5. method for writing data according to claim 1, wherein this storage device is in order to store a Basic Input or Output System (BIOS) sign indicating number or an embedded Control sign indicating number.
6. computer system includes:
One processing unit; And
One storage device is coupled to this processing unit;
Wherein receive data that come from this processing unit and write request in this storage device, and after sending out a confirmation according to this, this processing unit is sent out a data writing information according to this confirmation, this storage device is carried out a data write-in program again according to this data writing information.
7. computer system according to claim 6, wherein this data writing information includes these data that this confirmation that this storage device transmits and this processing unit transmit and writes request.
8. computer system according to claim 7, when wherein this confirmation that is comprised in this data writing information of affirmation met this confirmation of originally being sent out, this storage device was carried out this data write-in program according to this data writing information.
9. computer system according to claim 7, when wherein this confirmation that is comprised in this data writing information of affirmation did not meet this confirmation of originally being sent out, this storage device stopped executable operations.
10. computer system according to claim 6, wherein this storage device is in order to store a Basic Input or Output System (BIOS) sign indicating number or an embedded Control sign indicating number.
CN201010190500.8A 2010-06-03 2010-06-03 Method for writing data and computer system Active CN102270160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010190500.8A CN102270160B (en) 2010-06-03 2010-06-03 Method for writing data and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010190500.8A CN102270160B (en) 2010-06-03 2010-06-03 Method for writing data and computer system

Publications (2)

Publication Number Publication Date
CN102270160A true CN102270160A (en) 2011-12-07
CN102270160B CN102270160B (en) 2016-09-07

Family

ID=45052471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010190500.8A Active CN102270160B (en) 2010-06-03 2010-06-03 Method for writing data and computer system

Country Status (1)

Country Link
CN (1) CN102270160B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5664141A (en) * 1994-10-31 1997-09-02 Kabushiki Kaisha Toshiba Disk drive system using received address for selecting disk processing format
US20040205388A1 (en) * 2003-03-28 2004-10-14 Takayuki Nakano Method for managing computer, apparatus for managing computer, and computer readable medium storing program for managing computer
JP4164473B2 (en) * 2004-06-11 2008-10-15 キヤノン株式会社 Functional memory access control system, functional memory device, control method therefor, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5664141A (en) * 1994-10-31 1997-09-02 Kabushiki Kaisha Toshiba Disk drive system using received address for selecting disk processing format
US20040205388A1 (en) * 2003-03-28 2004-10-14 Takayuki Nakano Method for managing computer, apparatus for managing computer, and computer readable medium storing program for managing computer
JP4164473B2 (en) * 2004-06-11 2008-10-15 キヤノン株式会社 Functional memory access control system, functional memory device, control method therefor, and program

Also Published As

Publication number Publication date
CN102270160B (en) 2016-09-07

Similar Documents

Publication Publication Date Title
WO2020062887A1 (en) Firmware upgrading method and system based on flash micro-controller, and flash micro-controller
US20060064576A1 (en) Boot systems and methods
KR100988157B1 (en) Method and apparatus for detecting memory device configuration, and computer readable medium containing instructions for performing method for detecting memory device configuration
US8897092B2 (en) Memory storage device, memory controller and controlling method
CN102270144A (en) Embedded network equipment and method for upgrading firmware by using same
US20020129195A1 (en) Microcomputer with built-in programmable nonvolatile memory
KR20140035772A (en) A embedded multimedia card(emmc), emmc system including the emmc, and a method for operating the emmc
JP2008009721A (en) Evaluation system and evaluation method thereof
US20060020764A1 (en) Information processing apparatus including non-volatile memory device, non-volatile memory device and methods thereof
TW201312573A (en) Flash memory storage device and method for determining bad storage area thereof
KR100825786B1 (en) Memory card and debugging method for the same
CN104657685A (en) Apparatus for protecting program code stored in non-volatile memory
CN111124455B (en) Battery management system upgrading method, device, server and storage medium
CN110134423B (en) Firmware updating method and device and computer readable storage medium
CN113094107B (en) Data protection method, device, equipment and computer storage medium
EP2730993B1 (en) Reset method and network device
CN102236751A (en) Computer system with safety lock and method for implementing safety lock
CN102270160A (en) Data writing-in method and computer system
CN103677875A (en) Method for starting electronic equipment, method for controlling permission and electronic equipment
CN103870209A (en) Working mode switching method, memory controller and memory storage device
TWI446351B (en) Data writing method and computer system
CN111124462B (en) Method, device, server and storage medium for updating embedded multimedia card
US9373405B2 (en) Auto resume of irregular erase stoppage of a memory sector
CN102549550B (en) Method and system for data access
CN116594804A (en) EDAC code read-write optimization method, system, device and storage medium

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