[go: up one dir, main page]

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
state
write protection
protection
register
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 invention relates to a write protection logic realization method of a read-only memory for guidance, and belongs to the application technical field of semiconductor memory chips. This method first sets the write-protection data register and the write-protection status register, each of which is set to an initial value when resetting, and the write-protection status register is in the state of "write-protection enable", continuously writes data to the data register, and the write-protection status register is In the "write protection prohibited" state, the chip select signal of the boot ROM is decoded, so that the chip select signal of the boot ROM is valid. At this time, the write operation is performed on the boot ROM. After the write operation is completed, Write a data to the write protection data register, so that the write protection status register is in the state of "write protection enable" again. The method of the present invention can realize the write protection function of the read-only memory for guidance by changing the logic, and reduce the probability of the read-only memory for guidance being erased or rewritten.

Description

一种引导用只读存储器的写保护实现方法A method for implementing write protection of a bootable read-only memory

技术领域technical field

本发明涉及一种引导用只读存储器的写保护逻辑实现方法,属于半导体存储器芯片的应用技术领域。The invention relates to a write protection logic realization method of a read-only memory for guidance, and belongs to the application technical field of semiconductor memory chips.

背景技术Background technique

在一些电子设备中,单板上通常都安装起引导作用的单板引导用只读存储器。由于单板引导程序设计中难免存在考虑不周全因素,而且随时可能有新的需求,因此单板引导用只读存储器一般情况下都支持在线升级功能,此时引导用只读存储器必须在特定的时间允许被写入新的引导程序。但是在单板运行过程中,可能出现程序跑飞的情况。如果程序跑飞到相应的引导用只读存储器擦写函数,或者当程序跑飞后的写操作正好符合了引导用只读存储器的写操作时序,则引导用只读存储器就会被擦除或改写,从而损坏单板引导程序,由此而导致单板不能正常启动。解决引导用只读存储器被改写的基本方法就是对引导用只读存储器芯片进行写保护,当需要对引导用只读存储器进行写操作时,禁止保护功能,写操作完成以后再启动写保护功能。In some electronic devices, a single-board boot read-only memory that plays a booting role is usually installed on the single board. Because there are unavoidable inconsistencies in the design of the board boot program, and there may be new requirements at any time, the boot ROM of the board generally supports the online upgrade function. At this time, the boot ROM must be in a specific Time to allow the new bootloader to be written. However, during the operation of the board, the program may run away. If the program runs away to the corresponding boot ROM erase function, or when the write operation after the program runs away coincides with the timing of the boot ROM write operation, the boot ROM will be erased or Overwrite, thereby damaging the boot program of the board, and thus causing the board to fail to start normally. The basic method to solve the rewriting of the boot ROM is to write-protect the boot ROM chip. When the boot ROM needs to be written, the protection function is disabled, and the write protection function is activated after the write operation is completed.

在现有对引导用只读存储器进行写保护的方法中,大都采用硬件来实现。不同的引导用只读存储器芯片,实现数据保护的方法也不一样。有的引导用只读存储器芯片本身带有编程电压管脚VPP,这类器件在编程时要求在VPP引脚提供特定的编程电压,该电压不同于芯片的正常工作电压。引导用只读存储器的编程电压一般是在加载时由编程器提供,而在单板上不提供这个编程电压,这样就在单板正常工作时,在硬件上就可以保证引导用只读存储器器件不会被写入。有的芯片的VPP端,当输入电压大于某一阈值时,则器件允许被写入,若低于某一阈值,则器件将禁止写入。利用这一特性,可以在单板上将VPP信号实施单独的控制,仅当对引导用只读存储器芯片进行编程时再将其设置为高于电压阈值,电压阈值可一般在器件手册中提供。In the existing methods for writing protection of the boot read-only memory, most of them are realized by hardware. Different boot read-only memory chips have different methods for implementing data protection. Some ROM chips for booting have their own programming voltage pin VPP. When programming this type of device, a specific programming voltage is required to be provided on the VPP pin, which is different from the normal working voltage of the chip. The programming voltage of the boot read-only memory is generally provided by the programmer when loading, but this programming voltage is not provided on the single board, so that when the single board is working normally, the boot read-only memory device can be guaranteed on the hardware will not be written. On the VPP side of some chips, when the input voltage is greater than a certain threshold, the device is allowed to be written, and if it is lower than a certain threshold, the device will be prohibited from being written. Using this feature, the VPP signal can be individually controlled on the board and only set above a voltage threshold when programming the boot ROM chip, which is typically provided in the device manual.

