CN1253893C - Method of guiding ROM to realize write protection - Google Patents

Method of guiding ROM to realize write protection Download PDF

Info

Publication number
CN1253893C
CN1253893C CN 02140483 CN02140483A CN1253893C CN 1253893 C CN1253893 C CN 1253893C CN 02140483 CN02140483 CN 02140483 CN 02140483 A CN02140483 A CN 02140483A CN 1253893 C CN1253893 C CN 1253893C
Authority
CN
China
Prior art keywords
write
protect
state
read
memory
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.)
Expired - Fee Related
Application number
CN 02140483
Other languages
Chinese (zh)
Other versions
CN1469382A (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.)
Shenzhen Huawei Agisson Electric Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 02140483 priority Critical patent/CN1253893C/en
Publication of CN1469382A publication Critical patent/CN1469382A/en
Application granted granted Critical
Publication of CN1253893C publication Critical patent/CN1253893C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The present invention relates to a method for realizing writing-protection logic of a read only memory for guiding, which belongs to the technical field of the application of semiconductor memory chips. In the method, a writing-protection data register and a writing-protection state register are firstly arranged, when restoration is carried out, initial values are respectively set for the writing-protection data register and the writing-protection state register; when the writing-protection state register is under the state of 'writing-protection enabling', data is continuously written to the data register; when the writing-protection state register is under the state of 'writing-protection prohibiting', signals of chip selection of the read only memory for guiding are decoded in order to make the signals of chip selection of the read only memory for guiding effective; at the moment, writing operation is carried out to the read only memory for guiding; after the writing operation is ended, data is written towards the writing-protection data register to make the writing-protection state register under the state of 'writing-protection enabling' again. By changing logic, the method of the present invention can realize the writing-protection function of the read only memory for guiding and reduce the probability of the read only memory for guiding being erased or rewritten.

Description

