WO2015188511A1 - Nand flash operation processing method and apparatus, and logic device - Google Patents
Nand flash operation processing method and apparatus, and logic device Download PDFInfo
- Publication number
- WO2015188511A1 WO2015188511A1 PCT/CN2014/087232 CN2014087232W WO2015188511A1 WO 2015188511 A1 WO2015188511 A1 WO 2015188511A1 CN 2014087232 W CN2014087232 W CN 2014087232W WO 2015188511 A1 WO2015188511 A1 WO 2015188511A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- nand flash
- address
- protection table
- address protection
- protection
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
Definitions
- the present invention relates to the field of communications, and in particular to a NAND Flash operation processing method, apparatus, and logic device.
- NAND Flash Non-volatile memories
- NOR Flash NOR Flash
- NAND Flash NAND Flash
- NOR Flash NOR Flash
- NAND Flash NAND Flash memory
- NOR Flash memory has a much faster write speed than NOR Flash memory and has a faster erase speed. It is faster than NOR Flash memory, has a large single-chip capacity, and has low cost per unit storage capacity. It is suitable for storing large amounts of data. Due to technical development needs and cost reasons, NAND Flash has been widely used in various electronic products.
- NAND Flash In various occasions where NAND Flash is selected, improper operation from software may cause NAND Flash to be erased by mistake, which may cause serious consequences, especially when the boot and system running versions used for system booting are erroneously erased. It may even cause the system to fail to start.
- NAND Flash has an unreliable problem caused by erroneous erasure and writing.
- the invention provides a NAND Flash operation processing method, device and logic device to solve the problem that the NAND Flash in the related art is unreliable due to error erasure and writing.
- a NAND Flash operation processing method including: establishing an address protection table for protecting a NAND Flash protection area; and determining whether an address for operating the NAND Flash exists in the address protection table In the case where the judgment result is YES, the operation on the NAND Flash is masked.
- the address protection table for protecting the NAND flash protection area includes: an importance degree division level for protecting different areas of the NAND Flash protection area; corresponding to the different areas according to the division level Address, establish an address protection table.
- the method further includes: updating the address protection table.
- determining whether an address for operating the NAND Flash exists in the address protection table comprises: parsing a signal command from the central processing unit CPU to operate the NAND flash; comparing the signal command Whether the address of the NAND Flash matches the address in the address protection table; in the case of matching, it is determined whether an address operating on the NAND Flash exists in the address protection table.
- masking the operation of the NAND Flash comprises: determining whether an operation type of the operation of the NAND Flash is a modification operation; and if the determination result is YES, masking the operation of the NAND Flash.
- a NAND Flash operation processing apparatus includes: an establishment module configured to establish an address protection table for protecting a NAND Flash protection area; and a determination module configured to determine to perform the NAND Flash Whether the address of the operation exists in the address protection table; and the masking module is configured to mask the operation of the NAND Flash if the determination result of the determination module is YES.
- the establishing module includes: a dividing unit, configured to divide a level of importance of protecting different areas of the NAND Flash protection area; and establishing a unit, which is set to an address corresponding to the different area after the dividing level, Create an address protection table.
- the apparatus further comprises: an update module configured to update the address protection table.
- the determining module comprises: a parsing unit configured to parse a signal command from the central processing unit CPU to operate the NAND flash; and a comparing unit configured to compare the NAND flash for the signal command Whether the address matches the address in the address protection table; the determining unit is configured to determine, in the case of matching, whether an address operating on the NAND Flash exists in the address protection table.
- the masking module includes: a determining unit configured to determine whether an operation type of the operation of the NAND Flash is a modification operation; and a shielding unit configured to block the determination result of the determining unit as yes The operation of the NAND Flash.
- a logic device comprising the apparatus of any of the above.
- an address protection table for protecting a NAND flash protection area is established; whether an address for operating the NAND Flash exists in the address protection table is determined; and if the determination result is yes, the shielding is performed.
- the operation of NAND Flash solves the problem that NAND Flash exists in related technologies.
- the problem of unreliable storage caused by erasing and writing achieves the effect of not only effectively preventing the important storage area from being damaged, but also effectively improving the reliability of the NAND Flash stored data.
- FIG. 1 is a flowchart of a NAND Flash operation processing method according to an embodiment of the present invention
- FIG. 2 is a block diagram showing the structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention
- FIG. 3 is a structural block diagram of a setup module 22 in a NAND Flash operation processing apparatus according to an embodiment of the present invention
- FIG. 4 is a block diagram showing a preferred structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention
- FIG. 5 is a structural block diagram of a determining module 24 in a NAND Flash operation processing apparatus according to an embodiment of the present invention
- FIG. 6 is a structural block diagram of a masking module 26 in a NAND Flash operation processing apparatus according to an embodiment of the present invention
- FIG. 7 is a structural block diagram of a logic device in accordance with an embodiment of the present invention.
- FIG. 8 is a schematic diagram of an architecture for preventing NAND Flash from being erased and erroneously written according to an embodiment of the present invention
- FIG. 9 is a functional explanatory diagram of an implementation method for preventing NAND Flash from being erroneously erased and erroneously written according to an embodiment of the present invention.
- FIG. 10 is a flowchart of an implementation method for preventing NAND FLASH from being erroneously erased and erroneously written according to an embodiment of the present invention
- FIG. 11 is a flow diagram of adding or modifying a protected area to prevent an NAND FLASH from being erased and miswritten by an implementation in accordance with an embodiment of the present invention.
- FIG. 1 is a flowchart of a NAND Flash operation processing method according to an embodiment of the present invention. As shown in FIG. 1, the flow includes the following steps:
- Step S102 establishing an address protection table for protecting the NAND Flash protection area
- Step S104 determining whether an address for operating the NAND Flash exists in the address protection table
- step S106 if the determination result is YES, the operation on the NAND Flash is masked.
- the storage area of the NAND Flash is protected according to the establishment of the address protection table, which not only effectively solves the problem that the NAND Flash area is not protected in the related art, and the storage caused by the erroneous erasure and writing of the NAND Flash is unreliable. It may even cause the system to fail to boot, and effectively improve the reliability of the data stored in the NAND Flash.
- an address protection table for protecting a NAND Flash protection area When establishing an address protection table for protecting a NAND Flash protection area, a plurality of methods may be used. For example, when different protection areas need to be treated differently, the importance level of protection of different areas of the NAND Flash protection area may be divided; An address protection table is established according to addresses corresponding to different areas after the level is divided. Through such processing, the data stored in the NAND Flash area is distinguished to a significant extent. For example, the protection level can be set to be the highest for which it is particularly important that it cannot be deleted, and can be set slightly lower for the general importance.
- the address protection table may also be updated.
- the importance of the NAND Flash storage area changes during different periods, and therefore, the address needs to be The protection table is updated accordingly to suit the needs of different periods.
- the signal command for operating the NAND Flash from the CPU of the central processing unit may be parsed first; the address and address protection table of the NAND Flash for comparing the signal command may be Whether the addresses in the match match; in the case of matching, it is determined whether the address operating on the NAND Flash exists in the address protection table.
- the operation on the NAND Flash is masked, the operation of erasing or modifying important data (protecting data stored in the corresponding area of the address) (for example, some simple read operations) is also blocked. , which may affect the user experience.
- important data protecting data stored in the corresponding area of the address
- a NAND Flash operation processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
- the term "module” A combination of software and/or hardware that can implement a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- FIG. 2 is a block diagram showing the structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a setup module 22, a determination module 24, and a masking module 26. The apparatus will be described below.
- the establishing module 22 is configured to establish an address protection table for protecting the NAND flash protection area; the determining module 24 is connected to the establishing module 22, and configured to determine whether an address for operating the NAND Flash exists in the address protection table; 26, connected to the above determining module 24, configured to mask the operation of the NAND Flash when the determination result of the determining module is YES.
- FIG. 3 is a structural block diagram of a setup module 22 in a NAND Flash operation processing apparatus according to an embodiment of the present invention.
- the setup module 22 includes a division unit 32 and an establishment unit 34.
- the setup module 22 is described below. .
- the dividing unit 32 is configured to divide the importance level of the different areas of the NAND Flash protection area; the establishing unit 34 is connected to the dividing unit 32, and is configured to establish an address protection table according to addresses corresponding to different areas after the dividing level .
- FIG. 4 is a block diagram of a preferred structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes, in addition to all the structures shown in FIG. 2, an update module 42, which is updated below. Module 42 is described.
- the update module 42 is coupled to the setup module 22 and the determination module 24, and is configured to update the address protection table.
- FIG. 5 is a structural block diagram of the determining module 24 in the NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the determining module 24 includes: a parsing unit 52, a comparing unit 54, and a determining unit 56. The determination module 24 is described.
- the parsing unit 52 is configured to parse a signal command from the central processing unit CPU for operating the NAND flash; the comparing unit 54 is connected to the parsing unit 52, and is configured to compare the address and address protection table of the NAND flash for which the signal command is directed Whether the addresses match, the determining unit 56 is connected to the comparing unit 54 described above, and is arranged to determine, in the case of matching, whether an address operating on the NAND Flash exists in the address protection table.
- FIG. 6 is a structural block diagram of a masking module 24 in a NAND Flash operation processing apparatus according to an embodiment of the present invention.
- the masking module 26 includes: a determining unit 62 and a shielding unit 64, and the masking module 26 is performed below. Description.
- the judging unit 62 is configured to determine whether the operation type of the operation of the NAND flash is a modification operation; the masking unit 64 is connected to the judging unit 62, and is configured to mask the NAND flash if the judgment result of the judging unit is YES. operating.
- the logic device 70 includes the NAND Flash operation processing device 72 of any of the above.
- the implementation method of preventing NAND flash from being erased and misprogrammed (false write) is through such address filtering and masking method to prevent a specific storage area from being damaged during an erroneous operation.
- the following processing methods can be used to achieve:
- FIG. 8 is a schematic diagram of an architecture for preventing NAND flash from being erroneously erased and erroneously written according to an embodiment of the present invention.
- the physical components included in the implementation method mainly include: a central processing unit (Central Processing Unit) , referred to as CPU), logic device (Field Programmable Gate Array (FPGA) or Complex Programmable Logic Device (CPLD)), NAND Flash.
- CPU Central Processing Unit
- FPGA Field Programmable Gate Array
- CPLD Complex Programmable Logic Device
- the CPU can access the internal Flash of the logic device through the control interface while providing the Flash interface to the logic device.
- the interface that the CPU accesses the internal Flash of the logic device can be various types, such as interfaces in the form of IIC, LOCAL BUS, SPI, etc., which depend on the interface provided by the processor.
- the logic device can be either FPGA or CPLD.
- the various logic devices on the market have built-in Flash.
- the address protection table is stored in the Flash of the logic device.
- the CPU can read, write, and store the address protection table.
- the protected area may be a boot area, a boot area, a large version area, and other storage areas for important information.
- the physical block addresses corresponding to these protected areas are stored in the address protection table.
- the logic device extracts the Row Address corresponding to these block addresses and compares it with the Row Address in the NAND Flash port. Once the same, the erase or program command is masked.
- the solution further includes establishment and update of the protection address table, signal analysis of the NAND Flash interface, masking of the error erasing and misprogramming commands, and status indication.
- the protection of the flash memory generally uses the staggered address space to make the Flash cannot be accessed, and this method is limited to the application of the NOR Flash.
- the above address protection table the protection against false erase and misprogramming of the boot area, the boot area, the large version area, and other important information storage areas on the NAND Flash is realized, and the protection method is protected by this protection method.
- no additional intervention is required by the software, which reduces the complexity of the software, reduces the workload of the processor, and improves the system reliability.
- FIG. 9 is a functional explanatory diagram of an implementation method for preventing NAND flash from being erroneously erased and erroneously written according to an embodiment of the present invention.
- the functional components of the scheme include: 101 processors. (CPU), 102 NAND Flash, 103 address protection table, 104 NAND Flash I/O interface parser, 105 NAND Flash I/O address filter, 106 access status indicator.
- the 101 processor can access the 103 address protection table in the internal Flash of the logic device through the control interface, and provide the Flash interface to the logic device.
- the CPU accesses the internal Flash interface of the logic device. It can be various types, such as IIC, LOCAL BUS, SPI, etc. The type of the specific interface depends on the CPU.
- the logic device can be either FPGA or CPLD.
- the CPU can access (read and write) the 103 address protection table in the built-in Flash of the logic device.
- the 104 NAND Flash I/O interface parser in the logic device parses the signal from the CPU's Flash interface. The parsed address is compared with the 103 address protection table.
- the 105 NAND Flash I/O address filter determines whether to mask the wipe. In addition to or programming commands.
- the 106 access status indicator indicates the current state in which erasure, programming, or normal access is prohibited.
- This flag can have a check digit to distinguish it from the value when Flash was not written.
- the memory device is 102 NAND Flash, and each block on the 102 NAND Flash can be read, erased, and programmed.
- NAND Flash is used to store boot code, boot code, large version code, other important information, and other relatively less important information.
- FIG. 10 is a flowchart of a method for preventing NAND FLASH from being erroneously erased and erroneously written according to an embodiment of the present invention. As shown in FIG. 10, the process includes the following steps:
- Step A After the system is reset or powered on, the logic device first causes the CPU to be in a reset state, waiting for the logic to read the address protection table;
- Step B The logic reads the address protection table from the built-in Flash
- Step C If the interval that does not require protection is read from the head of the address protection table, the protection address is processed in the default manner in the logic code, for example, transparently transmitting the address and the command. Otherwise, the protection interval is extracted according to the information in the flash;
- Step D The logic determines the address to be filtered according to the extracted protection interval information, for example, the Row Address of the protected block;
- Step E Release the reset of the processor CPU to enable the CPU to start
- Step F After the processor CPU is started, accessing the NAND Flash, the logic collects the interface information, first determines the type of the command, and if the parsed command is not Erase or Program edit, it is a read operation. (Read), the command is directly transmitted to the NAND Flash, and the normal access to the NAND Flash;
- Step G If the logic parsed command is Erase or Program, compare the Row Address of the protected block in step D. If the address does not match, the command is directly transmitted to the NAND Flash, and the NAND Flash is normally accessed.
- Step H If the logic parsed command is Erase or Program, compare the Row Address of the protected block in step D. If the address matches, the corresponding command is masked and fed back to the flag register to display an illegal Erase or Program.
- FIG. 11 is a flowchart of adding or modifying a protected area to prevent an NAND FLASH from being erased and miswritten by an implementation method according to an embodiment of the present invention. As shown in FIG. 11, if a guard interval needs to be changed, the flow includes the following step:
- Step A The system background starts the version update in the NAND Flash
- Step B The system notifies the logic to release the logical address protection, and transparently transmits all the commands of the originally set NAND FLASH protected interval;
- Step C The system starts downloading and updating the content in the NAND Flash
- Step D If the system downloads the update NAND Flash fails, the download update is terminated, and the update failure flag is set, and the logical address protection is restored.
- Step E If the system downloads and updates the NAND Flash successfully, the address protection table is updated, and the update success flag is set at the same time;
- Step F Update the protection flag of the address protection table to indicate that there is an address range that needs to be protected
- Step G The logic initiates address filtering in accordance with the updated address protection table.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the above embodiments and preferred embodiments solve the problem that the NAND Flash in the related art is unreliable due to erroneous erasure and writing, thereby achieving not only the effective avoidance of the important storage area being damaged, but also The effect of the reliability of the data stored in the NAND Flash is effectively improved.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本发明涉及通信领域,具体而言,涉及一种NAND Flash操作处理方法、装置及逻辑器件。The present invention relates to the field of communications, and in particular to a NAND Flash operation processing method, apparatus, and logic device.
目前比较常见的非易失性存储器包括NOR Flash(NOR闪存)和NAND Flash(NAND闪存)两种,相比于NOR Flash,NAND Flash存储器具备写入速度比NOR Flash存储器快很多、擦除速度远比NOR Flash存储器快、单片容量较大、单位存储容量成本低等优点,适用于大量数据的存储。由于技术发展需求和成本方面的原因,NAND Flash已经在各种电子产品中有很广泛的应用。At present, the more common non-volatile memories include NOR Flash (NOR Flash) and NAND Flash (NAND Flash). Compared to NOR Flash, NAND Flash memory has a much faster write speed than NOR Flash memory and has a faster erase speed. It is faster than NOR Flash memory, has a large single-chip capacity, and has low cost per unit storage capacity. It is suitable for storing large amounts of data. Due to technical development needs and cost reasons, NAND Flash has been widely used in various electronic products.
在各种选用NAND Flash的场合中,来自软件的不当操作有可能导致NAND Flash被错误地擦除,会造成比较严重的后果,尤其是当用于系统引导的Boot和系统运行版本被错误擦除时甚至可能导致系统无法启动。In various occasions where NAND Flash is selected, improper operation from software may cause NAND Flash to be erased by mistake, which may cause serious consequences, especially when the boot and system running versions used for system booting are erroneously erased. It may even cause the system to fail to start.
因此,在相关技术中,NAND Flash存在被错误擦除与写入引起的不可靠的问题。Therefore, in the related art, NAND Flash has an unreliable problem caused by erroneous erasure and writing.
发明内容Summary of the invention
本发明提供了一种NAND Flash操作处理方法、装置及逻辑器件,以解决相关技术中NAND Flash存在被错误擦除与写入引起的不可靠的问题。The invention provides a NAND Flash operation processing method, device and logic device to solve the problem that the NAND Flash in the related art is unreliable due to error erasure and writing.
根据本发明的一个方面,提供了一种NAND Flash操作处理方法,包括:建立对NAND Flash保护区进行保护的地址保护表;判断对所述NAND Flash进行操作的地址是否存在于所述地址保护表中;在判断结果为是的情况下,屏蔽对所述NAND Flash的操作。According to an aspect of the present invention, a NAND Flash operation processing method is provided, including: establishing an address protection table for protecting a NAND Flash protection area; and determining whether an address for operating the NAND Flash exists in the address protection table In the case where the judgment result is YES, the operation on the NAND Flash is masked.
优选地,建立对所述NAND Flash保护区进行保护的所述地址保护表包括:对所述NAND Flash保护区的不同区域进行保护的重要程度划分级别;依据划分级别后的所述不同区域对应的地址,建立地址保护表。Preferably, the address protection table for protecting the NAND flash protection area includes: an importance degree division level for protecting different areas of the NAND Flash protection area; corresponding to the different areas according to the division level Address, establish an address protection table.
优选地,在建立对所述NAND Flash保护区进行保护的所述地址保护表之后,还包括:对所述地址保护表进行更新。 Preferably, after the establishing the address protection table for protecting the NAND Flash protection area, the method further includes: updating the address protection table.
优选地,判断对所述NAND Flash进行操作的地址是否存在于所述地址保护表中包括:解析来自中央处理器CPU的对所述NAND Flash进行操作的信号命令;比较所述信号命令所针对的所述NAND Flash的地址与所述地址保护表中的地址是否匹配;在匹配的情况下,确定对所述NAND Flash进行操作的地址是否存在于所述地址保护表中。Preferably, determining whether an address for operating the NAND Flash exists in the address protection table comprises: parsing a signal command from the central processing unit CPU to operate the NAND flash; comparing the signal command Whether the address of the NAND Flash matches the address in the address protection table; in the case of matching, it is determined whether an address operating on the NAND Flash exists in the address protection table.
优选地,屏蔽对所述NAND Flash的操作包括:判断对所述NAND Flash的操作的操作类型是否为修改操作;在判断结果为是的情况下,屏蔽对所述NAND Flash的操作。Preferably, masking the operation of the NAND Flash comprises: determining whether an operation type of the operation of the NAND Flash is a modification operation; and if the determination result is YES, masking the operation of the NAND Flash.
根据本发明的另一方面,提供了一种NAND Flash操作处理装置,包括:建立模块,设置为建立对NAND Flash保护区进行保护的地址保护表;判断模块,设置为判断对所述NAND Flash进行操作的地址是否存在于所述地址保护表中;屏蔽模块,设置为在所述判断模块的判断结果为是的情况下,屏蔽对所述NAND Flash的操作。According to another aspect of the present invention, a NAND Flash operation processing apparatus includes: an establishment module configured to establish an address protection table for protecting a NAND Flash protection area; and a determination module configured to determine to perform the NAND Flash Whether the address of the operation exists in the address protection table; and the masking module is configured to mask the operation of the NAND Flash if the determination result of the determination module is YES.
优选地,所述建立模块包括:划分单元,设置为对所述NAND Flash保护区的不同区域进行保护的重要程度划分级别;建立单元,设置为依据划分级别后的所述不同区域对应的地址,建立地址保护表。Preferably, the establishing module includes: a dividing unit, configured to divide a level of importance of protecting different areas of the NAND Flash protection area; and establishing a unit, which is set to an address corresponding to the different area after the dividing level, Create an address protection table.
优选地,该装置还包括:更新模块,设置为对所述地址保护表进行更新。Preferably, the apparatus further comprises: an update module configured to update the address protection table.
优选地,所述判断模块包括:解析单元,设置为解析来自中央处理器CPU的对所述NAND Flash进行操作的信号命令;比较单元,设置为比较所述信号命令所针对的所述NAND Flash的地址与所述地址保护表中的地址是否匹配;确定单元,设置为在匹配的情况下,确定对所述NAND Flash进行操作的地址是否存在于所述地址保护表中。Preferably, the determining module comprises: a parsing unit configured to parse a signal command from the central processing unit CPU to operate the NAND flash; and a comparing unit configured to compare the NAND flash for the signal command Whether the address matches the address in the address protection table; the determining unit is configured to determine, in the case of matching, whether an address operating on the NAND Flash exists in the address protection table.
优选地,所述屏蔽模块包括:判断单元,设置为判断对所述NAND Flash的操作的操作类型是否为修改操作;屏蔽单元,设置为在所述判断单元的判断结果为是的情况下,屏蔽对所述NAND Flash的操作。Preferably, the masking module includes: a determining unit configured to determine whether an operation type of the operation of the NAND Flash is a modification operation; and a shielding unit configured to block the determination result of the determining unit as yes The operation of the NAND Flash.
根据本发明的再一方面,提供了一种逻辑器件,包括上述任一项所述的装置。According to still another aspect of the present invention, there is provided a logic device comprising the apparatus of any of the above.
通过本发明,采用建立对NAND Flash保护区进行保护的地址保护表;判断对所述NAND Flash进行操作的地址是否存在于所述地址保护表中;在判断结果为是的情况下,屏蔽对所述NAND Flash的操作,解决了相关技术中NAND Flash存在被错误 擦除与写入引起的存储不可靠的问题,进而达到了不仅能够有效避免重要存储区域被损坏,而且有效地提高了NAND Flash存储数据的可靠性的效果。According to the present invention, an address protection table for protecting a NAND flash protection area is established; whether an address for operating the NAND Flash exists in the address protection table is determined; and if the determination result is yes, the shielding is performed. The operation of NAND Flash solves the problem that NAND Flash exists in related technologies. The problem of unreliable storage caused by erasing and writing achieves the effect of not only effectively preventing the important storage area from being damaged, but also effectively improving the reliability of the NAND Flash stored data.
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的NAND Flash操作处理方法的流程图;1 is a flowchart of a NAND Flash operation processing method according to an embodiment of the present invention;
图2是根据本发明实施例的NAND Flash操作处理装置的结构框图;2 is a block diagram showing the structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention;
图3是根据本发明实施例的NAND Flash操作处理装置中建立模块22的结构框图;3 is a structural block diagram of a setup module 22 in a NAND Flash operation processing apparatus according to an embodiment of the present invention;
图4是根据本发明实施例的NAND Flash操作处理装置的优选结构框图;4 is a block diagram showing a preferred structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention;
图5是根据本发明实施例的NAND Flash操作处理装置中判断模块24的结构框图;FIG. 5 is a structural block diagram of a determining module 24 in a NAND Flash operation processing apparatus according to an embodiment of the present invention;
图6是根据本发明实施例的NAND Flash操作处理装置中屏蔽模块26的结构框图;6 is a structural block diagram of a masking module 26 in a NAND Flash operation processing apparatus according to an embodiment of the present invention;
图7是根据本发明实施例的逻辑器件的结构框图;7 is a structural block diagram of a logic device in accordance with an embodiment of the present invention;
图8是根据本发明实施例的防止NAND Flash被误擦除和误写入的架构示意图;FIG. 8 is a schematic diagram of an architecture for preventing NAND Flash from being erased and erroneously written according to an embodiment of the present invention; FIG.
图9是根据本发明实施例的防止NAND Flash被误擦除和误写入的实现方法功能说明图;9 is a functional explanatory diagram of an implementation method for preventing NAND Flash from being erroneously erased and erroneously written according to an embodiment of the present invention;
图10是根据本发明实施例的防止NAND FLASH被误擦除和误写入的实现方法的流程图;10 is a flowchart of an implementation method for preventing NAND FLASH from being erroneously erased and erroneously written according to an embodiment of the present invention;
图11是根据本发明实施例的防止NAND FLASH被误擦除和误写入的实现方法的增加或修改保护区的流程图。11 is a flow diagram of adding or modifying a protected area to prevent an NAND FLASH from being erased and miswritten by an implementation in accordance with an embodiment of the present invention.
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。 The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种NAND Flash操作处理方法,图1是根据本发明实施例的NAND Flash操作处理方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a NAND Flash operation processing method is provided. FIG. 1 is a flowchart of a NAND Flash operation processing method according to an embodiment of the present invention. As shown in FIG. 1, the flow includes the following steps:
步骤S102,建立对NAND Flash保护区进行保护的地址保护表;Step S102, establishing an address protection table for protecting the NAND Flash protection area;
步骤S104,判断对NAND Flash进行操作的地址是否存在于地址保护表中;Step S104, determining whether an address for operating the NAND Flash exists in the address protection table;
步骤S106,在判断结果为是的情况下,屏蔽对NAND Flash的操作。In step S106, if the determination result is YES, the operation on the NAND Flash is masked.
通过上述步骤,依据建立地址保护表来对NAND Flash的存储区域进行保护,不仅有效地解决了相关技术中不对NAND Flash区域进行保护,导致NAND Flash被错误擦除与写入引起的存储不可靠,甚至可能导致系统无法启动的问题,而且有效地提高了NAND Flash存储数据的可靠性的效果。Through the above steps, the storage area of the NAND Flash is protected according to the establishment of the address protection table, which not only effectively solves the problem that the NAND Flash area is not protected in the related art, and the storage caused by the erroneous erasure and writing of the NAND Flash is unreliable. It may even cause the system to fail to boot, and effectively improve the reliability of the data stored in the NAND Flash.
在建立对NAND Flash保护区进行保护的地址保护表时,可以采用多种方式,例如,在需要对各个保护区域区别对待时,可以对NAND Flash保护区的不同区域进行保护的重要程度划分级别;依据划分级别后的不同区域对应的地址,建立地址保护表。通过这样的处理,使得NAND Flash区域存储的数据有重要程度的区分,比如,对于特别重要不能删除的可以将其的保护级别设置得最高,对于一般重要的可以设置得稍微低一些。When establishing an address protection table for protecting a NAND Flash protection area, a plurality of methods may be used. For example, when different protection areas need to be treated differently, the importance level of protection of different areas of the NAND Flash protection area may be divided; An address protection table is established according to addresses corresponding to different areas after the level is divided. Through such processing, the data stored in the NAND Flash area is distinguished to a significant extent. For example, the protection level can be set to be the highest for which it is particularly important that it cannot be deleted, and can be set slightly lower for the general importance.
优选地,在建立对NAND Flash保护区进行保护的地址保护表之后,还可以对地址保护表进行更新,例如,在不同的时期,NAND Flash存储区域的重要性会发生变化,因此,需要对地址保护表进行相应的更新修改,以适应不同时期的需要。Preferably, after the address protection table for protecting the NAND flash protection area is established, the address protection table may also be updated. For example, the importance of the NAND Flash storage area changes during different periods, and therefore, the address needs to be The protection table is updated accordingly to suit the needs of different periods.
在判断对NAND Flash进行操作的地址是否存在于地址保护表中时,可以先解析来自中央处理器CPU的对NAND Flash进行操作的信号命令;比较信号命令所针对的NAND Flash的地址与地址保护表中的地址是否匹配;在匹配的情况下,确定对NAND Flash进行操作的地址是否存在于地址保护表中。When determining whether the address for operating the NAND Flash exists in the address protection table, the signal command for operating the NAND Flash from the CPU of the central processing unit may be parsed first; the address and address protection table of the NAND Flash for comparing the signal command may be Whether the addresses in the match match; in the case of matching, it is determined whether the address operating on the NAND Flash exists in the address protection table.
优选地,在屏蔽对NAND Flash的操作时,为防止对不会造成重要数据(保护地址对应区域所存储的数据)擦除或是修改的操作(例如,一些简单的读操作)也进行了屏蔽,导致影响用户体验的可能。在判断对NAND Flash进行操作的地址是否存在于地址保护表中之前,还可以判断对NAND Flash的操作的操作类型是否为修改操作;在判断结果为是的情况下,才屏蔽对NAND Flash的操作。Preferably, when the operation on the NAND Flash is masked, the operation of erasing or modifying important data (protecting data stored in the corresponding area of the address) (for example, some simple read operations) is also blocked. , which may affect the user experience. Before determining whether the address for operating the NAND Flash exists in the address protection table, it is also possible to determine whether the operation type of the operation of the NAND Flash is a modification operation; if the determination result is yes, the operation on the NAND Flash is masked. .
在本实施例中还提供了一种NAND Flash操作处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块” 可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a NAND Flash operation processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used below, the term "module" A combination of software and/or hardware that can implement a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的NAND Flash操作处理装置的结构框图,如图2所示,该装置包括建立模块22、判断模块24和屏蔽模块26,下面对该装置进行说明。2 is a block diagram showing the structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a setup module 22, a determination module 24, and a masking module 26. The apparatus will be described below.
建立模块22,设置为建立对NAND Flash保护区进行保护的地址保护表;判断模块24,连接至上述建立模块22,设置为判断对NAND Flash进行操作的地址是否存在于地址保护表中;屏蔽模块26,连接至上述判断模块24,设置为在判断模块的判断结果为是的情况下,屏蔽对NAND Flash的操作。The establishing module 22 is configured to establish an address protection table for protecting the NAND flash protection area; the determining module 24 is connected to the establishing module 22, and configured to determine whether an address for operating the NAND Flash exists in the address protection table; 26, connected to the above determining module 24, configured to mask the operation of the NAND Flash when the determination result of the determining module is YES.
图3是根据本发明实施例的NAND Flash操作处理装置中建立模块22的结构框图,如图3所示,该建立模块22包括划分单元32和建立单元34,下面对该建立模块22进行说明。3 is a structural block diagram of a setup module 22 in a NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the setup module 22 includes a division unit 32 and an establishment unit 34. The setup module 22 is described below. .
划分单元32,设置为对NAND Flash保护区的不同区域进行保护的重要程度划分级别;建立单元34,连接至上述划分单元32,设置为依据划分级别后的不同区域对应的地址,建立地址保护表。The dividing unit 32 is configured to divide the importance level of the different areas of the NAND Flash protection area; the establishing unit 34 is connected to the dividing unit 32, and is configured to establish an address protection table according to addresses corresponding to different areas after the dividing level .
图4是根据本发明实施例的NAND Flash操作处理装置的优选结构框图,如图4所示,该装置除包括图2所示的所有结构外,还包括:更新模块42,下面对该更新模块42进行说明。4 is a block diagram of a preferred structure of a NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes, in addition to all the structures shown in FIG. 2, an update module 42, which is updated below. Module 42 is described.
更新模块42,连接到上述建立模块22和判断模块24,设置为对地址保护表进行更新。The update module 42 is coupled to the setup module 22 and the determination module 24, and is configured to update the address protection table.
图5是根据本发明实施例的NAND Flash操作处理装置中判断模块24的结构框图,如图5所示,该判断模块24包括:解析单元52、比较单元54和确定单元56,下面对该判断模块24进行说明。FIG. 5 is a structural block diagram of the determining module 24 in the NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the determining module 24 includes: a parsing unit 52, a comparing unit 54, and a determining unit 56. The determination module 24 is described.
解析单元52,设置为解析来自中央处理器CPU的对NAND Flash进行操作的信号命令;比较单元54,连接至上述解析单元52,设置为比较信号命令所针对的NAND Flash的地址与地址保护表中的地址是否匹配;确定单元56,连接至上述比较单元54,设置为在匹配的情况下,确定对NAND Flash进行操作的地址是否存在于地址保护表中。 The parsing unit 52 is configured to parse a signal command from the central processing unit CPU for operating the NAND flash; the comparing unit 54 is connected to the parsing unit 52, and is configured to compare the address and address protection table of the NAND flash for which the signal command is directed Whether the addresses match, the determining unit 56 is connected to the comparing unit 54 described above, and is arranged to determine, in the case of matching, whether an address operating on the NAND Flash exists in the address protection table.
图6是根据本发明实施例的NAND Flash操作处理装置中屏蔽模块24的结构框图,如图6所示,该屏蔽模块26包括:判断单元62和屏蔽单元64,下面对该屏蔽模块26进行说明。FIG. 6 is a structural block diagram of a masking module 24 in a NAND Flash operation processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, the masking module 26 includes: a determining unit 62 and a shielding unit 64, and the masking module 26 is performed below. Description.
判断单元62,设置为判断对NAND Flash的操作的操作类型是否为修改操作;屏蔽单元64,连接至上述判断单元62,设置为在判断单元的判断结果为是的情况下,屏蔽对NAND Flash的操作。The judging unit 62 is configured to determine whether the operation type of the operation of the NAND flash is a modification operation; the masking unit 64 is connected to the judging unit 62, and is configured to mask the NAND flash if the judgment result of the judging unit is YES. operating.
图7是根据本发明实施例的逻辑器件的结构框图,如图7所示,该逻辑器件70包括上述任一项的NAND Flash操作处理装置72。7 is a block diagram showing the structure of a logic device according to an embodiment of the present invention. As shown in FIG. 7, the logic device 70 includes the NAND Flash operation processing device 72 of any of the above.
针对相关技术中,由于对NAND闪存的特定区域没有进行保护,因而造成NAND闪存存在被错误地写入或擦除引起存储不可靠的问题,在本实施例中,通过一种防止NAND Flash被误擦除和误写入的实现方法来对NAND Flash上的特定区域进行保护,例如,采用地址过滤的办法来保护特定存储区,从而有效地防止重要的存储区域被错误擦除和写入,增加了电子产品的可靠性。In the related art, since there is no protection for a specific area of the NAND flash memory, there is a problem that the NAND flash memory is erroneously written or erased to cause storage unreliability. In the embodiment, the NAND flash is prevented from being mistaken. Erase and miswrite implementations to protect specific areas of NAND Flash, for example, using address filtering to protect specific memory areas, effectively preventing important memory areas from being erased and written by mistake, increasing The reliability of electronic products.
该防止NAND Flash被误擦除和误编程(误写入)的实现方法,通过这种地址过滤与屏蔽的方法,以避免特定存储区域在错误操作时不被损坏。可以采用以下处理方式来实现:The implementation method of preventing NAND flash from being erased and misprogrammed (false write) is through such address filtering and masking method to prevent a specific storage area from being damaged during an erroneous operation. The following processing methods can be used to achieve:
通过建立一个针对NAND Flash保护区的地址保护表,在对NAND Flash的访问中,将接口信号进行解析,如果有对被保护区间的擦除或者编程操作,则将对应的操作屏蔽掉。图8是根据本发明实施例的防止NAND Flash被误擦除和误写入的架构示意图,如图8所示,该实现方法涉及的器件包含的物理构件主要包括:中央处理器(Central Processing Unit,简称为CPU),逻辑器件(现场可编程门阵列(Field Programmable Gate Array,简称为FPGA)或者复杂可编程逻辑器件(Complex Programmable Logic Device,简称为CPLD)),NAND Flash。By establishing an address protection table for the NAND Flash protection area, in the access to the NAND Flash, the interface signal is parsed, and if there is an erase or program operation on the protected interval, the corresponding operation is masked. FIG. 8 is a schematic diagram of an architecture for preventing NAND flash from being erroneously erased and erroneously written according to an embodiment of the present invention. As shown in FIG. 8 , the physical components included in the implementation method mainly include: a central processing unit (Central Processing Unit) , referred to as CPU), logic device (Field Programmable Gate Array (FPGA) or Complex Programmable Logic Device (CPLD)), NAND Flash.
在该方案中,CPU可以通过控制接口访问逻辑器件的内部Flash,同时向逻辑器件提供Flash接口。CPU访问逻辑器件内部Flash的接口可以是各种类型的,比如IIC,LOCAL BUS,SPI等形式的接口,这些依赖于处理器提供的接口。In this scheme, the CPU can access the internal Flash of the logic device through the control interface while providing the Flash interface to the logic device. The interface that the CPU accesses the internal Flash of the logic device can be various types, such as interfaces in the form of IIC, LOCAL BUS, SPI, etc., which depend on the interface provided by the processor.
逻辑器件可以选用FPGA也可以选用CPLD,当前市场上的各种逻辑器件都具备内置的Flash,地址保护表存放在逻辑器件的Flash中,CPU可以对地址保护表读写访问以及存储。 The logic device can be either FPGA or CPLD. The various logic devices on the market have built-in Flash. The address protection table is stored in the Flash of the logic device. The CPU can read, write, and store the address protection table.
一般来说,保护区可能是启动引导区,Boot区,大版本区,以及其他的重要信息的存储区等。这些保护区所对应的物理block地址都存放在地址保护表中。逻辑器件会将这些block地址所对应的Row Address提取出来,与NAND Flash端口中的Row Address比较,一旦相同,就将擦除或编程命令屏蔽。Generally speaking, the protected area may be a boot area, a boot area, a large version area, and other storage areas for important information. The physical block addresses corresponding to these protected areas are stored in the address protection table. The logic device extracts the Row Address corresponding to these block addresses and compares it with the Row Address in the NAND Flash port. Once the same, the erase or program command is masked.
优选地,该方案还包含保护地址表的建立与更新,NAND Flash接口的信号解析,误擦除与误编程命令的屏蔽,以及状态指示等。Preferably, the solution further includes establishment and update of the protection address table, signal analysis of the NAND Flash interface, masking of the error erasing and misprogramming commands, and status indication.
相对于相关技术中,对Flash存储器的保护一般采用错开地址空间使Flash不能被访问,而且这个方式局限在NOR Flash的应用场合。通过上述地址保护表的方式,实现了对NAND Flash上启动引导区、Boot区、大版本区、以及其他的重要信息的存储区等的防止误擦除与误编程的保护,通过这种保护方法,在对NAND Flash的访问操作中,不需要软件做额外的干预,降低了软件的复杂性,减少了处理器的工作量,提高了系统可靠性。Compared with the related art, the protection of the flash memory generally uses the staggered address space to make the Flash cannot be accessed, and this method is limited to the application of the NOR Flash. Through the above address protection table, the protection against false erase and misprogramming of the boot area, the boot area, the large version area, and other important information storage areas on the NAND Flash is realized, and the protection method is protected by this protection method. In the access operation to NAND Flash, no additional intervention is required by the software, which reduces the complexity of the software, reduces the workload of the processor, and improves the system reliability.
下面结合附图对本发明实施例进行说明。The embodiments of the present invention will be described below with reference to the accompanying drawings.
图9是根据本发明实施例的防止NAND Flash被误擦除和误写入的实现方法功能说明图,如图9所示,基于图1所示架构,该方案的功能构件包括:101处理器(CPU),102 NAND Flash,103地址保护表,104 NAND Flash I/O接口解析器,105 NAND Flash I/O地址过滤器,106访问状态指示器。9 is a functional explanatory diagram of an implementation method for preventing NAND flash from being erroneously erased and erroneously written according to an embodiment of the present invention. As shown in FIG. 9, based on the architecture shown in FIG. 1, the functional components of the scheme include: 101 processors. (CPU), 102 NAND Flash, 103 address protection table, 104 NAND Flash I/O interface parser, 105 NAND Flash I/O address filter, 106 access status indicator.
101处理器(CPU)可以通过控制接口访问逻辑器件的内部Flash中的103地址保护表,同时向逻辑器件提供Flash接口。CPU访问逻辑器件内部Flash的接口可以是各种类型的,比如IIC,LOCAL BUS,SPI等形式的接口,具体接口的类型依赖于CPU。The 101 processor (CPU) can access the 103 address protection table in the internal Flash of the logic device through the control interface, and provide the Flash interface to the logic device. The CPU accesses the internal Flash interface of the logic device. It can be various types, such as IIC, LOCAL BUS, SPI, etc. The type of the specific interface depends on the CPU.
逻辑器件可以选用FPGA也可以选用CPLD,CPU可以对逻辑器件内置的Flash中的103地址保护表进行访问(读写)。逻辑器件中的104 NAND Flash I/O接口解析器对来自CPU的Flash接口的信号进行解析,解析出来的地址与103地址保护表中的比较,105 NAND Flash I/O地址过滤器决定是否屏蔽擦除或编程命令。The logic device can be either FPGA or CPLD. The CPU can access (read and write) the 103 address protection table in the built-in Flash of the logic device. The 104 NAND Flash I/O interface parser in the logic device parses the signal from the CPU's Flash interface. The parsed address is compared with the 103 address protection table. The 105 NAND Flash I/O address filter determines whether to mask the wipe. In addition to or programming commands.
106访问状态指示器指示当前的禁止擦除、编程或允许正常访问的状态。The 106 access status indicator indicates the current state in which erasure, programming, or normal access is prohibited.
在103地址保护表的头部,存有特定的是否需要保护的标志。这个标志可以带有校验位来区别于Flash未写入时的值。 At the head of the 103 address protection table, there is a specific flag for protection. This flag can have a check digit to distinguish it from the value when Flash was not written.
本方案中存储器件是102 NAND Flash,102NAND Flash上的各个block可以被读、擦除、编程。NAND Flash用来存储启动引导代码、Boot代码、大版本代码、其他的重要信息、以及其他一些相对不是太重要的信息等。In this solution, the memory device is 102 NAND Flash, and each block on the 102 NAND Flash can be read, erased, and programmed. NAND Flash is used to store boot code, boot code, large version code, other important information, and other relatively less important information.
图10是根据本发明实施例的防止NAND FLASH被误擦除和误写入的实现方法的流程图,如图10所示,该流程包括如下步骤:FIG. 10 is a flowchart of a method for preventing NAND FLASH from being erroneously erased and erroneously written according to an embodiment of the present invention. As shown in FIG. 10, the process includes the following steps:
步骤A.系统复位或上电后,逻辑器件先使CPU处于复位状态,等待逻辑读出地址保护表;Step A. After the system is reset or powered on, the logic device first causes the CPU to be in a reset state, waiting for the logic to read the address protection table;
步骤B.逻辑从内置的Flash中读出地址保护表;Step B. The logic reads the address protection table from the built-in Flash;
步骤C.如果从地址保护表的头部读出没有需要保护的区间,保护地址则按照逻辑代码中默认的方式处理,比如,透传地址和命令。否则依据flash中信息提取保护区间;Step C. If the interval that does not require protection is read from the head of the address protection table, the protection address is processed in the default manner in the logic code, for example, transparently transmitting the address and the command. Otherwise, the protection interval is extracted according to the information in the flash;
步骤D.逻辑依照提取的保护区间信息,决定需要过滤的地址,比如,被保护block的Row Address;Step D. The logic determines the address to be filtered according to the extracted protection interval information, for example, the Row Address of the protected block;
步骤E.释放处理器CPU的复位,使CPU启动;Step E. Release the reset of the processor CPU to enable the CPU to start;
步骤F.处理器CPU启动后,对NAND Flash访问,逻辑将接口信息采集,首先判断命令的类型,如果解析出的命令不是Erase(擦除)或Program(程序编辑写入),则为读操作(Read),该命令直接透传到NAND Flash,正常访问NAND Flash;Step F. After the processor CPU is started, accessing the NAND Flash, the logic collects the interface information, first determines the type of the command, and if the parsed command is not Erase or Program edit, it is a read operation. (Read), the command is directly transmitted to the NAND Flash, and the normal access to the NAND Flash;
步骤G.如果逻辑解析出的命令是Erase或Program,则比较步骤D中被保护block的Row Address,如果地址不匹配,该命令直接透传到NAND Flash,正常访问NAND Flash;Step G. If the logic parsed command is Erase or Program, compare the Row Address of the protected block in step D. If the address does not match, the command is directly transmitted to the NAND Flash, and the NAND Flash is normally accessed.
步骤H.如果逻辑解析出的命令是Erase或Program,则比较步骤D中被保护block的Row Address,如果地址匹配,将相应的命令屏蔽掉,同时反馈到标示寄存器,显示非法的Erase或Program。Step H. If the logic parsed command is Erase or Program, compare the Row Address of the protected block in step D. If the address matches, the corresponding command is masked and fed back to the flag register to display an illegal Erase or Program.
图11是根据本发明实施例的防止NAND FLASH被误擦除和误写入的实现方法的增加或修改保护区的流程图,如图11所示,如果保护区间需要变更,则该流程包括如下步骤:11 is a flowchart of adding or modifying a protected area to prevent an NAND FLASH from being erased and miswritten by an implementation method according to an embodiment of the present invention. As shown in FIG. 11, if a guard interval needs to be changed, the flow includes the following step:
步骤A.系统后台启动NAND Flash中版本更新; Step A. The system background starts the version update in the NAND Flash;
步骤B.系统通知逻辑,解除逻辑地址保护,对原来设置的NAND FLASH被保护区间的所有命令透传;Step B. The system notifies the logic to release the logical address protection, and transparently transmits all the commands of the originally set NAND FLASH protected interval;
步骤C.系统开始下载更新NAND Flash中的内容;Step C. The system starts downloading and updating the content in the NAND Flash;
步骤D.如果系统下载更新NAND Flash失败,则终止下载更新,同时设置更新失败标志,逻辑恢复原来的逻辑地址保护;Step D. If the system downloads the update NAND Flash fails, the download update is terminated, and the update failure flag is set, and the logical address protection is restored.
步骤E.如果系统下载更新NAND Flash成功,则更新地址保护表,同时设置更新成功标志;Step E. If the system downloads and updates the NAND Flash successfully, the address protection table is updated, and the update success flag is set at the same time;
步骤F.更新地址保护表的保护标志位,表示有需要保护的地址区间;Step F. Update the protection flag of the address protection table to indicate that there is an address range that needs to be protected;
步骤G.逻辑按照更新的地址保护表启动地址过滤。Step G. The logic initiates address filtering in accordance with the updated address protection table.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
如上所述,通过上述实施例及优选实施方式,解决了相关技术中NAND Flash存在被错误擦除与写入引起的存储不可靠的问题,进而达到了不仅能够有效避免重要存储区域被损坏,而且有效地提高了NAND Flash存储数据的可靠性的效果。 As described above, the above embodiments and preferred embodiments solve the problem that the NAND Flash in the related art is unreliable due to erroneous erasure and writing, thereby achieving not only the effective avoidance of the important storage area being damaged, but also The effect of the reliability of the data stored in the NAND Flash is effectively improved.
Claims (11)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410253586.2 | 2014-06-09 | ||
| CN201410253586.2A CN105279094A (en) | 2014-06-09 | 2014-06-09 | NAND Flash operation processing method, NAND Flash operation processing device and logic device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2015188511A1 true WO2015188511A1 (en) | 2015-12-17 |
Family
ID=54832811
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2014/087232 Ceased WO2015188511A1 (en) | 2014-06-09 | 2014-09-23 | Nand flash operation processing method and apparatus, and logic device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105279094A (en) |
| WO (1) | WO2015188511A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116089994A (en) * | 2022-11-25 | 2023-05-09 | 成都长虹网络科技有限责任公司 | Flash key data protection method for ONT product |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107145805B (en) * | 2017-03-21 | 2020-01-17 | 芯海科技(深圳)股份有限公司 | Method for realizing FLASH/MTP internal data anti-false erasing |
| CN107608905B (en) * | 2017-09-11 | 2020-05-12 | 杭州中天微系统有限公司 | Method and device for erasing Flash data |
| CN111966611B (en) * | 2020-08-03 | 2023-12-12 | 南京扬贺扬微电子科技有限公司 | SPI flash memory control chip with logical to physical address architecture |
| CN113407453A (en) * | 2021-06-29 | 2021-09-17 | 芯天下技术股份有限公司 | Verification method and device of data protection bit, electronic equipment and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090050697A1 (en) * | 2007-08-24 | 2009-02-26 | Collier Sparks | Apparatus for distributed data storage of security identification and security access system and method of use thereof |
| CN101799858A (en) * | 2010-04-08 | 2010-08-11 | 华为终端有限公司 | FLASH data protection method and device |
| CN102298555A (en) * | 2011-08-22 | 2011-12-28 | 宜兴市华星特种陶瓷科技有限公司 | Modular flash management system based on Not AND (NAND) technology |
| CN102650973A (en) * | 2011-02-28 | 2012-08-29 | 株式会社东芝 | Memory system capable of prohibiting access to application software and system software |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7467272B2 (en) * | 2004-12-16 | 2008-12-16 | International Business Machines Corporation | Write protection of subroutine return addresses |
| CN101178661B (en) * | 2007-12-14 | 2010-06-02 | 华为技术有限公司 | FLASH integrated BOOTROM realization method and device |
| CN101826059A (en) * | 2010-02-01 | 2010-09-08 | 华为技术有限公司 | Write-protection ring of central protector and storage |
| JP2012203919A (en) * | 2011-03-23 | 2012-10-22 | Toshiba Corp | Semiconductor memory device and control method therefor |
| CN102541969B (en) * | 2011-03-29 | 2015-04-29 | 深圳市江波龙电子有限公司 | File protection method and system based on FAT file system and memory |
| CN102184143B (en) * | 2011-04-25 | 2013-08-14 | 深圳市江波龙电子有限公司 | Data protection method, device and system for storage device |
| CN102207913B (en) * | 2011-06-09 | 2019-05-31 | 中兴通讯股份有限公司 | Control method and device for write protection in embedded system |
| CN102867154B (en) * | 2012-09-12 | 2015-08-12 | 迈普通信技术股份有限公司 | A kind of source code guard method and device |
-
2014
- 2014-06-09 CN CN201410253586.2A patent/CN105279094A/en active Pending
- 2014-09-23 WO PCT/CN2014/087232 patent/WO2015188511A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090050697A1 (en) * | 2007-08-24 | 2009-02-26 | Collier Sparks | Apparatus for distributed data storage of security identification and security access system and method of use thereof |
| CN101799858A (en) * | 2010-04-08 | 2010-08-11 | 华为终端有限公司 | FLASH data protection method and device |
| CN102650973A (en) * | 2011-02-28 | 2012-08-29 | 株式会社东芝 | Memory system capable of prohibiting access to application software and system software |
| CN102298555A (en) * | 2011-08-22 | 2011-12-28 | 宜兴市华星特种陶瓷科技有限公司 | Modular flash management system based on Not AND (NAND) technology |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116089994A (en) * | 2022-11-25 | 2023-05-09 | 成都长虹网络科技有限责任公司 | Flash key data protection method for ONT product |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105279094A (en) | 2016-01-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7890726B1 (en) | Flash memory protection scheme for secured shared BIOS implementation in personal computers with an embedded controller | |
| TWI581099B (en) | Integrated-circuit and method of controlling memory access on the integrated-circuit device | |
| KR100929870B1 (en) | How to keep BIOS security of computer system | |
| US12242739B2 (en) | Transparently attached flash memory security | |
| US20030088728A1 (en) | Method for flashing ESCD and variables into a ROM | |
| WO2015188511A1 (en) | Nand flash operation processing method and apparatus, and logic device | |
| CN107678762B (en) | System version upgrading method and device | |
| US9262631B2 (en) | Embedded device and control method thereof | |
| CN107567629A (en) | Dynamic firmware module loader in credible performing environment container | |
| WO2016155282A1 (en) | Storage partition method and terminal | |
| EP2151755A1 (en) | Electronic device and method for updating bios thereof | |
| US20190370439A1 (en) | Secure system on chip for protecting software program from tampering, rehosting and piracy and method for operating the same | |
| WO2020063975A1 (en) | Partition protection method and apparatus for non-volatile memory | |
| US6405311B1 (en) | Method for storing board revision | |
| CN114721493B (en) | Chip starting method, computer equipment and readable storage medium | |
| CN101639877A (en) | Electronic device and method for updating basic input and output system thereof | |
| CN103366814B (en) | A kind of flash data security protection circuit and method | |
| US20020144104A1 (en) | Method and system for providing a trusted flash boot source | |
| TWI530954B (en) | Apparatuses for securing software code stored in a non-volatile memory | |
| TWI743480B (en) | Computer system and a booting method for the same | |
| US6973564B2 (en) | Automatically initiating a manufacturing mode of a system firmware | |
| US20210240364A1 (en) | Storing new settings for write-protected systems on non-write-protected storage | |
| US11086797B2 (en) | Systems and methods for restricting write access to non-volatile memory | |
| NL2010437C2 (en) | Data storage device and computer system comprising such data storage device. | |
| CN116628767B (en) | Method for preventing flash system firmware attack after system start and flash controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14894598 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 14894598 Country of ref document: EP Kind code of ref document: A1 |