另外,通过器件的部分控制线也能够实现数据保护。通过控制引脚实现的写保护实际上也就是防止软件对引导用只读存储器芯片的意外写入。引导用只读存储器芯片与写相关的控制引脚有WP#(写保护)以及WE#(写允许),有些器件还提供RP#(复位或掉电)管脚,不同的芯片可能提供的控制引脚不完全相同,例如SST39VF040芯片容量较小,一般用于单板引导用只读存储器,芯片只提供WE#而没有WP#和RP#引脚。如果器件有RP#管脚,需要确认在CPU复位结束之前,将引导用只读存储器芯片的RP#管脚由低电平置为高电平。如果引导用只读存储器芯片支持通过RP#进行数据保护,则建议将WP#设置为引导用只读存储器可写入状态,而通过控制RP#实现引导用只读存储器的数据保护;如果引导用只读存储器只存在WP#控制线,则可以控制WP#实现数据保护;如果不存在类似WP#的控制线,也不存在类似RP#的控制线,还可以通过控制WE#信号线实现数据保护。通常情况下对同一芯片实现多种保护方式是没有必要的。如果要通过控制WE#信号线实现数据保护,在设计中一般是将WE#拉死为高电平,但是在这种情况下引导用只读存储器就不能支持在线升级功能了。另外一些较大容量的闪存(Flash)具备扇区保护功能,这也是一种软件的保护方式。In addition, data protection can also be implemented through some control lines of the device. The write protection implemented by the control pin is actually to prevent software from accidentally writing to the ROM chip for booting. The write-related control pins of the boot read-only memory chip include WP# (write protection) and WE# (write enable). Some devices also provide RP# (reset or power-down) pins. Different chips may provide control The pins are not exactly the same. For example, the SST39VF040 chip has a small capacity and is generally used as a read-only memory for single-board booting. The chip only provides WE# without WP# and RP# pins. If the device has an RP# pin, it is necessary to confirm that the RP# pin of the boot ROM chip is set from low level to high level before the CPU reset is completed. If the boot ROM chip supports data protection through RP#, it is recommended to set WP# to the writable state of the boot ROM, and realize the data protection of the boot ROM by controlling RP#; If there is only WP# control line in the read-only memory, you can control WP# to realize data protection; if there is no control line similar to WP#, and there is no control line similar to RP#, you can also realize data protection by controlling the WE# signal line . Usually it is not necessary to implement multiple protection methods for the same chip. If you want to realize data protection by controlling the WE# signal line, generally pull WE# to a high level in the design, but in this case, the boot ROM cannot support the online upgrade function. In addition, some larger-capacity flash memory (Flash) has a sector protection function, which is also a software protection method.

上述引导用只读存储器的写保护方法主要是采用了芯片本身的VPP、WP#、RP#等管脚。利用这些管脚实现写保护的前提条件必须是芯片本身提供这些管脚。但是现在常用的引导用只读存储器芯片不一定提供这些引脚。另外如果将WE#拉为固定的高电平,则引导用只读存储器又不能支持在线升级功能。The write protection method of the above-mentioned boot ROM mainly adopts pins such as VPP, WP#, and RP# of the chip itself. The prerequisite for using these pins to implement write protection must be that the chip itself provides these pins. However, the commonly used ROM chip for booting does not necessarily provide these pins. In addition, if WE# is pulled to a fixed high level, the boot ROM cannot support the online upgrade function.