A kind of write-protect implementation method that guides with ROM (read-only memory)
Technical field
The present invention relates to a kind of write-protect logic realization method that guides with ROM (read-only memory), belong to the applied technical field of semiconductor memory chips.
Background technology
In some electronic equipments, the board pilot ROM (read-only memory) of guiding function has been installed all usually on the veneer.Owing to have inconsiderate total factor unavoidably in the single-board bootstrap program design, and has new demand at any time, therefore board pilot is all supported online upgrade function generally speaking with ROM (read-only memory), and this moment, guiding must allow to be written into new boot with ROM (read-only memory) in the specific time.But in the veneer operational process, the situation of program fleet may appear.If program fleet is to the corresponding guiding erasable function of ROM (read-only memory), perhaps the write operation behind program fleet has just in time met the write operation sequential of guiding with ROM (read-only memory), then guiding will be wiped free of or rewrite with ROM (read-only memory), thereby the damage single-board bootstrap program causes veneer normally not start therefrom.The basic skills that the solution guiding is rewritten with ROM (read-only memory) is carried out write-protect to guiding with ROM chip exactly, when needs carry out write operation to guiding with ROM (read-only memory), forbids defencive function, restarts the write-protect function after write operation is finished.
Existing guiding is carried out in the write-protected method with ROM (read-only memory), mostly adopted hardware to realize.Different guiding ROM chip realizes that the method for data protection is also different.The guiding that has has program voltage pin VPP with ROM chip itself, and this class device requires to provide specific program voltage at the VPP pin when programming, and this voltage is different from the normal working voltage of chip.Guiding generally is to be provided by programmable device when loading with the program voltage of ROM (read-only memory), and this program voltage is not provided on veneer, so just when normal working of single board, just can guarantee that on hardware guiding can not be written into ROM device.The VPP of the chip that has end, when input voltage during greater than a certain threshold value, then device allows to be written into, if be lower than a certain threshold value, then device will be forbidden writing.Utilize this characteristic, can on veneer the VPP signal be implemented independent control, only it is set to be higher than voltage threshold again when guiding is programmed with ROM chip, and voltage threshold can generally provide in the device handbook.
In addition, also can realize data protection by the part control line of device.The write-protect that realizes by the control pin prevents that in fact just software from writing the accident of guiding with ROM chip.Guiding with ROM chip with write relevant control pin WP# (write-protect) and WE# (writing permission) arranged; some device also provides RP# (resetting or power down) pin; the control pin that different chips may provide is incomplete same; for example the SST39VF040 chip capacity is less; generally be used for the board pilot ROM (read-only memory), chip only provides WE# and does not have WP# and RP# pin.If device has the RP# pin, need to confirm before cpu reset finishes, will guide RP# pin to be changed to high level by low level with ROM chip.If guiding is carried out data protection with the ROM chip support by RP#, but advise that then WP# is set to guiding with the ROM (read-only memory) write state, realizes the data protection of guiding with ROM (read-only memory) and pass through control RP#; If only there is the WP# control line in guiding with ROM (read-only memory), then can controls WP# and realize data protection; There is not the control line of similar RP# in the if there is no control line of similar WP# yet, can also realize data protection by control WE# signal wire.Generally same chip is realized that the kinds of protect mode there is no need.If realize data protection by control WE# signal wire, generally be that WE# is drawn the dead high level that is in design, just can not support online upgrade function but guide in this case with ROM (read-only memory).The flash memory of other larger capacity (Flash) possesses the sector defencive function, and this also is a kind of protected mode of software.
Above-mentioned guiding mainly is pins such as the VPP, the WP# that have adopted chip itself, RP# with the Write-protection method of ROM (read-only memory).Utilize these pins to realize that write-protected precondition must be that chip itself provides these pins.But guiding commonly used now not necessarily provides these pins with ROM chip.If in addition WE# is drawn to fixing high level, then guides with ROM (read-only memory) and can not support online upgrade function again.
Be not fixing high level if WE# draws, utilize WE# to realize that to the write-protect of guiding with ROM (read-only memory), then guiding must be drawn with the WE# pin of ROM chip from logic, but the WE# signal be not the pin that must draw from logic.Comparatively speaking, guiding is come by decoding by logic with the chip selection signal CE# of ROM chip.Especially some veneer is not considered at the beginning of design and is supported the write-protect function, but their CE# but draws by logical device.
Summary of the invention
It is limited with the Write-protection method defencive function of ROM (read-only memory) to the present invention is directed to existing guiding; and use the shortcoming of underaction; a kind of write-protect logic realization method that guides with ROM (read-only memory) has been proposed; to strengthen the write-protect function of guiding, reduce the probability that it is wiped free of or is rewritten with ROM (read-only memory).
The guiding that the present invention the proposes write-protect logic realization method of ROM (read-only memory) may further comprise the steps:
(1) write-protect data register and write-protect status register are set, and are respectively above-mentioned two its registers addresses;
Described write-protect status register comprises " write-protect enables " state and " write-protect is forbidden " state;
(2) respectively put an initial value for above-mentioned two registers, guide with ROM (read-only memory) and be set to " write-protect enables " state;
(3) write data to the write-protect data register continuously, whenever write data, the value of write-protect status register changes once, is a particular value up to this value, and guide with ROM (read-only memory) and be set to " write-protect is forbidden " state this moment;
(4) guiding is deciphered with the chip selection signal of ROM (read-only memory), made guiding effective with the chip selection signal of ROM (read-only memory), carry out write operation to guiding with ROM (read-only memory) this moment;
(5) after write operation finishes, write data, make guiding be in " write-protect enables " state again with ROM (read-only memory) to the write-protect data register.
In above-mentioned (4) step, what be used for guiding is deciphered with the chip selection signal of ROM (read-only memory) is most significant digit and other control signal of chip of write-protect status register.
Write-protect status register in the said method also comprises " intermediate state " state, and in wherein said (3) step, its process is as follows:
When (1) initial, the write-protect status register is in " write-protect enables " state;
(2) at " write-protect enables " state, write first setting data, make the write-protect status register enter " intermediate state " state, if other operation then turns back to " write-protect enables " state to the write-protect data register;
(3) in " intermediate state "; if write first setting data to the write-protect data register; then the write-protect status register is kept current state; if write second setting data to the write-protect data register; make the write-protect status register enter " write-protect is forbidden " state; if other operation then turns back to " write-protect enables " state.
The guiding that the present invention the proposes write-protect logic realization method of ROM (read-only memory); for the veneer of not realizing in design initial guiding with ROM (read-only memory) write-protect function; can consider whether this chip provides the hardware pin relevant with write-protect; as long as guiding is obtained by logic decoding with the CE# signal of ROM chip; just can realize the write-protect function of guiding by the change logic with ROM (read-only memory).If this Write-protection method and other Write-protection method use simultaneously, then can greatly strengthen guiding write-protect function with ROM (read-only memory), reduce the probability that guiding is wiped free of or is rewritten with ROM (read-only memory).Method of the present invention can be applied to and comprise guiding with all flash chips (Flash) of ROM (read-only memory), and wherein guiding is realized the write-protect function with ROM chip.
Description of drawings
Fig. 1 is the process flow diagram that the present invention realizes an embodiment of write-protect logic.
Embodiment
Below in conjunction with accompanying drawing, the guiding that the present invention is proposed describes in detail with the write-protect logic realization method of ROM (read-only memory).
(1) register is set
One 8 write-protect data register and one 3 write-protect status register are set in logic.Be two its registers addresses separately.Had after the address, write process, promptly can implement the register pair read or write by in logic, setting up.
Above-mentioned write-protect status register is used to represent guide the write-protect state with ROM (read-only memory), and it one has three kinds of states: " write-protect enables ", " intermediate state ", " write-protect is forbidden "." intermediate state " wherein be the write-protect logic from " write-protect enables " state variation to " write-protect is forbidden " state must process intermediateness, when this state, still can not write data in ROM (read-only memory) to guiding.
The write-protect data register is used for to wherein writing data, and when writing certain data in the write-protect data register, corresponding variation will take place the state of write-protect status register
The figure place of above-mentioned write-protect status register can become, and can be designed to 2 or other as required.The data number that writes continuously in the write-protect data register can flexible design, if increase the data number, intermediate state is also done corresponding increase, to strengthen the write-protect function.The value that writes continuously in the write-protect data register also can flexible design.
(2) be that two registers are provided with initial value
When Board Power up or when resetting, the write-protect logic enters " write-protect enables " state, and be changed to entirely " 1 " with the write-protect data register this moment, and the write-protect status register also is changed to " 1 " entirely;
(3) write-protect is forbidden
If implement must at first make then that to the write operation of guiding the write-protect logic is in " forbidding write-protect " state with ROM (read-only memory).At this moment, write-protect logic needs through " write-protect enables ", " intermediate state ", " write-protect is forbidden " three kinds of states.
One embodiment of the present of invention are example with two " intermediate states ", and as shown in Figure 1, at this moment, the write-protect logic needs through " write-protect enables ", " the 1st intermediate state ", " the 2nd intermediate state ", " write-protect is forbidden " four kinds of states.If realize forbidding the write-protect function, then write 3 data: 0xAA, 0x99,0x66 (3 write operations must be continuous) to data register continuously.Whenever write data, the value of write-protect status register just takes place once to change, and is " 011 " up to its value, when the value of write-protect status register be " 011 ", guides this moment to be in " write-protect is forbidden " state with ROM (read-only memory).
As shown in Figure 1, the transformational relation between four of the write-protect status register kinds of states is as follows:
When Board Power up or when resetting, the write-protect status register is in " write-protect enables " state;
At " write-protect enables " state, if write first setting data (for example 0xAA) to the write-protect data register, then the write-protect status register enters " the 1st intermediate state " state, if other operation then will be kept current state;
At " the 1st intermediate state " state, if write first setting data (for example 0xAA) to the write-protect data register, then the write-protect status register is kept current state, if write second setting data (for example 0x99) to the write-protect data register, then the write-protect status register enters " the 2nd intermediate state " state, if other operation then turns back to " write-protect enables " state;
At " the 2nd intermediate state " state, if write the 3rd setting data (for example 0x66) to the write-protect data register, then the write-protect status register enters " write-protect is forbidden " state, if other operation then turns back to " write-protect enables ";
At " write-protect is forbidden " state; if write the 4th setting data (for example 0x55) to the write-protect data register; then the write-protect status register turns back to " write-protect enables " state; if other operation then can be carried out write operation and other any operation of guiding with ROM (read-only memory).
At " write-protect is forbidden " state; can carry out write operation and other any operation of guiding with ROM (read-only memory); if write the 4th setting data (0x55) to the write-protect data register, then the write-protect status register turns back to " write-protect enables " state.
The corresponding relation of the four kinds of states of write-protect status register and the register value of write-protect status register is as follows:
The value of " write-protect enables " state--write-protect status register is " 111 ";
The value of " the 1st intermediate state " state--write-protect status register is " 110 ";
The value of " the 2nd intermediate state " state--write-protect status register is " 101 ";
The value of " write-protect is forbidden " state--write-protect status register is " 011 ".
(4) implement the write operation of guiding with ROM (read-only memory)
When the write-protect status register is in " write-protect is forbidden " state, can carry out write operations such as online upgrading with ROM (read-only memory) to guiding.When enforcement was used the write operation of ROM (read-only memory) to guiding, guiding should be deciphered with other control signal by the 2nd bit data of write-protect status register with the chip selection signal of ROM (read-only memory) and obtain.The state of CE# signal is except by in the general control signal, beyond (comprising the read signal, write signal, high-order address signal, chip selection signal of CPU etc.) decoding obtains, also is subjected to the 2nd control of write-protect status register.In addition, when carrying out read operation, the CE# signal should not be subjected to the 2nd control of write-protect status register.
(5) after write operation finishes, the write-protect status register is changed to the write-protect state again.Write the 4th data 0x55 to the write-protect data register, then guide with ROM (read-only memory) to be in the write-protect state again.