如果WE#没有被拉为固定的高电平,要利用WE#实现对引导用只读存储器的写保护,则引导用只读存储器芯片的WE#管脚必须从逻辑中引出,但是WE#信号并不是必须从逻辑中引出的管脚。比较而言,引导用只读存储器芯片的片选信号CE#一般是由逻辑通过译码而来。尤其是某些单板在设计之初并没有考虑到支持写保护功能,但是它们的CE#却是通过逻辑器件引出的。If WE# is not pulled to a fixed high level, and WE# is used to realize the write protection of the boot ROM, the WE# pin of the boot ROM chip must be drawn from the logic, but the WE# signal It is not a pin that must be brought out from the logic. In comparison, the chip select signal CE# of the boot ROM chip is generally obtained through logic decoding. In particular, some single boards are not designed to support the write protection function, but their CE# is drawn out through the logic device.

发明内容Contents of the invention

本发明针对现有引导用只读存储器的写保护方法保护功能有限,且应用不够灵活的缺点,提出了一种引导用只读存储器的写保护逻辑实现方法,以加强引导用只读存储器的写保护功能,降低其被擦除或被改写的概率。The present invention aims at the shortcomings of the limited protection function and inflexible application of the existing write protection method of the read-only memory for guidance, and proposes a write protection logic implementation method for the read-only memory for guidance, so as to strengthen the write protection of the read-only memory for guidance. Protection function to reduce the probability of it being erased or rewritten.

本发明提出的引导用只读存储器的写保护逻辑实现方法,包括以下步骤:The method for implementing the write protection logic of the read-only memory for guidance provided by the present invention comprises the following steps:

(1)设置写保护数据寄存器和写保护状态寄存器,并分别为上述两个寄存器分配地址;(1) Write-protection data register and write-protection status register are set, and address is allocated for above-mentioned two registers respectively;

所述的写保护状态寄存器包括“写保护使能”状态和“写保护禁止”状态;The write protection state register includes a "write protection enabled" state and a "write protection prohibited" state;

(2)为上述两个寄存器各置一个初始值,将引导用只读存储器设置为“写保护使能”状态;(2) An initial value is respectively set for the above two registers, and the read-only memory for guiding is set to the "write protection enabling" state;

(3)连续向写保护数据寄存器写入数据,每写入一个数据,写保护状态寄存器的值发生变化一次,直到该值为一个特定值,此时将引导用只读存储器设置为“写保护禁止”状态;(3) Write data to the write-protected data register continuously. Every time a data is written, the value of the write-protected status register changes once until the value is a specific value. At this time, the boot read-only memory is set to "write-protected Forbidden" status;

(4)对引导用只读存储器的片选信号进行译码,使得引导用只读存储器的片选信号有效,此时对引导用只读存储器进行写操作;(4) Decoding the chip select signal of the ROM for guidance, so that the chip select signal of the ROM for guidance is valid, and at this time, the write operation is performed for the ROM for guidance;

(5)写操作结束后,向写保护数据寄存器写入数据,使引导用只读存储器重新处于“写保护使能”状态。(5) After the write operation is finished, write data into the write protection data register, so that the boot read-only memory is in the "write protection enable" state again.

上述第(4)步中,用于对引导用只读存储器的片选信号进行译码的是写保护状态寄存器的最高位与芯片其它控制信号。In the above step (4), the highest bit of the write protection status register and other control signals of the chip are used to decode the chip select signal of the boot ROM.

上述方法中的写保护状态寄存器还包括“中间态”状态,其中所述的第(3)步,其过程如下:The write protection state register in the above-mentioned method also comprises " intermediate state " state, wherein said (3) step, its process is as follows:

(1)起始时,写保护状态寄存器处于“写保护使能”状态;(1) At the beginning, the write protection status register is in the state of "write protection enable";

(2)在“写保护使能”状态,向写保护数据寄存器写入第一个设定数据,使写保护状态寄存器进入“中间态”状态,若为其它操作,则返回到“写保护使能”状态;(2) In the "write protection enable" state, write the first setting data to the write protection data register, so that the write protection state register enters the "intermediate state" state, if it is other operations, return to the "write protection enable" can" state;

(3)在“中间态”,若向写保护数据寄存器写入第一个设定数据,则写保护状态寄存器维持当前状态,若向写保护数据寄存器写入第二个设定数据,使写保护状态寄存器进入“写保护禁止”状态,若为其它操作,则返回到“写保护使能”状态。(3) In the "intermediate state", if the first set data is written to the write-protected data register, the write-protected state register maintains the current state, and if the second set data is written to the write-protected data register, the write The protection status register enters the "write protection disabled" state, and returns to the "write protection enabled" state for other operations.

本发明提出的引导用只读存储器的写保护逻辑实现方法,对于在设计初期没有实现引导用只读存储器写保护功能的单板,可以不用考虑该芯片是否提供与写保护相关的硬件引脚,只要引导用只读存储器芯片的CE#信号由逻辑译码得到,就可以通过更改逻辑,实现引导用只读存储器的写保护功能。如果该写保护方法与其它写保护方法同时使用,则能够极大地加强引导用只读存储器的写保护功能,降低引导用只读存储器被擦除或被改写的概率。本发明的方法可以应用到包括引导用只读存储器在内的所有闪存芯片(Flash),对其中的引导用只读存储器芯片实现写保护功能。The write protection logic implementation method of the boot ROM proposed by the present invention, for a single board that does not implement the write protection function of the boot ROM at the initial stage of design, it does not need to consider whether the chip provides hardware pins related to write protection. As long as the CE# signal of the boot ROM chip is decoded by logic, the write protection function of the boot ROM can be realized by changing the logic. If the write protection method is used together with other write protection methods, the write protection function of the boot ROM can be greatly enhanced, and the probability of the boot ROM being erased or rewritten can be reduced. The method of the present invention can be applied to all flash memory chips (Flash) including the boot read-only memory, and realizes the write protection function for the boot read-only memory chip.

附图说明Description of drawings

图1是本发明实现写保护逻辑的一个实施例的流程图。FIG. 1 is a flowchart of an embodiment of the present invention implementing write protection logic.

具体实施方式Detailed ways

以下结合附图,对本发明提出的引导用只读存储器的写保护逻辑实现方法作详细介绍。The method for implementing the write protection logic of the boot ROM proposed by the present invention will be described in detail below in conjunction with the accompanying drawings.

(1)设置寄存器(1) Setting register

在逻辑中设置一个8位的写保护数据寄存器和一个3位的写保护状态寄存器。为两个寄存器分配各自的地址。有了地址以后,通过在逻辑中建立写进程,即可以实施对寄存器对读或写操作。Set up an 8-bit write protection data register and a 3-bit write protection status register in the logic. Assign the two registers their respective addresses. After having the address, by establishing the write process in the logic, the register pair can be read or written.

上述写保护状态寄存器用于表示引导用只读存储器的写保护状态,它一共有三种状态:“写保护使能”、“中间态”、“写保护禁止”。其中的“中间态”是写保护逻辑从“写保护使能”状态变化到“写保护禁止”状态所必须经过的中间状态,在这种状态时仍然不能向引导用只读存储器中写入数据。The above-mentioned write protection state register is used to indicate the write protection state of the boot ROM, and it has three states in total: "write protection enabled", "intermediate state", and "write protection disabled". The "intermediate state" is the intermediate state that the write protection logic must pass through from the "write protection enable" state to the "write protection prohibition" state. In this state, it is still impossible to write data to the boot read-only memory. .

写保护数据寄存器用于向其中写入数据,当向写保护数据寄存器中写入一定的数据时,写保护状态寄存器的状态就会发生相应的变化The write-protected data register is used to write data into it. When certain data is written into the write-protected data register, the state of the write-protected status register will change accordingly.

上述写保护状态寄存器的位数是可以变的,可以根据需要设计为2位或其它。向写保护数据寄存器中连续写入的数据个数可以灵活设计,若增加数据个数,中间态也作相应增加,以增强写保护功能。向写保护数据寄存器中连续写入的值也可以灵活设计。The number of bits of the above-mentioned write protection status register can be changed, and can be designed as 2 bits or others according to needs. The number of data continuously written into the write protection data register can be flexibly designed. If the number of data is increased, the intermediate state will be correspondingly increased to enhance the write protection function. The value written continuously to the write-protected data register can also be flexibly designed.

(2)为两个寄存器设置初始值(2) Set the initial value for the two registers