Claims (3)

1, a kind of write-protect logic realization method that guides with ROM (read-only memory) is characterized in that this method may further comprise the steps:
(1) write-protect data register and write-protect status register are set, and are respectively two its registers addresses;
Described write-protect status register comprises " write-protect enables " state and " write-protect is forbidden " state;
(2) respectively put an initial value for above-mentioned two registers, guide with ROM (read-only memory) and be set to " write-protect enables " state;
(3) write data to the write-protect data register continuously, whenever write data, the value of write-protect status register takes place once to change, and is a setting value up to this value, and guide with ROM (read-only memory) and be set to " write-protect is forbidden " state this moment;
(4) guiding is deciphered with the chip selection signal of ROM (read-only memory), made guiding effective with the chip selection signal of ROM (read-only memory), carry out write operation to guiding with ROM (read-only memory) this moment;
(5) after write operation finishes, write data, make guiding be in " write-protect enables " state again with ROM (read-only memory) to the write-protect data register.
2, the method for claim 1, what it is characterized in that wherein (4) step is used for guiding is deciphered with the chip selection signal of ROM (read-only memory) is most significant digit and other control signal of chip of write-protect status register.
3, the method for claim 1 is characterized in that the write-protect status register also comprises " intermediate state " state, and in wherein said (3) step, its process is as follows:
When (1) initial, the write-protect status register is in " write-protect enables " state;
(2) at " write-protect enables " state, write first setting data, make the write-protect status register enter " intermediate state " state, if other operation then turns back to " write-protect enables " state to the write-protect data register;
(3) in " intermediate state "; if write first setting data to the write-protect data register; then the write-protect status register is kept current state; if write second setting data to the write-protect data register; then the write-protect status register enters " write-protect is forbidden " state; if other operation then turns back to " write-protect enables " state.
CN 02140483 2002-07-15 2002-07-15 Method of guiding ROM to realize write protection Expired - Fee Related CN1253893C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02140483 CN1253893C (en) 2002-07-15 2002-07-15 Method of guiding ROM to realize write protection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02140483 CN1253893C (en) 2002-07-15 2002-07-15 Method of guiding ROM to realize write protection