当单板上电或复位时,写保护逻辑进入“写保护使能”状态,此时将写保护数据寄存器置为全“1”,将写保护状态寄存器也置为全“1”;When the board is powered on or reset, the write protection logic enters the "write protection enable" state, at this time, the write protection data register is set to all "1", and the write protection status register is also set to all "1";

(3)写保护禁止(3) Write protection prohibited

如果要实施对引导用只读存储器的写操作,则必须首先使得写保护逻辑处于“禁止写保护”状态。此时,写保护逻辑需要经过“写保护使能”、“中间态”、“写保护禁止”三种状态。If you want to implement the write operation to the boot read-only memory, you must first make the write protection logic in the "write protection disabled" state. At this time, the write protection logic needs to go through three states: "write protection enabled", "intermediate state", and "write protection disabled".

本发明的一个实施例以两个“中间态”为例,如图1所示,此时,写保护逻辑需要经过“写保护使能”、“第1中间态”、“第2中间态”、“写保护禁止”四种状态。如果要实现禁止写保护功能,则连续向数据寄存器写入3个数据:0xAA、0x99、0x66(3个写操作必须连续)。每写入一个数据,写保护状态寄存器的值就发生一次变化,直到其值为“011”,当写保护状态寄存器的值为“011”,此时引导用只读存储器处于“写保护禁止”状态。An embodiment of the present invention takes two "intermediate states" as examples, as shown in Figure 1, at this time, the write protection logic needs to go through "write protection enabling", "the first intermediate state", and "the second intermediate state" , "write protection prohibited" four states. If you want to realize the function of prohibiting write protection, write 3 data to the data register continuously: 0xAA, 0x99, 0x66 (3 write operations must be continuous). Every time a data is written, the value of the write protection status register changes once until its value is "011". When the value of the write protection status register is "011", the boot read-only memory is in the "write protection prohibited" state.

如图1所示,写保护状态寄存器的四种状态之间的转换关系如下:As shown in Figure 1, the conversion relationship between the four states of the write protection status register is as follows:

当单板上电或复位时,写保护状态寄存器处于“写保护使能”状态;When the board is powered on or reset, the write protection status register is in the "write protection enabled" state;

在“写保护使能”状态,如果向写保护数据寄存器写入第一个设定数据(例如0xAA),则写保护状态寄存器进入“第1中间态”状态,若为其它操作,则将维持当前状态;In the "write protection enable" state, if the first setting data (such as 0xAA) is written to the write protection data register, the write protection state register will enter the "first intermediate state" state, and if it is other operations, it will remain current status;

在“第1中间态”状态,如果向写保护数据寄存器写入第一个设定数据(例如0xAA),则写保护状态寄存器维持当前状态,如果向写保护数据寄存器写入第二个设定数据(例如0x99),则写保护状态寄存器进入“第2中间态”状态,若为其它操作,则返回到“写保护使能”状态;In the "first intermediate state" state, if the first setting data (such as 0xAA) is written to the write protection data register, the write protection status register maintains the current state, and if the second setting data is written to the write protection data register data (such as 0x99), the write protection status register enters the "second intermediate state" state, and if it is other operations, it returns to the "write protection enable" state;

在“第2中间态”状态,如果向写保护数据寄存器写入第三个设定数据(例如0x66),则写保护状态寄存器进入“写保护禁止”状态,若为其它操作,则返回到“写保护使能”;In the "second intermediate state" state, if the third setting data (such as 0x66) is written to the write protection data register, the write protection state register enters the "write protection prohibited" state, and if it is other operations, it returns to the " Write Protect Enable";

在“写保护禁止”状态,如果向写保护数据寄存器写入第四个设定数据(例如0x55),则写保护状态寄存器返回到“写保护使能”状态,若为其它操作,则可以进行对引导用只读存储器的写操作以及其它任何操作。In the "write protection disabled" state, if the fourth setting data (such as 0x55) is written to the write protection data register, the write protection status register returns to the "write protection enable" state, and if it is other operations, it can be Write operations to boot ROM and any other operations.

在“写保护禁止”状态,可以进行对引导用只读存储器的写操作以及其它任何操作,如果向写保护数据寄存器写入第四个设定数据(0x55),则写保护状态寄存器返回到“写保护使能”状态,。In the state of "write protection prohibited", the write operation and any other operation to the boot read-only memory can be carried out. If the fourth setting data (0x55) is written to the write protection data register, the write protection status register returns to " Write protection enabled" state,.

写保护状态寄存器的四种状态与写保护状态寄存器的寄存器值的对应关系如下:The corresponding relationship between the four states of the write protection status register and the register value of the write protection status register is as follows:

“写保护使能”状态--写保护状态寄存器的值为“111”;"Write protection enable" status -- the value of the write protection status register is "111";

“第1中间态”状态--写保护状态寄存器的值为“110”;"The first intermediate state" state--the value of the write protection state register is "110";

“第2中间态”状态--写保护状态寄存器的值为“101”;"The second intermediate state" state--the value of the write protection state register is "101";

“写保护禁止”状态--写保护状态寄存器的值为“011”。"Write protection disabled" status - the value of the write protection status register is "011".

(4)实施对引导用只读存储器的写操作(4) Implement a write operation to the boot ROM

当写保护状态存储器处于“写保护禁止”状态时,可以对引导用只读存储器进行在线升级等写操作。当实施对引导用只读存储器的写操作时,引导用只读存储器的片选信号应该由写保护状态寄存器的第2位数据和其它控制信号译码得到。CE#信号的状态除了由一般的控制信号中,(包括CPU的读信号、写信号、高位地址信号、片选信号等)译码得到以外,还受到写保护状态寄存器的第2位的控制。另外,在进行读操作时,CE#信号不应该受到写保护状态寄存器的第2位的控制。When the write-protected state memory is in the state of "write-protection prohibited", write operations such as online upgrade can be performed on the boot read-only memory. When implementing the write operation to the boot read-only memory, the chip select signal of the boot read-only memory should be decoded from the second bit data of the write protection status register and other control signals. The state of the CE# signal is not only obtained by decoding the general control signals (including the CPU's read signal, write signal, high address signal, chip select signal, etc.), but also controlled by the second bit of the write protection status register. In addition, when performing a read operation, the CE# signal should not be controlled by the second bit of the write protection status register.

(5)写操作结束后,将写保护状态寄存器重新置为写保护状态。向写保护数据寄存器写入第四数据0x55,则引导用只读存储器重新处于写保护状态。(5) After the write operation is finished, reset the write protection state register to the write protection state. Write the fourth data 0x55 into the write protection data register, then the boot read-only memory is in the write protection state again.

Claims (3)