Publications (2)

Publication Number Publication Date
CN1469382A CN1469382A (en) 2004-01-21
CN1253893C true CN1253893C (en) 2006-04-26

Family

ID=34147591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02140483 Expired - Fee Related CN1253893C (en) 2002-07-15 2002-07-15 Method of guiding ROM to realize write protection

Country Status (1)

Country Link
CN (1) CN1253893C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515258B (en) * 2008-02-19 2012-06-20 索尼株式会社 Recording control apparatus, one-time recording medium, recording system, and control method
CN106971108A (en) * 2017-03-20 2017-07-21 郑州云海信息技术有限公司 A kind of system and method for online updating BIOS ROM write-protects

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102196971B1 (en) 2014-03-28 2020-12-31 삼성전자주식회사 Storage system, and method for performing and authenticating write-protection thereof
CN110457236B (en) * 2014-03-28 2020-06-30 三星电子株式会社 Storage system and method for executing and verifying write protection of storage system
CN105138929B (en) * 2015-10-09 2019-05-07 天津国芯科技有限公司 A kind of register guard method and device with anti-error write operation
CN106909341A (en) * 2015-12-23 2017-06-30 展讯通信(上海)有限公司 The enabled method of the functional module based on register, device and mobile terminal
CN106502585A (en) * 2016-10-13 2017-03-15 深圳Tcl数字技术有限公司 Nor flash storage storage content guard methods and device
CN109739673B (en) * 2018-12-05 2023-05-09 新华三技术有限公司合肥分公司 Register write-in protection method, logic device and communication equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515258B (en) * 2008-02-19 2012-06-20 索尼株式会社 Recording control apparatus, one-time recording medium, recording system, and control method
CN106971108A (en) * 2017-03-20 2017-07-21 郑州云海信息技术有限公司 A kind of system and method for online updating BIOS ROM write-protects