1、一种引导用只读存储器的写保护逻辑实现方法,其特征在于该方法包括以下步骤:1, a kind of write-protection logic implementation method with read-only memory for guiding, it is characterized in that the method comprises the following steps: (1)设置写保护数据寄存器和写保护状态寄存器,并分别为两个寄存器分配地址;(1) Write-protected data register and write-protected status register are set, and addresses are assigned to the two registers respectively; 所述的写保护状态寄存器包括“写保护使能”状态和“写保护禁止”状态;The write protection state register includes a "write protection enabled" state and a "write protection prohibited" state; (2)为上述两个寄存器各置一个初始值,将引导用只读存储器设置为“写保护使能”状态;(2) An initial value is respectively set for the above two registers, and the read-only memory for guiding is set to the "write protection enabling" state; (3)连续向写保护数据寄存器写入数据,每写入一个数据,写保护状态寄存器的值发生一次变化,直到该值为一个设定值,此时将引导用只读存储器设置为“写保护禁止”状态;(3) Continuously write data to the write protection data register. Every time a data is written, the value of the write protection status register changes once until the value is a set value. At this time, the boot read-only memory is set to "write protection prohibited" status; (4)对引导用只读存储器的片选信号进行译码,使得引导用只读存储器的片选信号有效,此时对引导用只读存储器进行写操作;(4) Decoding the chip select signal of the ROM for guidance, so that the chip select signal of the ROM for guidance is valid, and at this time, the write operation is performed for the ROM for guidance; (5)写操作结束后,向写保护数据寄存器写入数据,使引导用只读存储器重新处于“写保护使能”状态。(5) After the write operation is finished, write data into the write protection data register, so that the boot read-only memory is in the "write protection enable" state again. 2、如权利要求1所述的方法,其特征在于其中的第(4)步用于对引导用只读存储器的片选信号进行译码的是写保护状态寄存器的最高位与芯片其它控制信号。2. The method according to claim 1, wherein the (4) step is used to decode the chip select signal of the ROM for guidance and is the highest bit of the write protection status register and other control signals of the chip . 3、如权利要求1所述的方法,其特征在于写保护状态寄存器还包括“中间态”状态,其中所述的第(3)步,其过程如下:3. The method according to claim 1, wherein the write protection state register also includes an "intermediate state" state, wherein said (3) step, its process is as follows: (1)起始时,写保护状态寄存器处于“写保护使能”状态;(1) At the beginning, the write protection status register is in the state of "write protection enable"; (2)在“写保护使能”状态,向写保护数据寄存器写入第一个设定数据,使写保护状态寄存器进入“中间态”状态,若为其它操作,则返回到“写保护使能”状态;(2) In the "write protection enable" state, write the first setting data to the write protection data register, so that the write protection state register enters the "intermediate state" state, if it is other operations, return to the "write protection enable" can" state; (3)在“中间态”,若向写保护数据寄存器写入第一个设定数据,则写保护状态寄存器维持当前状态,若向写保护数据寄存器写入第二个设定数据,则写保护状态寄存器进入“写保护禁止”状态,若为其它操作,则返回到“写保护使能”状态。(3) In the "intermediate state", if the first set data is written to the write-protected data register, the write-protected state register will maintain the current state; if the second set data is written to the write-protected data register, the write The protection status register enters the "write protection disabled" state, and returns to the "write protection enabled" state for other operations.
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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100552807C (en) * 2007-05-28 2009-10-21 创见资讯股份有限公司 Storage device and protection method thereof
KR102196971B1 (en) 2014-03-28 2020-12-31 삼성전자주식회사 Storage system, and method for performing and authenticating write-protection thereof
CN104951405B (en) * 2014-03-28 2019-09-06 三星电子株式会社 Storage system and method of performing and verifying write protection on 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
JP5421127B2 (en) Nonvolatile memory with dynamic multimode operation
US8024509B2 (en) Method of managing a multi-bit-cell flash memory
CN1129916C (en) Programmable access protection in a flash memory device
US9484103B1 (en) Electronic storage device
US8009503B2 (en) Card controller controlling semiconductor memory including memory cell having charge accumulation layer and control gate
US8913411B2 (en) Method for modifying data more than once in a multi-level cell memory location within a memory array
TWI443661B (en) Nand flash architecture with multi-level row decoding
US7814264B2 (en) Memory card, semiconductor device, and method of controlling semiconductor memory
US20170039141A1 (en) Mapping table updating method, memory storage device and memory control circuit unit
US20090109756A1 (en) Memory device with variable trim setting
US11216381B2 (en) Data storage devices and data processing methods
CN114530181B (en) A non-volatile storage device, a programming method and a memory system
US20130013887A1 (en) Memory controller
CN1856839A (en) Nonvolatile semiconductor memory device using some memory blocks in multi-ary memory as binary memory blocks
CN1253893C (en) Method of guiding ROM to realize write protection
US20100232226A1 (en) Solid state storage system for uniformly using memory area and method controlling the same
US20070189107A1 (en) Nonvolatile memory and apparayus and method for deciding data validity for the same
JP2002230983A (en) Nonvolatile semiconductor memory and automatic erasing method / automatic writing method thereof
US20150154109A1 (en) Memory System Controller Including a Multi-Resolution Internal Cache
CN1222885C (en) FLASH data protecting method and its FLASH curcuit
US12387801B2 (en) Memory device and method of operating the memory device
TWI880822B (en) Data storage device and update method for memory configuration information
US20240126642A1 (en) Storage device
US20220051748A1 (en) Execution method of firmware code, memory storage device and memory control circuit unit
KR20250170980A (en) Controller and memory system having the controller, and operating method of the memory system

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