Also Published As

Publication number Publication date
CN1469382A (en) 2004-01-21

Similar Documents

Publication Publication Date Title
CA2675565C (en) Non-volatile memory with dynamic multi-mode operation
US7783851B2 (en) Methods of reusing log blocks in non-volatile memories and related non-volatile memory devices
CN1129916C (en) Programmable access protection in a flash memory device
US7325114B2 (en) Selectable block protection for non-volatile memory
US8024509B2 (en) Method of managing a multi-bit-cell flash memory
US8009503B2 (en) Card controller controlling semiconductor memory including memory cell having charge accumulation layer and control gate
US7210012B2 (en) Write-protection blocks for non-volatile semiconductor memory device
US7155589B2 (en) Permanent memory block protection in a flash memory device
US20060129750A1 (en) Method and apparatus for storing multimedia data in nonvolatile storage device in units of blocks
US20170039141A1 (en) Mapping table updating method, memory storage device and memory control circuit unit
CN101996680B (en) Nonvolatile memory device, method of programming the same and memory system including the same
US8397018B2 (en) Systems and methods for implementing a programming sequence to enhance die interleave
WO2000060605A1 (en) Space management for managing high capacity nonvolatile memory
US20090106481A1 (en) Hybrid flash memory device
CN1253893C (en) Method of guiding ROM to realize write protection
US20040205314A1 (en) Semiconductor memory with access protection scheme
CN1770327A (en) Semiconductor integrated circuit with flash interface
US6944093B2 (en) Semiconductor memory device
US8081517B2 (en) Solid state storage system for uniformly using memory area and method controlling the same
CN114416147B (en) Firmware loading method, memory and computer readable storage medium
US6922362B2 (en) Structure for updating a block of memory cells in a flash memory device with erase and program operation reduction
CN1115630C (en) Micro computer
US20080059690A1 (en) Self-updating memory controller
CN1222885C (en) FLASH data protecting method and its FLASH curcuit
CN111159071B (en) Device and method for realizing OTP (one time programmable) by eFlash memory and OTP memory

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
ASS Succession or assignment of patent right

Owner name: HUAWEI ANSETT ELECTRONICS CO., LTD., SHENZHEN CIT

Free format text: FORMER OWNER: HUAWEI TECHNOLOGY CO., LTD.

Effective date: 20081010

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20081010

Address after: Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong

Patentee after: Shenzhen Huawei Anjiexin Electrical Co., Ltd.

Address before: Guangdong Shenzhen science and Technology Park HUAWEI road user service center building intellectual property department

Patentee before: Huawei Technologies Co., Ltd.

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060426

Termination date: 20110715